diff --git a/backend/ride/invitor/claim.php b/backend/ride/invitor/claim.php new file mode 100644 index 0000000..1d4fd0b --- /dev/null +++ b/backend/ride/invitor/claim.php @@ -0,0 +1,107 @@ + "failure", "message" => "Invite ID required."]); + exit; + } + + $walletServer = "https://walletintaleq.intaleq.xyz"; // Default + if (strtolower($countryCode) == 'jordan') { + $rewardAmount = 5; + $currency = "JOD"; + $walletServer = $_ENV['WALLET_SERVER_JORDAN'] ?? "https://walletintaleq.intaleq.xyz"; + } elseif (strtolower($countryCode) == 'egypt') { + $rewardAmount = 500; + $currency = "EGP"; + $walletServer = $_ENV['WALLET_SERVER_EGYPT'] ?? "https://walletintaleq.intaleq.xyz"; + } else { + $rewardAmount = 500; // Default Syria + $currency = "SYP"; + $walletServer = $_ENV['WALLET_SERVER_SYRIA'] ?? "https://walletintaleq.intaleq.xyz"; + } + + $walletUrl = "$walletServer/v2/main/ride/payment/add.php"; + + $con->beginTransaction(); + + if (!empty($driverId)) { + // Driver Invitation Reward Logic + $stmt = $con->prepare("SELECT * FROM invit_driver WHERE id = :invite_id AND driverId = :driver_id AND isGiftToken = 0 FOR UPDATE"); + $stmt->execute([':invite_id' => $inviteId, ':driver_id' => $driverId]); + $invitation = $stmt->fetch(PDO::FETCH_ASSOC); + + if ($invitation) { + $upd = $con->prepare("UPDATE invit_driver SET isGiftToken = 1 WHERE id = :invite_id"); + $upd->execute([':invite_id' => $inviteId]); + + // Reward for current driver + addWalletBalance($walletUrl, $driverId, "driver", $rewardAmount); + // Reward for inviter + addWalletBalance($walletUrl, $invitation['driverInviterId'], "driver", $rewardAmount); + + $con->commit(); + echo json_encode(["status" => "success", "message" => "Reward of $rewardAmount $currency claimed successfully."]); + } else { + $con->rollBack(); + echo json_encode(["status" => "failure", "message" => "Invitation not valid or already claimed."]); + } + + } elseif (!empty($passengerId)) { + // Passenger Invitation Reward Logic + $stmt = $con->prepare("SELECT * FROM invit_passenger WHERE id = :invite_id AND passengerInviterId = :passenger_id AND isGiftToken = 0 FOR UPDATE"); + $stmt->execute([':invite_id' => $inviteId, ':passenger_id' => $passengerId]); + $invitation = $stmt->fetch(PDO::FETCH_ASSOC); + + if ($invitation) { + $upd = $con->prepare("UPDATE invit_passenger SET isGiftToken = 1 WHERE id = :invite_id"); + $upd->execute([':invite_id' => $inviteId]); + + // Call Wallet Server + addWalletBalance($walletUrl, $passengerId, "passenger", $rewardAmount); + + $con->commit(); + echo json_encode(["status" => "success", "message" => "Reward of $rewardAmount $currency claimed successfully."]); + } else { + $con->rollBack(); + echo json_encode(["status" => "failure", "message" => "Invitation not valid or already claimed."]); + } + + } else { + echo json_encode(["status" => "failure", "message" => "User ID required."]); + } + +} catch (Exception $e) { + if ($con && $con->inTransaction()) { $con->rollBack(); } + error_log("Error in claim.php: " . $e->getMessage()); + echo json_encode(["status" => "error", "message" => "Server error."]); +} + +function addWalletBalance($url, $userId, $userType, $amount) { + $data = [ + "user_id" => $userId, + "user_type" => $userType, + "amount" => $amount, + "action" => "add", + "reason" => "Invitation Reward" + ]; + + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); + $response = curl_exec($ch); + curl_close($ch); + return $response; +} +?> diff --git a/backend/ride/pricing/get.php b/backend/ride/pricing/get.php new file mode 100644 index 0000000..fd2d399 --- /dev/null +++ b/backend/ride/pricing/get.php @@ -0,0 +1,269 @@ + "failure", "message" => "Country parameter is required"]); + exit; +} + +$price = 0.0; +$price_for_driver = 0.0; +$withCommission = 0.0; +$kazan = 0.0; +$isNightFare = false; + +// Common variables +date_default_timezone_set('Asia/Damascus'); +$currentTime = new DateTime(); +$hour = (int)$currentTime->format('H'); + +switch ($country) { + case 'Syria': + $minFare = 150.0; + break; + case 'Egypt': + $minFare = 20.0; + break; + case 'Jordan': + $minFare = 1.0; + break; + default: + $minFare = 0.0; + break; +} + +// Fetch kazan from DB for the specified country +$sql = "SELECT * FROM `kazan` WHERE country = :country LIMIT 1"; +$stmt = $con->prepare($sql); +$stmt->execute([':country' => $country]); +$kazanRow = $stmt->fetch(PDO::FETCH_ASSOC); + +if (!$kazanRow) { + echo json_encode(["status" => "failure", "message" => "No pricing available for this country"]); + exit; +} + +$result = calculateDynamicPrice($country, $minFare, $distance, $duration, $kazanRow, $startNameAddress, $endNameAddress, $destLat, $destLng, $passengerLat, $passengerLng); +$price = $result['price']; +$price_for_driver = $result['price_for_driver']; +$withCommission = $result['withCommission']; +$kazan = $result['kazan']; +$isNightFare = $result['isNightFare']; + +// ---------------------------------------------------------------------- +// Helper Functions for Countries +// ---------------------------------------------------------------------- + +function calculateDynamicPrice($country, $minFare, $distance, $duration, $kazanRow, $startNameAddress, $endNameAddress, $destLat, $destLng, $passengerLat, $passengerLng) { + $comfortPrice = (float) $kazanRow['comfortPrice']; + $speedPrice = (float) $kazanRow['speedPrice']; + $familyPrice = (float) $kazanRow['familyPrice']; + $deliveryPrice = (float) $kazanRow['deliveryPrice']; + $naturePrice = (float) $kazanRow['naturePrice']; + $heavyPrice = (float) $kazanRow['heavyPrice']; + $latePrice = (float) $kazanRow['latePrice']; + $kazanPercent = (float) $kazanRow['kazan']; + + // === General Settings === + $minBillableKm = 0.2; + $airportAddon = 0.0; + $damascusAirportBoundAddon = 0.0; + + switch ($country) { + case 'Egypt': + $airportAddon = 35.0; + break; + case 'Jordan': + $airportAddon = 5.0; + break; + default: // Syria + $airportAddon = 200.0; + $damascusAirportBoundAddon = 1400.0; + break; + } + + $longSpeedThresholdKm = 40.0; + $longSpeedPerKm = 26.0; + + $mediumDistThresholdKm = 25.0; + $longDistThresholdKm = 35.0; + $longTripPerMin = 6.0; + $minuteCapMedium = 60; + $minuteCapLong = 80; + $freeMinutesLong = 10; + + $extraReduction100 = 0.07; + $maxReductionCap = 0.35; + + $totalMinutes = floor($duration / 60); + + $airportCtx = (stripos($startNameAddress, 'airport') !== false || stripos($startNameAddress, 'مطار') !== false || stripos($endNameAddress, 'airport') !== false || stripos($endNameAddress, 'مطار') !== false); + $clubCtx = (stripos($startNameAddress, 'club') !== false || stripos($startNameAddress, 'ديسكو') !== false || stripos($endNameAddress, 'club') !== false || stripos($endNameAddress, 'ديسكو') !== false); + + $northLat = 33.415313; + $southLat = 33.400265; + $eastLng = 36.531505; + $westLng = 36.499687; + $damascusAirportBoundCtx = ($destLat <= $northLat && $destLat >= $southLat && $destLng <= $eastLng && $destLng >= $westLng); + $isInDamascusAirportBoundCtx = ($passengerLat <= $northLat && $passengerLat >= $southLat && $passengerLng <= $eastLng && $passengerLng >= $westLng); + + $billableDistance = ($distance < $minBillableKm) ? $minBillableKm : $distance; + $isLongSpeed = $billableDistance > $longSpeedThresholdKm; + $perKmSpeedBaseFromServer = $speedPrice; + $perKmSpeed = $isLongSpeed ? $longSpeedPerKm : $perKmSpeedBaseFromServer; + + $reductionPct40 = 0.0; + if ($perKmSpeedBaseFromServer > 0) { + $r = 1.0 - ($longSpeedPerKm / $perKmSpeedBaseFromServer); + $reductionPct40 = max(0.0, min($maxReductionCap, $r)); + } + $reductionPct100 = max(0.0, min($maxReductionCap, $reductionPct40 + $extraReduction100)); + + $distanceReduction = 0.0; + if ($billableDistance > 100.0) { + $distanceReduction = $reductionPct100; + } else if ($billableDistance > 40.0) { + $distanceReduction = $reductionPct40; + } + + date_default_timezone_set('Asia/Damascus'); + $hour = (int)date('H'); + $effectivePerMin = $naturePrice; + if ($hour >= 21 || $hour < 1) { + $effectivePerMin = $latePrice; + } else if ($hour >= 1 && $hour < 5) { + $effectivePerMin = $clubCtx ? ($latePrice * 2) : $latePrice; + } else if ($hour >= 14 && $hour <= 17) { + $effectivePerMin = $heavyPrice; + } + + $billableMinutes = $totalMinutes; + if ($billableDistance > $longDistThresholdKm) { + $effectivePerMin = $longTripPerMin; + $capped = ($billableMinutes > $minuteCapLong) ? $minuteCapLong : $billableMinutes; + $billableMinutes = max(0, $capped - $freeMinutesLong); + } else if ($billableDistance > $mediumDistThresholdKm) { + $effectivePerMin = $longTripPerMin; + $billableMinutes = ($billableMinutes > $minuteCapMedium) ? $minuteCapMedium : $billableMinutes; + } + + $fare = $billableDistance * $perKmSpeed; + $fare += $billableMinutes * $effectivePerMin; + if ($airportCtx) $fare += $airportAddon; + if ($damascusAirportBoundCtx || $isInDamascusAirportBoundCtx) { + $fare += $damascusAirportBoundAddon; + } + + $price = max($fare, $minFare); + + // Apply kazan (e.g. 11%) + $withCommission = ceil($price * (1 + $kazanPercent / 100)); + $kazan = $withCommission - $price; + $price_for_driver = $price; + + return [ + 'price' => $price, + 'price_for_driver' => $price_for_driver, + 'withCommission' => $withCommission, + 'kazan' => $kazan, + 'isNightFare' => false + ]; +} + +// 2. Validate Promo Code +$discount = 0; +if (!empty($promo_code)) { + $sqlPromo = "SELECT amount FROM `promos` + WHERE promo_code = :promo_code + AND (passengerID = :passenger_id OR passengerID LIKE '%all%') + AND validity_start_date <= CURDATE() + AND validity_end_date >= CURDATE()"; + $stmtPromo = $con->prepare($sqlPromo); + $stmtPromo->execute([ + ':promo_code' => $promo_code, + ':passenger_id' => $passenger_id + ]); + if ($stmtPromo->rowCount() > 0) { + $promoData = $stmtPromo->fetch(PDO::FETCH_ASSOC); + $discount = (float) $promoData['amount']; + } +} + +// 3. Fetch Passenger Wallet (Negative Balance / Debt) +// Using Redis for ultra-fast reads, with a fallback to the Payment Server API. +$negativeBalance = 0; +if (!empty($passenger_id)) { + try { + $redis = new Redis(); + $redis->connect('127.0.0.1', 6379); + $redisKey = "passenger_debt_" . $passenger_id; + + $redisDebt = $redis->get($redisKey); + + if ($redisDebt !== false) { + $negativeBalance = (float) $redisDebt; + } else { + // Fallback: If not in Redis, call the Payment Server Endpoint + // TODO: Replace with the actual Payment Server Endpoint URL and API Key + /* + $paymentApiUrl = "https://payment.siroapp.com/api/get_debt?passenger_id=" . urlencode($passenger_id); + $options = [ + "http" => [ + "header" => "Authorization: Bearer YOUR_API_KEY\r\n" + ] + ]; + $context = stream_context_create($options); + $response = file_get_contents($paymentApiUrl, false, $context); + if ($response !== false) { + $data = json_decode($response, true); + if (isset($data['debt'])) { + $negativeBalance = (float) $data['debt']; + // Cache the result in Redis for future pricing calls (e.g. 1 hour) + $redis->setex($redisKey, 3600, $negativeBalance); + } + } + */ + } + } catch (Exception $e) { + // If Redis fails, gracefully default to 0 or fallback API + $negativeBalance = 0; + } +} + +$prices = ['total' => $withCommission]; + +// 4. Apply Discount and Negative Balance +foreach ($prices as $key => $price) { + // Apply discount (Assuming percentage discount if amount <= 100, else fixed amount) + if ($discount > 0 && $discount <= 100) { + $prices[$key] = max(0, $price - ($price * ($discount / 100))); + } else { + $prices[$key] = max(0, $price - $discount); + } + + // Add negative balance + $prices[$key] += $negativeBalance; +} + +echo json_encode([ + 'status' => 'success', + 'data' => $prices, + 'applied_discount' => $discount, + 'added_negative_balance' => $negativeBalance +]); +?> diff --git a/backend/ride/rides/cancel_ride_by_driver.php b/backend/ride/rides/cancel_ride_by_driver.php index d2e54ee..dd253bc 100755 --- a/backend/ride/rides/cancel_ride_by_driver.php +++ b/backend/ride/rides/cancel_ride_by_driver.php @@ -12,6 +12,7 @@ $rideId = filterRequest("ride_id"); $driverId = filterRequest("driver_id"); $reason = filterRequest("reason"); $passengerToken = filterRequest("passenger_token"); +$penaltyFee = (float) filterRequest("penalty_fee"); // تثبيت الحالة $statusText = "CancelFromDriverAfterApply"; @@ -92,6 +93,27 @@ try { if (function_exists('notifyPassengerOnRideServer')) { notifyPassengerOnRideServer($passenger_id, $socketPayload); } + + // 4.1. إضافة غرامة الإلغاء على الراكب (الدين) إذا كانت موجودة + if ($penaltyFee > 0) { + // إضافة القيمة كدين سالب في المحفظة + $negativeDebt = -$penaltyFee; + $stmtWallet = $con->prepare("INSERT INTO `passengerWallet` (passenger_id, balance) VALUES (?, ?)"); + $stmtWallet->execute([$passenger_id, $negativeDebt]); + + // تخزين الدين في الـ Redis لمدة 6 شهور (15552000 ثانية) + try { + $redis = new Redis(); + $redis->connect('127.0.0.1', 6379); + $redisKey = "passenger_debt_" . $passenger_id; + // إضافة الدين الجديد إلى الدين السابق إن وجد + $currentDebt = (float) $redis->get($redisKey); + $newDebt = $currentDebt + $negativeDebt; + $redis->setex($redisKey, 15552000, $newDebt); + } catch (Exception $e) { + error_log("Redis Error: " . $e->getMessage()); + } + } } // ب) FCM (Internal) diff --git a/backend/ride/rides/start_ride.php b/backend/ride/rides/start_ride.php index 82fe456..b9dc69b 100755 --- a/backend/ride/rides/start_ride.php +++ b/backend/ride/rides/start_ride.php @@ -58,6 +58,30 @@ try { $stmtPas->execute([$ride_id]); $passenger_id = $stmtPas->fetchColumn(); + // 2.5 تصفير الدين من Redis عند بدء الرحلة (كما طلبت) + if ($passenger_id) { + try { + $redis = new Redis(); + $redis->connect('127.0.0.1', 6379); + $redisKey = "passenger_debt_" . $passenger_id; + + // قراءة الدين الحالي من Redis قبل الحذف (إن لزم الأمر للتسجيل مستقبلاً) + $currentDebt = (float) $redis->get($redisKey); + + // تصفير / حذف الدين + $redis->del($redisKey); + + // يمكنك هنا أيضاً إدراج حركة معاكسة في جدول passengerWallet إذا أردت تسوية قاعدة البيانات + if ($currentDebt < 0) { + $positiveOffset = abs($currentDebt); + $stmtWallet = $con->prepare("INSERT INTO `passengerWallet` (passenger_id, balance) VALUES (?, ?)"); + $stmtWallet->execute([$passenger_id, $positiveOffset]); + } + } catch (Exception $e) { + error_log("Redis Error (zeroing debt): " . $e->getMessage()); + } + } + if ($passenger_id) { // أ) إرسال السوكيت (Socket) diff --git a/backend/ride/tips/add.php b/backend/ride/tips/add.php index d083e4a..4acff87 100755 --- a/backend/ride/tips/add.php +++ b/backend/ride/tips/add.php @@ -6,27 +6,91 @@ $passengerID = filterRequest("passengerID"); $driverID = filterRequest("driverID"); $rideID = filterRequest("rideID"); $tipAmount = filterRequest("tipAmount"); +$countryCode = filterRequest("country_code"); // sent from flutter // تحقق من صحة قيمة البقشيش -if (!is_numeric($tipAmount) || $tipAmount < 0 || $tipAmount > 99999999.99) { - jsonError("Invalid tip amount."); +if (!is_numeric($tipAmount) || $tipAmount <= 0 || $tipAmount > 99999999.99) { + echo json_encode(["status" => "failure", "message" => "Invalid tip amount."]); exit(); } -// إدراج بيانات البقشيش -$sql = "INSERT INTO `tips` (`driverID`, `passengerID`, `rideID`, `tipAmount`) - VALUES (:driverID, :passengerID, :rideID, :tipAmount)"; +$con->beginTransaction(); -$stmt = $con->prepare($sql); -$stmt->bindParam(':driverID', $driverID); -$stmt->bindParam(':passengerID', $passengerID); -$stmt->bindParam(':rideID', $rideID); -$stmt->bindParam(':tipAmount', $tipAmount); +try { + // إدراج بيانات البقشيش + $sql = "INSERT INTO `tips` (`driverID`, `passengerID`, `rideID`, `tipAmount`) + VALUES (:driverID, :passengerID, :rideID, :tipAmount)"; + + $stmt = $con->prepare($sql); + $stmt->execute([ + ':driverID' => $driverID, + ':passengerID' => $passengerID, + ':rideID' => $rideID, + ':tipAmount' => $tipAmount + ]); + + if ($stmt->rowCount() > 0) { + $walletServer = "https://walletintaleq.intaleq.xyz"; // Default + if (strtolower($countryCode) == 'jordan') { + $walletServer = $_ENV['WALLET_SERVER_JORDAN'] ?? "https://walletintaleq.intaleq.xyz"; + } elseif (strtolower($countryCode) == 'egypt') { + $walletServer = $_ENV['WALLET_SERVER_EGYPT'] ?? "https://walletintaleq.intaleq.xyz"; + } else { + $walletServer = $_ENV['WALLET_SERVER_SYRIA'] ?? "https://walletintaleq.intaleq.xyz"; + } -// تنفيذ العملية -if ($stmt->execute() && $stmt->rowCount() > 0) { - jsonSuccess(null, "Tip inserted successfully"); -} else { - jsonError("Failed to save tip information"); + // Amount logic depending on country (as done previously in flutter) + $driverTipAmount = $tipAmount; + if (strtolower($countryCode) == 'egypt') { + $driverTipAmount = round($tipAmount, 0); // Egypt + } else { + $driverTipAmount = $tipAmount * 100; // Syria and Jordan use * 100 + } + + // 1. Deduct from passenger + $urlPassenger = "$walletServer/v2/main/ride/payment/add.php"; + $dataPassenger = [ + "user_id" => $passengerID, + "user_type" => "passenger", + "amount" => -1 * $tipAmount, // negative + "action" => "subtract", + "reason" => "Tip Deduction" + ]; + + $ch1 = curl_init($urlPassenger); + curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch1, CURLOPT_POST, true); + curl_setopt($ch1, CURLOPT_POSTFIELDS, http_build_query($dataPassenger)); + $resPassenger = curl_exec($ch1); + curl_close($ch1); + + // 2. Add to Driver + $urlDriver = "$walletServer/v2/main/ride/payment/add.php"; + $dataDriver = [ + "user_id" => $driverID, + "user_type" => "driver", + "amount" => $driverTipAmount, + "action" => "add", + "paymentID" => $rideID . "tip", + "paymentMethod" => "visa-tip" + ]; + + $ch2 = curl_init($urlDriver); + curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch2, CURLOPT_POST, true); + curl_setopt($ch2, CURLOPT_POSTFIELDS, http_build_query($dataDriver)); + $resDriver = curl_exec($ch2); + curl_close($ch2); + + $con->commit(); + echo json_encode(["status" => "success", "message" => "Tip inserted and wallet updated"]); + } else { + $con->rollBack(); + echo json_encode(["status" => "failure", "message" => "Failed to save tip information"]); + } +} catch (Exception $e) { + $con->rollBack(); + error_log("Error in addTips: " . $e->getMessage()); + echo json_encode(["status" => "failure", "message" => "Server error"]); } ?> \ No newline at end of file diff --git a/bottomsheet.diff b/bottomsheet.diff new file mode 100644 index 0000000..416eba6 --- /dev/null +++ b/bottomsheet.diff @@ -0,0 +1,572 @@ +commit d8901e1a879f696e512e13d389d666baae33dc84 +Author: Hamza-Ayed +Date: Tue Jun 9 08:40:31 2026 +0300 + + first commit + +diff --git a/siro_rider/lib/views/home/map_widget.dart/buttom_sheet_map_show.dart b/siro_rider/lib/views/home/map_widget.dart/buttom_sheet_map_show.dart +new file mode 100644 +index 0000000..c3dee90 +--- /dev/null ++++ b/siro_rider/lib/views/home/map_widget.dart/buttom_sheet_map_show.dart +@@ -0,0 +1,560 @@ ++import 'package:flutter/material.dart'; ++import 'package:get/get.dart'; ++import 'package:siro_rider/controller/payment/payment_controller.dart'; ++ ++import '../../../constant/style.dart'; ++import '../../../controller/home/map/ride_lifecycle_controller.dart'; ++ ++GetBuilder buttomSheetMapPage() { ++ Get.put(PaymentController()); ++ return GetBuilder( ++ builder: (controller) => ++ controller.isBottomSheetShown && controller.rideConfirm == false ++ ? const Positioned( ++ left: 5, ++ bottom: 0, ++ right: 5, ++ child: Column( ++ // children: [ ++ // Row( ++ // mainAxisAlignment: MainAxisAlignment.end, ++ // children: [ ++ // double.parse(box.read(BoxName.passengerWalletTotal)) < ++ // 0 && ++ // controller.data.isNotEmpty ++ // ? Container( ++ // decoration: AppStyle.boxDecoration ++ // .copyWith(color: AppColor.redColor), ++ // height: 50, ++ // width: Get.width * .94, ++ // child: Padding( ++ // padding: ++ // const EdgeInsets.symmetric(horizontal: 8), ++ // child: Text( ++ // 'Your trip cost is'.tr + ++ // ' ${controller.totalCostPassenger.toStringAsFixed(2)} ' ++ // 'But you have a negative salary of' ++ // .tr + ++ // '${double.parse(box.read(BoxName.passengerWalletTotal)).toStringAsFixed(2)}' ++ // ' in your' ++ // .tr + ++ // ' ${AppInformation.appName}' ++ // ' wallet due to a previous trip.' ++ // .tr, ++ // style: AppStyle.subtitle, ++ // ), ++ // )) ++ // : const SizedBox(), ++ // ], ++ // ), ++ // const SizedBox( ++ // height: 5, ++ // ), ++ // AnimatedContainer( ++ // // clipBehavior: Clip.antiAliasWithSaveLayer, ++ // curve: Curves.easeInCirc, ++ // onEnd: () { ++ // controller.height = 250; ++ // }, ++ // height: controller.heightBottomSheetShown, ++ // duration: const Duration(seconds: 2), ++ // child: Column( ++ // children: [ ++ // controller.data.isEmpty ++ // ? const SizedBox() ++ // : Container( ++ // // width: Get.width * .9, ++ // height: 100, ++ // decoration: BoxDecoration( ++ // color: AppColor.secondaryColor, ++ // boxShadow: [ ++ // const BoxShadow( ++ // color: AppColor.accentColor, ++ // offset: Offset(2, 2)), ++ // BoxShadow( ++ // color: AppColor.accentColor ++ // .withOpacity(.4), ++ // offset: const Offset(-2, -2)) ++ // ], ++ // borderRadius: const BorderRadius.all( ++ // Radius.circular(15))), ++ // child: ListView.builder( ++ // scrollDirection: Axis.horizontal, ++ // itemCount: controller ++ // .dataCarsLocationByPassenger.length - ++ // 1, ++ // itemBuilder: ++ // (BuildContext context, int index) { ++ // return Container( ++ // color: controller.gender == 'Female' ++ // ? const Color.fromARGB( ++ // 255, 246, 52, 181) ++ // : AppColor.secondaryColor, ++ // width: Get.width, ++ // child: Row( ++ // mainAxisAlignment: ++ // MainAxisAlignment.spaceBetween, ++ // children: [ ++ // SizedBox( ++ // width: Get.width * .15, ++ // child: Padding( ++ // padding: ++ // const EdgeInsets.all(8.0), ++ // child: Image.asset( ++ // 'assets/images/jeep.png', ++ // width: 50, ++ // fit: BoxFit.fill, ++ // repeat: ImageRepeat.repeatX, ++ // ), ++ // ), ++ // ), ++ // SizedBox( ++ // width: Get.width * .55, ++ // child: Column( ++ // crossAxisAlignment: ++ // CrossAxisAlignment.start, ++ // mainAxisAlignment: ++ // MainAxisAlignment.spaceEvenly, ++ // children: [ ++ // Text( ++ // controller.hours > 0 ++ // ? '${'Your Ride Duration is '.tr}${controller.hours} ${'H and'.tr} ${controller.minutes} ${'m'.tr}' ++ // : '${'Your Ride Duration is '.tr} ${controller.minutes} m', ++ // style: AppStyle.subtitle, ++ // ), ++ // // Text( ++ // // '${'You will be thier in'.tr} ${DateFormat('h:mm a').format(controller.newTime)}', ++ // // style: AppStyle.subtitle, ++ // // ), ++ // Text( ++ // '${'Your trip distance is'.tr} ${controller.distance.toStringAsFixed(2)} ${'KM'.tr}', ++ // style: AppStyle.subtitle, ++ // ) ++ // ], ++ // ), ++ // ), ++ // SizedBox( ++ // width: Get.width * .2, ++ // child: Padding( ++ // padding: const EdgeInsets.only( ++ // right: 5, left: 5), ++ // child: Column( ++ // crossAxisAlignment: ++ // CrossAxisAlignment.center, ++ // children: [ ++ // Container( ++ // width: Get.width * .14, ++ // height: Get.height * .06, ++ // decoration: BoxDecoration( ++ // color: AppColor ++ // .secondaryColor, ++ // shape: ++ // BoxShape.rectangle, ++ // border: Border.all( ++ // width: 2, ++ // color: AppColor ++ // .greenColor)), ++ // child: Center( ++ // child: Text( ++ // '${'Fee is'.tr} \n${controller.totalPassenger.toStringAsFixed(2)}', ++ // style: ++ // AppStyle.subtitle, ++ // ), ++ // ), ++ // ), ++ // controller.promoTaken ++ // ? const Icon( ++ // Icons ++ // .filter_vintage_rounded, ++ // color: ++ // AppColor.redColor, ++ // ) ++ // : const SizedBox( ++ // height: 0, ++ // ) ++ // ], ++ // ), ++ // ), ++ // ), ++ // ], ++ // ), ++ // ); ++ // }, ++ // ), ++ // ), ++ // const SizedBox( ++ // height: 5, ++ // ), ++ // Container( ++ // // height: 130, ++ // decoration: BoxDecoration( ++ // color: AppColor.secondaryColor, ++ // boxShadow: [ ++ // const BoxShadow( ++ // color: AppColor.accentColor, ++ // offset: Offset(2, 2)), ++ // BoxShadow( ++ // color: AppColor.accentColor.withOpacity(.4), ++ // offset: const Offset(-2, -2)) ++ // ], ++ // borderRadius: ++ // const BorderRadius.all(Radius.circular(15))), ++ // child: controller.data.isEmpty ++ // ? const SizedBox() ++ // : Center( ++ // child: Padding( ++ // padding: const EdgeInsets.symmetric( ++ // horizontal: 5), ++ // child: Column( ++ // children: [ ++ // Row( ++ // children: [ ++ // const Icon( ++ // Icons.location_on, ++ // color: AppColor.redColor, ++ // ), ++ // const SizedBox( ++ // width: 10, ++ // ), ++ // Text( ++ // 'From : '.tr, ++ // style: AppStyle.subtitle, ++ // ), ++ // Text( ++ // controller.data[0] ++ // ['start_address'] ++ // .toString(), ++ // style: AppStyle.subtitle, ++ // ) ++ // ], ++ // ), ++ // Row( ++ // children: [ ++ // const Icon(Icons ++ // .location_searching_rounded), ++ // const SizedBox( ++ // width: 10, ++ // ), ++ // Text( ++ // 'To : '.tr, ++ // style: AppStyle.subtitle, ++ // ), ++ // Text( ++ // controller.data[0]['end_address'], ++ // style: AppStyle.subtitle, ++ // ), ++ // ], ++ // ), ++ // const Divider( ++ // color: AppColor.accentColor, ++ // thickness: 1, ++ // height: 2, ++ // indent: 1, ++ // ), ++ // SizedBox( ++ // height: 40, ++ // child: Row( ++ // mainAxisAlignment: ++ // MainAxisAlignment.center, ++ // children: [ ++ // Container( ++ // decoration: BoxDecoration( ++ // color: ++ // AppColor.secondaryColor, ++ // borderRadius: ++ // BorderRadius.circular(12), ++ // // border: Border.all(), ++ // ), ++ // child: Row( ++ // children: [ ++ // Icon( ++ // Icons.monetization_on, ++ // color: Colors.green[400], ++ // ), ++ // InkWell( ++ // onTap: () async { ++ // controller ++ // .changeCashConfirmPageShown(); ++ // Get.find< ++ // PaymentController>() ++ // .getPassengerWallet(); ++ // }, ++ // child: GetBuilder< ++ // PaymentController>( ++ // builder: (paymentController) => ++ // paymentController ++ // .isCashChecked ++ // ? Text( ++ // 'CASH', ++ // style: AppStyle ++ // .title, ++ // ) ++ // : Text( ++ // '${AppInformation.appName} Wallet', ++ // style: AppStyle ++ // .title, ++ // ), ++ // ), ++ // ), ++ // ], ++ // ), ++ // ), ++ // const SizedBox( ++ // width: 40, ++ // ), ++ // GetBuilder( ++ // builder: ++ // (paymentController) => ++ // Container( ++ // decoration: ++ // BoxDecoration( ++ // color: AppColor ++ // .secondaryColor, ++ // borderRadius: ++ // BorderRadius ++ // .circular( ++ // 12), ++ // ), ++ // child: Row( ++ // children: [ ++ // Icon( ++ // Icons ++ // .qr_code_2_rounded, ++ // color: Colors ++ // .green[ ++ // 400], ++ // ), ++ // InkWell( ++ // onTap: () { ++ // if (controller ++ // .promoTaken == ++ // false) { ++ // Get.defaultDialog( ++ // title: 'Add Promo'.tr, ++ // titleStyle: AppStyle.title, ++ // content: Column( ++ // children: [ ++ // SizedBox( ++ // width: Get.width * .7, ++ // child: TextFormField( ++ // controller: controller.promo, ++ // decoration: InputDecoration( ++ // labelText: 'Promo Code'.tr, ++ // hintText: 'Enter promo code'.tr, ++ // labelStyle: AppStyle.subtitle, ++ // hintStyle: AppStyle.subtitle, ++ // border: OutlineInputBorder( ++ // borderRadius: BorderRadius.circular(10), ++ // ), ++ // filled: true, ++ // fillColor: Colors.grey[200], ++ // focusedBorder: OutlineInputBorder( ++ // borderSide: const BorderSide( ++ // color: AppColor.primaryColor, ++ // width: 2.0, ++ // ), ++ // borderRadius: BorderRadius.circular(10), ++ // ), ++ // errorBorder: OutlineInputBorder( ++ // borderSide: const BorderSide( ++ // color: Colors.red, ++ // width: 2.0, ++ // ), ++ // borderRadius: BorderRadius.circular(10), ++ // ), ++ // enabledBorder: OutlineInputBorder( ++ // borderSide: const BorderSide( ++ // color: Colors.grey, ++ // width: 1.0, ++ // ), ++ // borderRadius: BorderRadius.circular(10), ++ // ), ++ // ), ++ // ), ++ // ), ++ // MyElevatedButton( ++ // title: 'Add Promo'.tr, ++ // onPressed: () async { ++ // controller.applyPromoCodeToPassenger(); ++ // }, ++ // ) ++ // ], ++ // )); ++ // } else { ++ // Get.snackbar( ++ // 'You have promo!' ++ // .tr, ++ // '', ++ // backgroundColor: ++ // AppColor.redColor); ++ // } ++ // }, ++ // child: Text( ++ // 'Add Promo' ++ // .tr, ++ // style: AppStyle ++ // .title, ++ // ), ++ // ), ++ // ], ++ // ), ++ // )), ++ // ], ++ // ), ++ // ), ++ // SizedBox( ++ // width: Get.width * .95, ++ // child: Row( ++ // mainAxisAlignment: ++ // MainAxisAlignment.center, ++ // children: [ ++ // controller.isCashSelectedBeforeConfirmRide == ++ // false ++ // ? MyElevatedButton( ++ // title: 'Next'.tr, ++ // onPressed: () { ++ // controller ++ // .changeCashConfirmPageShown(); ++ // }, ++ // ) ++ // : ++ // // controller.isPassengerChosen == ++ // // false ++ // // ? MyElevatedButton( ++ // // title: 'Next'.tr, ++ // // onPressed: () { ++ // // controller ++ // // .onChangedPassengersChoose(); ++ // // Get.defaultDialog( ++ // // barrierDismissible: ++ // // false, ++ // // title: ++ // // 'How Many Passengers?' ++ // // .tr, ++ // // titleStyle: ++ // // AppStyle ++ // // .title, ++ // // content: ++ // // Column( ++ // // children: [ ++ // // Text( ++ // // 'Allowed up to 4 Passengers.' ++ // // .tr, ++ // // style: AppStyle ++ // // .title, ++ // // ), ++ // // SizedBox( ++ // // height: ++ // // 200, // Set the desired height here ++ // // child: ++ // // CupertinoPicker( ++ // // itemExtent: ++ // // 32, ++ // // onSelectedItemChanged: ++ // // (index) { ++ // // controller.onChangedPassengerCount(index + ++ // // 1); ++ // // }, ++ // // children: [ ++ // // Text('1 Passenger'.tr), ++ // // Text('2 Passengers'.tr), ++ // // Text('3 Passengers'.tr), ++ // // Text('4 Passengers'.tr), ++ // // ], ++ // // ), ++ // // ), ++ // // MyElevatedButton( ++ // // title: ++ // // 'Back', ++ // // onPressed: ++ // // () => ++ // // Get.back(), ++ // // ) ++ // // ], ++ // // ), ++ // // ); ++ // // }, ++ // // ) ++ // // : ++ // MyElevatedButton( ++ // title: 'Confirm Selection' ++ // .tr, ++ // onPressed: () { ++ // controller ++ // .confirmRideForFirstDriver(); ++ // }, ++ // ), ++ // ], ++ // ), ++ // ) ++ // ], ++ // ), ++ // ), ++ // ), ++ // ), ++ // ], ++ // ), ++ // ), ++ // ], ++ ), ++ ) ++ : const SizedBox()); ++} ++ ++class Details extends StatelessWidget { ++ const Details({ ++ super.key, ++ }); ++ ++ @override ++ Widget build(BuildContext context) { ++ return GetBuilder( ++ builder: (controller) => Column( ++ children: [ ++ Row( ++ mainAxisAlignment: MainAxisAlignment.spaceAround, ++ children: [ ++ Text( ++ '${'Distance is'.tr} ${controller.distance.toStringAsFixed(2)} KM', ++ style: AppStyle.title, ++ ), ++ Text( ++ '${'Duration is'.tr} ${controller.data[0]['duration']['text']}', ++ style: AppStyle.title, ++ ), ++ ], ++ ), ++ Row( ++ mainAxisAlignment: MainAxisAlignment.spaceAround, ++ children: [ ++ Text( ++ 'Cost for .21/km ${controller.costDistance.toStringAsFixed(2)} ', ++ style: AppStyle.title, ++ ), ++ Text( ++ '${'Cost Duration'.tr} ${controller.averageDuration.toStringAsFixed(2)} is ${controller.costDuration.toStringAsFixed(2)} ', ++ style: AppStyle.title, ++ ), ++ ], ++ ), ++ Row( ++ mainAxisAlignment: MainAxisAlignment.spaceAround, ++ children: [ ++ Text( ++ 'Total Driver ${controller.totalDriver.toStringAsFixed(2)}', ++ style: AppStyle.title, ++ ), ++ Text( ++ 'totaME ${controller.totalME.toStringAsFixed(2)} ', ++ style: AppStyle.title, ++ ), ++ ], ++ ), ++ Text( ++ 'Cost for passenger ${controller.totalPassenger.toStringAsFixed(2)} ', ++ style: AppStyle.title, ++ ), ++ ], ++ )); ++ } ++} diff --git a/cleanup_kazan.py b/cleanup_kazan.py new file mode 100644 index 0000000..2b2a9eb --- /dev/null +++ b/cleanup_kazan.py @@ -0,0 +1,26 @@ +import sys +import re + +def cleanup(filepath): + with open(filepath, 'r') as f: + content = f.read() + + # Remove double kazan = 8; + content = re.sub(r'\s*double kazan = 8;', '', content) + + # Remove unawaited(getKazanPercent()); + content = re.sub(r'\s*unawaited\(getKazanPercent\(\)\);', '', content) + + # Remove await getKazanPercent(); + content = re.sub(r'\s*await getKazanPercent\(\);', '', content) + + # Remove getKazanPercent method + kazan_method_pattern = re.compile(r'Future getKazanPercent\(\) async \{.*?\} catch \(e\) \{.*?\}\s*\}', re.DOTALL) + content = kazan_method_pattern.sub('', content) + + with open(filepath, 'w') as f: + f.write(content) + print(f"Cleaned up {filepath}") + +if __name__ == '__main__': + cleanup(sys.argv[1]) diff --git a/fix_translations.py b/fix_translations.py new file mode 100644 index 0000000..19ddcab --- /dev/null +++ b/fix_translations.py @@ -0,0 +1,62 @@ +import sys +import re + +def fix_translations(filepath): + with open(filepath, 'r') as f: + content = f.read() + + # Pattern to match "SYP": "..." and inject "EGP" and "JOD" right after it. + def replace_syp(match): + syp_line = match.group(0) # e.g. "SYP": "ل.س", + syp_val = match.group(1) # e.g. ل.س + + # Decide what EGP and JOD should be based on the SYP translation + if 'ل.س' in syp_val: + egp_val = syp_val.replace('ل.س', 'ج.م') + jod_val = syp_val.replace('ل.س', 'د.أ') + elif 'SYP' in syp_val: + egp_val = syp_val.replace('SYP', 'EGP') + jod_val = syp_val.replace('SYP', 'JOD') + else: + # Fallback + egp_val = 'EGP' + jod_val = 'JOD' + + egp_line = syp_line.replace('SYP', 'EGP').replace(syp_val, egp_val) + jod_line = syp_line.replace('SYP', 'JOD').replace(syp_val, jod_val) + + return f'{syp_line}\n {egp_line}\n {jod_line}' + + # "SYP": "ل.س", + content = re.sub(r'"SYP"\s*:\s*"([^"]+)",', replace_syp, content) + + # "You have gift 300 SYP": "عندك هدية 300 ل.س", + content = re.sub(r'"You have gift 300 SYP"\s*:\s*"([^"]+)",', replace_syp, content) + + # "You have gift 30000 SYP": "عندك هدية 30000 ل.س", + content = re.sub(r'"You have gift 30000 SYP"\s*:\s*"([^"]+)",', replace_syp, content) + + with open(filepath, 'w') as f: + f.write(content) + print(f"Fixed {filepath}") + +def fix_json(filepath): + with open(filepath, 'r') as f: + content = f.read() + + def replace_syp_json(match): + syp_line = match.group(0) + egp_line = syp_line.replace('SYP', 'EGP') + jod_line = syp_line.replace('SYP', 'JOD') + return f'{syp_line}\n {egp_line}\n {jod_line}' + + content = re.sub(r'"Points"\s*:\s*"SYP",', replace_syp_json, content) + + with open(filepath, 'w') as f: + f.write(content) + print(f"Fixed {filepath}") + +if __name__ == '__main__': + fix_translations('siro_rider/lib/controller/local/translations.dart') + fix_translations('siro_driver/lib/controller/local/translations.dart') + fix_json('siro_driver/lib/translations_en.json') diff --git a/git_cost.diff b/git_cost.diff new file mode 100644 index 0000000..a2a0f73 --- /dev/null +++ b/git_cost.diff @@ -0,0 +1,4570 @@ +commit d8901e1a879f696e512e13d389d666baae33dc84 +Author: Hamza-Ayed +Date: Tue Jun 9 08:40:31 2026 +0300 + + first commit + +diff --git a/siro_rider/lib/controller/home/map/ride_lifecycle_controller.dart b/siro_rider/lib/controller/home/map/ride_lifecycle_controller.dart +new file mode 100644 +index 0000000..c229ad2 +--- /dev/null ++++ b/siro_rider/lib/controller/home/map/ride_lifecycle_controller.dart +@@ -0,0 +1,4558 @@ ++import 'dart:async'; ++import 'dart:convert'; ++import 'dart:ui'; ++import 'dart:math' show cos, max, min, pi, pow, sin, atan2; ++import 'package:flutter/foundation.dart'; ++import 'package:flutter/material.dart'; ++import 'package:flutter/cupertino.dart'; ++import 'package:flutter/services.dart'; ++import 'package:geolocator/geolocator.dart'; ++import 'package:get/get.dart'; ++import 'package:intaleq_maps/intaleq_maps.dart'; ++import 'package:http/http.dart' as http; ++import 'package:intl/intl.dart'; ++import '../../../constant/api_key.dart'; ++import '../../../services/offline_map_service.dart'; ++import '../../../models/model/painter_copoun.dart'; ++import '../../../views/widgets/mycircular.dart'; ++import '../deep_link_controller.dart'; ++ ++import '../../../constant/box_name.dart'; ++import '../../../constant/links.dart'; ++import '../../../constant/colors.dart'; ++import '../../../constant/style.dart'; ++import '../../../constant/country_polygons.dart'; ++import '../../../env/env.dart'; ++import '../../../main.dart'; // contains global 'box', 'sql' ++import '../../../print.dart'; ++import '../../../services/pip_service.dart'; ++import '../../../services/ride_live_notification.dart'; ++import '../../../views/home/map_page_passenger.dart'; ++import '../../../views/Rate/rate_captain.dart'; ++import '../../../views/Rate/rating_driver_bottom.dart'; ++import '../../../views/widgets/mydialoug.dart'; ++import '../../../views/widgets/elevated_btn.dart'; ++import '../../../views/home/map_widget.dart/car_details_widget_to_go.dart'; ++import '../../../views/home/map_widget.dart/select_driver_mishwari.dart'; ++import '../../functions/crud.dart'; ++import '../../functions/launch.dart'; ++import '../../payment/payment_controller.dart'; ++import '../points_for_rider_controller.dart'; ++import 'map_engine_controller.dart'; ++import 'location_search_controller.dart'; ++import 'nearby_drivers_controller.dart'; ++import 'ui_interactions_controller.dart'; ++import 'map_socket_controller.dart'; ++import '../decode_polyline_isolate.dart'; ++import '../ios_live_activity_service.dart'; ++import '../../firebase/local_notification.dart'; ++import '../../firebase/notification_service.dart'; ++import '../../functions/audio_record1.dart'; ++import '../../functions/package_info.dart'; ++import '../../functions/secure_storage.dart'; ++import '../vip_waitting_page.dart'; ++import '../device_performance.dart'; ++import 'ride_state.dart'; ++import '../../../views/widgets/error_snakbar.dart'; ++import 'package:flutter_confetti/flutter_confetti.dart' hide Circle; ++import 'package:crypto/crypto.dart'; ++ ++class RideLifecycleController extends GetxController { ++ // --- Missing variables from monolithic controller --- ++ String currentRideId = ''; ++ bool isDrawingRoute = false; ++ bool isAnotherOreder = false; ++ bool isWhatsAppOrder = false; ++ LatLng startLocation = const LatLng(32, 35); ++ LatLng endLocation = const LatLng(32, 35); ++ String dynamicApiUrl = 'https://routec.intaleq.xyz/route'; ++ String? cardNumber; ++ bool isBeginRideFromDriverRunning = false; ++ bool isDriversTokensSend = false; ++ Map rideData = {}; ++ Map dInfo = {}; ++ List datadriverCarsLocationToPassengerAfterApplied = []; ++ double distanceOfTrip = 0.0; ++ double apiDistanceMeters = 0.0; ++ double tax = 0.0; ++ int selectedPassengerCount = 1; ++ final GlobalKey increaseFeeFormKey = GlobalKey(); ++ final GlobalKey messagesFormKey = GlobalKey(); ++ final GlobalKey promoFormKey = GlobalKey(); ++ String walletStr = '0'; ++ double walletVal = 0.0; ++ bool rideConfirm = false; ++ LatLng driverLocationToPassenger = const LatLng(32, 35); ++ final TextEditingController messageToDriver = TextEditingController(); ++ int carsOrder = 0; ++ ++ Rx currentRideState = RideState.noRide.obs; ++ String statusRide = 'wait'; ++ String statusRideVip = 'wait'; ++ bool statusRideFromStart = false; ++ ++ double distance = 0; ++ double duration = 0; ++ int durationToRide = 0; ++ int remainingTime = 25; ++ int remainingTimeToPassengerFromDriverAfterApplied = 60; ++ int remainingTimeDriverWaitPassenger5Minute = 60; ++ int timeToPassengerFromDriverAfterApplied = 0; ++ Timer? timerToPassengerFromDriverAfterApplied; ++ DateTime? _driverEtaUpdatedAt; ++ int _driverEtaSecondsAtUpdate = 0; ++ int _driverEtaCountdownTicks = 0; ++ ++ bool rideTimerBegin = false; ++ double progressTimerRideBegin = 0; ++ int remainingTimeTimerRideBegin = 60; ++ String stringRemainingTimeRideBegin = ''; ++ ++ late String rideId = 'yet'; ++ late String driverId = ''; ++ late String make = ''; ++ late String model = ''; ++ late String carColor = ''; ++ late String licensePlate = ''; ++ late String driverName = ''; ++ late String passengerName = ''; ++ late String driverPhone = ''; ++ late String colorHex = ''; ++ late String carYear = ''; ++ late String driverRate = '5.0'; ++ late String driverToken = ''; ++ ++ double kazan = 8; ++ double totalPassenger = 0; ++ double totalDriver = 0; ++ double costDistance = 0; ++ double costDuration = 0; ++ double averageDuration = 0; ++ double totalCostPassenger = 0; ++ ++ double totalPassengerSpeed = 0; ++ double totalPassengerBalash = 0; ++ double totalPassengerComfort = 0; ++ double totalPassengerElectric = 0; ++ double totalPassengerLady = 0; ++ double totalPassengerScooter = 0; ++ double totalPassengerVan = 0; ++ double totalPassengerRayehGai = 0; ++ double totalPassengerRayehGaiComfort = 0; ++ double totalPassengerRayehGaiBalash = 0; ++ ++ double latePrice = 0; ++ double fuelPrice = 0; ++ double heavyPrice = 0; ++ double naturePrice = 0; ++ ++ bool isRideFinished = false; ++ String stringRemainingTimeToPassenger = ''; ++ String stringRemainingTimeDriverWaitPassenger5Minute = ''; ++ ++ bool isDriverInPassengerWay = false; ++ bool isDriverArrivePassenger = false; ++ bool isSearchingWindow = false; ++ bool shouldFetch = true; ++ ++ double progressTimerToPassengerFromDriverAfterApplied = 0; ++ double progressTimerDriverWaitPassenger5Minute = 0; ++ bool isCashSelectedBeforeConfirmRide = false; ++ bool isPassengerChosen = false; ++ ++ Timer? _masterTimer; ++ Timer? _searchTimer; ++ Timer? _timer; ++ Timer? _uiCountdownTimer; ++ ++ bool _isArrivalProcessed = false; ++ bool _isFinishProcessed = false; ++ bool _isCancelProcessed = false; ++ bool _isAcceptanceProcessed = false; ++ bool _isRatingScreenOpen = false; ++ bool _isRecalculatingRoute = false; ++ ++ String _rideAcceptedViaSource = "Unknown"; ++ ++ final double kDurationScalar = 1.5348; ++ // مسافة الانحراف المسموح بها بالمتر قبل إعادة حساب المسار تلقائيًا للرحلة. ++ // إذا انحرف السائق عن المسار بأكثر من هذه المسافة، يُعاد حساب المسار. ++ final double _deviationThresholdMeters = 30.0; ++ int _routeHeadingMismatchCount = 0; ++ ++ final Map _pollingIntervals = { ++ RideState.noRide: 6, ++ RideState.searching: 8, ++ RideState.driverApplied: 10, ++ RideState.driverArrived: 15, ++ RideState.inProgress: 15, ++ RideState.cancelled: 3600, ++ RideState.finished: 3600, ++ RideState.preCheckReview: 3600, ++ }; ++ ++ Timer? _locationPollingTimer; ++ List _currentDriverRoutePoints = []; ++ double _currentDriverRouteDistanceMeters = 0.0; ++ int _currentDriverRouteDurationSeconds = 0; ++ ++ int _currentSearchPhase = 0; ++ bool _isFetchingDriverLocation = false; ++ Timer? _watchdogTimer; ++ ++ final List _searchRadii = [2400, 3000, 3100]; ++ final int _searchPhaseDurationSeconds = 30; ++ final int _totalSearchTimeoutSeconds = 90; ++ ++ int _noRideSearchCount = 0; ++ final int _noRideMaxTries = 3; ++ final int _noRideIntervalSec = 5; ++ DateTime? _noRideNextAllowed; ++ bool _noRideSearchCapped = false; ++ int _masterIntervalSeconds = -1; ++ ++ final StreamController _rideStatusStreamController = ++ StreamController.broadcast(); ++ Stream get rideStatusStream => _rideStatusStreamController.stream; ++ ++ final StreamController _beginRideStreamController = ++ StreamController.broadcast(); ++ Stream get beginRideStream => _beginRideStreamController.stream; ++ ++ final StreamController _timerStreamController = StreamController(); ++ Stream get timerStream => _timerStreamController.stream; ++ ++ bool isTimerFromDriverToPassengerAfterAppliedRunning = true; ++ bool isTimerRunning = false; ++ int beginRideInterval = 10; ++ ++ Timer? _rideProgressTimer; ++ bool _hasShownSpeedWarning = false; ++ bool rideInProgress = true; ++ double elapsedTimeInSeconds = 0; ++ String stringElapsedTimeRideBeginVip = '0:00'; ++ ++ Map rideStatusFromStartApp = {}; ++ bool isStartAppHasRide = false; ++ late Duration durationToAdd; ++ late DateTime newTime = DateTime.now(); ++ String durationByPassenger = ''; ++ int hours = 0; ++ int minutes = 0; ++ ++ int selectedReason = -1; ++ String? cancelNote; ++ double latitudeWhatsApp = 0; ++ double longitudeWhatsApp = 0; ++ ++ // Getters for linked controllers ++ LocationSearchController get locSearch => ++ Get.find(); ++ MapEngineController get mapEngine => Get.find(); ++ NearbyDriversController get nearbyDrivers => ++ Get.find(); ++ MapSocketController get mapSocket => Get.find(); ++ UiInteractionsController get uiInteractions => ++ Get.find(); ++ ++ // LocationSearchController pass-throughs ++ LatLng get passengerLocation => locSearch.passengerLocation; ++ set passengerLocation(LatLng val) => locSearch.passengerLocation = val; ++ ++ LatLng get newMyLocation => locSearch.newMyLocation; ++ set newMyLocation(LatLng val) => locSearch.newMyLocation = val; ++ ++ LatLng get newStartPointLocation => locSearch.newStartPointLocation; ++ set newStartPointLocation(LatLng val) => ++ locSearch.newStartPointLocation = val; ++ ++ LatLng get myDestination => locSearch.myDestination; ++ set myDestination(LatLng val) => locSearch.myDestination = val; ++ ++ String get startNameAddress => locSearch.startNameAddress; ++ set startNameAddress(String val) => locSearch.startNameAddress = val; ++ ++ String get endNameAddress => locSearch.endNameAddress; ++ set endNameAddress(String val) => locSearch.endNameAddress = val; ++ ++ List get placesCoordinate => locSearch.placesCoordinate; ++ set placesCoordinate(List val) => locSearch.placesCoordinate = val; ++ ++ int get activeMenuWaypointCount => locSearch.activeMenuWaypointCount; ++ set activeMenuWaypointCount(int val) => ++ locSearch.activeMenuWaypointCount = val; ++ ++ List get menuWaypoints => locSearch.menuWaypoints; ++ set menuWaypoints(List val) => locSearch.menuWaypoints = val; ++ ++ List get menuWaypointNames => locSearch.menuWaypointNames; ++ set menuWaypointNames(List val) => locSearch.menuWaypointNames = val; ++ ++ bool get passengerStartLocationFromMap => ++ locSearch.passengerStartLocationFromMap; ++ set passengerStartLocationFromMap(bool val) => ++ locSearch.passengerStartLocationFromMap = val; ++ ++ List get coordinatesWithoutEmpty => locSearch.coordinatesWithoutEmpty; ++ ++ // MapEngineController pass-throughs ++ Set get markers => mapEngine.markers; ++ set markers(Set val) { ++ mapEngine.markers = val; ++ mapEngine.update(); ++ } ++ ++ Set get polyLines => mapEngine.polyLines; ++ set polyLines(Set val) { ++ mapEngine.polyLines = val; ++ mapEngine.update(); ++ } ++ ++ IntaleqMapController? get mapController => mapEngine.mapController; ++ ++ bool get isStyleLoaded => mapEngine.isStyleLoaded; ++ set isStyleLoaded(bool val) => mapEngine.isStyleLoaded = val; ++ ++ bool get isBottomSheetShown => mapEngine.isBottomSheetShown; ++ set isBottomSheetShown(bool val) => mapEngine.isBottomSheetShown = val; ++ ++ double get heightBottomSheetShown => mapEngine.heightBottomSheetShown; ++ set heightBottomSheetShown(double val) => ++ mapEngine.heightBottomSheetShown = val; ++ ++ bool get isPickerShown => mapEngine.isPickerShown; ++ set isPickerShown(bool val) => mapEngine.isPickerShown = val; ++ ++ bool get isMarkersShown => mapEngine.isMarkersShown; ++ set isMarkersShown(bool val) => mapEngine.isMarkersShown = val; ++ ++ bool get isMainBottomMenuMap => mapEngine.isMainBottomMenuMap; ++ set isMainBottomMenuMap(bool val) => mapEngine.isMainBottomMenuMap = val; ++ ++ double get mainBottomMenuMapHeight => mapEngine.mainBottomMenuMapHeight; ++ set mainBottomMenuMapHeight(double val) => ++ mapEngine.mainBottomMenuMapHeight = val; ++ ++ bool get isWayPointSheet => mapEngine.isWayPointSheet; ++ set isWayPointSheet(bool val) => mapEngine.isWayPointSheet = val; ++ ++ bool get isWayPointStopsSheet => mapEngine.isWayPointStopsSheet; ++ set isWayPointStopsSheet(bool val) => mapEngine.isWayPointStopsSheet = val; ++ ++ bool get isWayPointStopsSheetUtilGetMap => ++ mapEngine.isWayPointStopsSheetUtilGetMap; ++ set isWayPointStopsSheetUtilGetMap(bool val) => ++ mapEngine.isWayPointStopsSheetUtilGetMap = val; ++ ++ double get wayPointSheetHeight => mapEngine.wayPointSheetHeight; ++ set wayPointSheetHeight(double val) => mapEngine.wayPointSheetHeight = val; ++ ++ double get cashConfirmPageShown => mapEngine.cashConfirmPageShown; ++ set cashConfirmPageShown(double val) => mapEngine.cashConfirmPageShown = val; ++ ++ bool get isCashConfirmPageShown => mapEngine.isCashConfirmPageShown; ++ set isCashConfirmPageShown(bool val) => ++ mapEngine.isCashConfirmPageShown = val; ++ ++ bool get isCancelRidePageShown => mapEngine.isCancelRidePageShown; ++ set isCancelRidePageShown(bool val) => mapEngine.isCancelRidePageShown = val; ++ ++ void changeCashConfirmPageShown() => mapEngine.changeCashConfirmPageShown(); ++ ++ void resetNoRideSearch() { ++ _noRideSearchCount = 0; ++ _noRideSearchCapped = false; ++ _noRideNextAllowed = null; ++ } ++ ++ double get paymentPageShown => mapEngine.paymentPageShown; ++ set paymentPageShown(double val) => mapEngine.paymentPageShown = val; ++ ++ void changeCancelRidePageShow() => mapEngine.changeCancelRidePageShow(); ++ ++ // NearbyDriversController pass-throughs ++ List get carsLocationByPassenger => nearbyDrivers.carsLocationByPassenger; ++ set carsLocationByPassenger(List val) => ++ nearbyDrivers.carsLocationByPassenger = val; ++ ++ List get driverCarsLocationToPassengerAfterApplied => ++ nearbyDrivers.driverCarsLocationToPassengerAfterApplied; ++ set driverCarsLocationToPassengerAfterApplied(List val) => ++ nearbyDrivers.driverCarsLocationToPassengerAfterApplied = val; ++ ++ bool get noCarString => nearbyDrivers.noCarString; ++ set noCarString(bool val) => nearbyDrivers.noCarString = val; ++ ++ double get speed => locSearch.speed; ++ set speed(double val) => locSearch.speed = val; ++ ++ Timer? get locationPollingTimer => _locationPollingTimer; ++ ++ bool isActiveRideState() { ++ return currentRideState.value == RideState.searching || ++ currentRideState.value == RideState.driverApplied || ++ currentRideState.value == RideState.driverArrived || ++ currentRideState.value == RideState.inProgress; ++ } ++ ++ void startMasterTimer() { ++ _masterTimer?.cancel(); ++ _masterTimer = Timer.periodic(const Duration(seconds: 13), (_) { ++ _handleRideState(currentRideState.value); ++ }); ++ } ++ ++ void cancelMasterTimer() { ++ _masterTimer?.cancel(); ++ _masterTimer = null; ++ } ++ ++ void startMasterTimerWithInterval(int seconds) { ++ if (_masterTimer != null && _masterIntervalSeconds == seconds) return; ++ _masterIntervalSeconds = seconds; ++ _masterTimer?.cancel(); ++ _masterTimer = Timer.periodic(Duration(seconds: seconds), (_) { ++ _handleRideState(currentRideState.value); ++ }); ++ } ++ ++ void stopAllTimers() { ++ Log.print('🛑 FORCE STOP: Stopping ALL Timers and Streams 🛑'); ++ _masterTimer?.cancel(); ++ _masterTimer = null; ++ timerToPassengerFromDriverAfterApplied?.cancel(); ++ timerToPassengerFromDriverAfterApplied = null; ++ _timer?.cancel(); ++ _timer = null; ++ _uiCountdownTimer?.cancel(); ++ _uiCountdownTimer = null; ++ _locationPollingTimer?.cancel(); ++ _locationPollingTimer = null; ++ _watchdogTimer?.cancel(); ++ _watchdogTimer = null; ++ _searchTimer?.cancel(); ++ _searchTimer = null; ++ _rideProgressTimer?.cancel(); ++ _rideProgressTimer = null; ++ ++ isTimerRunning = false; ++ isBeginRideFromDriverRunning = false; ++ _isFetchingDriverLocation = false; ++ update(); ++ } ++ ++ Future _handleRideState(RideState state) async { ++ if (_isRatingScreenOpen) { ++ Log.print('⛔ Rating Screen is Open. Skipping Logic.'); ++ stopAllTimers(); ++ return; ++ } ++ Log.print('Handling state: $state'); ++ ++ int effectivePollingInterval = _pollingIntervals[state] ?? 13; ++ ++ switch (state) { ++ case RideState.noRide: ++ final now = DateTime.now(); ++ if (_noRideSearchCount >= _noRideMaxTries) { ++ if (!_noRideSearchCapped) { ++ _noRideSearchCapped = true; ++ Log.print('[noRide] search capped at $_noRideMaxTries attempts'); ++ } ++ break; ++ } ++ if (_noRideNextAllowed != null && now.isBefore(_noRideNextAllowed!)) { ++ break; ++ } ++ _noRideSearchCount++; ++ Log.print('_noRideSearchCount: $_noRideSearchCount'); ++ _noRideNextAllowed = now.add(Duration(seconds: _noRideIntervalSec)); ++ nearbyDrivers.getCarsLocationByPassengerAndReloadMarker(); ++ nearbyDrivers.getNearestDriverByPassengerLocation(); ++ break; ++ ++ case RideState.cancelled: ++ stopAllTimers(); ++ break; ++ ++ case RideState.preCheckReview: ++ stopAllTimers(); ++ _checkLastRideForReview(); ++ break; ++ ++ case RideState.searching: ++ if (rideId == 'yet' || rideId.isEmpty) break; ++ try { ++ String statusFromServer = await getRideStatus(rideId); ++ if (statusFromServer == 'Apply' || statusFromServer == 'Applied') { ++ await processRideAcceptance(source: "Polling"); ++ break; ++ } ++ } catch (e) { ++ Log.print('Error polling getRideStatus: $e'); ++ } ++ ++ final now = DateTime.now(); ++ final int elapsedSeconds = now.difference(_searchStartTime!).inSeconds; ++ ++ if (elapsedSeconds > _totalSearchTimeoutSeconds) { ++ stopAllTimers(); ++ currentRideState.value = RideState.noRide; ++ isSearchingWindow = false; ++ update(); ++ _showIncreaseFeeDialog(); ++ break; ++ } ++ ++ int targetPhase = ++ (elapsedSeconds / _searchPhaseDurationSeconds).floor(); ++ if (targetPhase >= _searchRadii.length) { ++ targetPhase = _searchRadii.length - 1; ++ } ++ ++ bool isNewPhase = targetPhase > _currentSearchPhase; ++ bool timeToScanForNewDrivers = (elapsedSeconds % 15 == 0); ++ ++ if (isNewPhase || timeToScanForNewDrivers || elapsedSeconds < 5) { ++ _currentSearchPhase = targetPhase; ++ int currentRadius = _searchRadii[_currentSearchPhase]; ++ Log.print( ++ '[Search Logic] Scanning for drivers. Phase: $_currentSearchPhase, Radius: $currentRadius'); ++ } ++ ++ if (elapsedSeconds < 5) { ++ driversStatusForSearchWindow = 'Your order is being prepared'.tr; ++ } else if (elapsedSeconds < 15) { ++ driversStatusForSearchWindow = 'Your order sent to drivers'.tr; ++ } else { ++ driversStatusForSearchWindow = ++ 'The drivers are reviewing your request'.tr; ++ } ++ update(); ++ break; ++ ++ case RideState.driverApplied: ++ if (!_isDriverAppliedLogicExecuted && !_isAcceptanceProcessed) { ++ Log.print('[handleRideState] Execution driverApplied logic.'); ++ rideAppliedFromDriver(true); ++ _isDriverAppliedLogicExecuted = true; ++ } ++ ++ if (!mapSocket.isSocketConnected) { ++ try { ++ String statusFromServer = await getRideStatus(rideId); ++ if (statusFromServer == 'Arrived') { ++ currentRideState.value = RideState.driverArrived; ++ break; ++ } else if (statusFromServer == 'Begin' || ++ statusFromServer == 'inProgress') { ++ processRideBegin(); ++ break; ++ } ++ } catch (e) { ++ Log.print('Error polling for Arrived/Begin status: $e'); ++ } ++ } ++ if (!_isSocketHealthy()) { ++ getDriverCarsLocationToPassengerAfterApplied(); ++ } ++ break; ++ ++ case RideState.driverArrived: ++ if (!_isDriverArrivedLogicExecuted) { ++ _isDriverArrivedLogicExecuted = true; ++ startTimerDriverWaitPassenger5Minute(); ++ uiInteractions.driverArrivePassengerDialoge(); ++ } ++ break; ++ ++ case RideState.inProgress: ++ if (!mapSocket.isSocketConnected) { ++ try { ++ String statusFromServer = await getRideStatus(rideId); ++ if (statusFromServer == 'Finished' || ++ statusFromServer == 'finished') { ++ Log.print( ++ '🏁 DETECTED FINISHED: Killing processes and forcing Review.'); ++ stopAllTimers(); ++ currentRideState.value = RideState.preCheckReview; ++ tripFinishedFromDriver(); ++ _checkLastRideForReview(); ++ return; ++ } ++ } catch (e) { ++ Log.print('Error polling status: $e'); ++ } ++ } ++ ++ if (!_isRideBeginLogicExecuted) { ++ _isRideBeginLogicExecuted = true; ++ _executeBeginRideLogic(); ++ } ++ if (!_isSocketHealthy()) { ++ getDriverCarsLocationToPassengerAfterApplied(); ++ } ++ break; ++ ++ case RideState.finished: ++ tripFinishedFromDriver(); ++ stopAllTimers(); ++ effectivePollingInterval = 3600; ++ break; ++ } ++ startMasterTimerWithInterval(effectivePollingInterval); ++ } ++ ++ bool _isSocketHealthy() { ++ return mapSocket.isSocketHealthy(); ++ } ++ ++ Future _checkInitialRideStatus() async { ++ await getRideStatusFromStartApp(); ++ if (rideStatusFromStartApp['data'] == null) { ++ currentRideState.value = RideState.noRide; ++ _handleRideState(currentRideState.value); ++ return; ++ } ++ String _status = rideStatusFromStartApp['data']['status'] ?? ''; ++ String _lowerStatus = _status.toLowerCase(); ++ ++ if (_lowerStatus == 'waiting' || ++ _lowerStatus == 'apply' || ++ _lowerStatus == 'applied' || ++ _lowerStatus == 'accepted' || ++ _lowerStatus == 'arrived' || ++ _lowerStatus == 'begin') { ++ rideId = rideStatusFromStartApp['data']['rideId'].toString(); ++ currentRideState.value = _lowerStatus == 'waiting' ++ ? RideState.searching ++ : (_lowerStatus == 'apply' || ++ _lowerStatus == 'applied' || ++ _lowerStatus == 'accepted') ++ ? RideState.driverApplied ++ : _lowerStatus == 'arrived' ++ ? RideState.driverArrived ++ : _lowerStatus == 'begin' ++ ? RideState.inProgress ++ : _lowerStatus == 'cancel' ++ ? RideState.cancelled ++ : RideState.noRide; ++ } else if (_lowerStatus == 'finished') { ++ if (rideStatusFromStartApp['data']['needsReview'] == 1) { ++ currentRideState.value = RideState.preCheckReview; ++ } else { ++ currentRideState.value = RideState.noRide; ++ } ++ } else { ++ currentRideState.value = RideState.noRide; ++ } ++ _handleRideState(currentRideState.value); ++ } ++ ++ Future _checkLastRideForReview() async { ++ Log.print('⭐ FORCE OPEN RATING PAGE (Get.to mode)'); ++ await getRideStatusFromStartApp(); ++ ++ if (rideStatusFromStartApp['data'] == null) { ++ currentRideState.value = RideState.noRide; ++ startMasterTimer(); ++ return; ++ } ++ ++ String needsReview = ++ rideStatusFromStartApp['data']['needsReview'].toString(); ++ ++ if (needsReview == '1') { ++ _isRatingScreenOpen = true; ++ var args = { ++ 'driverId': rideStatusFromStartApp['data']['driver_id'].toString(), ++ 'rideId': rideStatusFromStartApp['data']['rideId'].toString(), ++ 'driverName': rideStatusFromStartApp['data']['driverName'], ++ 'price': rideStatusFromStartApp['data']['price'], ++ }; ++ ++ await Get.to( ++ () => RatingDriverBottomSheet(), ++ arguments: args, ++ preventDuplicates: true, ++ popGesture: false, ++ ); ++ ++ Log.print('✅ Rating Page Closed. Resetting App.'); ++ _isRatingScreenOpen = false; ++ restCounter(); ++ currentRideState.value = RideState.noRide; ++ startMasterTimer(); ++ } else { ++ currentRideState.value = RideState.noRide; ++ startMasterTimer(); ++ } ++ } ++ ++ DateTime? _searchStartTime; ++ bool _isDriverAppliedLogicExecuted = false; ++ bool _isDriverArrivedLogicExecuted = false; ++ bool _isRideBeginLogicExecuted = false; ++ String driversStatusForSearchWindow = ''; ++ ++ void startSearchingForDriver() async { ++ if (currentRideState.value == RideState.searching) return; ++ ++ isSearchingWindow = true; ++ currentRideState.value = RideState.searching; ++ driversStatusForSearchWindow = 'Searching for nearby drivers...'.tr; ++ _searchStartTime = DateTime.now(); ++ _currentSearchPhase = 0; ++ update(); ++ ++ bool rideCreated = await postRideDetailsToServer(); ++ ++ if (!rideCreated) { ++ isSearchingWindow = false; ++ currentRideState.value = RideState.noRide; ++ mySnackbarWarning("Could not create ride. Please try again.".tr); ++ update(); ++ return; ++ } ++ ++ _addRideToWaitingTable(); ++ mapSocket.initConnectionWithSocket(); ++ } ++ ++ void _showIncreaseFeeDialog() { ++ Get.dialog( ++ CupertinoAlertDialog( ++ title: Text("No drivers accepted your request yet".tr), ++ content: Text( ++ "Increasing the fare might attract more drivers. Would you like to increase the price?" ++ .tr), ++ actions: [ ++ CupertinoDialogAction( ++ child: Text("Cancel Ride".tr, ++ style: TextStyle(color: AppColor.redColor)), ++ onPressed: () { ++ Get.back(); ++ mapEngine.changeCancelRidePageShow(); ++ }, ++ ), ++ CupertinoDialogAction( ++ child: Text("Increase Fare".tr, ++ style: TextStyle(color: AppColor.greenColor)), ++ onPressed: () { ++ Get.back(); ++ double newPrice = totalPassenger * 1.10; ++ increasePriceAndRestartSearch(newPrice); ++ }, ++ ), ++ ], ++ ), ++ barrierDismissible: false, ++ ); ++ } ++ ++ Future increasePriceAndRestartSearch(double newPrice) async { ++ totalPassenger = newPrice; ++ update(); ++ ++ await CRUD() ++ .post(link: "${AppLink.server}/ride/rides/update.php", payload: { ++ "id": rideId, ++ "price": newPrice.toStringAsFixed(2), ++ }); ++ ++ Log.print( ++ '[increasePrice] Price changed. Clearing notified list to resend.'); ++ notifiedDrivers.clear(); ++ ++ _searchStartTime = DateTime.now(); ++ _currentSearchPhase = 0; ++ isSearchingWindow = true; ++ update(); ++ startMasterTimer(); ++ } ++ ++ void _stopWaitPassengerTimer({bool resetUI = false}) { ++ _waitPassengerTimer?.cancel(); ++ _waitPassengerTimer = null; ++ ++ if (resetUI) { ++ progressTimerDriverWaitPassenger5Minute = 0.0; ++ remainingTimeDriverWaitPassenger5Minute = 0; ++ stringRemainingTimeDriverWaitPassenger5Minute = '00:00'; ++ update(); ++ } ++ } ++ ++ void _executeBeginRideLogic() { ++ Log.print('[executeBeginRideLogic] execution of ride start logic...'); ++ _stopWaitPassengerTimer(resetUI: true); ++ ++ timeToPassengerFromDriverAfterApplied = 0; ++ remainingTime = 0; ++ remainingTimeToPassengerFromDriverAfterApplied = 0; ++ remainingTimeDriverWaitPassenger5Minute = 0; ++ ++ rideTimerBegin = true; ++ statusRide = 'Begin'; ++ isDriverInPassengerWay = false; ++ isDriverArrivePassenger = false; ++ ++ box.write(BoxName.passengerWalletTotal, '0'); ++ update(); ++ ++ rideIsBeginPassengerTimer(); ++ runWhenRideIsBegin(); ++ ++ NotificationController().showNotification( ++ 'Trip is Begin'.tr, ++ 'The trip has started! Feel free to contact emergency numbers, share your trip, or activate voice recording for the journey' ++ .tr, ++ 'start'); ++ } ++ ++ Future processRideBegin({String source = "Unknown"}) async { ++ if (currentRideState.value == RideState.inProgress || ++ _isRideStartedProcessed) { ++ return; ++ } ++ _isRideStartedProcessed = true; ++ currentRideState.value = RideState.inProgress; ++ statusRide = 'Begin'; ++ ++ remainingTimeDriverWaitPassenger5Minute = 0; ++ _stopWaitPassengerTimer(); ++ ++ // مسح الخطوط القديمة (pickup/direct) قبل رسم خط المرحلة الجديدة ++ polyLines = polyLines ++ .where((p) => ++ p.polylineId.value != 'main_route' && ++ p.polylineId.value != 'route_direct' && ++ !p.polylineId.value.startsWith('driver_route')) ++ .toSet(); ++ ++ // موقع السائق الحالي من آخر تحديث ++ LatLng driverPos = passengerLocation; ++ if (driverCarsLocationToPassengerAfterApplied.isNotEmpty) { ++ driverPos = driverCarsLocationToPassengerAfterApplied.last; ++ } ++ ++ // رسم المسار من موقع السائق إلى الهدف بخط أزرق مستمر ++ await calculateDriverToPassengerRoute(driverPos, myDestination, ++ isBeginPhase: true); ++ ++ rideIsBeginPassengerTimer(); ++ runWhenRideIsBegin(); ++ update(); ++ } ++ ++ bool _isRideStartedProcessed = false; ++ ++ void updateDriverRouteMetrics({int? etaSeconds, double? distanceMeters}) { ++ if (distanceMeters != null && distanceMeters > 0) { ++ distanceByPassenger = distanceMeters.toStringAsFixed(0); ++ } ++ ++ if (etaSeconds == null) return; ++ ++ final int clampedEta = max(0, etaSeconds); ++ timeToPassengerFromDriverAfterApplied = clampedEta; ++ remainingTimeToPassengerFromDriverAfterApplied = clampedEta; ++ durationToPassenger = clampedEta; ++ _driverEtaSecondsAtUpdate = clampedEta; ++ _driverEtaUpdatedAt = DateTime.now(); ++ ++ final int minutes = (clampedEta / 60).floor(); ++ final int seconds = clampedEta % 60; ++ stringRemainingTimeToPassenger = ++ '$minutes:${seconds.toString().padLeft(2, '0')}'; ++ } ++ ++ void startTimerFromDriverToPassengerAfterApplied() { ++ stopTimerFromDriverToPassengerAfterApplied(); ++ if (isTimerRunning) return; ++ isTimerRunning = true; ++ isTimerFromDriverToPassengerAfterAppliedRunning = true; ++ _driverEtaUpdatedAt ??= DateTime.now(); ++ _driverEtaSecondsAtUpdate = timeToPassengerFromDriverAfterApplied; ++ _driverEtaCountdownTicks = 0; ++ ++ timerToPassengerFromDriverAfterApplied = ++ Timer.periodic(const Duration(seconds: 1), (timer) { ++ bool isRideActive = (statusRide == 'Apply' || ++ statusRide == 'Arrived' || ++ statusRide == 'Begin' || ++ currentRideState.value == RideState.driverApplied || ++ currentRideState.value == RideState.driverArrived || ++ currentRideState.value == RideState.inProgress); ++ ++ if (!isRideActive || !isTimerFromDriverToPassengerAfterAppliedRunning) { ++ timer.cancel(); ++ timerToPassengerFromDriverAfterApplied = null; ++ isTimerRunning = false; ++ return; ++ } ++ ++ _driverEtaCountdownTicks++; ++ if (!_timerStreamController.isClosed) { ++ _timerStreamController.add(_driverEtaCountdownTicks); ++ } ++ ++ final int secondsElapsedSinceEta = _driverEtaUpdatedAt == null ++ ? 0 ++ : DateTime.now().difference(_driverEtaUpdatedAt!).inSeconds; ++ remainingTimeToPassengerFromDriverAfterApplied = ++ _driverEtaSecondsAtUpdate - secondsElapsedSinceEta; ++ ++ if (remainingTimeToPassengerFromDriverAfterApplied < 0) { ++ remainingTimeToPassengerFromDriverAfterApplied = 0; ++ } ++ ++ int minutes = ++ (remainingTimeToPassengerFromDriverAfterApplied / 60).floor(); ++ int seconds = remainingTimeToPassengerFromDriverAfterApplied % 60; ++ stringRemainingTimeToPassenger = ++ '$minutes:${seconds.toString().padLeft(2, '0')}'; ++ ++ if (_driverEtaCountdownTicks % 5 == 0) { ++ double currentProgress = 1 - ++ (remainingTimeToPassengerFromDriverAfterApplied / ++ (_driverEtaSecondsAtUpdate == 0 ++ ? 1 ++ : _driverEtaSecondsAtUpdate)); ++ ++ IosLiveActivityService.updateRideActivity( ++ status: 'waiting', ++ driverName: driverName, ++ carDetails: '$make • $model • $carColor', ++ etaText: stringRemainingTimeToPassenger, ++ progress: currentProgress.clamp(0.0, 1.0), ++ ); ++ } ++ ++ if (_driverEtaCountdownTicks % beginRideInterval == 0) { ++ uploadPassengerLocation(); ++ } else { ++ update(); ++ } ++ }); ++ } ++ ++ void stopTimerFromDriverToPassengerAfterApplied() { ++ isTimerFromDriverToPassengerAfterAppliedRunning = false; ++ timerToPassengerFromDriverAfterApplied?.cancel(); ++ timerToPassengerFromDriverAfterApplied = null; ++ isTimerRunning = false; ++ update(); ++ } ++ ++ Timer? _waitPassengerTimer; ++ static const int _waitPassengerTotalSeconds = 300; ++ int _waitPassengerElapsedSeconds = 0; ++ ++ void startTimerDriverWaitPassenger5Minute() { ++ if (currentRideState.value != RideState.driverArrived) return; ++ ++ stopTimerFromDriverToPassengerAfterApplied(); ++ isTimerRunning = false; ++ _stopWaitPassengerTimer(); ++ ++ isDriverArrivePassenger = true; ++ isDriverInPassengerWay = false; ++ timeToPassengerFromDriverAfterApplied = 0; ++ ++ _waitPassengerElapsedSeconds = 0; ++ remainingTimeDriverWaitPassenger5Minute = _waitPassengerTotalSeconds; ++ progressTimerDriverWaitPassenger5Minute = 0; ++ ++ int m = (remainingTimeDriverWaitPassenger5Minute / 60).floor(); ++ int s = remainingTimeDriverWaitPassenger5Minute % 60; ++ stringRemainingTimeDriverWaitPassenger5Minute = ++ '$m:${s.toString().padLeft(2, '0')}'; ++ ++ update(); ++ ++ _waitPassengerTimer = Timer.periodic(const Duration(seconds: 1), (t) { ++ if (currentRideState.value != RideState.driverArrived) { ++ _stopWaitPassengerTimer(resetUI: true); ++ if (currentRideState.value == RideState.inProgress) { ++ isDriverArrivePassenger = false; ++ } ++ update(); ++ return; ++ } ++ ++ _waitPassengerElapsedSeconds++; ++ int remaining = _waitPassengerTotalSeconds - _waitPassengerElapsedSeconds; ++ if (remaining < 0) remaining = 0; ++ ++ remainingTimeDriverWaitPassenger5Minute = remaining; ++ progressTimerDriverWaitPassenger5Minute = ++ _waitPassengerElapsedSeconds / _waitPassengerTotalSeconds; ++ ++ int minutes = (remaining / 60).floor(); ++ int seconds = remaining % 60; ++ stringRemainingTimeDriverWaitPassenger5Minute = ++ '$minutes:${seconds.toString().padLeft(2, '0')}'; ++ update(); ++ ++ if (remaining == 0) { ++ _stopWaitPassengerTimer(); ++ } ++ }); ++ } ++ ++ void beginRideTimer() { ++ Timer.periodic(const Duration(seconds: 1), (timer) { ++ if (!timerController.isClosed) { ++ timerController.add(timer.tick); ++ } ++ update(); ++ }); ++ } ++ ++ final timerController = StreamController(); ++ void stopRideTimer() { ++ timerController.close(); ++ update(); ++ } ++ ++ void rideIsBeginPassengerTimer() { ++ _rideProgressTimer?.cancel(); ++ _hasShownSpeedWarning = false; ++ ++ DateTime now = DateTime.now(); ++ DateTime expectedArrivalTime = now.add(Duration(seconds: durationToRide)); ++ ++ var arrivalTime = DateFormat('hh:mm a').format(expectedArrivalTime); ++ box.write(BoxName.arrivalTime, arrivalTime); ++ ++ Log.print("⏳ Ride Timer Started. Duration: $durationToRide sec"); ++ ++ _rideProgressTimer = ++ Timer.periodic(const Duration(seconds: 1), (timer) async { ++ if (currentRideState.value != RideState.inProgress) { ++ timer.cancel(); ++ return; ++ } ++ ++ DateTime currentNow = DateTime.now(); ++ int remainingSeconds = ++ expectedArrivalTime.difference(currentNow).inSeconds; ++ ++ if (remainingSeconds < 0) remainingSeconds = 0; ++ ++ remainingTimeTimerRideBegin = remainingSeconds; ++ progressTimerRideBegin = ++ durationToRide > 0 ? 1 - (remainingSeconds / durationToRide) : 1.0; ++ ++ int minutes = (remainingSeconds / 60).floor(); ++ int seconds = remainingSeconds % 60; ++ stringRemainingTimeRideBegin = ++ '$minutes:${seconds.toString().padLeft(2, '0')}'; ++ ++ final percent = (progressTimerRideBegin * 100).clamp(0, 100).toInt(); ++ ++ if (remainingSeconds % 5 == 0 || remainingSeconds == 0) { ++ IosLiveActivityService.updateRideActivity( ++ status: 'ongoing', ++ driverName: driverName, ++ carDetails: '$make • $model • $carColor', ++ etaText: stringRemainingTimeRideBegin, ++ progress: progressTimerRideBegin.clamp(0.0, 1.0), ++ ); ++ } ++ ++ if (remainingSeconds % 60 == 0 || remainingSeconds == 0) { ++ await RideLiveNotification.showTripInProgress( ++ percentage: percent, ++ etaText: stringRemainingTimeRideBegin, ++ ); ++ } ++ ++ if (speed > 100 && !_hasShownSpeedWarning) { ++ _hasShownSpeedWarning = true; ++ _triggerSpeedWarning(); ++ } ++ ++ if (speed < 80 && _hasShownSpeedWarning) { ++ _hasShownSpeedWarning = false; ++ } ++ ++ if (remainingSeconds <= 0) { ++ timer.cancel(); ++ } ++ update(); ++ }); ++ } ++ ++ void _triggerSpeedWarning() { ++ NotificationController().showNotification("Warning: Speeding detected!".tr, ++ 'You can call or record audio of this trip'.tr, 'tone1'); ++ ++ Get.defaultDialog( ++ barrierDismissible: false, ++ title: "Warning: Speeding detected!".tr, ++ titleStyle: AppStyle.title.copyWith(color: AppColor.redColor), ++ content: Column( ++ children: [ ++ Icon(Icons.speed, size: 50, color: AppColor.redColor), ++ const SizedBox(height: 10), ++ Text( ++ "We noticed the speed is exceeding 100 km/h. Please slow down for your safety..." ++ .tr, ++ textAlign: TextAlign.center, ++ style: AppStyle.title, ++ ), ++ ], ++ ), ++ confirm: MyElevatedButton( ++ title: "Share Trip Details".tr, ++ kolor: AppColor.redColor, ++ onPressed: () { ++ Get.back(); ++ uiInteractions.sosPassenger(); ++ }, ++ ), ++ cancel: MyElevatedButton( ++ title: "I'm Safe".tr, ++ kolor: AppColor.greenColor, ++ onPressed: () { ++ Get.back(); ++ }, ++ ), ++ ); ++ } ++ ++ void rideIsBeginPassengerTimerVIP() async { ++ rideInProgress = true; ++ bool sendSOS = false; ++ while (rideInProgress) { ++ await Future.delayed(const Duration(seconds: 1)); ++ elapsedTimeInSeconds++; ++ ++ int minutes = (elapsedTimeInSeconds / 60).floor(); ++ int seconds = (elapsedTimeInSeconds % 60).toInt(); ++ stringElapsedTimeRideBeginVip = ++ '$minutes:${seconds.toString().padLeft(2, '0')}'; ++ ++ if (speed > 100 && !sendSOS) { ++ Get.defaultDialog( ++ barrierDismissible: false, ++ title: "Warning: Speeding detected!".tr, ++ titleStyle: AppStyle.title, ++ content: Text( ++ "We noticed the speed is exceeding 100 km/h. Please slow down for your safety. If you feel unsafe, you can share your trip details with a contact or call the police using the red SOS button." ++ .tr, ++ style: AppStyle.title, ++ ), ++ confirm: MyElevatedButton( ++ title: "Share Trip Details".tr, ++ onPressed: () { ++ Get.back(); ++ String message = "**Emergency SOS from Passenger:**\n"; ++ message += "* ${'Origin'.tr}: $passengerLocation\n"; ++ message += "* ${'Destination'.tr}: $myDestination\n"; ++ message += "* ${'Driver Name'.tr}: $passengerName\n"; ++ message += "* ${'Driver Car Plate'.tr}: $licensePlate\n\n"; ++ message += "* ${'Driver Phone'.tr}: $driverPhone\n\n"; ++ message += ++ "${'Current Location'.tr}:https://www.google.com/maps/place/${passengerLocation.latitude},${passengerLocation.longitude} \n"; ++ message += "Please help! Contact me as soon as possible.".tr; ++ ++ launchCommunication( ++ 'whatsapp', box.read(BoxName.sosPhonePassenger), message); ++ sendSOS = true; ++ }, ++ kolor: AppColor.redColor, ++ ), ++ cancel: MyElevatedButton( ++ title: "Cancel".tr, ++ onPressed: () { ++ Get.back(); ++ }, ++ kolor: AppColor.greenColor, ++ ), ++ ); ++ } ++ update(); ++ } ++ } ++ ++ Future tripFinishedFromDriver() async { ++ Log.print('🧹 Cleaning UI for Finish'); ++ if (Get.isDialogOpen == true) Get.back(); ++ if (Get.isBottomSheetOpen == true) Get.back(); ++ ++ statusRide = 'Finished'; ++ currentRideState.value = RideState.finished; ++ ++ isSearchingWindow = false; ++ rideTimerBegin = false; ++ shouldFetch = false; ++ ++ stopAllTimers(); ++ resetAllMapStates(); ++ mapEngine.clearPolyline(); ++ markers = {}; ++ update(); ++ } ++ ++ void listenToBeginRideStream() { ++ beginRideStream.listen((status) { ++ Log.print("Ride status: $status"); ++ }, onError: (error) { ++ Log.print("Error in Begin Ride Stream: $error"); ++ }); ++ } ++ ++ Future begiVIPTripFromPassenger() async { ++ timeToPassengerFromDriverAfterApplied = 0; ++ remainingTime = 0; ++ isBottomSheetShown = false; ++ remainingTimeToPassengerFromDriverAfterApplied = 0; ++ remainingTimeDriverWaitPassenger5Minute = 0; ++ rideTimerBegin = true; ++ statusRideVip = 'Begin'; ++ isDriverInPassengerWay = false; ++ isDriverArrivePassenger = false; ++ update(); ++ rideIsBeginPassengerTimerVIP(); ++ runWhenRideIsBegin(); ++ } ++ ++ Future getRideStatusFromStartApp() async { ++ try { ++ var res = await CRUD().get( ++ link: AppLink.getRideStatusFromStartApp, ++ payload: {'passenger_id': box.read(BoxName.passengerID)}); ++ Log.print('rideStatusFromStartApp: $res'); ++ if (res == 'failure') { ++ rideStatusFromStartApp = { ++ 'data': {'status': 'NoRide', 'needsReview': false} ++ }; ++ isStartAppHasRide = false; ++ } else { ++ var decoded = jsonDecode(res); ++ if (decoded['status'] == 'failure') { ++ rideStatusFromStartApp = { ++ 'data': {'status': 'NoRide', 'needsReview': false} ++ }; ++ isStartAppHasRide = false; ++ } else { ++ rideStatusFromStartApp = decoded; ++ } ++ } ++ ++ String status = ++ (rideStatusFromStartApp['data']['status'] ?? '').toString(); ++ String lowerStatus = status.toLowerCase(); ++ ++ if (lowerStatus == 'begin' || ++ lowerStatus == 'apply' || ++ lowerStatus == 'applied' || ++ lowerStatus == 'accepted' || ++ lowerStatus == 'arrived') { ++ statusRide = status; ++ isStartAppHasRide = true; ++ final bool isBeginStatus = lowerStatus == 'begin'; ++ final bool isPickupStatus = lowerStatus == 'apply' || ++ lowerStatus == 'applied' || ++ lowerStatus == 'accepted' || ++ lowerStatus == 'arrived'; ++ currentRideState.value = lowerStatus == 'begin' ++ ? RideState.inProgress ++ : lowerStatus == 'arrived' ++ ? RideState.driverArrived ++ : RideState.driverApplied; ++ driverId = ++ rideStatusFromStartApp['data']['driver_id']?.toString() ?? ''; ++ driverName = ++ rideStatusFromStartApp['data']['driverName']?.toString() ?? ''; ++ driverRate = ++ rideStatusFromStartApp['data']['rateDriver']?.toString() ?? '5.0'; ++ final LatLng? pickupPoint = _parseLatLng( ++ rideStatusFromStartApp['data']['start_location']?.toString()); ++ final LatLng? destinationPoint = _parseLatLng( ++ rideStatusFromStartApp['data']['end_location']?.toString()); ++ if (pickupPoint != null) { ++ passengerLocation = pickupPoint; ++ } ++ if (destinationPoint != null) { ++ myDestination = destinationPoint; ++ } ++ statusRideFromStart = true; ++ update(); ++ ++ // Safe recovery of trip data ++ Map? tripData; ++ try { ++ var rawTrip = box.read(BoxName.tripData); ++ if (rawTrip is Map) { ++ tripData = Map.from(rawTrip); ++ } ++ } catch (e) { ++ Log.print("Error reading BoxName.tripData: $e"); ++ } ++ ++ String? pointsString = tripData?['polyline']; ++ ++ if (pointsString == null || pointsString.isEmpty) { ++ // No local polyline saved: Re-fetch the route from API ++ final String startLoc = ++ rideStatusFromStartApp['data']['start_location'] ?? ''; ++ final String endLoc = ++ rideStatusFromStartApp['data']['end_location'] ?? ''; ++ if (startLoc.isNotEmpty && endLoc.isNotEmpty) { ++ Log.print("🔄 Re-fetching route from API: $startLoc -> $endLoc"); ++ // Call getDirectionMap to fetch the route asynchronously ++ getDirectionMap(startLoc, endLoc, []); ++ } ++ } else { ++ List decodedPoints = ++ await compute(decodePolylineIsolate, pointsString); ++ ++ mapEngine.clearPolyline(); ++ mapEngine.polylineCoordinates.clear(); ++ mapEngine.polylineCoordinates.addAll(decodedPoints); ++ if (decodedPoints.isNotEmpty) { ++ passengerLocation = pickupPoint ?? decodedPoints.first; ++ myDestination = destinationPoint ?? decodedPoints.last; ++ } ++ var polyline = Polyline( ++ polylineId: const PolylineId('main_route'), ++ points: mapEngine.polylineCoordinates, ++ width: 6, ++ color: const Color(0xFF2196F3), ++ ); ++ ++ polyLines = {...polyLines, polyline}; ++ } ++ ++ timeToPassengerFromDriverAfterApplied = 0; ++ remainingTime = 0; ++ remainingTimeToPassengerFromDriverAfterApplied = 0; ++ remainingTimeDriverWaitPassenger5Minute = 0; ++ rideTimerBegin = isBeginStatus; ++ isDriverInPassengerWay = false; ++ isDriverArrivePassenger = false; ++ ++ // Safe durationToAdd parsing ++ if (tripData != null && tripData['distance_m'] != null) { ++ var distVal = tripData['distance_m']; ++ if (distVal is Duration) { ++ durationToAdd = distVal; ++ } else if (distVal is num) { ++ durationToAdd = Duration(seconds: distVal.toInt()); ++ } ++ } else { ++ durationToAdd = Duration.zero; ++ } ++ ++ mapSocket.initConnectionWithSocket(); ++ ++ if (isBeginStatus) { ++ _isRideBeginLogicExecuted = true; ++ _isRideStartedProcessed = true; ++ await getDriverCarsLocationToPassengerAfterApplied(); ++ if (driverCarsLocationToPassengerAfterApplied.isNotEmpty && ++ myDestination.latitude != 0 && ++ myDestination.longitude != 0) { ++ await calculateDriverToPassengerRoute( ++ driverCarsLocationToPassengerAfterApplied.last, ++ myDestination, ++ isBeginPhase: true, ++ ); ++ } ++ rideIsBeginPassengerTimer(); ++ runWhenRideIsBegin(); ++ } else if (isPickupStatus) { ++ _isAcceptanceProcessed = true; ++ _isDriverAppliedLogicExecuted = true; ++ await getDriverCarsLocationToPassengerAfterApplied(); ++ if (driverCarsLocationToPassengerAfterApplied.isNotEmpty) { ++ await calculateDriverToPassengerRoute( ++ driverCarsLocationToPassengerAfterApplied.last, ++ passengerLocation, ++ ); ++ startTimerFromDriverToPassengerAfterApplied(); ++ } ++ _startSocketWatchdog(); ++ } ++ update(); ++ } ++ } catch (e) { ++ Log.print("Error getRideStatusFromStartApp: $e"); ++ } ++ } ++ ++ void driverArrivePassenger() { ++ timeToPassengerFromDriverAfterApplied = 0; ++ remainingTime = 0; ++ update(); ++ rideIsBeginPassengerTimer(); ++ } ++ ++ void cancelTimerToPassengerFromDriverAfterApplied() { ++ timerToPassengerFromDriverAfterApplied?.cancel(); ++ } ++ ++ Future postRideDetailsToServer() async { ++ if (mapEngine.polylineCoordinates.isEmpty) return false; ++ ++ LatLng startLoc = mapEngine.polylineCoordinates.first; ++ LatLng endLoc = mapEngine.polylineCoordinates.last; ++ ++ Map payload = { ++ "start_location": '${startLoc.latitude},${startLoc.longitude}', ++ "end_location": '${endLoc.latitude},${endLoc.longitude}', ++ "date": DateTime.now().toString(), ++ "time": DateTime.now().toString(), ++ "endtime": "00:00:00", ++ "price": totalPassenger.toStringAsFixed(2), ++ "passenger_id": box.read(BoxName.passengerID).toString(), ++ "driver_id": "0", ++ "status": "waiting", ++ "carType": box.read(BoxName.carType), ++ "price_for_driver": totalPassenger.toString(), ++ "price_for_passenger": totalME.toString(), ++ "distance": distance.toString(), ++ "passenger_name": box.read(BoxName.name).toString(), ++ "passenger_phone": box.read(BoxName.phone).toString(), ++ "passenger_token": box.read(BoxName.tokenFCM).toString(), ++ "passenger_email": box.read(BoxName.email).toString(), ++ "passenger_wallet": box.read(BoxName.passengerWalletTotal).toString(), ++ "passenger_rating": (passengerRate ?? 5.0).toString(), ++ "start_name": startNameAddress, ++ "end_name": endNameAddress, ++ "duration_text": "${(durationToRide / 60).floor()}", ++ "distance_text": "$distance", ++ "is_wallet": Get.find().isWalletChecked.toString(), ++ "has_steps": Get.find().wayPoints.length > 1 ++ ? 'true' ++ : 'false', ++ "step0": placesCoordinate.length > 0 ? placesCoordinate[0] : "", ++ "step1": placesCoordinate.length > 1 ? placesCoordinate[1] : "", ++ "step2": placesCoordinate.length > 2 ? placesCoordinate[2] : "", ++ "step3": placesCoordinate.length > 3 ? placesCoordinate[3] : "", ++ "step4": placesCoordinate.length > 4 ? placesCoordinate[4] : "", ++ }; ++ ++ Log.print(' 📦 Payload: $payload'); ++ ++ try { ++ var response = await CRUD().post( ++ link: "${AppLink.server}/ride/rides/add_ride.php", payload: payload); ++ ++ var jsonResponse = (response is String) ? jsonDecode(response) : response; ++ ++ if (jsonResponse['status'] == 'success') { ++ rideId = jsonResponse['message'].toString(); ++ Log.print("✅ Ride Created ID: $rideId"); ++ return true; ++ } else { ++ Log.print("❌ Ride Creation Failed: $response"); ++ return false; ++ } ++ } catch (e) { ++ Log.print("❌ Exception in postRide: $e"); ++ return false; ++ } ++ } ++ ++ Future rideAppliedFromDriver(bool isApplied) async { ++ Log.print('[rideAppliedFromDriver] 🚀 Starting logic...'); ++ await getUpdatedRideForDriverApply(rideId); ++ ++ if (['Speed', 'Awfar Car'].contains(box.read(BoxName.carType))) { ++ NotificationController().showNotification('Fixed Price'.tr, ++ 'The captain is responsible for the route.'.tr, 'ding'); ++ } else if (['Comfort', 'Lady'].contains(box.read(BoxName.carType))) { ++ NotificationController().showNotification('Attention'.tr, ++ 'The price may increase if the route changes.'.tr, 'ding'); ++ } ++ ++ isApplied = true; ++ statusRide = 'Apply'; ++ rideConfirm = false; ++ isSearchingWindow = false; ++ _isDriverAppliedLogicExecuted = true; ++ ++ update(); ++ ++ // إيقاف جلب السيارات المجاورة ومسحها، باستثناء السائق الذي قبل الطلب ++ mapEngine.reloadStartApp = false; ++ mapEngine.markers.removeWhere((marker) => marker.markerId.value != driverId.toString()); ++ mapEngine.update(); ++ ++ await getDriverCarsLocationToPassengerAfterApplied(); ++ ++ if (driverCarsLocationToPassengerAfterApplied.isNotEmpty) { ++ LatLng driverPos = driverCarsLocationToPassengerAfterApplied.last; ++ Log.print( ++ '[rideAppliedFromDriver] 📍 Driver at: $driverPos, Passenger at: $passengerLocation'); ++ await getInitialDriverDistanceAndDuration(driverPos, passengerLocation); ++ await drawDriverPathOnly(driverPos, passengerLocation); ++ mapEngine.fitCameraToPoints(driverPos, passengerLocation); ++ } ++ ++ startTimerFromDriverToPassengerAfterApplied(); ++ } ++ ++ Future getInitialDriverDistanceAndDuration( ++ LatLng driverPos, LatLng passengerPos) async { ++ final String apiUrl = 'https://routec.intaleq.xyz/route'; ++ final String apiKey = Env.mapKeyOsm; ++ final String origin = '${driverPos.latitude},${driverPos.longitude}'; ++ final String dest = '${passengerPos.latitude},${passengerPos.longitude}'; ++ ++ final Uri uri = Uri.parse( ++ '$apiUrl?origin=$origin&destination=$dest&steps=false&overview=false'); ++ ++ try { ++ final response = await http.get(uri, headers: {'X-API-KEY': apiKey}); ++ if (response.statusCode == 200) { ++ final data = jsonDecode(response.body); ++ if (data['status'] == 'ok') { ++ double durationSecondsRaw = (data['duration_s'] as num).toDouble(); ++ int finalDurationSeconds = ++ (durationSecondsRaw * kDurationScalar).toInt(); ++ double distanceMeters = (data['distance_m'] as num).toDouble(); ++ ++ updateDriverRouteMetrics( ++ etaSeconds: finalDurationSeconds, ++ distanceMeters: distanceMeters, ++ ); ++ ++ update(); ++ } ++ } ++ } catch (e) { ++ Log.print('Error getInitialDriverDistanceAndDuration: $e'); ++ } ++ } ++ ++ int durationToPassenger = 0; ++ String distanceByPassenger = ''; ++ ++ Future drawDriverPathOnly(LatLng driverPos, LatLng passengerPos) async { ++ final String apiUrl = 'https://routec.intaleq.xyz/route'; ++ final String apiKey = Env.mapKeyOsm; ++ final String origin = '${driverPos.latitude},${driverPos.longitude}'; ++ final String dest = '${passengerPos.latitude},${passengerPos.longitude}'; ++ ++ final Uri uri = Uri.parse( ++ '$apiUrl?origin=$origin&destination=$dest&steps=false&overview=full'); ++ ++ try { ++ final response = await http.get(uri, headers: {'X-API-KEY': apiKey}); ++ if (response.statusCode == 200) { ++ final data = jsonDecode(response.body); ++ if (data['status'] == 'ok' && data['polyline'] != null) { ++ final String pointsString = data['polyline']; ++ List decodedPoints = ++ await compute(decodePolylineIsolate, pointsString); ++ _currentDriverRoutePoints = decodedPoints; ++ final double decodedDistance = _pathDistanceMeters(decodedPoints); ++ if (decodedDistance > 0) { ++ _currentDriverRouteDistanceMeters = decodedDistance; ++ } ++ ++ polyLines = polyLines ++ .where((p) => ++ !p.polylineId.value.startsWith('driver_route') && ++ p.polylineId.value != 'main_route' && ++ p.polylineId.value != 'route_primary' && ++ p.polylineId.value != 'route_direct') ++ .toSet(); ++ ++ // رسم خط صلب (Solid) من السائق للراكب ++ final Polyline driverSolidPolyline = Polyline( ++ polylineId: const PolylineId('driver_route_solid'), ++ points: decodedPoints, ++ color: Colors.amber, // مسار القدوم باللون الأصفر ++ width: 5, ++ ); ++ polyLines.add(driverSolidPolyline); ++ update(); ++ } ++ } ++ } catch (e) { ++ Log.print('Error drawing driver path: $e'); ++ } ++ } ++ ++ void listenToRideStatusStream() { ++ rideStatusStream.listen((rideStatus) { ++ Log.print("Ride Status: $rideStatus"); ++ }, onError: (error) { ++ Log.print("Error in Ride Status Stream: $error"); ++ }); ++ } ++ ++ void start15SecondTimer(String rideId) {} ++ ++ void startUiCountdown() { ++ _uiCountdownTimer?.cancel(); ++ progress = 0; ++ remainingTime = durationTimer; ++ ++ _uiCountdownTimer = Timer.periodic(const Duration(seconds: 1), (timer) { ++ int i = timer.tick; ++ progress = i / durationTimer; ++ remainingTime = durationTimer - i; ++ ++ if (remainingTime <= 0) { ++ timer.cancel(); ++ rideConfirm = false; ++ timeToPassengerFromDriverAfterApplied += durationToPassenger; ++ timerEnded(); ++ } ++ update(); ++ }); ++ } ++ ++ double progress = 0; ++ int durationTimer = 9; ++ ++ void timerEnded() async { ++ runEvery30SecondsUntilConditionMet(); ++ isCancelRidePageShown = false; ++ update(); ++ } ++ ++ late String driverCarModel = '', driverCarMake = '', driverLicensePlate = ''; ++ ++ Future getUpdatedRideForDriverApply(String rideId) async { ++ if (rideId == 'yet' || rideId.isEmpty) return; ++ ++ try { ++ final res = await CRUD().get( ++ link: "${AppLink.server}/ride/rides/getRideOrderID.php", ++ payload: {'passengerID': box.read(BoxName.passengerID).toString()}); ++ ++ if (res != 'failure') { ++ var response = jsonDecode(res); ++ Log.print('getUpdatedRideForDriverApply Response: $response'); ++ ++ if (response['status'] == 'success' && ++ response['data'] != null && ++ response['data'] is Map) { ++ var data = response['data']; ++ ++ driverId = data['driver_id']?.toString() ?? ''; ++ driverPhone = data['phone']?.toString() ?? ''; ++ driverCarMake = data['make']?.toString() ?? ''; ++ model = data['model']?.toString() ?? ''; ++ colorHex = data['color_hex']?.toString() ?? ''; ++ carColor = data['color']?.toString() ?? ''; ++ make = data['make']?.toString() ?? ''; ++ licensePlate = data['car_plate']?.toString() ?? ''; ++ ++ String firstName = data['passengerName']?.toString() ?? ''; ++ String lastName = data['last_name']?.toString() ?? ''; ++ passengerName = ++ lastName.isNotEmpty ? "$firstName $lastName" : firstName; ++ driverName = data['driverName']?.toString() ?? ''; ++ driverToken = data['token']?.toString() ?? ''; ++ carYear = data['year']?.toString() ?? ''; ++ driverRate = data['ratingDriver']?.toString() ?? '5.0'; ++ ++ update(); ++ } ++ } ++ } catch (e) { ++ Log.print("Error in getUpdatedRideForDriverApply: $e"); ++ } ++ } ++ ++ String getLocationArea(double latitude, double longitude) { ++ LatLng passengerPoint = LatLng(latitude, longitude); ++ String previousCountry = box.read(BoxName.countryCode)?.toString() ?? ''; ++ String newCountry = 'Jordan'; ++ ++ if (isPointInPolygon(passengerPoint, CountryPolygons.jordanBoundary)) { ++ newCountry = 'Jordan'; ++ } else if (isPointInPolygon( ++ passengerPoint, CountryPolygons.syriaBoundary)) { ++ newCountry = 'Syria'; ++ } else if (isPointInPolygon( ++ passengerPoint, CountryPolygons.egyptBoundary)) { ++ newCountry = 'Egypt'; ++ } else { ++ newCountry = 'Jordan'; ++ } ++ ++ box.write(BoxName.countryCode, newCountry); ++ box.write(BoxName.serverChosen, AppLink.server); ++ ++ if (newCountry != previousCountry) { ++ unawaited(getKazanPercent()); ++ } ++ ++ return newCountry; ++ } ++ ++ bool isPointInPolygon(LatLng point, List polygon) { ++ int intersections = 0; ++ for (int i = 0; i < polygon.length; i++) { ++ LatLng vertex1 = polygon[i]; ++ LatLng vertex2 = polygon[(i + 1) % polygon.length]; ++ ++ if (_rayIntersectsSegment(point, vertex1, vertex2)) { ++ intersections++; ++ } ++ } ++ return intersections % 2 != 0; ++ } ++ ++ bool _rayIntersectsSegment(LatLng point, LatLng vertex1, LatLng vertex2) { ++ double px = point.longitude; ++ double py = point.latitude; ++ double v1x = vertex1.longitude; ++ double v1y = vertex1.latitude; ++ double v2x = vertex2.longitude; ++ double v2y = vertex2.latitude; ++ ++ if ((py < v1y && py < v2y) || (py > v1y && py > v2y)) { ++ return false; ++ } ++ double intersectX = v1x + (py - v1y) * (v2x - v1x) / (v2y - v1y); ++ return intersectX > px; ++ } ++ ++ String generateTrackingLink(String rideId, String driverId) { ++ String cleanRideId = rideId.toString().trim(); ++ String cleanDriverId = driverId.toString().trim(); ++ const String secretSalt = "Intaleq_Secure_Track_2025"; ++ ++ String rawString = "$cleanRideId$cleanDriverId$secretSalt"; ++ var bytes = utf8.encode(rawString); ++ var digest = md5.convert(bytes); ++ String token = digest.toString(); ++ ++ return "https://intaleqapp.com/track/index.php?id=$cleanRideId&token=$token"; ++ } ++ ++ calcualateDistsanceInMetet(LatLng prev, current) async { ++ double distance2 = Geolocator.distanceBetween( ++ prev.latitude, ++ prev.longitude, ++ current.latitude, ++ current.longitude, ++ ); ++ return distance2; ++ } ++ ++ uploadPassengerLocation() async { ++ await CRUD().post(link: AppLink.addpassengerLocation, payload: { ++ "passengerId": box.read(BoxName.passengerID), ++ "lat": passengerLocation.latitude.toString(), ++ "lng": passengerLocation.longitude.toString(), ++ "rideId": rideId.toString() ++ }); ++ } ++ ++ void _showRideStartNotifications() { ++ if (['Speed', 'Awfar Car'].contains(box.read(BoxName.carType))) { ++ NotificationController().showNotification('Fixed Price'.tr, ++ 'The captain is responsible for the route.'.tr, 'ding'); ++ } else if (['Comfort', 'Lady'].contains(box.read(BoxName.carType))) { ++ NotificationController().showNotification('Attention'.tr, ++ 'The price may increase if the route changes.'.tr, 'ding'); ++ } ++ } ++ ++ bool promoTaken = false; ++ final promo = TextEditingController(); ++ ++ void applyPromoCodeToPassenger(BuildContext context) async { ++ if (promoTaken == true) { ++ MyDialog().getDialog( ++ 'Promo Already Used'.tr, ++ 'You have already used this promo code.'.tr, ++ () => Get.back(), ++ ); ++ return; ++ } ++ ++ if (!promoFormKey.currentState!.validate()) return; ++ ++ const double minPromoLowSYP = 172; ++ const double minPromoHighSYP = 200; ++ ++ try { ++ final value = await CRUD().get( ++ link: AppLink.getPassengersPromo, ++ payload: {'promo_code': promo.text}, ++ ); ++ ++ if (value == 'failure') { ++ MyDialog().getDialog( ++ 'Promo Ended'.tr, ++ 'The promotion period has ended.'.tr, ++ () => Get.back(), ++ ); ++ return; ++ } ++ ++ final bool eligibleNow = (totalPassengerSpeed >= minPromoLowSYP) || ++ (totalPassengerBalash >= minPromoLowSYP) || ++ (totalPassengerComfort >= minPromoHighSYP) || ++ (totalPassengerElectric >= minPromoHighSYP) || ++ (totalPassengerLady >= minPromoHighSYP); ++ ++ if (!eligibleNow) { ++ Get.snackbar( ++ 'Lowest Price Achieved'.tr, ++ 'Cannot apply further discounts.'.tr, ++ backgroundColor: AppColor.yellowColor, ++ ); ++ return; ++ } ++ ++ final decode = jsonDecode(value); ++ if (decode["status"] != "success") { ++ MyDialog().getDialog( ++ 'Promo Ended'.tr, ++ 'The promotion period has ended.'.tr, ++ () => Get.back(), ++ ); ++ return; ++ } ++ ++ Get.snackbar('Promo Code Accepted'.tr, '', ++ backgroundColor: AppColor.greenColor); ++ ++ final firstElement = decode["message"][0]; ++ final int discountPercentage = ++ int.tryParse(firstElement['amount'].toString()) ?? 0; ++ ++ final double walletVal = double.tryParse( ++ box.read(BoxName.passengerWalletTotal)?.toString() ?? '0') ?? ++ 0.0; ++ ++ final bool isWalletNegative = walletVal < 0; ++ ++ double _applyDiscountPerTier({ ++ required double fare, ++ required double minThreshold, ++ required bool isWalletNegative, ++ }) { ++ if (fare < minThreshold) return fare; ++ ++ final double discount = fare * (discountPercentage / 100.0); ++ double result; ++ ++ if (isWalletNegative) { ++ double neg = (-1) * walletVal; ++ result = fare + neg - discount; ++ } else { ++ result = fare - discount; ++ } ++ ++ if (result < minThreshold) { ++ result = minThreshold; ++ } ++ return result.clamp(0.0, double.infinity); ++ } ++ ++ totalPassengerComfort = _applyDiscountPerTier( ++ fare: totalPassengerComfort, ++ minThreshold: minPromoHighSYP, ++ isWalletNegative: isWalletNegative, ++ ); ++ ++ totalPassengerElectric = _applyDiscountPerTier( ++ fare: totalPassengerElectric, ++ minThreshold: minPromoHighSYP, ++ isWalletNegative: isWalletNegative, ++ ); ++ ++ totalPassengerLady = _applyDiscountPerTier( ++ fare: totalPassengerLady, ++ minThreshold: minPromoHighSYP, ++ isWalletNegative: isWalletNegative, ++ ); ++ ++ totalPassengerSpeed = _applyDiscountPerTier( ++ fare: totalPassengerSpeed, ++ minThreshold: minPromoLowSYP, ++ isWalletNegative: isWalletNegative, ++ ); ++ ++ totalPassengerBalash = _applyDiscountPerTier( ++ fare: totalPassengerBalash, ++ minThreshold: minPromoLowSYP, ++ isWalletNegative: isWalletNegative, ++ ); ++ ++ totalDriver = totalDriver - (totalDriver * discountPercentage / 100.0); ++ promoTaken = true; ++ update(); ++ ++ Confetti.launch( ++ context, ++ options: const ConfettiOptions(particleCount: 100, spread: 70, y: 0.6), ++ ); ++ ++ Get.back(); ++ await Future.delayed(const Duration(milliseconds: 120)); ++ } catch (e) { ++ Get.snackbar('Error'.tr, e.toString(), ++ backgroundColor: AppColor.redColor); ++ } ++ } ++ ++ double getDistanceFromText(String distanceText) { ++ String distanceValue = distanceText.replaceAll(RegExp(r'[^0-9.]+'), ''); ++ double distance = double.parse(distanceValue); ++ return distance; ++ } ++ ++ double costForDriver = 0; ++ ++ Future bottomSheet() async { ++ const double minFareSYP = 160; ++ const double minBillableKm = 0.3; ++ const double ladyFlatAddon = 20; ++ const double airportAddonSYP = 200; ++ const double damascusAirportBoundAddon = 1400; ++ ++ const double electricPerKmUplift = 4; ++ const double electricFlatAddon = 10; ++ ++ const double longSpeedThresholdKm = 40.0; ++ const double longSpeedPerKm = 26.0; ++ ++ const double mediumDistThresholdKm = 25.0; ++ const double longDistThresholdKm = 35.0; ++ const double longTripPerMin = 6.0; ++ const int minuteCapMedium = 60; ++ const int minuteCapLong = 80; ++ const int freeMinutesLong = 10; ++ ++ const double extraReduction100 = 0.07; ++ const double maxReductionCap = 0.35; ++ ++ durationToAdd = Duration(seconds: durationToRide); ++ hours = durationToAdd.inHours; ++ minutes = (durationToAdd.inMinutes % 60).round(); ++ final DateTime currentTime = DateTime.now(); ++ newTime = currentTime.add(durationToAdd); ++ averageDuration = (durationToRide / 60) / distance; ++ final int waypointSurchargeMinutes = activeMenuWaypointCount * 5; ++ final int totalMinutes = ++ (durationToRide / 60).floor() + waypointSurchargeMinutes; ++ ++ bool _isAirport(String s) { ++ final t = s.toLowerCase(); ++ return t.contains('airport') || ++ s.contains('مطار') || ++ s.contains('المطار'); ++ } ++ ++ bool _isClub(String s) { ++ final t = s.toLowerCase(); ++ return t.contains('club') || ++ t.contains('nightclub') || ++ t.contains('night club') || ++ s.contains('ديسكو') || ++ s.contains('ملهى ليلي'); ++ } ++ ++ bool _isInsideDamascusAirportBounds(double lat, double lng) { ++ final double northLat = 33.415313; ++ final double southLat = 33.400265; ++ final double eastLng = 36.531505; ++ final double westLng = 36.499687; ++ ++ bool isLatInside = (lat <= northLat) && (lat >= southLat); ++ bool isLngInside = (lng <= eastLng) && (lng >= westLng); ++ return isLatInside && isLngInside; ++ } ++ ++ final double naturePerMin = naturePrice; ++ final double latePerMin = latePrice; ++ final double heavyPerMin = heavyPrice; ++ ++ double _perMinuteByTime(DateTime now, bool clubCtx) { ++ final h = now.hour; ++ if (h >= 21 || h < 1) return latePerMin; ++ if (h >= 1 && h < 5) return clubCtx ? (latePerMin * 2) : latePerMin; ++ if (h >= 14 && h <= 17) return heavyPerMin; ++ return naturePerMin; ++ } ++ ++ double _applyMinFare(double fare) => ++ (fare < minFareSYP) ? minFareSYP : fare; ++ ++ double _withCommission(double base) => ++ (base * (1 + kazan / 100)).ceilToDouble(); ++ ++ final bool airportCtx = ++ _isAirport(startNameAddress) || _isAirport(endNameAddress); ++ final bool clubCtx = _isClub(startNameAddress) || _isClub(endNameAddress); ++ ++ double destLat = 0.0; ++ double destLng = 0.0; ++ try { ++ destLat = myDestination.latitude; ++ destLng = myDestination.longitude; ++ } catch (_) { ++ if (locSearch.coordinatesWithoutEmpty.isNotEmpty) { ++ destLat = double.tryParse( ++ locSearch.coordinatesWithoutEmpty.last.split(',')[0]) ?? ++ 0.0; ++ destLng = double.tryParse( ++ locSearch.coordinatesWithoutEmpty.last.split(',')[1]) ?? ++ 0.0; ++ } ++ } ++ ++ final bool damascusAirportBoundCtx = ++ _isInsideDamascusAirportBounds(destLat, destLng); ++ final bool isInDamascusAirportBoundCtx = _isInsideDamascusAirportBounds( ++ newMyLocation.latitude.toDouble(), ++ newMyLocation.longitude.toDouble(), ++ ); ++ ++ final double billableDistance = ++ (distance < minBillableKm) ? minBillableKm : distance; ++ ++ final bool isLongSpeed = billableDistance > longSpeedThresholdKm; ++ final double perKmSpeedBaseFromServer = speedPrice; ++ final double perKmSpeed = ++ isLongSpeed ? longSpeedPerKm : perKmSpeedBaseFromServer; ++ ++ double reductionPct40 = 0.0; ++ if (perKmSpeedBaseFromServer > 0) { ++ reductionPct40 = (1.0 - (longSpeedPerKm / perKmSpeedBaseFromServer)) ++ .clamp(0.0, maxReductionCap); ++ } ++ final double reductionPct100 = ++ (reductionPct40 + extraReduction100).clamp(0.0, maxReductionCap); ++ double distanceReduction = 0.0; ++ if (billableDistance > 100.0) { ++ distanceReduction = reductionPct100; ++ } else if (billableDistance > 40.0) { ++ distanceReduction = reductionPct40; ++ } ++ ++ double effectivePerMin = _perMinuteByTime(currentTime, clubCtx); ++ int billableMinutes = totalMinutes; ++ if (billableDistance > longDistThresholdKm) { ++ effectivePerMin = longTripPerMin; ++ final int capped = ++ (billableMinutes > minuteCapLong) ? minuteCapLong : billableMinutes; ++ billableMinutes = capped - freeMinutesLong; ++ if (billableMinutes < 0) billableMinutes = 0; ++ } else if (billableDistance > mediumDistThresholdKm) { ++ effectivePerMin = longTripPerMin; ++ billableMinutes = (billableMinutes > minuteCapMedium) ++ ? minuteCapMedium ++ : billableMinutes; ++ } ++ ++ final double perKmComfortRaw = comfortPrice; ++ final double perKmDelivery = deliveryPrice; ++ final double perKmVanRaw = ++ (familyPrice > 0 ? familyPrice : (speedPrice + 13)); ++ final double perKmElectricRaw = perKmComfortRaw + electricPerKmUplift; ++ ++ double perKmComfort = perKmComfortRaw * (1.0 - distanceReduction); ++ double perKmElectric = perKmElectricRaw * (1.0 - distanceReduction); ++ double perKmVan = perKmVanRaw * (1.0 - distanceReduction); ++ perKmComfort = perKmComfort.clamp(0, double.infinity); ++ perKmElectric = perKmElectric.clamp(0, double.infinity); ++ perKmVan = perKmVan.clamp(0, double.infinity); ++ final double perKmBalash = (perKmSpeed - 5).clamp(0, double.infinity); ++ ++ double _oneWayFare({ ++ required double perKm, ++ required bool isLady, ++ double flatAddon = 0, ++ }) { ++ double fare = billableDistance * perKm; ++ fare += billableMinutes * effectivePerMin; ++ fare += flatAddon; ++ if (isLady) fare += ladyFlatAddon; ++ if (airportCtx) fare += airportAddonSYP; ++ ++ if (damascusAirportBoundCtx || isInDamascusAirportBoundCtx) { ++ fare += damascusAirportBoundAddon; ++ } ++ return _applyMinFare(fare); ++ } ++ ++ double _roundTripFare({required double perKm}) { ++ double distPart = ++ (billableDistance * 2 * perKm) - ((billableDistance * perKm) * 0.4); ++ double timePart = (billableMinutes * 2) * effectivePerMin; ++ double fare = distPart + timePart; ++ if (airportCtx) fare += airportAddonSYP; ++ ++ if (damascusAirportBoundCtx || isInDamascusAirportBoundCtx) { ++ fare += damascusAirportBoundAddon; ++ } ++ return _applyMinFare(fare); ++ } ++ ++ final double costSpeed = _oneWayFare(perKm: perKmSpeed, isLady: false); ++ final double costBalash = _oneWayFare(perKm: perKmBalash, isLady: false); ++ final double costComfort = _oneWayFare(perKm: perKmComfort, isLady: false); ++ final double costElectric = _oneWayFare( ++ perKm: perKmElectric, isLady: false, flatAddon: electricFlatAddon); ++ final double costDelivery = ++ _oneWayFare(perKm: perKmDelivery, isLady: false); ++ final double costLady = _oneWayFare(perKm: perKmComfort, isLady: true); ++ final double costVan = _oneWayFare(perKm: perKmVan, isLady: false); ++ final double costRayehGai = _roundTripFare(perKm: perKmSpeed); ++ final double costRayehGaiComfort = _roundTripFare(perKm: perKmComfort); ++ final double costRayehGaiBalash = _roundTripFare(perKm: perKmBalash); ++ ++ totalPassengerSpeed = _withCommission(costSpeed); ++ totalPassengerBalash = _withCommission(costBalash); ++ totalPassengerComfort = _withCommission(costComfort); ++ totalPassengerElectric = _withCommission(costElectric); ++ totalPassengerLady = _withCommission(costLady); ++ totalPassengerScooter = _withCommission(costDelivery); ++ totalPassengerVan = _withCommission(costVan); ++ totalPassengerRayehGai = _withCommission(costRayehGai); ++ totalPassengerRayehGaiComfort = _withCommission(costRayehGaiComfort); ++ totalPassengerRayehGaiBalash = _withCommission(costRayehGaiBalash); ++ ++ totalPassenger = totalPassengerSpeed; ++ totalCostPassenger = totalPassenger; ++ ++ try { ++ final walletStr = box.read(BoxName.passengerWalletTotal).toString(); ++ final walletVal = double.tryParse(walletStr) ?? 0.0; ++ if (walletVal < 0) { ++ final neg = (-1) * walletVal; ++ totalPassenger += neg; ++ totalPassengerComfort += neg; ++ totalPassengerElectric += neg; ++ totalPassengerLady += neg; ++ totalPassengerBalash += neg; ++ totalPassengerScooter += neg; ++ totalPassengerRayehGai += neg; ++ totalPassengerRayehGaiComfort += neg; ++ totalPassengerRayehGaiBalash += neg; ++ totalPassengerVan += neg; ++ } ++ } catch (e) { ++ Log.print("Error: $e"); ++ } ++ ++ update(); ++ mapEngine.changeBottomSheetShown(forceValue: true); ++ } ++ ++ // حساب المسار بين السائق والراكب وعرضه على الخريطة. ++ // ترسل هذه الدالة طلبًا للخادم للحصول على إحداثيات المسار وتفك تشفيره. ++ // ثم تقوم بتحديث المسافة والوقت وعرض الخطوط المناسبة على الخريطة. ++ Future calculateDriverToPassengerRoute( ++ LatLng driverPos, LatLng passengerPos, ++ {bool isBeginPhase = false}) async { ++ final Map queryParams = { ++ 'fromLat': driverPos.latitude.toString(), ++ 'fromLng': driverPos.longitude.toString(), ++ 'toLat': passengerPos.latitude.toString(), ++ 'toLng': passengerPos.longitude.toString(), ++ }; ++ final uri = ++ Uri.parse(AppLink.mapSaasRoute).replace(queryParameters: queryParams); ++ ++ Log.print('📍 Calculating Driver Route: $uri'); ++ ++ try { ++ final response = await http.get(uri, headers: { ++ 'x-api-key': Env.mapSaasKey, ++ }).timeout(const Duration(seconds: 20)); ++ ++ if (response.statusCode == 200) { ++ final responseData = json.decode(response.body); ++ ++ var routeData = responseData['routes'] != null ++ ? responseData['routes'][0] ++ : responseData; ++ ++ double durationSecondsRaw = (routeData['duration'] as num).toDouble(); ++ int finalDurationSeconds = ++ (durationSecondsRaw * kDurationScalar).toInt(); ++ double distanceMeters = (routeData['distance'] as num).toDouble(); ++ ++ updateDriverRouteMetrics( ++ etaSeconds: finalDurationSeconds, ++ distanceMeters: distanceMeters, ++ ); ++ _currentDriverRouteDistanceMeters = distanceMeters; ++ _currentDriverRouteDurationSeconds = finalDurationSeconds; ++ ++ int minutes = (finalDurationSeconds / 60).floor(); ++ int seconds = finalDurationSeconds % 60; ++ stringRemainingTimeToPassenger = ++ '$minutes:${seconds.toString().padLeft(2, '0')}'; ++ ++ Log.print( ++ '✅ Driver Route Info: $minutes min, ${distanceMeters.toInt()} m'); ++ ++ String pointsString = ++ routeData['points'] ?? routeData['geometry'] ?? ""; ++ if (pointsString.isNotEmpty) { ++ List decodedPoints = ++ await compute(decodePolylineIsolate, pointsString); ++ _currentDriverRoutePoints = decodedPoints; ++ final double decodedDistance = _pathDistanceMeters(decodedPoints); ++ if (decodedDistance > 0) { ++ _currentDriverRouteDistanceMeters = decodedDistance; ++ } ++ // مسح كل السلمات السابقة (الخط المستمر والمتقطع على حد سواء) ++ polyLines = polyLines ++ .where((p) => ++ !p.polylineId.value.startsWith('driver_route') && ++ p.polylineId.value != 'main_route' && ++ p.polylineId.value != 'route_primary' && ++ p.polylineId.value != 'route_direct') ++ .toSet(); ++ ++ if (isBeginPhase) { ++ // حالة Begin: لا نرسم مسار السائق القديم إطلاقاً لأنه وصل والآن الرحلة ستبدأ ++ polyLines = polyLines ++ .where((p) => !p.polylineId.value.startsWith('driver_route')) ++ .toSet(); ++ } else { ++ // مسح السلمات القديمة أولاً ++ polyLines = polyLines ++ .where((p) => ++ !p.polylineId.value.startsWith('driver_route') && ++ p.polylineId.value != 'main_route' && ++ p.polylineId.value != 'route_primary' && ++ p.polylineId.value != 'route_direct') ++ .toSet(); ++ // حالة Apply/Arrived: خط متصل صلب بدل المتقطع ++ polyLines = { ++ ...polyLines, ++ Polyline( ++ polylineId: const PolylineId('driver_route_solid'), ++ points: decodedPoints, ++ color: Colors.amber, // مسار القدوم باللون الأصفر ++ width: 5, ++ ) ++ }; ++ } ++ } ++ ++ mapEngine.fitCameraToPoints(driverPos, passengerPos); ++ update(); ++ } ++ } catch (e) { ++ Log.print('❌ Error calculating driver route: $e'); ++ } ++ } ++ ++ Future checkAndRecalculateIfDeviated( ++ LatLng driverPos, { ++ double? heading, ++ double? speed, ++ }) async { ++ if (_isRecalculatingRoute || _currentDriverRoutePoints.isEmpty) return; ++ ++ double minDistance = 100000.0; ++ int closestIdx = 0; ++ for (int idx = 0; idx < _currentDriverRoutePoints.length; idx++) { ++ final point = _currentDriverRoutePoints[idx]; ++ double dist = Geolocator.distanceBetween(driverPos.latitude, ++ driverPos.longitude, point.latitude, point.longitude); ++ if (dist < minDistance) { ++ minDistance = dist; ++ closestIdx = idx; ++ } ++ } ++ ++ final bool distanceDeviation = minDistance > _deviationThresholdMeters; ++ final bool headingDeviation = _isHeadingAwayFromRoute( ++ heading: heading, ++ speed: speed, ++ closestRouteIndex: closestIdx, ++ distanceFromRouteMeters: minDistance, ++ ); ++ ++ if (!headingDeviation) { ++ _routeHeadingMismatchCount = 0; ++ } else { ++ _routeHeadingMismatchCount++; ++ } ++ ++ if (distanceDeviation || _routeHeadingMismatchCount >= 2) { ++ Log.print( ++ "⚠️ Driver deviated (${minDistance.toStringAsFixed(1)} m, heading mismatch: $_routeHeadingMismatchCount). Recalculating route..."); ++ _routeHeadingMismatchCount = 0; ++ _isRecalculatingRoute = true; ++ if (statusRide == 'Begin' || ++ currentRideState.value == RideState.inProgress) { ++ await calculateDriverToPassengerRoute(driverPos, myDestination, ++ isBeginPhase: true); ++ } else { ++ await calculateDriverToPassengerRoute(driverPos, passengerLocation); ++ } ++ _isRecalculatingRoute = false; ++ } ++ } ++ ++ // تحديث الجزء المتبقي من المسار والمسافة والوقت بشكل تفاعلي. ++ // تحدد الدالة أقرب نقطة للسائق على المسار الحالي وتقوم بقص النقاط السابقة. ++ // ثم تعيد حساب المسافة والوقت المتبقيين محلياً وتحديث الخطوط على الخريطة. ++ void updateRemainingRoute(LatLng driverPos, {bool updateEta = true}) { ++ if (_currentDriverRoutePoints.isEmpty) return; ++ ++ int closestIdx = 0; ++ double minDistance = double.infinity; ++ for (int i = 0; i < _currentDriverRoutePoints.length; i++) { ++ double dist = Geolocator.distanceBetween( ++ driverPos.latitude, ++ driverPos.longitude, ++ _currentDriverRoutePoints[i].latitude, ++ _currentDriverRoutePoints[i].longitude); ++ if (dist < minDistance) { ++ minDistance = dist; ++ closestIdx = i; ++ } ++ } ++ ++ if (minDistance < 150.0) { ++ List remainingPoints = ++ _currentDriverRoutePoints.sublist(closestIdx); ++ ++ if (updateEta) { ++ final double remainingDistance = _pathDistanceMeters(remainingPoints); ++ int remainingDuration = _currentDriverRouteDurationSeconds; ++ if (remainingDistance > 0 && ++ _currentDriverRouteDistanceMeters > 0 && ++ _currentDriverRouteDurationSeconds > 0) { ++ remainingDuration = ++ ((_currentDriverRouteDurationSeconds * remainingDistance) / ++ _currentDriverRouteDistanceMeters) ++ .round(); ++ } ++ ++ remainingDuration = max(0, remainingDuration); ++ updateDriverRouteMetrics( ++ etaSeconds: remainingDuration, ++ distanceMeters: remainingDistance, ++ ); ++ } ++ ++ polyLines = polyLines ++ .where((p) => ++ !p.polylineId.value.startsWith('driver_route') && ++ p.polylineId.value != 'main_route' && ++ p.polylineId.value != 'route_primary' && ++ p.polylineId.value != 'route_direct') ++ .toSet(); ++ ++ if (statusRide == 'Begin' || ++ currentRideState.value == RideState.inProgress) { ++ // لا نرسم أي شيء في حالة البدء لأنه وصل ++ polyLines = polyLines ++ .where((p) => !p.polylineId.value.startsWith('driver_route')) ++ .toSet(); ++ } else { ++ polyLines = { ++ ...polyLines, ++ Polyline( ++ polylineId: const PolylineId('driver_route_solid'), ++ points: remainingPoints, ++ color: Colors.amber, ++ width: 5, ++ ), ++ }; ++ } ++ update(); ++ } ++ } ++ ++ Future getDriverCarsLocationToPassengerAfterApplied() async { ++ bool isRideActive = (statusRide == 'Apply' || ++ statusRide == 'Arrived' || ++ statusRide == 'Begin' || ++ currentRideState.value == RideState.driverApplied || ++ currentRideState.value == RideState.driverArrived || ++ currentRideState.value == RideState.inProgress); ++ ++ if (!isRideActive || ++ statusRide == 'Finished' || ++ statusRide == 'Cancel' || ++ currentRideState.value == RideState.finished || ++ currentRideState.value == RideState.noRide || ++ currentRideState.value == RideState.preCheckReview) { ++ return; ++ } ++ ++ if (_isFetchingDriverLocation) return; ++ _isFetchingDriverLocation = true; ++ ++ try { ++ var res = await CRUD().get( ++ link: AppLink.getDriverCarsLocationToPassengerAfterApplied, ++ payload: {'driver_id': driverId}); ++ ++ if (res != 'failure') { ++ var datadriverLocation = jsonDecode(res); ++ ++ if (datadriverLocation['message'] != null && ++ datadriverLocation['message'].isNotEmpty) { ++ var _data = datadriverLocation['message'][0]; ++ ++ LatLng newDriverPos = LatLng( ++ double.parse(_data['latitude'].toString()), ++ double.parse(_data['longitude'].toString())); ++ double newHeading = ++ double.tryParse(_data['heading']?.toString() ?? '0') ?? 0.0; ++ double speed = ++ double.tryParse(_data['speed']?.toString() ?? '0') ?? 0; ++ ++ if (driverCarsLocationToPassengerAfterApplied.length > 10) { ++ driverCarsLocationToPassengerAfterApplied.removeAt(0); ++ } ++ driverCarsLocationToPassengerAfterApplied.add(newDriverPos); ++ checkAndRecalculateIfDeviated( ++ newDriverPos, ++ heading: newHeading, ++ speed: speed, ++ ); ++ updateRemainingRoute(newDriverPos); ++ if (statusRide == 'Begin' || ++ currentRideState.value == RideState.inProgress) { ++ double zoom = 16.5; ++ if (speed > 0) { ++ zoom = 17.0 - ((speed - 10) / 70) * 2.5; ++ zoom = zoom.clamp(14.5, 17.0); ++ } ++ if (mapEngine.mapController != null) { ++ mapEngine.mapController!.animateCamera( ++ CameraUpdate.newLatLngZoom(newDriverPos, zoom)); ++ } ++ } ++ mapEngine.clearMarkersExceptStartEndAndDriver(); ++ reloadMarkerDriverCarsLocationToPassengerAfterApplied( ++ datadriverLocation); ++ } ++ } ++ update(); ++ } catch (e) { ++ Log.print('Error fetching driver location: $e'); ++ } finally { ++ _isFetchingDriverLocation = false; ++ } ++ } ++ ++ void reloadMarkerDriverCarsLocationToPassengerAfterApplied( ++ dynamic datadriverLocation) { ++ if (datadriverLocation == null || ++ datadriverLocation['message'] == null || ++ datadriverLocation['message'].isEmpty) { ++ return; ++ } ++ ++ var driverData = datadriverLocation['message'][0]; ++ LatLng newPosition = LatLng(double.parse(driverData['latitude'].toString()), ++ double.parse(driverData['longitude'].toString())); ++ double newHeading = ++ double.tryParse(driverData['heading'].toString()) ?? 0.0; ++ ++ String icon; ++ if (driverData['model'].toString().contains('دراجة') || ++ driverData['make'].toString().contains('دراجة')) { ++ icon = mapEngine.motoIcon; ++ } else if (driverData['gender'] == 'Female') { ++ icon = mapEngine.ladyIcon; ++ } else { ++ icon = mapEngine.carIcon; ++ } ++ ++ final String markerId = 'assigned_driver_marker'; ++ final mId = MarkerId(markerId); ++ final existingMarker = markers.cast().firstWhere( ++ (m) => m?.markerId == mId, ++ orElse: () => null, ++ ); ++ ++ if (existingMarker != null) { ++ mapEngine.smoothlyUpdateMarker( ++ existingMarker, newPosition, newHeading, icon); ++ } else { ++ markers = { ++ ...markers, ++ Marker( ++ markerId: mId, ++ position: newPosition, ++ rotation: newHeading, ++ icon: InlqBitmap.fromStyleImage(icon), ++ anchor: const Offset(0.5, 0.5), ++ ), ++ }; ++ update(); ++ } ++ } ++ ++ void updateDriverMarker(LatLng position, double heading) { ++ const String markerId = 'assigned_driver_marker'; ++ const mId = MarkerId(markerId); ++ ++ // Choose icon based on vehicle type ++ String icon; ++ if (model.contains('دراجة') || make.contains('دراجة')) { ++ icon = mapEngine.motoIcon; ++ } else { ++ icon = mapEngine.carIcon; ++ } ++ ++ final existingMarker = markers.cast().firstWhere( ++ (m) => m?.markerId == mId, ++ orElse: () => null, ++ ); ++ ++ if (existingMarker != null) { ++ mapEngine.smoothlyUpdateMarker(existingMarker, position, heading, icon); ++ } else { ++ markers = { ++ ...markers, ++ Marker( ++ markerId: mId, ++ position: position, ++ icon: InlqBitmap.fromStyleImage(icon), ++ rotation: heading, ++ anchor: const Offset(0.5, 0.5), ++ ), ++ }; ++ update(); ++ } ++ } ++ ++ Future runEvery30SecondsUntilConditionMet() async { ++ double tripDurationInMinutes = durationToPassenger / 5; ++ int loopCount = tripDurationInMinutes.ceil(); ++ for (var i = 0; i < loopCount; i++) { ++ await Future.delayed(const Duration(seconds: 5)); ++ if (rideTimerBegin == true || statusRide == 'Apply') { ++ await getDriverCarsLocationToPassengerAfterApplied(); ++ } ++ } ++ } ++ ++ Future runWhenRideIsBegin() async { ++ double tripDurationInMinutes = durationToRide / 6; ++ int loopCount = tripDurationInMinutes.ceil(); ++ mapEngine.clearMarkersExceptStartEndAndDriver(); ++ for (var i = 0; i < loopCount; i++) { ++ await Future.delayed(const Duration(seconds: 4)); ++ await getDriverCarsLocationToPassengerAfterApplied(); ++ } ++ } ++ ++ // بدء مراقب اتصال المقبس (Socket Watchdog). ++ // يتحقق دورياً كل 5 ثوانٍ من آخر تحديث تم استلامه عبر المقبس. ++ // في حال وجود خمول لأكثر من 15 ثانية، يجلب الموقع عبر واجهة التطبيق كطلب مفرد. ++ // وإذا زاد الخمول عن 30 ثانية، يبدأ آلية الاقتراع الدوري كخيار احتياطي. ++ void _startSocketWatchdog() { ++ _watchdogTimer?.cancel(); ++ Log.print("👀 Starting Socket Watchdog (Hybrid Mode)..."); ++ ++ _watchdogTimer = Timer.periodic(const Duration(seconds: 5), (timer) async { ++ if (currentRideState.value != RideState.driverApplied && ++ currentRideState.value != RideState.driverArrived && ++ currentRideState.value != RideState.inProgress) { ++ timer.cancel(); ++ return; ++ } ++ ++ final lastTime = mapSocket.lastDriverLocationTime ?? ++ DateTime.now().subtract(const Duration(minutes: 1)); ++ final difference = DateTime.now().difference(lastTime).inSeconds; ++ ++ if (difference < 15 && mapSocket.isSocketConnected) { ++ if (_locationPollingTimer != null && ++ _rideAcceptedViaSource == "Socket") { ++ Log.print("✅ Socket recovered. Stopping polling fallback."); ++ stopDriverLocationPolling(); ++ } ++ } else if (difference >= 15 && difference < 30) { ++ Log.print("⚠️ Socket silent for ${difference}s. Single API Poll..."); ++ await getDriverCarsLocationToPassengerAfterApplied(); ++ try { ++ String statusFromServer = await getRideStatus(rideId); ++ _handleServerStatusTransition(statusFromServer); ++ } catch (e) { ++ Log.print("Error polling ride status in watchdog: $e"); ++ } ++ } else if (difference >= 30) { ++ if (_locationPollingTimer == null) { ++ Log.print( ++ "🔴 Socket dead for ${difference}s. Activating polling fallback!"); ++ _startDriverLocationPollingWithTimer(); ++ } else { ++ await getDriverCarsLocationToPassengerAfterApplied(); ++ try { ++ String statusFromServer = await getRideStatus(rideId); ++ _handleServerStatusTransition(statusFromServer); ++ } catch (e) { ++ Log.print("Error polling ride status in watchdog: $e"); ++ } ++ } ++ } ++ }); ++ } ++ ++ // بدء الاقتراع الدوري لموقع السائق كخيار احتياطي عند توقف أو فشل المقبس. ++ // يقوم هذا التوقيت دورياً كل 6 ثوانٍ بجلب موقع السائق وتحديث حالة الرحلة. ++ void _startDriverLocationPollingWithTimer() { ++ Log.print("📍 Starting Driver Location Polling (6s interval)"); ++ _locationPollingTimer?.cancel(); ++ ++ _locationPollingTimer = Timer.periodic(Duration(seconds: 6), (timer) async { ++ if (currentRideState.value == RideState.finished || ++ currentRideState.value == RideState.cancelled || ++ currentRideState.value == RideState.noRide) { ++ timer.cancel(); ++ return; ++ } ++ await getDriverCarsLocationToPassengerAfterApplied(); ++ try { ++ String statusFromServer = await getRideStatus(rideId); ++ _handleServerStatusTransition(statusFromServer); ++ } catch (e) { ++ Log.print("Error polling ride status in fallback timer: $e"); ++ } ++ }); ++ } ++ ++ void _handleServerStatusTransition(String status) { ++ String lowerStatus = status.toLowerCase(); ++ Log.print( ++ "🔄 _handleServerStatusTransition status: $lowerStatus | Current state: ${currentRideState.value}"); ++ ++ if (lowerStatus == 'arrived' && ++ currentRideState.value != RideState.driverArrived) { ++ processDriverArrival("Polling"); ++ } else if ((lowerStatus == 'begin' || ++ lowerStatus == 'started' || ++ lowerStatus == 'inprogress') && ++ currentRideState.value != RideState.inProgress) { ++ processRideBegin(source: "Polling"); ++ } else if ((lowerStatus == 'finished' || lowerStatus == 'ended') && ++ currentRideState.value != RideState.finished && ++ currentRideState.value != RideState.preCheckReview) { ++ Log.print( ++ "🏁 Polling detected Finished. Releasing ride and moving to rating."); ++ stopAllTimers(); ++ currentRideState.value = RideState.preCheckReview; ++ tripFinishedFromDriver(); ++ _checkLastRideForReview(); ++ } else if (lowerStatus == 'cancelled' || lowerStatus == 'cancel') { ++ processRideCancelledByDriver({'reason': 'Cancelled by driver'}, ++ source: "Polling"); ++ } ++ } ++ ++ void stopDriverLocationPolling() { ++ Log.print("🛑 Stopping Location Polling"); ++ _locationPollingTimer?.cancel(); ++ _locationPollingTimer = null; ++ } ++ ++ Future _addRideToWaitingTable() async { ++ try { ++ LatLng startLoc = mapEngine.polylineCoordinates.first; ++ LatLng endLoc = mapEngine.polylineCoordinates.last; ++ await CRUD().post(link: AppLink.addWaitingRide, payload: { ++ 'id': rideId.toString(), ++ "start_location": '${startLoc.latitude},${startLoc.longitude}', ++ "end_location": '${endLoc.latitude},${endLoc.longitude}', ++ "date": DateTime.now().toString(), ++ "time": DateTime.now().toString(), ++ "price": totalPassenger.toStringAsFixed(2), ++ 'passenger_id': box.read(BoxName.passengerID).toString(), ++ 'status': 'waiting', ++ 'carType': box.read(BoxName.carType), ++ 'passengerRate': passengerRate.toStringAsFixed(2), ++ 'price_for_passenger': totalME.toStringAsFixed(2), ++ 'distance': distance.toStringAsFixed(1), ++ 'duration': duration.toStringAsFixed(1), ++ 'payment_method': ++ Get.find().isWalletChecked ? 'wallet' : 'cash', ++ "passenger_wallet": box.read(BoxName.passengerWalletTotal).toString(), ++ }); ++ Log.print('[WaitingTable] Ride $rideId added to waiting_ride table.'); ++ } catch (e) { ++ Log.print('Error adding ride to waiting_ride table: $e'); ++ } ++ } ++ ++ double totalME = 0; ++ double passengerRate = 5; ++ double comfortPrice = 45; ++ double speedPrice = 40; ++ double mashwariPrice = 40; ++ double familyPrice = 55; ++ double deliveryPrice = 1.2; ++ ++ Future getKazanPercent() async { ++ var res = await CRUD().get( ++ link: AppLink.getKazanPercent, ++ payload: {'country': box.read(BoxName.countryCode).toString()}, ++ ); ++ if (res != 'failure') { ++ var json = jsonDecode(res); ++ var dataList = json['data'] ?? json['message']; ++ ++ if (dataList != null && dataList is List && dataList.isNotEmpty) { ++ var firstRow = dataList[0]; ++ kazan = double.parse(firstRow['kazan'].toString()); ++ naturePrice = double.parse(firstRow['naturePrice'].toString()); ++ heavyPrice = double.parse(firstRow['heavyPrice'].toString()); ++ latePrice = double.parse(firstRow['latePrice'].toString()); ++ comfortPrice = double.parse(firstRow['comfortPrice'].toString()); ++ speedPrice = double.parse(firstRow['speedPrice'].toString()); ++ deliveryPrice = double.parse(firstRow['deliveryPrice'].toString()); ++ mashwariPrice = double.parse(firstRow['freePrice'].toString()); ++ familyPrice = double.parse(firstRow['familyPrice'].toString()); ++ fuelPrice = double.parse(firstRow['fuelPrice'].toString()); ++ } ++ } ++ } ++ ++ Future getPassengerRate() async { ++ var res = await CRUD().get( ++ link: AppLink.getPassengerRate, ++ payload: {'passenger_id': box.read(BoxName.passengerID)}); ++ if (res != 'failure') { ++ var json = jsonDecode(res); ++ var message = json['data'] ?? json['message']; ++ if (message['rating'] == null) { ++ passengerRate = 5.0; ++ } else { ++ var rating = message['rating']; ++ if (rating is String) { ++ passengerRate = double.tryParse(rating) ?? 5.0; ++ } else if (rating is num) { ++ passengerRate = rating.toDouble(); ++ } else { ++ passengerRate = 5.0; ++ } ++ } ++ } else { ++ passengerRate = 5.0; ++ } ++ } ++ ++ Future addFingerPrint() async { ++ String fingerPrint = await DeviceHelper.getDeviceFingerprint(); ++ await CRUD().postWallet(link: AppLink.addFingerPrint, payload: { ++ 'token': (box.read(BoxName.tokenFCM.toString())), ++ 'passengerID': box.read(BoxName.passengerID).toString(), ++ "fingerPrint": fingerPrint ++ }); ++ } ++ ++ Future firstTimeRunToGetCoupon() async { ++ if (box.read(BoxName.isFirstTime).toString() == '0' && ++ box.read(BoxName.isInstall).toString() == '1' && ++ box.read(BoxName.isGiftToken).toString() == '0') { ++ var promoCode, discount, validity; ++ var resPromo = await CRUD().get(link: AppLink.getPromoFirst, payload: { ++ "passengerID": box.read(BoxName.passengerID).toString(), ++ }); ++ if (resPromo != 'failure') { ++ var d1 = jsonDecode(resPromo); ++ promoCode = d1['message']['promo_code']; ++ discount = d1['message']['amount']; ++ validity = d1['message']['validity_end_date']; ++ } ++ box.write(BoxName.isFirstTime, '1'); ++ ++ Get.dialog( ++ AlertDialog( ++ contentPadding: EdgeInsets.zero, ++ content: SizedBox( ++ width: 300, ++ child: PromoBanner( ++ promoCode: promoCode, ++ discountPercentage: discount, ++ validity: validity, ++ ), ++ ), ++ ), ++ ); ++ } ++ } ++ ++ Future detectAndCacheDeviceTier() async { ++ bool isHighEnd = await DevicePerformanceManager.isHighEndDevice(); ++ Log.print("Device Analysis - Is Flagship/HighEnd? $isHighEnd"); ++ box.write(BoxName.lowEndMode, !isHighEnd); ++ } ++ ++ Future initilizeGetStorage() async { ++ if (box.read(BoxName.addWork) == null) { ++ box.write(BoxName.addWork, 'addWork'); ++ } ++ if (box.read(BoxName.addHome) == null) { ++ box.write(BoxName.addHome, 'addHome'); ++ } ++ if (box.read(BoxName.lowEndMode) == null) { ++ detectAndCacheDeviceTier(); ++ } ++ } ++ ++ Future selectDriverAndCarForMishwariTrip() async { ++ double latitudeOffset = 0.1; ++ double longitudeOffset = 0.12; ++ ++ double southwestLat = passengerLocation.latitude - latitudeOffset; ++ double northeastLat = passengerLocation.latitude + latitudeOffset; ++ double southwestLon = passengerLocation.longitude - longitudeOffset; ++ double northeastLon = passengerLocation.longitude + longitudeOffset; ++ ++ var payload = { ++ 'southwestLat': southwestLat.toString(), ++ 'northeastLat': northeastLat.toString(), ++ 'southwestLon': southwestLon.toString(), ++ 'northeastLon': northeastLon.toString(), ++ }; ++ ++ try { ++ var res = await CRUD().get( ++ link: AppLink.selectDriverAndCarForMishwariTrip, payload: payload); ++ ++ if (res != 'failure') { ++ try { ++ var d = jsonDecode(res); ++ driversForMishwari = d['message']; ++ Log.print('driversForMishwari: $driversForMishwari'); ++ update(); ++ } catch (e) { ++ Log.print("Error decoding JSON: $e"); ++ } ++ } ++ } catch (e) { ++ Log.print("Error Mishwari select: $e"); ++ } ++ } ++ ++ List driversForMishwari = []; ++ final Rx selectedDateTime = DateTime.now().obs; ++ ++ void updateDateTime(DateTime newDateTime) { ++ selectedDateTime.value = newDateTime; ++ } ++ ++ Future mishwariOption() async { ++ isLoading = true; ++ update(); ++ await selectDriverAndCarForMishwariTrip(); ++ Future.delayed(Duration.zero); ++ isLoading = false; ++ update(); ++ Get.to(() => CupertinoDriverListWidget()); ++ } ++ ++ bool isLoading = false; ++ var driverIdVip = ''; ++ ++ Future saveTripData( ++ Map driver, DateTime tripDateTime) async { ++ try { ++ LatLng startLoc = mapEngine.polylineCoordinates.first; ++ Map tripData = { ++ 'id': driver['driver_id'].toString(), ++ 'phone': driver['phone'], ++ 'gender': driver['gender'], ++ 'name': driver['NAME'], ++ 'name_english': driver['name_english'], ++ 'address': driver['address'], ++ 'religion': driver['religion'] ?? 'UnKnown', ++ 'age': driver['age'].toString(), ++ 'education': driver['education'] ?? 'UnKnown', ++ 'license_type': driver['license_type'] ?? 'UnKnown', ++ 'national_number': driver['national_number'] ?? 'UnKnown', ++ 'car_plate': driver['car_plate'], ++ 'make': driver['make'], ++ 'model': driver['model'], ++ 'year': driver['year'].toString(), ++ 'color': driver['color'], ++ 'color_hex': driver['color_hex'], ++ 'displacement': driver['displacement'], ++ 'fuel': driver['fuel'], ++ 'token': driver['token'], ++ 'rating': driver['rating'].toString(), ++ 'countRide': driver['ride_count'].toString(), ++ 'passengerId': box.read(BoxName.passengerID), ++ 'timeSelected': tripDateTime.toIso8601String(), ++ 'status': 'pending', ++ 'startNameAddress': startNameAddress.toString(), ++ 'locationCoordinate': '${startLoc.latitude},${startLoc.longitude}', ++ }; ++ Log.print('tripData: $tripData'); ++ ++ var response = ++ await CRUD().post(link: AppLink.addMishwari, payload: tripData); ++ ++ if (response != 'failure') { ++ var id = response['message']['id'].toString(); ++ await CRUD() ++ .post(link: '${AppLink.server}/ride/rides/add.php', payload: { ++ "start_location": '${startLoc.latitude},${startLoc.longitude}', ++ "end_location": '${startLoc.latitude},${startLoc.longitude}', ++ "date": DateTime.now().toString(), ++ "time": DateTime.now().toString(), ++ "endtime": DateTime.now().add(const Duration(hours: 2)).toString(), ++ "price": '50', ++ "passenger_id": box.read(BoxName.passengerID).toString(), ++ "driver_id": driver['driver_id'].toString(), ++ "status": "waiting", ++ 'carType': 'vip', ++ "price_for_driver": '50', ++ "price_for_passenger": '50', ++ "distance": '20', ++ "paymentMethod": 'cash', ++ }).then((value) { ++ if (value is String) { ++ final parsedValue = jsonDecode(value); ++ rideId = parsedValue['message']; ++ } else if (value is Map) { ++ rideId = value['message']; ++ } ++ }); ++ ++ driverIdVip = driver['driver_id'].toString(); ++ driverId = driver['driver_id'].toString(); ++ ++ DateTime timeSelected = DateTime.parse(tripDateTime.toIso8601String()); ++ Get.find().scheduleNotificationsForTimeSelected( ++ "Your trip is scheduled".tr, ++ "Don't forget your ride!".tr, ++ "tone1", ++ timeSelected); ++ ++ await NotificationService.sendNotification( ++ category: 'OrderVIP', ++ target: driver['token'].toString(), ++ title: 'OrderVIP'.tr, ++ body: '$rideId - VIP Trip', ++ isTopic: false, ++ tone: 'tone1', ++ driverList: [ ++ id, ++ rideId, ++ driver['id'], ++ passengerLocation.latitude.toString(), ++ startNameAddress.toString(), ++ passengerLocation.longitude.toString(), ++ (box.read(BoxName.name).toString().split(' ')[0]).toString(), ++ box.read(BoxName.passengerID).toString(), ++ box.read(BoxName.phone).toString(), ++ box.read(BoxName.email).toString(), ++ box.read(BoxName.passengerPhotoUrl).toString(), ++ box.read(BoxName.tokenFCM).toString(), ++ (driver['token'].toString()), ++ ], ++ ); ++ if (response['message'] == "Trip updated successfully") { ++ mySnackbarSuccess("Trip updated successfully".tr); ++ await NotificationService.sendNotification( ++ category: 'Order VIP Canceld', ++ target: response['previous_driver_token'].toString(), ++ title: 'Order VIP Canceld'.tr, ++ body: 'Passenger cancel order'.tr, ++ isTopic: false, ++ tone: 'cancel', ++ driverList: [], ++ ); ++ } ++ isBottomSheetShown = false; ++ update(); ++ Get.to(() => VipWaittingPage()); ++ } else { ++ throw Exception('Failed to save trip'); ++ } ++ } catch (e) { ++ Get.snackbar('Error'.tr, 'Failed to book trip: $e'.tr, ++ backgroundColor: AppColor.redColor); ++ } ++ } ++ ++ Future cancelVip(String token, tripId) async { ++ var res = await CRUD() ++ .post(link: AppLink.cancelMishwari, payload: {'id': tripId}); ++ if (res != 'failure') { ++ Get.back(); ++ mySnackbarSuccess('You canceled VIP trip'.tr); ++ } ++ } ++ ++ void sendToDriverAgain(String token) { ++ NotificationService.sendNotification( ++ category: 'Order VIP Canceld', ++ target: token.toString(), ++ title: 'Order VIP Canceld'.tr, ++ body: 'Passenger cancel order'.tr, ++ isTopic: false, ++ tone: 'cancel', ++ driverList: [], ++ ); ++ } ++ ++ Set notifiedDrivers = {}; ++ ++ Future processDriverArrival(String source) async { ++ if (currentRideState.value == RideState.driverArrived || ++ _isArrivalProcessed) { ++ Log.print("✋ Ignored Arrival from $source. Already processed."); ++ return; ++ } ++ ++ _isArrivalProcessed = true; ++ Log.print("🚖 Driver Arrived via $source! Processing..."); ++ ++ currentRideState.value = RideState.driverArrived; ++ statusRide = 'Arrived'; ++ await RideLiveNotification.showDriverArrived(driverName); ++ ++ uiInteractions.driverArrivePassengerDialoge(); ++ startTimerDriverWaitPassenger5Minute(); ++ ++ if (mapEngine.polylineCoordinates.isNotEmpty) { ++ mapEngine.playRouteAnimation( ++ mapEngine.polylineCoordinates, mapEngine.lastComputedBounds); ++ } ++ update(); ++ } ++ ++ Future processRideFinished(List driverList, ++ {String source = "Unknown"}) async { ++ if (currentRideState.value == RideState.finished || _isFinishProcessed) { ++ Log.print("✋ Ignored Finish Request from $source. Already Finished."); ++ return; ++ } ++ ++ _isFinishProcessed = true; ++ Log.print("🏁 Ride Finished via $source."); ++ ++ currentRideState.value = RideState.finished; ++ mapSocket.disposeRideSocket(); ++ stopDriverLocationPolling(); ++ if (Get.isRegistered()) { ++ Get.find().stopRecording(); ++ } ++ ++ if (Get.isDialogOpen == true) Get.back(); ++ ++ NotificationController().showNotification( ++ 'Alert'.tr, ++ "Please make sure not to leave any personal belongings in the car.".tr, ++ 'tone1', ++ ); ++ IosLiveActivityService.endRideActivity(); ++ PipService.disablePip(); ++ await RideLiveNotification.cancel(); ++ ++ if (driverList.length >= 4) { ++ String price = driverList[3].toString(); ++ Get.offAll(() => RateDriverFromPassenger(), arguments: { ++ 'driverId': driverList[0].toString(), ++ 'rideId': driverList[1].toString(), ++ 'price': price ++ }); ++ } ++ } ++ ++ Future processRideCancelledByDriver(dynamic data, ++ {String source = "Unknown"}) async { ++ if (_isCancelProcessed) return; ++ ++ _isCancelProcessed = true; ++ stopAllTimers(); ++ if (Get.isDialogOpen == true) Get.back(); ++ await RideLiveNotification.cancel(); ++ IosLiveActivityService.endRideActivity(); ++ PipService.disablePip(); ++ ++ Get.defaultDialog( ++ title: "Sorry 😔".tr, ++ titleStyle: ++ const TextStyle(color: Colors.red, fontWeight: FontWeight.bold), ++ barrierDismissible: false, ++ content: Column( ++ children: [ ++ const Icon(Icons.cancel_presentation, ++ size: 50, color: Colors.redAccent), ++ const SizedBox(height: 10), ++ Text( ++ "The driver cancelled the trip for an emergency reason.\nDo you want to search for another driver immediately?" ++ .tr, ++ textAlign: TextAlign.center, ++ ), ++ ], ++ ), ++ actions: [ ++ TextButton( ++ onPressed: () { ++ Get.back(); ++ handleNoDriverFound(); ++ }, ++ child: Text("Cancel Trip".tr, ++ style: const TextStyle(color: Colors.grey)), ++ ), ++ ElevatedButton.icon( ++ style: ++ ElevatedButton.styleFrom(backgroundColor: AppColor.primaryColor), ++ icon: const Icon(Icons.refresh, color: Colors.white), ++ label: Text("Search for another driver".tr, ++ style: const TextStyle(color: Colors.white)), ++ onPressed: () { ++ Get.back(); ++ retrySearchForDrivers(); ++ }, ++ ), ++ ], ++ ); ++ } ++ ++ void showNoDriverDialog() { ++ Get.defaultDialog( ++ title: "No Drivers Found".tr, ++ middleText: ++ "Sorry, there are no cars available of this type right now.".tr, ++ textConfirm: "Refresh Map".tr, ++ textCancel: "Cancel".tr, ++ confirmTextColor: Colors.white, ++ onConfirm: () { ++ Get.back(); ++ restCounter(); ++ stopAllTimers(); ++ clearControllersAndGoHome(); ++ }, ++ ); ++ } ++ ++ Future ++ calculateDistanceBetweenPassengerAndDriverBeforeCancelRide() async { ++ await getDriverCarsLocationToPassengerAfterApplied(); ++ double dist = Geolocator.distanceBetween( ++ passengerLocation.latitude, ++ passengerLocation.longitude, ++ driverCarsLocationToPassengerAfterApplied.last.latitude, ++ driverCarsLocationToPassengerAfterApplied.last.longitude, ++ ); ++ if (dist > 500) { ++ isCancelRidePageShown = true; ++ update(); ++ } else { ++ Get.defaultDialog( ++ barrierDismissible: false, ++ title: 'The Driver Will be in your location soon .'.tr, ++ middleText: 'The distance less than 500 meter.'.tr, ++ confirm: Column( ++ children: [ ++ MyElevatedButton( ++ kolor: AppColor.greenColor, ++ title: 'Ok'.tr, ++ onPressed: () { ++ Get.back(); ++ }, ++ ), ++ MyElevatedButton( ++ kolor: AppColor.redColor, ++ title: 'No, I want to cancel this trip'.tr, ++ onPressed: () { ++ Get.back(); ++ MyDialog().getDialog( ++ 'Attention'.tr, ++ 'You will be charged for the cost of the driver coming to your location.' ++ .tr, ++ () async { ++ Get.back(); ++ Get.find() ++ .payToDriverForCancelAfterAppliedAndHeNearYou(rideId); ++ }, ++ ); ++ }, ++ ), ++ ], ++ ), ++ ); ++ } ++ } ++ ++ Future cancelRideAfterRejectFromAll() async { ++ locSearch.clearPlacesDestination(); ++ mapEngine.clearPolyline(); ++ data = []; ++ await CRUD().post( ++ link: "${AppLink.server}/ride/rides/cancel_ride_by_passenger.php", ++ payload: { ++ "ride_id": rideId.toString(), ++ "reason": 'notApplyFromAnyDriver' ++ }); ++ ++ rideConfirm = false; ++ statusRide = 'Cancel'; ++ isSearchingWindow = false; ++ shouldFetch = false; ++ isPassengerChosen = false; ++ isCashConfirmPageShown = false; ++ isCashSelectedBeforeConfirmRide = false; ++ timeToPassengerFromDriverAfterApplied = 0; ++ mapEngine.changeCancelRidePageShow(); ++ remainingTime = 0; ++ update(); ++ } ++ ++ void selectReason0(int index, String note) { ++ selectedReason = index; ++ cancelNote = note; ++ update(); ++ } ++ ++ int selectedReasonIndex = -1; ++ String selectedReasonText = ""; ++ TextEditingController otherReasonController = TextEditingController(); ++ ++ void selectReason(int index, String reason) { ++ selectedReasonIndex = index; ++ selectedReasonText = reason; ++ update(); ++ } ++ ++ List data = []; ++ ++ void restCounter() { ++ locSearch.clearPlacesDestination(); ++ mapEngine.clearPolyline(); ++ data = []; ++ rideConfirm = false; ++ shouldFetch = false; ++ timeToPassengerFromDriverAfterApplied = 0; ++ update(); ++ } ++ ++ Future _checkAndRefreshMapStyle() async { ++ try { ++ final String styleJson = await rootBundle.loadString('assets/style.json'); ++ final Map decoded = json.decode(styleJson); ++ final String? currentVersion = ++ decoded['metadata'] != null ? decoded['metadata']['version'] : null; ++ ++ if (currentVersion == null) return; ++ final String lastVersion = box.read(BoxName.styleVersion) ?? "0.0.0"; ++ ++ if (currentVersion != lastVersion) { ++ Log.print( ++ "♻️ Map Style Version mismatch ($lastVersion -> $currentVersion). Purging offline cache..."); ++ await OfflineMapService.instance.clearCache(); ++ await Future.delayed(const Duration(milliseconds: 500)); ++ box.write(BoxName.styleVersion, currentVersion); ++ Log.print("✅ Style Version updated to $currentVersion"); ++ } ++ } catch (e) { ++ Log.print("⚠️ Style version check failed: $e"); ++ } ++ } ++ ++ void reinit() { ++ if (currentRideState.value != RideState.noRide && ++ currentRideState.value != RideState.cancelled) { ++ Log.print('ℹ️ reinit() skipped: ride is active'); ++ return; ++ } ++ Log.print('🔄 reinit() calling resetAllMapStates and restarting timers...'); ++ resetAllMapStates(); ++ stopAllTimers(); ++ currentRideState.value = RideState.noRide; ++ ++ // Restart location search ++ locSearch.getLocation(); ++ ++ // Restart lifecycle timers & stages ++ getLocationArea(passengerLocation.latitude, passengerLocation.longitude); ++ unawaited(_stagePricingAndState()); ++ unawaited(_stageNiceToHave()); ++ startMasterTimer(); ++ } ++ ++ void resetAllMapStates() { ++ Log.print('🧹 Resetting all map states to prevent sticky location bug'); ++ locSearch.clearPlacesDestination(); ++ locSearch.clearPlacesStart(); ++ locSearch.waypoints.clear(); ++ locSearch.clearAllMenuWaypoints(); ++ if (Get.isRegistered()) { ++ Get.find().reset(); ++ } ++ ++ // Call reset on mapEngine which handles clearing markers, polylines, animation timers and UI states ++ mapEngine.reset(); ++ data = []; ++ ++ locSearch.passengerStartLocationFromMap = false; ++ locSearch.startLocationFromMap = false; ++ isPickerShown = false; ++ locSearch.workLocationFromMap = false; ++ locSearch.homeLocationFromMap = false; ++ isAnotherOreder = false; ++ isWhatsAppOrder = false; ++ ++ myDestination = passengerLocation; ++ locSearch.hintTextDestinationPoint = 'Select your destination'.tr; ++ ++ locSearch.placeDestinationController.clear(); ++ locSearch.placeStartController.clear(); ++ ++ rideConfirm = false; ++ shouldFetch = true; // reset to true by default for next ride search polling ++ isDrawingRoute = false; ++ isLoading = false; ++ ++ // Reset RideLifecycleController specific search and lifecycle states ++ isSearchingWindow = false; ++ currentRideState.value = RideState.noRide; ++ statusRide = 'wait'; ++ statusRideVip = 'wait'; ++ statusRideFromStart = false; ++ isDriverInPassengerWay = false; ++ isDriverArrivePassenger = false; ++ _isArrivalProcessed = false; ++ _isFinishProcessed = false; ++ _isCancelProcessed = false; ++ _isAcceptanceProcessed = false; ++ _isRatingScreenOpen = false; ++ _isRecalculatingRoute = false; ++ _isRideStartedProcessed = false; ++ _isDriverAppliedLogicExecuted = false; ++ _isDriverArrivedLogicExecuted = false; ++ _isRideBeginLogicExecuted = false; ++ _currentDriverRoutePoints = []; ++ _currentDriverRouteDistanceMeters = 0.0; ++ _currentDriverRouteDurationSeconds = 0; ++ _driverEtaUpdatedAt = null; ++ _driverEtaSecondsAtUpdate = 0; ++ _driverEtaCountdownTicks = 0; ++ _routeHeadingMismatchCount = 0; ++ distanceByPassenger = ''; ++ durationToPassenger = 0; ++ stringRemainingTimeToPassenger = ''; ++ ++ update(); ++ } ++ ++ void _handleFatalError(String title, String message) { ++ if (Get.isBottomSheetOpen == true || Get.isDialogOpen == true) { ++ Get.back(); ++ } ++ if (Get.isSnackbarOpen) Get.closeCurrentSnackbar(); ++ ++ isDrawingRoute = false; ++ isLoading = false; ++ update(); ++ ++ Get.defaultDialog( ++ title: title, ++ titleStyle: AppStyle.title.copyWith(color: AppColor.redColor), ++ middleText: message, ++ middleTextStyle: AppStyle.subtitle, ++ barrierDismissible: false, ++ confirm: MyElevatedButton( ++ title: "Close".tr, ++ kolor: AppColor.redColor, ++ onPressed: () { ++ Get.back(); ++ clearControllersAndGoHome(); ++ }, ++ ), ++ ); ++ } ++ ++ String shortenAddress(String fullAddress) { ++ List parts = fullAddress.split('،'); ++ parts = parts.map((part) => part.trim()).toList(); ++ parts = parts.where((part) => part.isNotEmpty).toList(); ++ ++ String shortAddress = ''; ++ if (parts.isNotEmpty) { ++ shortAddress += parts[0]; ++ } ++ if (parts.length > 2) { ++ shortAddress += '، ${parts[2]}'; ++ } else if (parts.length > 1) { ++ shortAddress += '، ${parts[1]}'; ++ } ++ ++ if (parts.length > 1) { ++ shortAddress += '، ${parts.last}'; ++ } ++ ++ shortAddress = shortAddress ++ .split('،') ++ .where((part) => !RegExp(r'^[0-9 ]+$').hasMatch(part.trim())) ++ .join('er'); ++ ++ bool isEnglish = ++ RegExp(r'^[a-zA-Z0-9 ]+$').hasMatch(shortAddress.replaceAll('،', '')); ++ ++ if (isEnglish) { ++ List englishParts = shortAddress.split('،'); ++ if (englishParts.length > 2) { ++ shortAddress = ++ '${englishParts[0]}، ${englishParts[1]}، ${englishParts.last}'; ++ } else if (englishParts.length > 1) { ++ shortAddress = '${englishParts[0]}، ${englishParts.last}'; ++ } ++ } ++ return shortAddress; ++ } ++ ++ double distanceOfDestination = 0; ++ bool haveSteps = false; ++ ++ Future getMapPoints( ++ String originSteps, String destinationSteps, int index) async { ++ isWayPointStopsSheetUtilGetMap = false; ++ await nearbyDrivers.getCarsLocationByPassengerAndReloadMarker(); ++ update(); ++ ++ var url = ++ ('${AppLink.googleMapsLink}directions/json?&language=${box.read(BoxName.lang)}&avoid=tolls|ferries&destination=$destinationSteps&origin=$originSteps&key=${AK.mapAPIKEY}'); ++ var response = await CRUD().getGoogleApi(link: url, payload: {}); ++ ++ data = response['routes'][0]['legs']; ++ ++ int durationToRide0 = data[0]['duration']['value']; ++ durationToRide = durationToRide + durationToRide0; ++ distance = distanceOfDestination + (data[0]['distance']['value']) / 1000; ++ ++ update(); ++ final String pointsString = ++ response['routes'][0]["overview_polyline"]["points"]; ++ ++ List decodedPoints = ++ await compute(decodePolylineIsolate, pointsString); ++ for (int i = 0; i < decodedPoints.length; i++) { ++ mapEngine.polylineCoordinates.add(decodedPoints[i]); ++ } ++ ++ if (polyLines.isEmpty) { ++ var polyline = Polyline( ++ polylineId: PolylineId('route_$index'), ++ points: locSearch.polylineCoordinatesPointsAll[index], ++ width: 6, ++ color: const Color(0xFF2196F3), ++ ); ++ ++ polyLines = {...polyLines, polyline}; ++ rideConfirm = false; ++ update(); ++ } ++ } ++ ++ void updateCameraForDistanceAfterGetMap() { ++ LatLng coord1 = LatLng( ++ double.parse(locSearch.coordinatesWithoutEmpty.first.split(',')[0]), ++ double.parse(locSearch.coordinatesWithoutEmpty.first.split(',')[1])); ++ ++ LatLng coord2 = LatLng( ++ double.parse(locSearch.coordinatesWithoutEmpty.last.split(',')[0]), ++ double.parse(locSearch.coordinatesWithoutEmpty.last.split(',')[1])); ++ ++ LatLng northeastBound; ++ LatLng southwestBound; ++ ++ if (coord1.latitude > coord2.latitude) { ++ northeastBound = coord1; ++ southwestBound = coord2; ++ } else { ++ northeastBound = coord2; ++ southwestBound = coord1; ++ } ++ ++ LatLngBounds boundsObj = ++ LatLngBounds(northeast: northeastBound, southwest: southwestBound); ++ var cameraUpdate = CameraUpdate.newLatLngBounds(boundsObj, ++ left: 180, top: 180, right: 180, bottom: 180); ++ mapController!.animateCamera(cameraUpdate); ++ update(); ++ } ++ ++ int selectedIndex = -1; ++ void selectCarFromList(int index) { ++ selectedIndex = index; ++ carTypes.forEach((element) => element.isSelected = false); ++ carTypes[index].isSelected = true; ++ update(); ++ } ++ ++ Future showBottomSheet1() async { ++ await bottomSheet(); ++ isBottomSheetShown = true; ++ heightBottomSheetShown = 250; ++ update(); ++ } ++ ++ double calculateAngleBetweenLocations(LatLng start, LatLng end) { ++ double startLat = start.latitude * pi / 180; ++ double startLon = start.longitude * pi / 180; ++ double endLat = end.latitude * pi / 180; ++ double endLon = end.longitude * pi / 180; ++ ++ double dLon = endLon - startLon; ++ ++ double y = sin(dLon) * cos(endLat); ++ double x = ++ cos(startLat) * sin(endLat) - sin(startLat) * cos(endLat) * cos(dLon); ++ ++ double angle = atan2(y, x); ++ double angleDegrees = angle * 180 / pi; ++ ++ return angleDegrees; ++ } ++ ++ get dataCarsLocationByPassenger { ++ return nearbyDrivers.carsLocationByPassenger; ++ } ++ ++ set dataCarsLocationByPassenger(var val) { ++ nearbyDrivers.carsLocationByPassenger = val; ++ } ++ ++ double calculateBearing(double lat1, double lon1, double lat2, double lon2) { ++ return nearbyDrivers.calculateBearing(lat1, lon1, lat2, lon2); ++ } ++ ++ void analyzeBehavior(Position currentPosition, List routePoints) { ++ nearbyDrivers.analyzeBehavior(currentPosition, routePoints); ++ } ++ ++ void detectStops(Position currentPosition) { ++ nearbyDrivers.detectStops(currentPosition); ++ } ++ ++ Future getDirectionMap(String origin, String destination, ++ [List waypoints = const [], int attemptCount = 0]) async { ++ if (attemptCount == 0) { ++ isDrawingRoute = true; ++ update(); ++ if (isDrawingRoute) showDrawingBottomSheet(); ++ ++ await nearbyDrivers.getCarsLocationByPassengerAndReloadMarker(); ++ } ++ ++ if (origin.isEmpty) { ++ origin = '${passengerLocation.latitude},${passengerLocation.longitude}'; ++ } ++ ++ var coordDestination = destination.split(','); ++ double latDest = double.parse(coordDestination[0]); ++ double lngDest = double.parse(coordDestination[1]); ++ myDestination = LatLng(latDest, lngDest); ++ ++ Uri uri; ++ ++ var originCoords = origin.split(','); ++ final Map queryParams = { ++ 'fromLat': originCoords[0].trim(), ++ 'fromLng': originCoords[1].trim(), ++ 'toLat': latDest.toString(), ++ 'toLng': lngDest.toString(), ++ }; ++ ++ for (int i = 0; i < activeMenuWaypointCount; i++) { ++ final wp = menuWaypoints[i]; ++ if (wp != null) { ++ queryParams['stop${i + 1}Lat'] = wp.latitude.toString(); ++ queryParams['stop${i + 1}Lng'] = wp.longitude.toString(); ++ } ++ } ++ ++ uri = Uri.parse(AppLink.mapSaasRoute).replace(queryParameters: queryParams); ++ ++ Log.print( ++ 'Requesting Route URI (SaaS, Attempt: ${attemptCount + 1}): $uri'); ++ ++ http.Response response; ++ Map responseData; ++ ++ try { ++ response = await http.get(uri, headers: { ++ 'x-api-key': Env.mapSaasKey, ++ }).timeout(const Duration(seconds: 20)); ++ ++ responseData = json.decode(response.body); ++ ++ bool isRequestValid = response.statusCode == 200; ++ ++ if (!isRequestValid) { ++ if (attemptCount < 2) { ++ await _retryProcess(origin, destination, waypoints, attemptCount); ++ return; ++ } ++ _handleFatalError( ++ "Server Error".tr, "Connection failed. Please try again.".tr); ++ return; ++ } ++ ++ double apiDistanceMeters; ++ String pointsString; ++ dynamic routeData; ++ ++ apiDistanceMeters = (responseData['distance'] as num).toDouble(); ++ pointsString = responseData['points'] ?? ""; ++ routeData = responseData; ++ ++ var origCoords = origin.split(','); ++ double startLat = double.parse(origCoords[0]); ++ double startLng = double.parse(origCoords[1]); ++ ++ double aerialDistance = ++ Geolocator.distanceBetween(startLat, startLng, latDest, lngDest); ++ ++ if (apiDistanceMeters < 50.0 && aerialDistance > 200.0) { ++ Log.print( ++ "⚠️ Suspicious Route detected! Server: $apiDistanceMeters m | Aerial: $aerialDistance m"); ++ ++ if (attemptCount < 2) { ++ Log.print("🔄 Retrying request (Attempt ${attemptCount + 2})..."); ++ await Future.delayed(const Duration(seconds: 1)); ++ await getDirectionMap( ++ origin, destination, waypoints, attemptCount + 1); ++ return; ++ } else { ++ Log.print("❌ All retries failed. Calculating Route is impossible."); ++ _handleFatalError( ++ "Route Not Found".tr, ++ "We couldn't find a valid route to this destination. Please try selecting a different point." ++ .tr); ++ return; ++ } ++ } ++ ++ box.remove(BoxName.tripData); ++ box.write(BoxName.tripData, routeData); ++ ++ durationToRide = ++ ((routeData['duration'] as num) * kDurationScalar).toInt(); ++ double distanceOfTrip = apiDistanceMeters / 1000.0; ++ distance = distanceOfTrip; ++ ++ data = routeData['legs'] != null && routeData['legs'].isNotEmpty ++ ? (routeData['legs'][0]['steps'] ?? []) ++ : []; ++ ++ List decodedPoints = []; ++ if (pointsString.isNotEmpty) { ++ decodedPoints = await compute(decodePolylineIsolate, pointsString); ++ } ++ ++ if (decodedPoints.isEmpty) { ++ _handleFatalError("Map Error".tr, "Received empty route data.".tr); ++ return; ++ } ++ ++ mapEngine.polylineCoordinates.clear(); ++ mapEngine.polylineCoordinates.addAll(decodedPoints); ++ ++ final LatLng startLoc = mapEngine.polylineCoordinates.first; ++ final LatLng endLoc = mapEngine.polylineCoordinates.last; ++ ++ startNameAddress = responseData['startName'] ?? 'Start Point'.tr; ++ endNameAddress = responseData['endName'] ?? 'Destination'.tr; ++ Log.print('📍 ROUTE START: $startNameAddress'); ++ Log.print('📍 ROUTE END: $endNameAddress'); ++ ++ if (responseData['bbox'] != null) { ++ List bbox = responseData['bbox']; ++ if (bbox.length == 4) { ++ mapEngine.lastComputedBounds = LatLngBounds( ++ southwest: LatLng(bbox[1], bbox[0]), ++ northeast: LatLng(bbox[3], bbox[2]), ++ ); ++ } ++ } else { ++ double? minLat, maxLat, minLng, maxLng; ++ for (LatLng point in mapEngine.polylineCoordinates) { ++ minLat = ++ minLat == null ? point.latitude : min(minLat, point.latitude); ++ maxLat = ++ maxLat == null ? point.latitude : max(maxLat, point.latitude); ++ minLng = ++ minLng == null ? point.longitude : min(minLng, point.longitude); ++ maxLng = ++ maxLng == null ? point.longitude : max(maxLng, point.longitude); ++ } ++ if (minLat != null) { ++ mapEngine.lastComputedBounds = LatLngBounds( ++ northeast: LatLng(maxLat!, maxLng!), ++ southwest: LatLng(minLat!, minLng!)); ++ } ++ } ++ ++ if (isDrawingRoute) { ++ Log.print('🔔 Finalizing route drawing state'); ++ isDrawingRoute = false; ++ isLoading = false; ++ update(); ++ } ++ ++ durationToAdd = Duration(seconds: durationToRide); ++ hours = durationToAdd.inHours; ++ minutes = (durationToAdd.inMinutes % 60).round(); ++ ++ markers = { ++ Marker( ++ markerId: const MarkerId('start'), ++ position: startLoc, ++ icon: InlqBitmap.fromStyleImage('orange_marker'), ++ infoWindow: const InfoWindow(title: 'A'), ++ anchor: const Offset(0.5, 1.0), ++ ), ++ Marker( ++ markerId: const MarkerId('end'), ++ position: endLoc, ++ icon: InlqBitmap.fromStyleImage('violet_marker'), ++ infoWindow: const InfoWindow(title: 'B'), ++ anchor: const Offset(0.5, 1.0), ++ ), ++ }; ++ ++ for (int i = 0; i < activeMenuWaypointCount; i++) { ++ final wp = menuWaypoints[i]; ++ if (wp != null) { ++ final bool isFirstWaypoint = i == 0; ++ markers.add(Marker( ++ markerId: MarkerId('waypoint_$i'), ++ position: wp, ++ icon: InlqBitmap.fromStyleImage( ++ isFirstWaypoint ? 'orange_marker' : 'violet_marker'), ++ infoWindow: ++ InfoWindow(title: isFirstWaypoint ? 'Stop 1' : 'Stop 2'), ++ anchor: const Offset(0.5, 1.0), ++ )); ++ } ++ } ++ ++ if (polyLines.isNotEmpty) mapEngine.clearPolyline(); ++ ++ rideConfirm = false; ++ isMarkersShown = true; ++ update(); ++ ++ await bottomSheet(); ++ ++ await mapEngine.playRouteAnimation( ++ mapEngine.polylineCoordinates, mapEngine.lastComputedBounds); ++ } catch (e, stackTrace) { ++ if (isDrawingRoute) { ++ isDrawingRoute = false; ++ isLoading = false; ++ update(); ++ } ++ ++ Log.print('🚨 CRITICAL ERROR IN getDirectionMap: $e'); ++ Log.print('🚨 STACKTRACE: $stackTrace'); ++ ++ if (attemptCount < 2) { ++ await _retryProcess(origin, destination, waypoints, attemptCount); ++ } else { ++ _handleFatalError("Connection Error".tr, ++ "Please check your internet and try again.".tr); ++ } ++ } ++ } ++ ++ Future _retryProcess(String origin, String dest, List waypoints, ++ int currentAttempt) async { ++ Log.print( ++ "🔄 Exception or Error caught. Retrying in 1s... (Attempt ${currentAttempt + 1})"); ++ await Future.delayed(const Duration(seconds: 1)); ++ getDirectionMap(origin, dest, waypoints, currentAttempt + 1); ++ } ++ ++ bool _isUsingFallback = false; ++ ++ void _startPollingFallback() { ++ if (_isUsingFallback) return; ++ ++ Log.print('🔄 Starting Polling Fallback Mode'); ++ _isUsingFallback = true; ++ ++ startMasterTimer(); ++ } ++ ++ Future _restorePolyline(String polylineString) async { ++ try { ++ List points = ++ await compute(decodePolylineIsolate, polylineString); ++ ++ mapEngine.polylineCoordinates.clear(); ++ mapEngine.polylineCoordinates.addAll(points); ++ ++ mapEngine.clearPolyline(); ++ mapEngine.polyLines = { ++ ...mapEngine.polyLines, ++ Polyline( ++ polylineId: const PolylineId('route_direct'), ++ points: mapEngine.polylineCoordinates, ++ color: const Color(0xFF2196F3), ++ width: 6, ++ ) ++ }; ++ ++ update(); ++ } catch (e) { ++ Log.print('Error restoring polyline: $e'); ++ } ++ } ++ ++ Future processRideAcceptance( ++ {Map? driverData, required String source}) async { ++ if (_isAcceptanceProcessed || ++ currentRideState.value == RideState.driverApplied || ++ currentRideState.value == RideState.driverArrived || ++ currentRideState.value == RideState.inProgress) { ++ Log.print("✋ Ignored Acceptance from $source. Already processed."); ++ return; ++ } ++ ++ _rideAcceptedViaSource = source; ++ ++ _isAcceptanceProcessed = true; ++ _isDriverAppliedLogicExecuted = true; ++ Log.print("🚀 Winner: $source triggered acceptance! Processing..."); ++ ++ _masterTimer?.cancel(); ++ ++ currentRideState.value = RideState.driverApplied; ++ statusRide = 'Apply'; ++ isSearchingWindow = false; ++ ++ if (driverData != null && driverData.isNotEmpty) { ++ Log.print("📥 Populating Data from $source payload..."); ++ _fillDriverDataLocally(driverData); ++ } else { ++ Log.print("⚠️ No Data in Payload. Fallback to API."); ++ await getUpdatedRideForDriverApply(rideId); ++ } ++ ++ await IosLiveActivityService.startRideActivity( ++ rideId: rideId, ++ driverName: driverName, ++ carDetails: '$make • $carColor', ++ etaText: stringRemainingTimeToPassenger, ++ progress: 0.0, ++ ); ++ ++ _showRideStartNotifications(); ++ final etaText = stringRemainingTimeToPassenger; ++ final carInfo = '$make • $model • $licensePlate'; ++ ++ await RideLiveNotification.showDriverOnWay( ++ driverName: driverName, ++ etaText: etaText, ++ carInfo: carInfo, ++ ); ++ ++ update(); ++ ++ await getDriverCarsLocationToPassengerAfterApplied(); ++ _startSocketWatchdog(); ++ ++ if (driverCarsLocationToPassengerAfterApplied.isNotEmpty) { ++ LatLng driverPos = driverCarsLocationToPassengerAfterApplied.last; ++ ++ await calculateDriverToPassengerRoute(driverPos, passengerLocation); ++ ++ startTimerFromDriverToPassengerAfterApplied(); ++ } ++ ++ PipService.enablePip(); ++ ++ if (source == "Socket" && mapSocket.isSocketConnected) { ++ Log.print( ++ "🧠 Smart Mode: Socket accepted ride. Skipping polling, relying on WebSocket."); ++ } else { ++ Log.print("🔄 Fallback Mode: $source accepted ride. Starting polling."); ++ _startDriverLocationPollingWithTimer(); ++ } ++ } ++ ++ void _fillDriverDataLocally(Map data) { ++ try { ++ driverId = data['driver_id']?.toString() ?? ''; ++ driverPhone = data['phone']?.toString() ?? ''; ++ ++ String fName = (data['first_name'] ?? data['driver_first_name'] ?? '') ++ .toString() ++ .trim(); ++ String lName = (data['last_name'] ?? data['driver_last_name'] ?? '') ++ .toString() ++ .trim(); ++ final socketDriverName = ++ (data['driverName'] ?? data['driver_name'] ?? '').toString().trim(); ++ driverName = socketDriverName.isNotEmpty ++ ? socketDriverName ++ : [fName, lName].where((part) => part.isNotEmpty).join(' '); ++ ++ make = data['make']?.toString() ?? ''; ++ model = data['model']?.toString() ?? ''; ++ carColor = data['color']?.toString() ?? ''; ++ colorHex = data['color_hex']?.toString() ?? ''; ++ licensePlate = data['car_plate']?.toString() ?? ''; ++ carYear = data['year']?.toString() ?? ''; ++ ++ driverRate = data['ratingDriver']?.toString() ?? '5.0'; ++ driverToken = data['token']?.toString() ?? ''; ++ ++ update(); ++ } catch (e) { ++ Log.print("Error parsing socket driver data: $e"); ++ } ++ } ++ ++ Future cancelRide() async { ++ if (selectedReasonIndex == -1) { ++ Get.snackbar( ++ 'Attention'.tr, ++ 'Please select a reason first'.tr, ++ snackPosition: SnackPosition.BOTTOM, ++ backgroundColor: Colors.orange, ++ colorText: Colors.white, ++ ); ++ return; ++ } ++ ++ String finalReason = selectedReasonText; ++ if (finalReason == "Other".tr) { ++ if (otherReasonController.text.trim().isEmpty) { ++ Get.snackbar("Attention".tr, "Please write the reason...".tr, ++ backgroundColor: Colors.red, colorText: Colors.white); ++ return; ++ } ++ finalReason = otherReasonController.text.trim(); ++ } ++ ++ Get.back(); ++ if (isCancelRidePageShown) { ++ mapEngine.changeCancelRidePageShow(); ++ } ++ ++ resetAllMapStates(); ++ ++ stopAllTimers(); ++ currentRideState.value = RideState.cancelled; ++ await RideLiveNotification.cancel(); ++ IosLiveActivityService.endRideActivity(); ++ PipService.disablePip(); ++ ++ if (rideId != 'yet' && rideId != null) { ++ Log.print( ++ '📡 Sending Cancel Request to Server with Reason: $finalReason'); ++ ++ try { ++ await CRUD().post( ++ link: "${AppLink.server}/ride/rides/cancel_ride_by_passenger.php", ++ payload: { ++ "ride_id": rideId.toString(), ++ "reason": finalReason, ++ "driver_token": driverToken, ++ }, ++ ); ++ } catch (e) { ++ Log.print("Error cancelling on server: $e"); ++ } ++ } ++ ++ clearControllersAndGoHome(); ++ } ++ ++ Future getAIKey(String key) async { ++ var res = ++ await CRUD().get(link: AppLink.getapiKey, payload: {"keyName": key}); ++ if (res != 'failure') { ++ var d = jsonDecode(res)['message']; ++ return d[key].toString(); ++ } ++ return null; ++ } ++ ++ Future getRideStatus(String rideId) async { ++ final response = await CRUD().get( ++ link: "${AppLink.rideServerSide}/ride/rides/getRideStatus.php", ++ payload: {'id': rideId}); ++ Log.print(response); ++ Log.print('2176'); ++ return jsonDecode(response)['data']; ++ } ++ ++ void handleActiveRideOnStartup(dynamic data) { ++ try { ++ if (data == null || data['has_active_ride'] != true) { ++ Log.print('[Startup] No active ride'); ++ currentRideState.value = RideState.noRide; ++ startMasterTimer(); ++ return; ++ } ++ ++ Log.print('[Startup] ✅ Active ride found!'); ++ ++ var rideData = data['ride']; ++ rideId = rideData['ride_id'].toString(); ++ currentRideId = rideId; ++ driverId = rideData['driver_id']?.toString() ?? ''; ++ ++ String status = rideData['status']?.toString().toLowerCase() ?? ''; ++ ++ if (status == 'waiting' || status == 'searching') { ++ currentRideState.value = RideState.searching; ++ isSearchingWindow = true; ++ } else if (status == 'apply' || status == 'applied') { ++ currentRideState.value = RideState.driverApplied; ++ statusRide = 'Apply'; ++ ++ mapSocket.socket.emit('subscribe_driver_location', { ++ 'ride_id': rideId, ++ 'driver_id': driverId, ++ }); ++ ++ if (rideData['driver_info'] != null) { ++ var dInfo = rideData['driver_info']; ++ passengerName = dInfo['first_name']?.toString() ?? ''; ++ driverPhone = dInfo['phone']?.toString() ?? ''; ++ model = dInfo['model']?.toString() ?? ''; ++ licensePlate = dInfo['license_plate']?.toString() ?? ''; ++ } ++ } else if (status == 'arrived') { ++ currentRideState.value = RideState.driverArrived; ++ statusRide = 'Arrived'; ++ isDriverArrivePassenger = true; ++ } else if (status == 'begin' || status == 'started') { ++ currentRideState.value = RideState.inProgress; ++ statusRide = 'Begin'; ++ rideTimerBegin = true; ++ ++ if (rideData['polyline'] != null) { ++ _restorePolyline(rideData['polyline']); ++ } ++ ++ rideIsBeginPassengerTimer(); ++ } ++ ++ update(); ++ startMasterTimer(); ++ } catch (e) { ++ Log.print('[Startup] Error: $e'); ++ currentRideState.value = RideState.noRide; ++ startMasterTimer(); ++ } ++ } ++ ++ Future handleNoDriverFound() async { ++ stopAllTimers(); ++ await RideLiveNotification.cancel(); ++ IosLiveActivityService.endRideActivity(); ++ PipService.disablePip(); ++ _isCancelProcessed = false; ++ currentRideState.value = RideState.noRide; ++ resetAllMapStates(); ++ clearControllersAndGoHome(); ++ ++ Get.defaultDialog( ++ title: "We apologize 😔".tr, ++ middleText: "No drivers found at the moment.\nPlease try again later.".tr, ++ confirm: ElevatedButton( ++ onPressed: () => Navigator.pop(Get.context!), ++ child: Text("Ok".tr), ++ ), ++ ); ++ } ++ ++ bool isDriversDataValid() { ++ return dataCarsLocationByPassenger != 'failure' && ++ dataCarsLocationByPassenger != null && ++ (dataCarsLocationByPassenger is Map) && ++ dataCarsLocationByPassenger.containsKey('message') && ++ dataCarsLocationByPassenger['message'] != null; ++ } ++ ++ void retrySearchForDrivers() async { ++ _isCancelProcessed = false; ++ isSearchingWindow = true; ++ currentRideState.value = RideState.searching; ++ driversStatusForSearchWindow = 'Searching for nearby drivers...'.tr; ++ update(); ++ ++ try { ++ Log.print("🔄 Retrying search for ride ID: $rideId"); ++ ++ var payload = { ++ "ride_id": rideId.toString(), ++ "passenger_id": box.read(BoxName.passengerID).toString(), ++ "passenger_name": box.read(BoxName.name).toString(), ++ "passenger_phone": box.read(BoxName.phone).toString(), ++ "passenger_email": box.read(BoxName.email).toString(), ++ "passenger_token": box.read(BoxName.tokenFCM).toString(), ++ "passenger_wallet": box.read(BoxName.passengerWalletTotal).toString(), ++ "passenger_rating": "5.0", ++ "start_lat": startLocation.latitude.toString(), ++ "start_lng": startLocation.longitude.toString(), ++ "end_lat": endLocation.latitude.toString(), ++ "end_lng": endLocation.longitude.toString(), ++ "start_name": startNameAddress, ++ "end_name": endNameAddress, ++ "distance": distance.toString(), ++ "distance_text": distanceByPassenger, ++ "duration_text": durationToPassenger.toString(), ++ "price": totalPassenger.toString(), ++ "price_for_driver": costForDriver.toString(), ++ "car_type": box.read(BoxName.carType).toString(), ++ "is_wallet": Get.find().isWalletChecked.toString(), ++ "has_steps": Get.find().wayPoints.length > 1 ++ ? "true" ++ : "false", ++ }; ++ ++ var response = await CRUD().post( ++ link: "${AppLink.rideServerSide}/rides/retry_search_drivers.php", ++ payload: payload, ++ ); ++ ++ if (response['status'] == 'success') { ++ Log.print("✅ Search reset successfully."); ++ startSearchingTimer(); ++ } else { ++ Log.print("❌ Failed to reset search: $response"); ++ handleNoDriverFound(); ++ } ++ } catch (e) { ++ Log.print("❌ Exception in retrySearchForDrivers: $e"); ++ handleNoDriverFound(); ++ } ++ } ++ ++ Future startSearchingTimer() async { ++ _searchTimer?.cancel(); ++ int seconds = 0; ++ ++ Log.print("⏳ Search Timer Started (90s)..."); ++ await RideLiveNotification.showSearching(driversStatusForSearchWindow); ++ ++ _searchTimer = Timer.periodic(const Duration(seconds: 1), (timer) { ++ seconds++; ++ ++ if (currentRideState.value != RideState.searching) { ++ timer.cancel(); ++ return; ++ } ++ ++ if (seconds >= 90) { ++ timer.cancel(); ++ handleNoDriverFound(); ++ } ++ }); ++ } ++ ++ void showNoDriversDialog() { ++ Get.dialog( ++ BackdropFilter( ++ filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5), ++ child: CupertinoAlertDialog( ++ title: Text("No Car or Driver Found in your area.".tr, ++ style: AppStyle.title ++ .copyWith(fontSize: 20, fontWeight: FontWeight.bold)), ++ content: Text("No Car or Driver Found in your area.".tr, ++ style: AppStyle.title.copyWith(fontSize: 16)), ++ actions: [ ++ CupertinoDialogAction( ++ onPressed: () { ++ Get.back(); ++ clearControllersAndGoHome(); ++ }, ++ child: ++ Text('OK'.tr, style: TextStyle(color: AppColor.greenColor)), ++ ), ++ ], ++ ), ++ ), ++ barrierDismissible: false, ++ ); ++ } ++ ++ Future getDistanceFromDriverAfterAcceptedRide( ++ String origin, String destination) async { ++ String apiKey = Env.mapKeyOsm; ++ if (origin.isEmpty) { ++ origin = '${passengerLocation.latitude},${passengerLocation.longitude}'; ++ } ++ var uri = Uri.parse( ++ '$dynamicApiUrl?origin=$origin&destination=$destination&steps=false&overview=false'); ++ Log.print('uri: $uri'); ++ ++ http.Response response; ++ Map responseData; ++ ++ try { ++ response = await http.get( ++ uri, ++ headers: { ++ 'X-API-KEY': apiKey, ++ }, ++ ).timeout(const Duration(seconds: 20)); ++ ++ if (response.statusCode != 200) { ++ Log.print('Error from API: ${response.statusCode}'); ++ isLoading = false; ++ update(); ++ return; ++ } ++ if (Get.isBottomSheetOpen ?? false) { ++ Get.back(); ++ } ++ isDrawingRoute = false; ++ ++ responseData = json.decode(response.body); ++ Log.print('responseData: $responseData'); ++ ++ if (responseData['status'] != 'ok') { ++ Log.print('API returned an error: ${responseData['message']}'); ++ isLoading = false; ++ update(); ++ return; ++ } ++ } catch (e) { ++ Log.print('Failed to get directions: $e'); ++ isLoading = false; ++ update(); ++ return; ++ } ++ } ++ ++ Future _stageNiceToHave() async { ++ Log.print('🚀 MapPassengerController: Starting _stageNiceToHave'); ++ ++ await Future.wait([ ++ Future(() async { ++ try { ++ Log.print('🔍 Loading Favorites...'); ++ await locSearch.getFavioratePlaces(); ++ } catch (e) { ++ Log.print("Error: $e"); ++ } ++ }), ++ Future(() async { ++ try { ++ Log.print('🔍 Loading Waypoints...'); ++ locSearch.readyWayPoints(); ++ } catch (e) { ++ Log.print("Error: $e"); ++ } ++ }), ++ Future(() async { ++ try { ++ Log.print('🔍 Loading Rate...'); ++ await getPassengerRate(); ++ } catch (e) { ++ Log.print("Error: $e"); ++ } ++ }), ++ Future(() async { ++ try { ++ Log.print('🔍 Loading Coupons...'); ++ await firstTimeRunToGetCoupon(); ++ } catch (e) { ++ Log.print("Error: $e"); ++ } ++ }), ++ ]); ++ Log.print('✅ MapPassengerController: _stageNiceToHave complete'); ++ try { ++ cardNumber = await SecureStorage().readData(BoxName.cardNumber); ++ } catch (e) { ++ Log.print("Error: $e"); ++ } ++ } ++ ++ Future _stagePricingAndState() async { ++ try { ++ await getKazanPercent(); ++ } catch (e) { ++ Log.print("Error: $e"); ++ } ++ try { ++ await _checkInitialRideStatus(); ++ } catch (e) { ++ Log.print("Error: $e"); ++ } ++ _applyLowEndModeIfNeeded(); ++ } ++ ++ void _applyLowEndModeIfNeeded() { ++ // Placeholder comment from original ++ } ++ ++ void showDrawingBottomSheet() { ++ Log.print( ++ '🔔 showDrawingBottomSheet called. isDrawingRoute: $isDrawingRoute'); ++ ++ final context = Get.context; ++ if (context == null) return; ++ ++ WidgetsBinding.instance.addPostFrameCallback((_) { ++ // Close any existing open dialogs first ++ if (Get.isDialogOpen == true) { ++ Get.back(); ++ } ++ ++ Get.dialog( ++ Dialog( ++ backgroundColor: Colors.transparent, ++ elevation: 0, ++ child: Container( ++ padding: const EdgeInsets.all(24), ++ width: 180, ++ decoration: BoxDecoration( ++ color: Colors.white.withOpacity(0.95), ++ borderRadius: BorderRadius.circular(24), ++ boxShadow: [ ++ BoxShadow( ++ color: Colors.black.withOpacity(0.15), ++ blurRadius: 20, ++ spreadRadius: 5, ++ ) ++ ], ++ ), ++ child: Column( ++ mainAxisSize: MainAxisSize.min, ++ mainAxisAlignment: MainAxisAlignment.center, ++ crossAxisAlignment: CrossAxisAlignment.center, ++ children: [ ++ // App Logo ++ Image.asset( ++ 'assets/images/logo.gif', ++ height: 64, ++ errorBuilder: (context, error, stackTrace) => const Icon( ++ Icons.map, ++ size: 64, ++ color: AppColor.primaryColor, ++ ), ++ ), ++ const SizedBox(height: 16), ++ const SizedBox( ++ width: 24, ++ height: 24, ++ child: MyCircularProgressIndicator(), ++ ), ++ const SizedBox(height: 16), ++ Text( ++ 'Drawing route on map...'.tr, ++ style: const TextStyle( ++ fontWeight: FontWeight.bold, ++ fontSize: 14, ++ color: AppColor.primaryColor, ++ ), ++ textAlign: TextAlign.center, ++ ), ++ ], ++ ), ++ ), ++ ), ++ barrierDismissible: false, ++ ); ++ ++ // Auto-dismiss after exactly 2 seconds ++ Future.delayed(const Duration(seconds: 2), () { ++ if (Get.isDialogOpen == true) { ++ Get.back(); ++ } ++ }); ++ }); ++ } ++ ++ @override ++ void onInit() async { ++ super.onInit(); ++ await _checkAndRefreshMapStyle(); ++ Get.put(DeepLinkController(), permanent: true); ++ await initilizeGetStorage(); ++ getLocationArea(passengerLocation.latitude, passengerLocation.longitude); ++ unawaited(_stagePricingAndState()); ++ unawaited(_stageNiceToHave()); ++ startMasterTimer(); ++ } ++ ++ @override ++ void onClose() { ++ stopAllTimers(); ++ if (!_timerStreamController.isClosed) { ++ _timerStreamController.close(); ++ } ++ if (!_beginRideStreamController.isClosed) { ++ _beginRideStreamController.close(); ++ } ++ if (!_rideStatusStreamController.isClosed) { ++ _rideStatusStreamController.close(); ++ } ++ if (!timerController.isClosed) { ++ timerController.close(); ++ } ++ super.onClose(); ++ } ++ ++ void clearControllersAndGoHome() { ++ Get.offAll(() => const MapPagePassenger()); ++ } ++ ++ /// Builds a Set of short [Polyline] segments that simulate a dashed line. ++ /// intaleq_maps (MapLibre) doesn't support `patterns`, so we manually ++ /// split the route into dash/gap alternating segments. ++ Set _buildDashedPolylines({ ++ required List points, ++ required double dashLengthMeters, ++ required double gapLengthMeters, ++ required Color color, ++ required int width, ++ required String idPrefix, ++ }) { ++ final Set result = {}; ++ if (points.length < 2) return result; ++ ++ int segmentIndex = 0; ++ bool isDash = true; ++ double remaining = dashLengthMeters; ++ List currentSegment = [points[0]]; ++ ++ for (int i = 0; i < points.length - 1; i++) { ++ final LatLng a = points[i]; ++ final LatLng b = points[i + 1]; ++ double segLen = _haversineDistance(a, b); ++ double covered = 0.0; ++ ++ while (covered < segLen) { ++ double leftInSeg = segLen - covered; ++ if (remaining <= leftInSeg) { ++ // interpolate the endpoint of this dash/gap ++ double fraction = (covered + remaining) / segLen; ++ LatLng interp = LatLng( ++ a.latitude + fraction * (b.latitude - a.latitude), ++ a.longitude + fraction * (b.longitude - a.longitude), ++ ); ++ currentSegment.add(interp); ++ ++ if (isDash && currentSegment.length >= 2) { ++ result.add(Polyline( ++ polylineId: PolylineId('${idPrefix}_seg_$segmentIndex'), ++ points: List.from(currentSegment), ++ color: color, ++ width: width, ++ )); ++ } ++ ++ final double consumed = remaining; ++ segmentIndex++; ++ isDash = !isDash; ++ remaining = isDash ? dashLengthMeters : gapLengthMeters; ++ currentSegment = [interp]; ++ covered += consumed; ++ } else { ++ currentSegment.add(b); ++ covered = segLen; ++ remaining -= leftInSeg; ++ } ++ } ++ } ++ ++ // Flush last dash segment ++ if (isDash && currentSegment.length >= 2) { ++ result.add(Polyline( ++ polylineId: PolylineId('${idPrefix}_seg_$segmentIndex'), ++ points: List.from(currentSegment), ++ color: color, ++ width: width, ++ )); ++ } ++ ++ return result; ++ } ++ ++ /// Haversine distance in meters between two LatLng points. ++ LatLng? _parseLatLng(String? raw) { ++ if (raw == null || raw.trim().isEmpty) return null; ++ final parts = raw.split(','); ++ if (parts.length < 2) return null; ++ final lat = double.tryParse(parts[0].trim()); ++ final lng = double.tryParse(parts[1].trim()); ++ if (lat == null || lng == null) return null; ++ if (lat == 0 && lng == 0) return null; ++ return LatLng(lat, lng); ++ } ++ ++ bool _isHeadingAwayFromRoute({ ++ required double? heading, ++ required double? speed, ++ required int closestRouteIndex, ++ required double distanceFromRouteMeters, ++ }) { ++ if (heading == null || speed == null || speed < 2.5) return false; ++ if (_currentDriverRoutePoints.length < 2) return false; ++ if (distanceFromRouteMeters < 10) return false; ++ ++ int fromIndex = closestRouteIndex; ++ int toIndex = ++ min(closestRouteIndex + 1, _currentDriverRoutePoints.length - 1); ++ if (fromIndex == toIndex && fromIndex > 0) { ++ fromIndex--; ++ } ++ if (fromIndex == toIndex) return false; ++ ++ final double routeBearing = _bearingBetween( ++ _currentDriverRoutePoints[fromIndex], ++ _currentDriverRoutePoints[toIndex], ++ ); ++ final double angleDiff = _angleDifference(heading, routeBearing); ++ return angleDiff > 110; ++ } ++ ++ double _bearingBetween(LatLng a, LatLng b) { ++ final double lat1 = a.latitude * pi / 180; ++ final double lat2 = b.latitude * pi / 180; ++ final double dLng = (b.longitude - a.longitude) * pi / 180; ++ final double y = sin(dLng) * cos(lat2); ++ final double x = cos(lat1) * sin(lat2) - sin(lat1) * cos(lat2) * cos(dLng); ++ return (atan2(y, x) * 180 / pi + 360) % 360; ++ } ++ ++ double _angleDifference(double a, double b) { ++ final double diff = ((a - b + 540) % 360) - 180; ++ return diff.abs(); ++ } ++ ++ double _pathDistanceMeters(List points) { ++ if (points.length < 2) return 0.0; ++ double total = 0.0; ++ for (int i = 0; i < points.length - 1; i++) { ++ total += _haversineDistance(points[i], points[i + 1]); ++ } ++ return total; ++ } ++ ++ double _haversineDistance(LatLng a, LatLng b) { ++ const R = 6371000.0; ++ final dLat = (b.latitude - a.latitude) * pi / 180; ++ final dLng = (b.longitude - a.longitude) * pi / 180; ++ final sinLat = sin(dLat / 2); ++ final sinLng = sin(dLng / 2); ++ final h = sinLat * sinLat + ++ cos(a.latitude * pi / 180) * ++ cos(b.latitude * pi / 180) * ++ sinLng * ++ sinLng; ++ return 2 * R * atan2(pow(h, 0.5).toDouble(), pow(1 - h, 0.5).toDouble()); ++ } ++} diff --git a/refactor_controller.py b/refactor_controller.py new file mode 100644 index 0000000..75ad450 --- /dev/null +++ b/refactor_controller.py @@ -0,0 +1,133 @@ +import sys +import re + +def refactor_controller(filepath): + with open(filepath, 'r') as f: + content = f.read() + + # 1. Change double to String for pricing variables + content = re.sub(r'double totalPassengerSpeed = 0;', "String totalPassengerSpeed = '0';", content) + content = re.sub(r'double totalPassengerBalash = 0;', "String totalPassengerBalash = '0';", content) + content = re.sub(r'double totalPassengerComfort = 0;', "String totalPassengerComfort = '0';", content) + content = re.sub(r'double totalPassengerElectric = 0;', "String totalPassengerElectric = '0';", content) + content = re.sub(r'double totalPassengerLady = 0;', "String totalPassengerLady = '0';", content) + content = re.sub(r'double totalPassengerScooter = 0;', "String totalPassengerScooter = '0';", content) + content = re.sub(r'double totalPassengerVan = 0;', "String totalPassengerVan = '0';", content) + content = re.sub(r'double totalPassengerRayehGai = 0;', "String totalPassengerRayehGai = '0';", content) + content = re.sub(r'double totalPassengerRayehGaiComfort = 0;', "String totalPassengerRayehGaiComfort = '0';", content) + content = re.sub(r'double totalPassengerRayehGaiBalash = 0;', "String totalPassengerRayehGaiBalash = '0';", content) + + content = re.sub(r'double totalPassenger = 0;', "String totalPassenger = '0';", content) + content = re.sub(r'double totalCostPassenger = 0;', "String totalCostPassenger = '0';", content) + + # 2. Replace bottomSheet method + bottom_sheet_pattern = re.compile(r'Future bottomSheet\(\) async \{.*?(?=update\(\);\n\s*mapEngine\.changeBottomSheetShown\(forceValue: true\);\n\s*\})', re.DOTALL) + + new_bottom_sheet = '''Future bottomSheet() async { + durationToAdd = Duration(seconds: durationToRide); + hours = durationToAdd.inHours; + minutes = (durationToAdd.inMinutes % 60).round(); + final DateTime currentTime = DateTime.now(); + newTime = currentTime.add(durationToAdd); + + try { + final res = await CRUD().post(link: AppLink.getPrices, payload: { + 'distance': distance.toString(), + 'durationToRide': durationToRide.toString(), + 'startNameAddress': startNameAddress, + 'endNameAddress': endNameAddress, + 'destLat': myDestination.latitude.toString(), + 'destLng': myDestination.longitude.toString(), + 'passengerLat': newMyLocation.latitude.toString(), + 'passengerLng': newMyLocation.longitude.toString(), + 'walletVal': box.read(BoxName.passengerWalletTotal)?.toString() ?? '0', + 'activeMenuWaypointCount': activeMenuWaypointCount.toString(), + }); + + if (res != 'failure') { + var response = jsonDecode(res); + if (response['status'] == 'success') { + var data = response['data']; + totalPassengerSpeed = data['totalPassengerSpeed']?.toString() ?? '0'; + totalPassengerBalash = data['totalPassengerBalash']?.toString() ?? '0'; + totalPassengerComfort = data['totalPassengerComfort']?.toString() ?? '0'; + totalPassengerElectric = data['totalPassengerElectric']?.toString() ?? '0'; + totalPassengerLady = data['totalPassengerLady']?.toString() ?? '0'; + totalPassengerScooter = data['totalPassengerScooter']?.toString() ?? '0'; + totalPassengerVan = data['totalPassengerVan']?.toString() ?? '0'; + totalPassengerRayehGai = data['totalPassengerRayehGai']?.toString() ?? '0'; + totalPassengerRayehGaiComfort = data['totalPassengerRayehGaiComfort']?.toString() ?? '0'; + totalPassengerRayehGaiBalash = data['totalPassengerRayehGaiBalash']?.toString() ?? '0'; + + totalPassenger = totalPassengerSpeed; + totalCostPassenger = totalPassenger; + } + } + } catch (e) { + Log.print("Error fetching prices: $e"); + } + + ''' + content = bottom_sheet_pattern.sub(new_bottom_sheet, content) + + # 3. Replace applyPromoCodeToPassenger + promo_pattern = re.compile(r'void applyPromoCodeToPassenger\(BuildContext context\) async \{.*?(?=Get\.back\(\);\n\s*await Future\.delayed\(const Duration\(milliseconds: 120\)\);\n\s*\} catch \(e\) \{)', re.DOTALL) + + new_promo = '''void applyPromoCodeToPassenger(BuildContext context) async { + if (promoTaken == true) { + MyDialog().getDialog('Promo Already Used'.tr, 'You have already used this promo code.'.tr, () => Get.back()); + return; + } + if (!promoFormKey.currentState!.validate()) return; + + try { + final res = await CRUD().post(link: AppLink.getPrices, payload: { + 'distance': distance.toString(), + 'durationToRide': durationToRide.toString(), + 'startNameAddress': startNameAddress, + 'endNameAddress': endNameAddress, + 'destLat': myDestination.latitude.toString(), + 'destLng': myDestination.longitude.toString(), + 'passengerLat': newMyLocation.latitude.toString(), + 'passengerLng': newMyLocation.longitude.toString(), + 'walletVal': box.read(BoxName.passengerWalletTotal)?.toString() ?? '0', + 'activeMenuWaypointCount': activeMenuWaypointCount.toString(), + 'promo_code': promo.text, + }); + + if (res != 'failure') { + var response = jsonDecode(res); + if (response['status'] == 'success') { + var data = response['data']; + totalPassengerSpeed = data['totalPassengerSpeed']?.toString() ?? '0'; + totalPassengerBalash = data['totalPassengerBalash']?.toString() ?? '0'; + totalPassengerComfort = data['totalPassengerComfort']?.toString() ?? '0'; + totalPassengerElectric = data['totalPassengerElectric']?.toString() ?? '0'; + totalPassengerLady = data['totalPassengerLady']?.toString() ?? '0'; + totalPassengerScooter = data['totalPassengerScooter']?.toString() ?? '0'; + totalPassengerVan = data['totalPassengerVan']?.toString() ?? '0'; + totalPassengerRayehGai = data['totalPassengerRayehGai']?.toString() ?? '0'; + totalPassengerRayehGaiComfort = data['totalPassengerRayehGaiComfort']?.toString() ?? '0'; + totalPassengerRayehGaiBalash = data['totalPassengerRayehGaiBalash']?.toString() ?? '0'; + + promoTaken = true; + update(); + + Confetti.launch( + context, + options: const ConfettiOptions(particleCount: 100, spread: 70, y: 0.6), + ); + } else { + MyDialog().getDialog('Promo Error'.tr, response['message']?.toString() ?? 'Invalid Promo'.tr, () => Get.back()); + return; + } + } + ''' + content = promo_pattern.sub(new_promo, content) + + with open(filepath, 'w') as f: + f.write(content) + print(f"Refactored {filepath}") + +if __name__ == '__main__': + refactor_controller(sys.argv[1]) diff --git a/refactor_widget.py b/refactor_widget.py new file mode 100644 index 0000000..184c02c --- /dev/null +++ b/refactor_widget.py @@ -0,0 +1,80 @@ +import sys +import re + +def refactor_widget(filepath): + with open(filepath, 'r') as f: + content = f.read() + + # Refactor _getPassengerPriceText + price_text_pattern = re.compile(r'String _getPassengerPriceText\(\s*CarType carType, RideLifecycleController mapPassengerController\) \{.*?return formatter\.format\(roundedPrice\);\s*\}', re.DOTALL) + + new_price_text = '''String _getPassengerPriceText( + CarType carType, RideLifecycleController mapPassengerController) { + String rawPrice; + switch (carType.carType) { + case 'Comfort': + rawPrice = mapPassengerController.totalPassengerComfort; + break; + case 'Fixed Price': + rawPrice = mapPassengerController.totalPassengerSpeed; + break; + case 'Electric': + rawPrice = mapPassengerController.totalPassengerElectric; + break; + case 'Awfar Car': + rawPrice = mapPassengerController.totalPassengerBalash; + break; + case 'Scooter': + case 'Pink Bike': + rawPrice = mapPassengerController.totalPassengerScooter; + break; + case 'Van': + rawPrice = mapPassengerController.totalPassengerVan; + break; + case 'Lady': + rawPrice = mapPassengerController.totalPassengerLady; + break; + case 'Rayeh Gai': + rawPrice = mapPassengerController.totalPassengerRayehGai; + break; + default: + return '...'; + } + return rawPrice; + }''' + content = price_text_pattern.sub(new_price_text, content) + + # Refactor _getOriginalPrice + original_price_pattern = re.compile(r'double _getOriginalPrice\(\s*CarType carType, RideLifecycleController mapPassengerController\) \{.*?return 0\.0;\s*\}\s*\}', re.DOTALL) + + new_original_price = '''String _getOriginalPrice( + CarType carType, RideLifecycleController mapPassengerController) { + switch (carType.carType) { + case 'Comfort': + return mapPassengerController.totalPassengerComfort; + case 'Fixed Price': + return mapPassengerController.totalPassengerSpeed; + case 'Electric': + return mapPassengerController.totalPassengerElectric; + case 'Awfar Car': + return mapPassengerController.totalPassengerBalash; + case 'Van': + return mapPassengerController.totalPassengerVan; + case 'Lady': + return mapPassengerController.totalPassengerLady; + default: + return '0'; + } + }''' + content = original_price_pattern.sub(new_original_price, content) + + # Refactor _buildRayehGaiOption + rayeh_gai_pattern = re.compile(r'Widget _buildRayehGaiOption\(\s*BuildContext context,\s*RideLifecycleController mapPassengerController,\s*String carTypeName,\s*double price\)') + content = rayeh_gai_pattern.sub(r'Widget _buildRayehGaiOption(BuildContext context, RideLifecycleController mapPassengerController, String carTypeName, String price)', content) + + with open(filepath, 'w') as f: + f.write(content) + print(f"Refactored {filepath}") + +if __name__ == '__main__': + refactor_widget(sys.argv[1]) diff --git a/replace_currency.py b/replace_currency.py new file mode 100644 index 0000000..2b3dfb5 --- /dev/null +++ b/replace_currency.py @@ -0,0 +1,60 @@ +import os +import re + +def process_file(filepath, app_name): + # Skip translations and currency.dart + if 'translations.dart' in filepath or 'currency.dart' in filepath or 'translations_en.json' in filepath: + return + + with open(filepath, 'r') as f: + content = f.read() + + original_content = content + + # We only want to replace instances that represent the currency string. + # Be careful not to replace it inside other words or imports. + # We'll use regex word boundaries or quotes. + + # Pattern to match 'SYP'.tr or "SYP".tr + content = re.sub(r"(['\"]SYP['\"])\.tr", "CurrencyHelper.currency", content) + + # Pattern to match 'SYP' or "SYP" (standalone, not followed by .tr since we did that) + content = re.sub(r"['\"]SYP['\"]", "CurrencyHelper.currency", content) + + # Sometimes it's inside string interpolation: '100 SYP' -> '100 ${CurrencyHelper.currency}' + # But this is tricky. Let's look for " SYP" or " SYP " or "SYP " inside strings. + # A safer way is to find exactly ' SYP' or 'SYP ' inside dart strings and replace with ${CurrencyHelper.currency} + # For simplicity, let's just do a pass on common patterns: + content = re.sub(r" SYP['\"]", " ${CurrencyHelper.currency}'", content) + content = re.sub(r" SYP ", " ${CurrencyHelper.currency} ", content) + content = re.sub(r"SYP ", "${CurrencyHelper.currency} ", content) + + # Fix double curly braces if it was already interpolated like '100 SYP' inside something + # Actually just simple regex + content = content.replace(" ${CurrencyHelper.currency}'", " ${CurrencyHelper.currency}'") + content = content.replace(' ${CurrencyHelper.currency}"', ' ${CurrencyHelper.currency}"') + + if content != original_content: + # Need to add import + import_stmt = f"import 'package:{app_name}/constant/currency.dart';\n" + if import_stmt not in content: + # find first import + import_idx = content.find('import ') + if import_idx != -1: + content = content[:import_idx] + import_stmt + content[import_idx:] + else: + content = import_stmt + content + + with open(filepath, 'w') as f: + f.write(content) + print(f"Updated {filepath}") + +def process_dir(directory, app_name): + for root, dirs, files in os.walk(directory): + for file in files: + if file.endswith('.dart'): + process_file(os.path.join(root, file), app_name) + +if __name__ == '__main__': + process_dir('siro_rider/lib', 'siro_rider') + process_dir('siro_driver/lib', 'siro_driver') diff --git a/ride_controller.diff b/ride_controller.diff new file mode 100644 index 0000000..3a96028 --- /dev/null +++ b/ride_controller.diff @@ -0,0 +1,4937 @@ +commit c5170a88d247aed6694e590b20363683d0cb6204 +Author: Hamza-Ayed +Date: Thu Jun 11 13:47:40 2026 +0300 + + Update: 2026-06-11 13:47:39 + +diff --git a/siro_rider/lib/controller/home/map/ride_lifecycle_controller.dart b/siro_rider/lib/controller/home/map/ride_lifecycle_controller.dart +index c264a61..41dbe32 100644 +--- a/siro_rider/lib/controller/home/map/ride_lifecycle_controller.dart ++++ b/siro_rider/lib/controller/home/map/ride_lifecycle_controller.dart +@@ -846,6 +846,7 @@ class RideLifecycleController extends GetxController { + + rideIsBeginPassengerTimer(); + runWhenRideIsBegin(); ++ _updatePassengerWalkLine(); + update(); + } + +@@ -1730,7 +1731,7 @@ class RideLifecycleController extends GetxController { + String generateTrackingLink(String rideId, String driverId) { + String cleanRideId = rideId.toString().trim(); + String cleanDriverId = driverId.toString().trim(); +- const String secretSalt = "Intaleq_Secure_Track_2025"; ++ const String secretSalt = "Siro_Secure_Track_2025"; + + String rawString = "$cleanRideId$cleanDriverId$secretSalt"; + var bytes = utf8.encode(rawString); +@@ -2260,6 +2261,7 @@ class RideLifecycleController extends GetxController { + } + + mapEngine.fitCameraToPoints(driverPos, passengerPos); ++ _updatePassengerWalkLine(); + update(); + } + } catch (e) { +@@ -2386,6 +2388,7 @@ class RideLifecycleController extends GetxController { + ), + }; + } ++ _updatePassengerWalkLine(); + update(); + } + } +@@ -3508,9 +3511,29 @@ class RideLifecycleController extends GetxController { + + LatLngBounds boundsObj = + LatLngBounds(northeast: northeastBound, southwest: southwestBound); +- var cameraUpdate = CameraUpdate.newLatLngBounds(boundsObj, +- left: 180, top: 180, right: 180, bottom: 180); +- mapController!.animateCamera(cameraUpdate); ++ ++ final latDiff = (northeastBound.latitude - southwestBound.latitude).abs(); ++ final lngDiff = (northeastBound.longitude - southwestBound.longitude).abs(); ++ ++ if (latDiff < 0.0001 || lngDiff < 0.0001) { ++ final center = LatLng( ++ (northeastBound.latitude + southwestBound.latitude) / 2, ++ (northeastBound.longitude + southwestBound.longitude) / 2, ++ ); ++ mapController!.animateCamera(CameraUpdate.newLatLngZoom(center, 17)); ++ } else { ++ try { ++ var cameraUpdate = CameraUpdate.newLatLngBounds(boundsObj, ++ left: 180, top: 180, right: 180, bottom: 180); ++ mapController!.animateCamera(cameraUpdate); ++ } catch (e) { ++ final center = LatLng( ++ (northeastBound.latitude + southwestBound.latitude) / 2, ++ (northeastBound.longitude + southwestBound.longitude) / 2, ++ ); ++ mapController!.animateCamera(CameraUpdate.newLatLngZoom(center, 17)); ++ } ++ } + update(); + } + +@@ -4562,4 +4585,82 @@ class RideLifecycleController extends GetxController { + sinLng; + return 2 * R * atan2(pow(h, 0.5).toDouble(), pow(1 - h, 0.5).toDouble()); + } ++ ++ // دالة لبناء الخط المنقط ++ List _buildDashedLine(LatLng start, LatLng end, ++ {required Color color, required String prefixId}) { ++ List segments = []; ++ double dist = Geolocator.distanceBetween( ++ start.latitude, start.longitude, end.latitude, end.longitude); ++ ++ const double dashLengthMeters = 8.0; ++ const double gapLengthMeters = 6.0; ++ ++ double latDiff = end.latitude - start.latitude; ++ double lngDiff = end.longitude - start.longitude; ++ ++ double totalLength = 0; ++ int segmentCount = 0; ++ ++ while (totalLength < dist) { ++ double startFraction = totalLength / dist; ++ double endFraction = (totalLength + dashLengthMeters) / dist; ++ ++ if (endFraction > 1.0) { ++ endFraction = 1.0; ++ } ++ ++ double startLat = start.latitude + latDiff * startFraction; ++ double startLng = start.longitude + lngDiff * startFraction; ++ double endLat = start.latitude + latDiff * endFraction; ++ double endLng = start.longitude + lngDiff * endFraction; ++ ++ segments.add( ++ Polyline( ++ polylineId: PolylineId('${prefixId}_dash_$segmentCount'), ++ points: [LatLng(startLat, startLng), LatLng(endLat, endLng)], ++ color: color, ++ width: 4, ++ ), ++ ); ++ segmentCount++; ++ totalLength += dashLengthMeters + gapLengthMeters; ++ } ++ return segments; ++ } ++ ++ // تحديث الخط المنقط ومكان أيقونة المشي للراكب ++ void _updatePassengerWalkLine() { ++ polyLines.removeWhere( ++ (p) => p.polylineId.value.startsWith('passenger_walk_line')); ++ markers.removeWhere((m) => m.markerId.value == 'walk_end_marker'); ++ ++ bool shouldShowWalkPath = ++ (statusRide == 'Apply' || statusRide == 'Arrived') && ++ _currentDriverRoutePoints.isNotEmpty && ++ passengerLocation.latitude != 0; ++ ++ if (shouldShowWalkPath) { ++ final LatLng lastRoadPt = _currentDriverRoutePoints.last; ++ ++ final walkDashes = _buildDashedLine( ++ lastRoadPt, ++ passengerLocation, ++ color: Colors.blueGrey, ++ prefixId: 'passenger_walk_line', ++ ); ++ polyLines.addAll(walkDashes); ++ ++ markers.add( ++ Marker( ++ markerId: const MarkerId('walk_end_marker'), ++ position: lastRoadPt, ++ icon: InlqBitmap.fromStyleImage('walk_icon'), ++ anchor: const Offset(0.5, 0.5), ++ ), ++ ); ++ } ++ mapEngine.update(); ++ update(); ++ } + } + +commit 977adfe99daffca96839c0cab3fef5546ebfb31a +Author: Hamza-Ayed +Date: Wed Jun 10 18:11:50 2026 +0300 + + Update: 2026-06-10 18:11:50 + +diff --git a/siro_rider/lib/controller/home/map/ride_lifecycle_controller.dart b/siro_rider/lib/controller/home/map/ride_lifecycle_controller.dart +index c229ad2..c264a61 100644 +--- a/siro_rider/lib/controller/home/map/ride_lifecycle_controller.dart ++++ b/siro_rider/lib/controller/home/map/ride_lifecycle_controller.dart +@@ -112,6 +112,7 @@ class RideLifecycleController extends GetxController { + late String driverId = ''; + late String make = ''; + late String model = ''; ++ late String gender = ''; + late String carColor = ''; + late String licensePlate = ''; + late String driverName = ''; +@@ -120,6 +121,9 @@ class RideLifecycleController extends GetxController { + late String colorHex = ''; + late String carYear = ''; + late String driverRate = '5.0'; ++ late String driverRatingCount = '0'; ++ late String driverCompletedRides = '0'; ++ late String driverTier = 'Verified driver'; + late String driverToken = ''; + + double kazan = 8; +@@ -1481,7 +1485,8 @@ class RideLifecycleController extends GetxController { + + // إيقاف جلب السيارات المجاورة ومسحها، باستثناء السائق الذي قبل الطلب + mapEngine.reloadStartApp = false; +- mapEngine.markers.removeWhere((marker) => marker.markerId.value != driverId.toString()); ++ mapEngine.markers ++ .removeWhere((marker) => marker.markerId.value != driverId.toString()); + mapEngine.update(); + + await getDriverCarsLocationToPassengerAfterApplied(); +@@ -1490,8 +1495,7 @@ class RideLifecycleController extends GetxController { + LatLng driverPos = driverCarsLocationToPassengerAfterApplied.last; + Log.print( + '[rideAppliedFromDriver] 📍 Driver at: $driverPos, Passenger at: $passengerLocation'); +- await getInitialDriverDistanceAndDuration(driverPos, passengerLocation); +- await drawDriverPathOnly(driverPos, passengerLocation); ++ await calculateDriverToPassengerRoute(driverPos, passengerLocation); + mapEngine.fitCameraToPoints(driverPos, passengerLocation); + } + +@@ -1656,6 +1660,9 @@ class RideLifecycleController extends GetxController { + driverToken = data['token']?.toString() ?? ''; + carYear = data['year']?.toString() ?? ''; + driverRate = data['ratingDriver']?.toString() ?? '5.0'; ++ driverRatingCount = data['ratingCount']?.toString() ?? '0'; ++ driverCompletedRides = data['completedRides']?.toString() ?? '0'; ++ driverTier = data['driverTier']?.toString() ?? 'Verified driver'; + + update(); + } +@@ -2221,6 +2228,15 @@ class RideLifecycleController extends GetxController { + polyLines = polyLines + .where((p) => !p.polylineId.value.startsWith('driver_route')) + .toSet(); ++ polyLines = { ++ ...polyLines, ++ Polyline( ++ polylineId: const PolylineId('main_route'), ++ points: decodedPoints, ++ color: const Color(0xFF2196F3), ++ width: 6, ++ ) ++ }; + } else { + // مسح السلمات القديمة أولاً + polyLines = polyLines +@@ -2290,7 +2306,9 @@ class RideLifecycleController extends GetxController { + _routeHeadingMismatchCount = 0; + _isRecalculatingRoute = true; + if (statusRide == 'Begin' || +- currentRideState.value == RideState.inProgress) { ++ statusRide == 'Arrived' || ++ currentRideState.value == RideState.inProgress || ++ currentRideState.value == RideState.driverArrived) { + await calculateDriverToPassengerRoute(driverPos, myDestination, + isBeginPhase: true); + } else { +@@ -2504,6 +2522,8 @@ class RideLifecycleController extends GetxController { + String icon; + if (model.contains('دراجة') || make.contains('دراجة')) { + icon = mapEngine.motoIcon; ++ } else if (gender == 'Female') { ++ icon = mapEngine.ladyIcon; + } else { + icon = mapEngine.carIcon; + } +@@ -3026,6 +3046,17 @@ class RideLifecycleController extends GetxController { + mapEngine.playRouteAnimation( + mapEngine.polylineCoordinates, mapEngine.lastComputedBounds); + } ++ ++ if (driverCarsLocationToPassengerAfterApplied.isNotEmpty && ++ myDestination.latitude != 0 && ++ myDestination.longitude != 0) { ++ await calculateDriverToPassengerRoute( ++ driverCarsLocationToPassengerAfterApplied.last, ++ myDestination, ++ isBeginPhase: true, ++ ); ++ } ++ + update(); + } + +@@ -3903,12 +3934,37 @@ class RideLifecycleController extends GetxController { + + make = data['make']?.toString() ?? ''; + model = data['model']?.toString() ?? ''; ++ gender = data['gender']?.toString() ?? ''; + carColor = data['color']?.toString() ?? ''; + colorHex = data['color_hex']?.toString() ?? ''; + licensePlate = data['car_plate']?.toString() ?? ''; + carYear = data['year']?.toString() ?? ''; + ++ // المحاولة الفورية لرسم السائق إذا توفرت الإحداثيات في البيانات ++ double lat = double.tryParse( ++ data['latitude']?.toString() ?? data['lat']?.toString() ?? '0') ?? ++ 0; ++ double lng = double.tryParse(data['longitude']?.toString() ?? ++ data['lng']?.toString() ?? ++ '0') ?? ++ 0; ++ double heading = double.tryParse(data['heading']?.toString() ?? '0') ?? 0; ++ ++ if (lat != 0 && lng != 0) { ++ LatLng initialPos = LatLng(lat, lng); ++ if (driverCarsLocationToPassengerAfterApplied.isEmpty) { ++ driverCarsLocationToPassengerAfterApplied.add(initialPos); ++ } else { ++ driverCarsLocationToPassengerAfterApplied[0] = initialPos; ++ } ++ // تحديث الماركر فوراً لضمان ظهوره بشكل موثوق ++ updateDriverMarker(initialPos, heading); ++ } ++ + driverRate = data['ratingDriver']?.toString() ?? '5.0'; ++ driverRatingCount = data['ratingCount']?.toString() ?? '0'; ++ driverCompletedRides = data['completedRides']?.toString() ?? '0'; ++ driverTier = data['driverTier']?.toString() ?? 'Verified driver'; + driverToken = data['token']?.toString() ?? ''; + + update(); +@@ -4185,55 +4241,6 @@ class RideLifecycleController extends GetxController { + ); + } + +- Future getDistanceFromDriverAfterAcceptedRide( +- String origin, String destination) async { +- String apiKey = Env.mapKeyOsm; +- if (origin.isEmpty) { +- origin = '${passengerLocation.latitude},${passengerLocation.longitude}'; +- } +- var uri = Uri.parse( +- '$dynamicApiUrl?origin=$origin&destination=$destination&steps=false&overview=false'); +- Log.print('uri: $uri'); +- +- http.Response response; +- Map responseData; +- +- try { +- response = await http.get( +- uri, +- headers: { +- 'X-API-KEY': apiKey, +- }, +- ).timeout(const Duration(seconds: 20)); +- +- if (response.statusCode != 200) { +- Log.print('Error from API: ${response.statusCode}'); +- isLoading = false; +- update(); +- return; +- } +- if (Get.isBottomSheetOpen ?? false) { +- Get.back(); +- } +- isDrawingRoute = false; +- +- responseData = json.decode(response.body); +- Log.print('responseData: $responseData'); +- +- if (responseData['status'] != 'ok') { +- Log.print('API returned an error: ${responseData['message']}'); +- isLoading = false; +- update(); +- return; +- } +- } catch (e) { +- Log.print('Failed to get directions: $e'); +- isLoading = false; +- update(); +- return; +- } +- } +- + Future _stageNiceToHave() async { + Log.print('🚀 MapPassengerController: Starting _stageNiceToHave'); + + +commit d8901e1a879f696e512e13d389d666baae33dc84 +Author: Hamza-Ayed +Date: Tue Jun 9 08:40:31 2026 +0300 + + first commit + +diff --git a/siro_rider/lib/controller/home/map/ride_lifecycle_controller.dart b/siro_rider/lib/controller/home/map/ride_lifecycle_controller.dart +new file mode 100644 +index 0000000..c229ad2 +--- /dev/null ++++ b/siro_rider/lib/controller/home/map/ride_lifecycle_controller.dart +@@ -0,0 +1,4558 @@ ++import 'dart:async'; ++import 'dart:convert'; ++import 'dart:ui'; ++import 'dart:math' show cos, max, min, pi, pow, sin, atan2; ++import 'package:flutter/foundation.dart'; ++import 'package:flutter/material.dart'; ++import 'package:flutter/cupertino.dart'; ++import 'package:flutter/services.dart'; ++import 'package:geolocator/geolocator.dart'; ++import 'package:get/get.dart'; ++import 'package:intaleq_maps/intaleq_maps.dart'; ++import 'package:http/http.dart' as http; ++import 'package:intl/intl.dart'; ++import '../../../constant/api_key.dart'; ++import '../../../services/offline_map_service.dart'; ++import '../../../models/model/painter_copoun.dart'; ++import '../../../views/widgets/mycircular.dart'; ++import '../deep_link_controller.dart'; ++ ++import '../../../constant/box_name.dart'; ++import '../../../constant/links.dart'; ++import '../../../constant/colors.dart'; ++import '../../../constant/style.dart'; ++import '../../../constant/country_polygons.dart'; ++import '../../../env/env.dart'; ++import '../../../main.dart'; // contains global 'box', 'sql' ++import '../../../print.dart'; ++import '../../../services/pip_service.dart'; ++import '../../../services/ride_live_notification.dart'; ++import '../../../views/home/map_page_passenger.dart'; ++import '../../../views/Rate/rate_captain.dart'; ++import '../../../views/Rate/rating_driver_bottom.dart'; ++import '../../../views/widgets/mydialoug.dart'; ++import '../../../views/widgets/elevated_btn.dart'; ++import '../../../views/home/map_widget.dart/car_details_widget_to_go.dart'; ++import '../../../views/home/map_widget.dart/select_driver_mishwari.dart'; ++import '../../functions/crud.dart'; ++import '../../functions/launch.dart'; ++import '../../payment/payment_controller.dart'; ++import '../points_for_rider_controller.dart'; ++import 'map_engine_controller.dart'; ++import 'location_search_controller.dart'; ++import 'nearby_drivers_controller.dart'; ++import 'ui_interactions_controller.dart'; ++import 'map_socket_controller.dart'; ++import '../decode_polyline_isolate.dart'; ++import '../ios_live_activity_service.dart'; ++import '../../firebase/local_notification.dart'; ++import '../../firebase/notification_service.dart'; ++import '../../functions/audio_record1.dart'; ++import '../../functions/package_info.dart'; ++import '../../functions/secure_storage.dart'; ++import '../vip_waitting_page.dart'; ++import '../device_performance.dart'; ++import 'ride_state.dart'; ++import '../../../views/widgets/error_snakbar.dart'; ++import 'package:flutter_confetti/flutter_confetti.dart' hide Circle; ++import 'package:crypto/crypto.dart'; ++ ++class RideLifecycleController extends GetxController { ++ // --- Missing variables from monolithic controller --- ++ String currentRideId = ''; ++ bool isDrawingRoute = false; ++ bool isAnotherOreder = false; ++ bool isWhatsAppOrder = false; ++ LatLng startLocation = const LatLng(32, 35); ++ LatLng endLocation = const LatLng(32, 35); ++ String dynamicApiUrl = 'https://routec.intaleq.xyz/route'; ++ String? cardNumber; ++ bool isBeginRideFromDriverRunning = false; ++ bool isDriversTokensSend = false; ++ Map rideData = {}; ++ Map dInfo = {}; ++ List datadriverCarsLocationToPassengerAfterApplied = []; ++ double distanceOfTrip = 0.0; ++ double apiDistanceMeters = 0.0; ++ double tax = 0.0; ++ int selectedPassengerCount = 1; ++ final GlobalKey increaseFeeFormKey = GlobalKey(); ++ final GlobalKey messagesFormKey = GlobalKey(); ++ final GlobalKey promoFormKey = GlobalKey(); ++ String walletStr = '0'; ++ double walletVal = 0.0; ++ bool rideConfirm = false; ++ LatLng driverLocationToPassenger = const LatLng(32, 35); ++ final TextEditingController messageToDriver = TextEditingController(); ++ int carsOrder = 0; ++ ++ Rx currentRideState = RideState.noRide.obs; ++ String statusRide = 'wait'; ++ String statusRideVip = 'wait'; ++ bool statusRideFromStart = false; ++ ++ double distance = 0; ++ double duration = 0; ++ int durationToRide = 0; ++ int remainingTime = 25; ++ int remainingTimeToPassengerFromDriverAfterApplied = 60; ++ int remainingTimeDriverWaitPassenger5Minute = 60; ++ int timeToPassengerFromDriverAfterApplied = 0; ++ Timer? timerToPassengerFromDriverAfterApplied; ++ DateTime? _driverEtaUpdatedAt; ++ int _driverEtaSecondsAtUpdate = 0; ++ int _driverEtaCountdownTicks = 0; ++ ++ bool rideTimerBegin = false; ++ double progressTimerRideBegin = 0; ++ int remainingTimeTimerRideBegin = 60; ++ String stringRemainingTimeRideBegin = ''; ++ ++ late String rideId = 'yet'; ++ late String driverId = ''; ++ late String make = ''; ++ late String model = ''; ++ late String carColor = ''; ++ late String licensePlate = ''; ++ late String driverName = ''; ++ late String passengerName = ''; ++ late String driverPhone = ''; ++ late String colorHex = ''; ++ late String carYear = ''; ++ late String driverRate = '5.0'; ++ late String driverToken = ''; ++ ++ double kazan = 8; ++ double totalPassenger = 0; ++ double totalDriver = 0; ++ double costDistance = 0; ++ double costDuration = 0; ++ double averageDuration = 0; ++ double totalCostPassenger = 0; ++ ++ double totalPassengerSpeed = 0; ++ double totalPassengerBalash = 0; ++ double totalPassengerComfort = 0; ++ double totalPassengerElectric = 0; ++ double totalPassengerLady = 0; ++ double totalPassengerScooter = 0; ++ double totalPassengerVan = 0; ++ double totalPassengerRayehGai = 0; ++ double totalPassengerRayehGaiComfort = 0; ++ double totalPassengerRayehGaiBalash = 0; ++ ++ double latePrice = 0; ++ double fuelPrice = 0; ++ double heavyPrice = 0; ++ double naturePrice = 0; ++ ++ bool isRideFinished = false; ++ String stringRemainingTimeToPassenger = ''; ++ String stringRemainingTimeDriverWaitPassenger5Minute = ''; ++ ++ bool isDriverInPassengerWay = false; ++ bool isDriverArrivePassenger = false; ++ bool isSearchingWindow = false; ++ bool shouldFetch = true; ++ ++ double progressTimerToPassengerFromDriverAfterApplied = 0; ++ double progressTimerDriverWaitPassenger5Minute = 0; ++ bool isCashSelectedBeforeConfirmRide = false; ++ bool isPassengerChosen = false; ++ ++ Timer? _masterTimer; ++ Timer? _searchTimer; ++ Timer? _timer; ++ Timer? _uiCountdownTimer; ++ ++ bool _isArrivalProcessed = false; ++ bool _isFinishProcessed = false; ++ bool _isCancelProcessed = false; ++ bool _isAcceptanceProcessed = false; ++ bool _isRatingScreenOpen = false; ++ bool _isRecalculatingRoute = false; ++ ++ String _rideAcceptedViaSource = "Unknown"; ++ ++ final double kDurationScalar = 1.5348; ++ // مسافة الانحراف المسموح بها بالمتر قبل إعادة حساب المسار تلقائيًا للرحلة. ++ // إذا انحرف السائق عن المسار بأكثر من هذه المسافة، يُعاد حساب المسار. ++ final double _deviationThresholdMeters = 30.0; ++ int _routeHeadingMismatchCount = 0; ++ ++ final Map _pollingIntervals = { ++ RideState.noRide: 6, ++ RideState.searching: 8, ++ RideState.driverApplied: 10, ++ RideState.driverArrived: 15, ++ RideState.inProgress: 15, ++ RideState.cancelled: 3600, ++ RideState.finished: 3600, ++ RideState.preCheckReview: 3600, ++ }; ++ ++ Timer? _locationPollingTimer; ++ List _currentDriverRoutePoints = []; ++ double _currentDriverRouteDistanceMeters = 0.0; ++ int _currentDriverRouteDurationSeconds = 0; ++ ++ int _currentSearchPhase = 0; ++ bool _isFetchingDriverLocation = false; ++ Timer? _watchdogTimer; ++ ++ final List _searchRadii = [2400, 3000, 3100]; ++ final int _searchPhaseDurationSeconds = 30; ++ final int _totalSearchTimeoutSeconds = 90; ++ ++ int _noRideSearchCount = 0; ++ final int _noRideMaxTries = 3; ++ final int _noRideIntervalSec = 5; ++ DateTime? _noRideNextAllowed; ++ bool _noRideSearchCapped = false; ++ int _masterIntervalSeconds = -1; ++ ++ final StreamController _rideStatusStreamController = ++ StreamController.broadcast(); ++ Stream get rideStatusStream => _rideStatusStreamController.stream; ++ ++ final StreamController _beginRideStreamController = ++ StreamController.broadcast(); ++ Stream get beginRideStream => _beginRideStreamController.stream; ++ ++ final StreamController _timerStreamController = StreamController(); ++ Stream get timerStream => _timerStreamController.stream; ++ ++ bool isTimerFromDriverToPassengerAfterAppliedRunning = true; ++ bool isTimerRunning = false; ++ int beginRideInterval = 10; ++ ++ Timer? _rideProgressTimer; ++ bool _hasShownSpeedWarning = false; ++ bool rideInProgress = true; ++ double elapsedTimeInSeconds = 0; ++ String stringElapsedTimeRideBeginVip = '0:00'; ++ ++ Map rideStatusFromStartApp = {}; ++ bool isStartAppHasRide = false; ++ late Duration durationToAdd; ++ late DateTime newTime = DateTime.now(); ++ String durationByPassenger = ''; ++ int hours = 0; ++ int minutes = 0; ++ ++ int selectedReason = -1; ++ String? cancelNote; ++ double latitudeWhatsApp = 0; ++ double longitudeWhatsApp = 0; ++ ++ // Getters for linked controllers ++ LocationSearchController get locSearch => ++ Get.find(); ++ MapEngineController get mapEngine => Get.find(); ++ NearbyDriversController get nearbyDrivers => ++ Get.find(); ++ MapSocketController get mapSocket => Get.find(); ++ UiInteractionsController get uiInteractions => ++ Get.find(); ++ ++ // LocationSearchController pass-throughs ++ LatLng get passengerLocation => locSearch.passengerLocation; ++ set passengerLocation(LatLng val) => locSearch.passengerLocation = val; ++ ++ LatLng get newMyLocation => locSearch.newMyLocation; ++ set newMyLocation(LatLng val) => locSearch.newMyLocation = val; ++ ++ LatLng get newStartPointLocation => locSearch.newStartPointLocation; ++ set newStartPointLocation(LatLng val) => ++ locSearch.newStartPointLocation = val; ++ ++ LatLng get myDestination => locSearch.myDestination; ++ set myDestination(LatLng val) => locSearch.myDestination = val; ++ ++ String get startNameAddress => locSearch.startNameAddress; ++ set startNameAddress(String val) => locSearch.startNameAddress = val; ++ ++ String get endNameAddress => locSearch.endNameAddress; ++ set endNameAddress(String val) => locSearch.endNameAddress = val; ++ ++ List get placesCoordinate => locSearch.placesCoordinate; ++ set placesCoordinate(List val) => locSearch.placesCoordinate = val; ++ ++ int get activeMenuWaypointCount => locSearch.activeMenuWaypointCount; ++ set activeMenuWaypointCount(int val) => ++ locSearch.activeMenuWaypointCount = val; ++ ++ List get menuWaypoints => locSearch.menuWaypoints; ++ set menuWaypoints(List val) => locSearch.menuWaypoints = val; ++ ++ List get menuWaypointNames => locSearch.menuWaypointNames; ++ set menuWaypointNames(List val) => locSearch.menuWaypointNames = val; ++ ++ bool get passengerStartLocationFromMap => ++ locSearch.passengerStartLocationFromMap; ++ set passengerStartLocationFromMap(bool val) => ++ locSearch.passengerStartLocationFromMap = val; ++ ++ List get coordinatesWithoutEmpty => locSearch.coordinatesWithoutEmpty; ++ ++ // MapEngineController pass-throughs ++ Set get markers => mapEngine.markers; ++ set markers(Set val) { ++ mapEngine.markers = val; ++ mapEngine.update(); ++ } ++ ++ Set get polyLines => mapEngine.polyLines; ++ set polyLines(Set val) { ++ mapEngine.polyLines = val; ++ mapEngine.update(); ++ } ++ ++ IntaleqMapController? get mapController => mapEngine.mapController; ++ ++ bool get isStyleLoaded => mapEngine.isStyleLoaded; ++ set isStyleLoaded(bool val) => mapEngine.isStyleLoaded = val; ++ ++ bool get isBottomSheetShown => mapEngine.isBottomSheetShown; ++ set isBottomSheetShown(bool val) => mapEngine.isBottomSheetShown = val; ++ ++ double get heightBottomSheetShown => mapEngine.heightBottomSheetShown; ++ set heightBottomSheetShown(double val) => ++ mapEngine.heightBottomSheetShown = val; ++ ++ bool get isPickerShown => mapEngine.isPickerShown; ++ set isPickerShown(bool val) => mapEngine.isPickerShown = val; ++ ++ bool get isMarkersShown => mapEngine.isMarkersShown; ++ set isMarkersShown(bool val) => mapEngine.isMarkersShown = val; ++ ++ bool get isMainBottomMenuMap => mapEngine.isMainBottomMenuMap; ++ set isMainBottomMenuMap(bool val) => mapEngine.isMainBottomMenuMap = val; ++ ++ double get mainBottomMenuMapHeight => mapEngine.mainBottomMenuMapHeight; ++ set mainBottomMenuMapHeight(double val) => ++ mapEngine.mainBottomMenuMapHeight = val; ++ ++ bool get isWayPointSheet => mapEngine.isWayPointSheet; ++ set isWayPointSheet(bool val) => mapEngine.isWayPointSheet = val; ++ ++ bool get isWayPointStopsSheet => mapEngine.isWayPointStopsSheet; ++ set isWayPointStopsSheet(bool val) => mapEngine.isWayPointStopsSheet = val; ++ ++ bool get isWayPointStopsSheetUtilGetMap => ++ mapEngine.isWayPointStopsSheetUtilGetMap; ++ set isWayPointStopsSheetUtilGetMap(bool val) => ++ mapEngine.isWayPointStopsSheetUtilGetMap = val; ++ ++ double get wayPointSheetHeight => mapEngine.wayPointSheetHeight; ++ set wayPointSheetHeight(double val) => mapEngine.wayPointSheetHeight = val; ++ ++ double get cashConfirmPageShown => mapEngine.cashConfirmPageShown; ++ set cashConfirmPageShown(double val) => mapEngine.cashConfirmPageShown = val; ++ ++ bool get isCashConfirmPageShown => mapEngine.isCashConfirmPageShown; ++ set isCashConfirmPageShown(bool val) => ++ mapEngine.isCashConfirmPageShown = val; ++ ++ bool get isCancelRidePageShown => mapEngine.isCancelRidePageShown; ++ set isCancelRidePageShown(bool val) => mapEngine.isCancelRidePageShown = val; ++ ++ void changeCashConfirmPageShown() => mapEngine.changeCashConfirmPageShown(); ++ ++ void resetNoRideSearch() { ++ _noRideSearchCount = 0; ++ _noRideSearchCapped = false; ++ _noRideNextAllowed = null; ++ } ++ ++ double get paymentPageShown => mapEngine.paymentPageShown; ++ set paymentPageShown(double val) => mapEngine.paymentPageShown = val; ++ ++ void changeCancelRidePageShow() => mapEngine.changeCancelRidePageShow(); ++ ++ // NearbyDriversController pass-throughs ++ List get carsLocationByPassenger => nearbyDrivers.carsLocationByPassenger; ++ set carsLocationByPassenger(List val) => ++ nearbyDrivers.carsLocationByPassenger = val; ++ ++ List get driverCarsLocationToPassengerAfterApplied => ++ nearbyDrivers.driverCarsLocationToPassengerAfterApplied; ++ set driverCarsLocationToPassengerAfterApplied(List val) => ++ nearbyDrivers.driverCarsLocationToPassengerAfterApplied = val; ++ ++ bool get noCarString => nearbyDrivers.noCarString; ++ set noCarString(bool val) => nearbyDrivers.noCarString = val; ++ ++ double get speed => locSearch.speed; ++ set speed(double val) => locSearch.speed = val; ++ ++ Timer? get locationPollingTimer => _locationPollingTimer; ++ ++ bool isActiveRideState() { ++ return currentRideState.value == RideState.searching || ++ currentRideState.value == RideState.driverApplied || ++ currentRideState.value == RideState.driverArrived || ++ currentRideState.value == RideState.inProgress; ++ } ++ ++ void startMasterTimer() { ++ _masterTimer?.cancel(); ++ _masterTimer = Timer.periodic(const Duration(seconds: 13), (_) { ++ _handleRideState(currentRideState.value); ++ }); ++ } ++ ++ void cancelMasterTimer() { ++ _masterTimer?.cancel(); ++ _masterTimer = null; ++ } ++ ++ void startMasterTimerWithInterval(int seconds) { ++ if (_masterTimer != null && _masterIntervalSeconds == seconds) return; ++ _masterIntervalSeconds = seconds; ++ _masterTimer?.cancel(); ++ _masterTimer = Timer.periodic(Duration(seconds: seconds), (_) { ++ _handleRideState(currentRideState.value); ++ }); ++ } ++ ++ void stopAllTimers() { ++ Log.print('🛑 FORCE STOP: Stopping ALL Timers and Streams 🛑'); ++ _masterTimer?.cancel(); ++ _masterTimer = null; ++ timerToPassengerFromDriverAfterApplied?.cancel(); ++ timerToPassengerFromDriverAfterApplied = null; ++ _timer?.cancel(); ++ _timer = null; ++ _uiCountdownTimer?.cancel(); ++ _uiCountdownTimer = null; ++ _locationPollingTimer?.cancel(); ++ _locationPollingTimer = null; ++ _watchdogTimer?.cancel(); ++ _watchdogTimer = null; ++ _searchTimer?.cancel(); ++ _searchTimer = null; ++ _rideProgressTimer?.cancel(); ++ _rideProgressTimer = null; ++ ++ isTimerRunning = false; ++ isBeginRideFromDriverRunning = false; ++ _isFetchingDriverLocation = false; ++ update(); ++ } ++ ++ Future _handleRideState(RideState state) async { ++ if (_isRatingScreenOpen) { ++ Log.print('⛔ Rating Screen is Open. Skipping Logic.'); ++ stopAllTimers(); ++ return; ++ } ++ Log.print('Handling state: $state'); ++ ++ int effectivePollingInterval = _pollingIntervals[state] ?? 13; ++ ++ switch (state) { ++ case RideState.noRide: ++ final now = DateTime.now(); ++ if (_noRideSearchCount >= _noRideMaxTries) { ++ if (!_noRideSearchCapped) { ++ _noRideSearchCapped = true; ++ Log.print('[noRide] search capped at $_noRideMaxTries attempts'); ++ } ++ break; ++ } ++ if (_noRideNextAllowed != null && now.isBefore(_noRideNextAllowed!)) { ++ break; ++ } ++ _noRideSearchCount++; ++ Log.print('_noRideSearchCount: $_noRideSearchCount'); ++ _noRideNextAllowed = now.add(Duration(seconds: _noRideIntervalSec)); ++ nearbyDrivers.getCarsLocationByPassengerAndReloadMarker(); ++ nearbyDrivers.getNearestDriverByPassengerLocation(); ++ break; ++ ++ case RideState.cancelled: ++ stopAllTimers(); ++ break; ++ ++ case RideState.preCheckReview: ++ stopAllTimers(); ++ _checkLastRideForReview(); ++ break; ++ ++ case RideState.searching: ++ if (rideId == 'yet' || rideId.isEmpty) break; ++ try { ++ String statusFromServer = await getRideStatus(rideId); ++ if (statusFromServer == 'Apply' || statusFromServer == 'Applied') { ++ await processRideAcceptance(source: "Polling"); ++ break; ++ } ++ } catch (e) { ++ Log.print('Error polling getRideStatus: $e'); ++ } ++ ++ final now = DateTime.now(); ++ final int elapsedSeconds = now.difference(_searchStartTime!).inSeconds; ++ ++ if (elapsedSeconds > _totalSearchTimeoutSeconds) { ++ stopAllTimers(); ++ currentRideState.value = RideState.noRide; ++ isSearchingWindow = false; ++ update(); ++ _showIncreaseFeeDialog(); ++ break; ++ } ++ ++ int targetPhase = ++ (elapsedSeconds / _searchPhaseDurationSeconds).floor(); ++ if (targetPhase >= _searchRadii.length) { ++ targetPhase = _searchRadii.length - 1; ++ } ++ ++ bool isNewPhase = targetPhase > _currentSearchPhase; ++ bool timeToScanForNewDrivers = (elapsedSeconds % 15 == 0); ++ ++ if (isNewPhase || timeToScanForNewDrivers || elapsedSeconds < 5) { ++ _currentSearchPhase = targetPhase; ++ int currentRadius = _searchRadii[_currentSearchPhase]; ++ Log.print( ++ '[Search Logic] Scanning for drivers. Phase: $_currentSearchPhase, Radius: $currentRadius'); ++ } ++ ++ if (elapsedSeconds < 5) { ++ driversStatusForSearchWindow = 'Your order is being prepared'.tr; ++ } else if (elapsedSeconds < 15) { ++ driversStatusForSearchWindow = 'Your order sent to drivers'.tr; ++ } else { ++ driversStatusForSearchWindow = ++ 'The drivers are reviewing your request'.tr; ++ } ++ update(); ++ break; ++ ++ case RideState.driverApplied: ++ if (!_isDriverAppliedLogicExecuted && !_isAcceptanceProcessed) { ++ Log.print('[handleRideState] Execution driverApplied logic.'); ++ rideAppliedFromDriver(true); ++ _isDriverAppliedLogicExecuted = true; ++ } ++ ++ if (!mapSocket.isSocketConnected) { ++ try { ++ String statusFromServer = await getRideStatus(rideId); ++ if (statusFromServer == 'Arrived') { ++ currentRideState.value = RideState.driverArrived; ++ break; ++ } else if (statusFromServer == 'Begin' || ++ statusFromServer == 'inProgress') { ++ processRideBegin(); ++ break; ++ } ++ } catch (e) { ++ Log.print('Error polling for Arrived/Begin status: $e'); ++ } ++ } ++ if (!_isSocketHealthy()) { ++ getDriverCarsLocationToPassengerAfterApplied(); ++ } ++ break; ++ ++ case RideState.driverArrived: ++ if (!_isDriverArrivedLogicExecuted) { ++ _isDriverArrivedLogicExecuted = true; ++ startTimerDriverWaitPassenger5Minute(); ++ uiInteractions.driverArrivePassengerDialoge(); ++ } ++ break; ++ ++ case RideState.inProgress: ++ if (!mapSocket.isSocketConnected) { ++ try { ++ String statusFromServer = await getRideStatus(rideId); ++ if (statusFromServer == 'Finished' || ++ statusFromServer == 'finished') { ++ Log.print( ++ '🏁 DETECTED FINISHED: Killing processes and forcing Review.'); ++ stopAllTimers(); ++ currentRideState.value = RideState.preCheckReview; ++ tripFinishedFromDriver(); ++ _checkLastRideForReview(); ++ return; ++ } ++ } catch (e) { ++ Log.print('Error polling status: $e'); ++ } ++ } ++ ++ if (!_isRideBeginLogicExecuted) { ++ _isRideBeginLogicExecuted = true; ++ _executeBeginRideLogic(); ++ } ++ if (!_isSocketHealthy()) { ++ getDriverCarsLocationToPassengerAfterApplied(); ++ } ++ break; ++ ++ case RideState.finished: ++ tripFinishedFromDriver(); ++ stopAllTimers(); ++ effectivePollingInterval = 3600; ++ break; ++ } ++ startMasterTimerWithInterval(effectivePollingInterval); ++ } ++ ++ bool _isSocketHealthy() { ++ return mapSocket.isSocketHealthy(); ++ } ++ ++ Future _checkInitialRideStatus() async { ++ await getRideStatusFromStartApp(); ++ if (rideStatusFromStartApp['data'] == null) { ++ currentRideState.value = RideState.noRide; ++ _handleRideState(currentRideState.value); ++ return; ++ } ++ String _status = rideStatusFromStartApp['data']['status'] ?? ''; ++ String _lowerStatus = _status.toLowerCase(); ++ ++ if (_lowerStatus == 'waiting' || ++ _lowerStatus == 'apply' || ++ _lowerStatus == 'applied' || ++ _lowerStatus == 'accepted' || ++ _lowerStatus == 'arrived' || ++ _lowerStatus == 'begin') { ++ rideId = rideStatusFromStartApp['data']['rideId'].toString(); ++ currentRideState.value = _lowerStatus == 'waiting' ++ ? RideState.searching ++ : (_lowerStatus == 'apply' || ++ _lowerStatus == 'applied' || ++ _lowerStatus == 'accepted') ++ ? RideState.driverApplied ++ : _lowerStatus == 'arrived' ++ ? RideState.driverArrived ++ : _lowerStatus == 'begin' ++ ? RideState.inProgress ++ : _lowerStatus == 'cancel' ++ ? RideState.cancelled ++ : RideState.noRide; ++ } else if (_lowerStatus == 'finished') { ++ if (rideStatusFromStartApp['data']['needsReview'] == 1) { ++ currentRideState.value = RideState.preCheckReview; ++ } else { ++ currentRideState.value = RideState.noRide; ++ } ++ } else { ++ currentRideState.value = RideState.noRide; ++ } ++ _handleRideState(currentRideState.value); ++ } ++ ++ Future _checkLastRideForReview() async { ++ Log.print('⭐ FORCE OPEN RATING PAGE (Get.to mode)'); ++ await getRideStatusFromStartApp(); ++ ++ if (rideStatusFromStartApp['data'] == null) { ++ currentRideState.value = RideState.noRide; ++ startMasterTimer(); ++ return; ++ } ++ ++ String needsReview = ++ rideStatusFromStartApp['data']['needsReview'].toString(); ++ ++ if (needsReview == '1') { ++ _isRatingScreenOpen = true; ++ var args = { ++ 'driverId': rideStatusFromStartApp['data']['driver_id'].toString(), ++ 'rideId': rideStatusFromStartApp['data']['rideId'].toString(), ++ 'driverName': rideStatusFromStartApp['data']['driverName'], ++ 'price': rideStatusFromStartApp['data']['price'], ++ }; ++ ++ await Get.to( ++ () => RatingDriverBottomSheet(), ++ arguments: args, ++ preventDuplicates: true, ++ popGesture: false, ++ ); ++ ++ Log.print('✅ Rating Page Closed. Resetting App.'); ++ _isRatingScreenOpen = false; ++ restCounter(); ++ currentRideState.value = RideState.noRide; ++ startMasterTimer(); ++ } else { ++ currentRideState.value = RideState.noRide; ++ startMasterTimer(); ++ } ++ } ++ ++ DateTime? _searchStartTime; ++ bool _isDriverAppliedLogicExecuted = false; ++ bool _isDriverArrivedLogicExecuted = false; ++ bool _isRideBeginLogicExecuted = false; ++ String driversStatusForSearchWindow = ''; ++ ++ void startSearchingForDriver() async { ++ if (currentRideState.value == RideState.searching) return; ++ ++ isSearchingWindow = true; ++ currentRideState.value = RideState.searching; ++ driversStatusForSearchWindow = 'Searching for nearby drivers...'.tr; ++ _searchStartTime = DateTime.now(); ++ _currentSearchPhase = 0; ++ update(); ++ ++ bool rideCreated = await postRideDetailsToServer(); ++ ++ if (!rideCreated) { ++ isSearchingWindow = false; ++ currentRideState.value = RideState.noRide; ++ mySnackbarWarning("Could not create ride. Please try again.".tr); ++ update(); ++ return; ++ } ++ ++ _addRideToWaitingTable(); ++ mapSocket.initConnectionWithSocket(); ++ } ++ ++ void _showIncreaseFeeDialog() { ++ Get.dialog( ++ CupertinoAlertDialog( ++ title: Text("No drivers accepted your request yet".tr), ++ content: Text( ++ "Increasing the fare might attract more drivers. Would you like to increase the price?" ++ .tr), ++ actions: [ ++ CupertinoDialogAction( ++ child: Text("Cancel Ride".tr, ++ style: TextStyle(color: AppColor.redColor)), ++ onPressed: () { ++ Get.back(); ++ mapEngine.changeCancelRidePageShow(); ++ }, ++ ), ++ CupertinoDialogAction( ++ child: Text("Increase Fare".tr, ++ style: TextStyle(color: AppColor.greenColor)), ++ onPressed: () { ++ Get.back(); ++ double newPrice = totalPassenger * 1.10; ++ increasePriceAndRestartSearch(newPrice); ++ }, ++ ), ++ ], ++ ), ++ barrierDismissible: false, ++ ); ++ } ++ ++ Future increasePriceAndRestartSearch(double newPrice) async { ++ totalPassenger = newPrice; ++ update(); ++ ++ await CRUD() ++ .post(link: "${AppLink.server}/ride/rides/update.php", payload: { ++ "id": rideId, ++ "price": newPrice.toStringAsFixed(2), ++ }); ++ ++ Log.print( ++ '[increasePrice] Price changed. Clearing notified list to resend.'); ++ notifiedDrivers.clear(); ++ ++ _searchStartTime = DateTime.now(); ++ _currentSearchPhase = 0; ++ isSearchingWindow = true; ++ update(); ++ startMasterTimer(); ++ } ++ ++ void _stopWaitPassengerTimer({bool resetUI = false}) { ++ _waitPassengerTimer?.cancel(); ++ _waitPassengerTimer = null; ++ ++ if (resetUI) { ++ progressTimerDriverWaitPassenger5Minute = 0.0; ++ remainingTimeDriverWaitPassenger5Minute = 0; ++ stringRemainingTimeDriverWaitPassenger5Minute = '00:00'; ++ update(); ++ } ++ } ++ ++ void _executeBeginRideLogic() { ++ Log.print('[executeBeginRideLogic] execution of ride start logic...'); ++ _stopWaitPassengerTimer(resetUI: true); ++ ++ timeToPassengerFromDriverAfterApplied = 0; ++ remainingTime = 0; ++ remainingTimeToPassengerFromDriverAfterApplied = 0; ++ remainingTimeDriverWaitPassenger5Minute = 0; ++ ++ rideTimerBegin = true; ++ statusRide = 'Begin'; ++ isDriverInPassengerWay = false; ++ isDriverArrivePassenger = false; ++ ++ box.write(BoxName.passengerWalletTotal, '0'); ++ update(); ++ ++ rideIsBeginPassengerTimer(); ++ runWhenRideIsBegin(); ++ ++ NotificationController().showNotification( ++ 'Trip is Begin'.tr, ++ 'The trip has started! Feel free to contact emergency numbers, share your trip, or activate voice recording for the journey' ++ .tr, ++ 'start'); ++ } ++ ++ Future processRideBegin({String source = "Unknown"}) async { ++ if (currentRideState.value == RideState.inProgress || ++ _isRideStartedProcessed) { ++ return; ++ } ++ _isRideStartedProcessed = true; ++ currentRideState.value = RideState.inProgress; ++ statusRide = 'Begin'; ++ ++ remainingTimeDriverWaitPassenger5Minute = 0; ++ _stopWaitPassengerTimer(); ++ ++ // مسح الخطوط القديمة (pickup/direct) قبل رسم خط المرحلة الجديدة ++ polyLines = polyLines ++ .where((p) => ++ p.polylineId.value != 'main_route' && ++ p.polylineId.value != 'route_direct' && ++ !p.polylineId.value.startsWith('driver_route')) ++ .toSet(); ++ ++ // موقع السائق الحالي من آخر تحديث ++ LatLng driverPos = passengerLocation; ++ if (driverCarsLocationToPassengerAfterApplied.isNotEmpty) { ++ driverPos = driverCarsLocationToPassengerAfterApplied.last; ++ } ++ ++ // رسم المسار من موقع السائق إلى الهدف بخط أزرق مستمر ++ await calculateDriverToPassengerRoute(driverPos, myDestination, ++ isBeginPhase: true); ++ ++ rideIsBeginPassengerTimer(); ++ runWhenRideIsBegin(); ++ update(); ++ } ++ ++ bool _isRideStartedProcessed = false; ++ ++ void updateDriverRouteMetrics({int? etaSeconds, double? distanceMeters}) { ++ if (distanceMeters != null && distanceMeters > 0) { ++ distanceByPassenger = distanceMeters.toStringAsFixed(0); ++ } ++ ++ if (etaSeconds == null) return; ++ ++ final int clampedEta = max(0, etaSeconds); ++ timeToPassengerFromDriverAfterApplied = clampedEta; ++ remainingTimeToPassengerFromDriverAfterApplied = clampedEta; ++ durationToPassenger = clampedEta; ++ _driverEtaSecondsAtUpdate = clampedEta; ++ _driverEtaUpdatedAt = DateTime.now(); ++ ++ final int minutes = (clampedEta / 60).floor(); ++ final int seconds = clampedEta % 60; ++ stringRemainingTimeToPassenger = ++ '$minutes:${seconds.toString().padLeft(2, '0')}'; ++ } ++ ++ void startTimerFromDriverToPassengerAfterApplied() { ++ stopTimerFromDriverToPassengerAfterApplied(); ++ if (isTimerRunning) return; ++ isTimerRunning = true; ++ isTimerFromDriverToPassengerAfterAppliedRunning = true; ++ _driverEtaUpdatedAt ??= DateTime.now(); ++ _driverEtaSecondsAtUpdate = timeToPassengerFromDriverAfterApplied; ++ _driverEtaCountdownTicks = 0; ++ ++ timerToPassengerFromDriverAfterApplied = ++ Timer.periodic(const Duration(seconds: 1), (timer) { ++ bool isRideActive = (statusRide == 'Apply' || ++ statusRide == 'Arrived' || ++ statusRide == 'Begin' || ++ currentRideState.value == RideState.driverApplied || ++ currentRideState.value == RideState.driverArrived || ++ currentRideState.value == RideState.inProgress); ++ ++ if (!isRideActive || !isTimerFromDriverToPassengerAfterAppliedRunning) { ++ timer.cancel(); ++ timerToPassengerFromDriverAfterApplied = null; ++ isTimerRunning = false; ++ return; ++ } ++ ++ _driverEtaCountdownTicks++; ++ if (!_timerStreamController.isClosed) { ++ _timerStreamController.add(_driverEtaCountdownTicks); ++ } ++ ++ final int secondsElapsedSinceEta = _driverEtaUpdatedAt == null ++ ? 0 ++ : DateTime.now().difference(_driverEtaUpdatedAt!).inSeconds; ++ remainingTimeToPassengerFromDriverAfterApplied = ++ _driverEtaSecondsAtUpdate - secondsElapsedSinceEta; ++ ++ if (remainingTimeToPassengerFromDriverAfterApplied < 0) { ++ remainingTimeToPassengerFromDriverAfterApplied = 0; ++ } ++ ++ int minutes = ++ (remainingTimeToPassengerFromDriverAfterApplied / 60).floor(); ++ int seconds = remainingTimeToPassengerFromDriverAfterApplied % 60; ++ stringRemainingTimeToPassenger = ++ '$minutes:${seconds.toString().padLeft(2, '0')}'; ++ ++ if (_driverEtaCountdownTicks % 5 == 0) { ++ double currentProgress = 1 - ++ (remainingTimeToPassengerFromDriverAfterApplied / ++ (_driverEtaSecondsAtUpdate == 0 ++ ? 1 ++ : _driverEtaSecondsAtUpdate)); ++ ++ IosLiveActivityService.updateRideActivity( ++ status: 'waiting', ++ driverName: driverName, ++ carDetails: '$make • $model • $carColor', ++ etaText: stringRemainingTimeToPassenger, ++ progress: currentProgress.clamp(0.0, 1.0), ++ ); ++ } ++ ++ if (_driverEtaCountdownTicks % beginRideInterval == 0) { ++ uploadPassengerLocation(); ++ } else { ++ update(); ++ } ++ }); ++ } ++ ++ void stopTimerFromDriverToPassengerAfterApplied() { ++ isTimerFromDriverToPassengerAfterAppliedRunning = false; ++ timerToPassengerFromDriverAfterApplied?.cancel(); ++ timerToPassengerFromDriverAfterApplied = null; ++ isTimerRunning = false; ++ update(); ++ } ++ ++ Timer? _waitPassengerTimer; ++ static const int _waitPassengerTotalSeconds = 300; ++ int _waitPassengerElapsedSeconds = 0; ++ ++ void startTimerDriverWaitPassenger5Minute() { ++ if (currentRideState.value != RideState.driverArrived) return; ++ ++ stopTimerFromDriverToPassengerAfterApplied(); ++ isTimerRunning = false; ++ _stopWaitPassengerTimer(); ++ ++ isDriverArrivePassenger = true; ++ isDriverInPassengerWay = false; ++ timeToPassengerFromDriverAfterApplied = 0; ++ ++ _waitPassengerElapsedSeconds = 0; ++ remainingTimeDriverWaitPassenger5Minute = _waitPassengerTotalSeconds; ++ progressTimerDriverWaitPassenger5Minute = 0; ++ ++ int m = (remainingTimeDriverWaitPassenger5Minute / 60).floor(); ++ int s = remainingTimeDriverWaitPassenger5Minute % 60; ++ stringRemainingTimeDriverWaitPassenger5Minute = ++ '$m:${s.toString().padLeft(2, '0')}'; ++ ++ update(); ++ ++ _waitPassengerTimer = Timer.periodic(const Duration(seconds: 1), (t) { ++ if (currentRideState.value != RideState.driverArrived) { ++ _stopWaitPassengerTimer(resetUI: true); ++ if (currentRideState.value == RideState.inProgress) { ++ isDriverArrivePassenger = false; ++ } ++ update(); ++ return; ++ } ++ ++ _waitPassengerElapsedSeconds++; ++ int remaining = _waitPassengerTotalSeconds - _waitPassengerElapsedSeconds; ++ if (remaining < 0) remaining = 0; ++ ++ remainingTimeDriverWaitPassenger5Minute = remaining; ++ progressTimerDriverWaitPassenger5Minute = ++ _waitPassengerElapsedSeconds / _waitPassengerTotalSeconds; ++ ++ int minutes = (remaining / 60).floor(); ++ int seconds = remaining % 60; ++ stringRemainingTimeDriverWaitPassenger5Minute = ++ '$minutes:${seconds.toString().padLeft(2, '0')}'; ++ update(); ++ ++ if (remaining == 0) { ++ _stopWaitPassengerTimer(); ++ } ++ }); ++ } ++ ++ void beginRideTimer() { ++ Timer.periodic(const Duration(seconds: 1), (timer) { ++ if (!timerController.isClosed) { ++ timerController.add(timer.tick); ++ } ++ update(); ++ }); ++ } ++ ++ final timerController = StreamController(); ++ void stopRideTimer() { ++ timerController.close(); ++ update(); ++ } ++ ++ void rideIsBeginPassengerTimer() { ++ _rideProgressTimer?.cancel(); ++ _hasShownSpeedWarning = false; ++ ++ DateTime now = DateTime.now(); ++ DateTime expectedArrivalTime = now.add(Duration(seconds: durationToRide)); ++ ++ var arrivalTime = DateFormat('hh:mm a').format(expectedArrivalTime); ++ box.write(BoxName.arrivalTime, arrivalTime); ++ ++ Log.print("⏳ Ride Timer Started. Duration: $durationToRide sec"); ++ ++ _rideProgressTimer = ++ Timer.periodic(const Duration(seconds: 1), (timer) async { ++ if (currentRideState.value != RideState.inProgress) { ++ timer.cancel(); ++ return; ++ } ++ ++ DateTime currentNow = DateTime.now(); ++ int remainingSeconds = ++ expectedArrivalTime.difference(currentNow).inSeconds; ++ ++ if (remainingSeconds < 0) remainingSeconds = 0; ++ ++ remainingTimeTimerRideBegin = remainingSeconds; ++ progressTimerRideBegin = ++ durationToRide > 0 ? 1 - (remainingSeconds / durationToRide) : 1.0; ++ ++ int minutes = (remainingSeconds / 60).floor(); ++ int seconds = remainingSeconds % 60; ++ stringRemainingTimeRideBegin = ++ '$minutes:${seconds.toString().padLeft(2, '0')}'; ++ ++ final percent = (progressTimerRideBegin * 100).clamp(0, 100).toInt(); ++ ++ if (remainingSeconds % 5 == 0 || remainingSeconds == 0) { ++ IosLiveActivityService.updateRideActivity( ++ status: 'ongoing', ++ driverName: driverName, ++ carDetails: '$make • $model • $carColor', ++ etaText: stringRemainingTimeRideBegin, ++ progress: progressTimerRideBegin.clamp(0.0, 1.0), ++ ); ++ } ++ ++ if (remainingSeconds % 60 == 0 || remainingSeconds == 0) { ++ await RideLiveNotification.showTripInProgress( ++ percentage: percent, ++ etaText: stringRemainingTimeRideBegin, ++ ); ++ } ++ ++ if (speed > 100 && !_hasShownSpeedWarning) { ++ _hasShownSpeedWarning = true; ++ _triggerSpeedWarning(); ++ } ++ ++ if (speed < 80 && _hasShownSpeedWarning) { ++ _hasShownSpeedWarning = false; ++ } ++ ++ if (remainingSeconds <= 0) { ++ timer.cancel(); ++ } ++ update(); ++ }); ++ } ++ ++ void _triggerSpeedWarning() { ++ NotificationController().showNotification("Warning: Speeding detected!".tr, ++ 'You can call or record audio of this trip'.tr, 'tone1'); ++ ++ Get.defaultDialog( ++ barrierDismissible: false, ++ title: "Warning: Speeding detected!".tr, ++ titleStyle: AppStyle.title.copyWith(color: AppColor.redColor), ++ content: Column( ++ children: [ ++ Icon(Icons.speed, size: 50, color: AppColor.redColor), ++ const SizedBox(height: 10), ++ Text( ++ "We noticed the speed is exceeding 100 km/h. Please slow down for your safety..." ++ .tr, ++ textAlign: TextAlign.center, ++ style: AppStyle.title, ++ ), ++ ], ++ ), ++ confirm: MyElevatedButton( ++ title: "Share Trip Details".tr, ++ kolor: AppColor.redColor, ++ onPressed: () { ++ Get.back(); ++ uiInteractions.sosPassenger(); ++ }, ++ ), ++ cancel: MyElevatedButton( ++ title: "I'm Safe".tr, ++ kolor: AppColor.greenColor, ++ onPressed: () { ++ Get.back(); ++ }, ++ ), ++ ); ++ } ++ ++ void rideIsBeginPassengerTimerVIP() async { ++ rideInProgress = true; ++ bool sendSOS = false; ++ while (rideInProgress) { ++ await Future.delayed(const Duration(seconds: 1)); ++ elapsedTimeInSeconds++; ++ ++ int minutes = (elapsedTimeInSeconds / 60).floor(); ++ int seconds = (elapsedTimeInSeconds % 60).toInt(); ++ stringElapsedTimeRideBeginVip = ++ '$minutes:${seconds.toString().padLeft(2, '0')}'; ++ ++ if (speed > 100 && !sendSOS) { ++ Get.defaultDialog( ++ barrierDismissible: false, ++ title: "Warning: Speeding detected!".tr, ++ titleStyle: AppStyle.title, ++ content: Text( ++ "We noticed the speed is exceeding 100 km/h. Please slow down for your safety. If you feel unsafe, you can share your trip details with a contact or call the police using the red SOS button." ++ .tr, ++ style: AppStyle.title, ++ ), ++ confirm: MyElevatedButton( ++ title: "Share Trip Details".tr, ++ onPressed: () { ++ Get.back(); ++ String message = "**Emergency SOS from Passenger:**\n"; ++ message += "* ${'Origin'.tr}: $passengerLocation\n"; ++ message += "* ${'Destination'.tr}: $myDestination\n"; ++ message += "* ${'Driver Name'.tr}: $passengerName\n"; ++ message += "* ${'Driver Car Plate'.tr}: $licensePlate\n\n"; ++ message += "* ${'Driver Phone'.tr}: $driverPhone\n\n"; ++ message += ++ "${'Current Location'.tr}:https://www.google.com/maps/place/${passengerLocation.latitude},${passengerLocation.longitude} \n"; ++ message += "Please help! Contact me as soon as possible.".tr; ++ ++ launchCommunication( ++ 'whatsapp', box.read(BoxName.sosPhonePassenger), message); ++ sendSOS = true; ++ }, ++ kolor: AppColor.redColor, ++ ), ++ cancel: MyElevatedButton( ++ title: "Cancel".tr, ++ onPressed: () { ++ Get.back(); ++ }, ++ kolor: AppColor.greenColor, ++ ), ++ ); ++ } ++ update(); ++ } ++ } ++ ++ Future tripFinishedFromDriver() async { ++ Log.print('🧹 Cleaning UI for Finish'); ++ if (Get.isDialogOpen == true) Get.back(); ++ if (Get.isBottomSheetOpen == true) Get.back(); ++ ++ statusRide = 'Finished'; ++ currentRideState.value = RideState.finished; ++ ++ isSearchingWindow = false; ++ rideTimerBegin = false; ++ shouldFetch = false; ++ ++ stopAllTimers(); ++ resetAllMapStates(); ++ mapEngine.clearPolyline(); ++ markers = {}; ++ update(); ++ } ++ ++ void listenToBeginRideStream() { ++ beginRideStream.listen((status) { ++ Log.print("Ride status: $status"); ++ }, onError: (error) { ++ Log.print("Error in Begin Ride Stream: $error"); ++ }); ++ } ++ ++ Future begiVIPTripFromPassenger() async { ++ timeToPassengerFromDriverAfterApplied = 0; ++ remainingTime = 0; ++ isBottomSheetShown = false; ++ remainingTimeToPassengerFromDriverAfterApplied = 0; ++ remainingTimeDriverWaitPassenger5Minute = 0; ++ rideTimerBegin = true; ++ statusRideVip = 'Begin'; ++ isDriverInPassengerWay = false; ++ isDriverArrivePassenger = false; ++ update(); ++ rideIsBeginPassengerTimerVIP(); ++ runWhenRideIsBegin(); ++ } ++ ++ Future getRideStatusFromStartApp() async { ++ try { ++ var res = await CRUD().get( ++ link: AppLink.getRideStatusFromStartApp, ++ payload: {'passenger_id': box.read(BoxName.passengerID)}); ++ Log.print('rideStatusFromStartApp: $res'); ++ if (res == 'failure') { ++ rideStatusFromStartApp = { ++ 'data': {'status': 'NoRide', 'needsReview': false} ++ }; ++ isStartAppHasRide = false; ++ } else { ++ var decoded = jsonDecode(res); ++ if (decoded['status'] == 'failure') { ++ rideStatusFromStartApp = { ++ 'data': {'status': 'NoRide', 'needsReview': false} ++ }; ++ isStartAppHasRide = false; ++ } else { ++ rideStatusFromStartApp = decoded; ++ } ++ } ++ ++ String status = ++ (rideStatusFromStartApp['data']['status'] ?? '').toString(); ++ String lowerStatus = status.toLowerCase(); ++ ++ if (lowerStatus == 'begin' || ++ lowerStatus == 'apply' || ++ lowerStatus == 'applied' || ++ lowerStatus == 'accepted' || ++ lowerStatus == 'arrived') { ++ statusRide = status; ++ isStartAppHasRide = true; ++ final bool isBeginStatus = lowerStatus == 'begin'; ++ final bool isPickupStatus = lowerStatus == 'apply' || ++ lowerStatus == 'applied' || ++ lowerStatus == 'accepted' || ++ lowerStatus == 'arrived'; ++ currentRideState.value = lowerStatus == 'begin' ++ ? RideState.inProgress ++ : lowerStatus == 'arrived' ++ ? RideState.driverArrived ++ : RideState.driverApplied; ++ driverId = ++ rideStatusFromStartApp['data']['driver_id']?.toString() ?? ''; ++ driverName = ++ rideStatusFromStartApp['data']['driverName']?.toString() ?? ''; ++ driverRate = ++ rideStatusFromStartApp['data']['rateDriver']?.toString() ?? '5.0'; ++ final LatLng? pickupPoint = _parseLatLng( ++ rideStatusFromStartApp['data']['start_location']?.toString()); ++ final LatLng? destinationPoint = _parseLatLng( ++ rideStatusFromStartApp['data']['end_location']?.toString()); ++ if (pickupPoint != null) { ++ passengerLocation = pickupPoint; ++ } ++ if (destinationPoint != null) { ++ myDestination = destinationPoint; ++ } ++ statusRideFromStart = true; ++ update(); ++ ++ // Safe recovery of trip data ++ Map? tripData; ++ try { ++ var rawTrip = box.read(BoxName.tripData); ++ if (rawTrip is Map) { ++ tripData = Map.from(rawTrip); ++ } ++ } catch (e) { ++ Log.print("Error reading BoxName.tripData: $e"); ++ } ++ ++ String? pointsString = tripData?['polyline']; ++ ++ if (pointsString == null || pointsString.isEmpty) { ++ // No local polyline saved: Re-fetch the route from API ++ final String startLoc = ++ rideStatusFromStartApp['data']['start_location'] ?? ''; ++ final String endLoc = ++ rideStatusFromStartApp['data']['end_location'] ?? ''; ++ if (startLoc.isNotEmpty && endLoc.isNotEmpty) { ++ Log.print("🔄 Re-fetching route from API: $startLoc -> $endLoc"); ++ // Call getDirectionMap to fetch the route asynchronously ++ getDirectionMap(startLoc, endLoc, []); ++ } ++ } else { ++ List decodedPoints = ++ await compute(decodePolylineIsolate, pointsString); ++ ++ mapEngine.clearPolyline(); ++ mapEngine.polylineCoordinates.clear(); ++ mapEngine.polylineCoordinates.addAll(decodedPoints); ++ if (decodedPoints.isNotEmpty) { ++ passengerLocation = pickupPoint ?? decodedPoints.first; ++ myDestination = destinationPoint ?? decodedPoints.last; ++ } ++ var polyline = Polyline( ++ polylineId: const PolylineId('main_route'), ++ points: mapEngine.polylineCoordinates, ++ width: 6, ++ color: const Color(0xFF2196F3), ++ ); ++ ++ polyLines = {...polyLines, polyline}; ++ } ++ ++ timeToPassengerFromDriverAfterApplied = 0; ++ remainingTime = 0; ++ remainingTimeToPassengerFromDriverAfterApplied = 0; ++ remainingTimeDriverWaitPassenger5Minute = 0; ++ rideTimerBegin = isBeginStatus; ++ isDriverInPassengerWay = false; ++ isDriverArrivePassenger = false; ++ ++ // Safe durationToAdd parsing ++ if (tripData != null && tripData['distance_m'] != null) { ++ var distVal = tripData['distance_m']; ++ if (distVal is Duration) { ++ durationToAdd = distVal; ++ } else if (distVal is num) { ++ durationToAdd = Duration(seconds: distVal.toInt()); ++ } ++ } else { ++ durationToAdd = Duration.zero; ++ } ++ ++ mapSocket.initConnectionWithSocket(); ++ ++ if (isBeginStatus) { ++ _isRideBeginLogicExecuted = true; ++ _isRideStartedProcessed = true; ++ await getDriverCarsLocationToPassengerAfterApplied(); ++ if (driverCarsLocationToPassengerAfterApplied.isNotEmpty && ++ myDestination.latitude != 0 && ++ myDestination.longitude != 0) { ++ await calculateDriverToPassengerRoute( ++ driverCarsLocationToPassengerAfterApplied.last, ++ myDestination, ++ isBeginPhase: true, ++ ); ++ } ++ rideIsBeginPassengerTimer(); ++ runWhenRideIsBegin(); ++ } else if (isPickupStatus) { ++ _isAcceptanceProcessed = true; ++ _isDriverAppliedLogicExecuted = true; ++ await getDriverCarsLocationToPassengerAfterApplied(); ++ if (driverCarsLocationToPassengerAfterApplied.isNotEmpty) { ++ await calculateDriverToPassengerRoute( ++ driverCarsLocationToPassengerAfterApplied.last, ++ passengerLocation, ++ ); ++ startTimerFromDriverToPassengerAfterApplied(); ++ } ++ _startSocketWatchdog(); ++ } ++ update(); ++ } ++ } catch (e) { ++ Log.print("Error getRideStatusFromStartApp: $e"); ++ } ++ } ++ ++ void driverArrivePassenger() { ++ timeToPassengerFromDriverAfterApplied = 0; ++ remainingTime = 0; ++ update(); ++ rideIsBeginPassengerTimer(); ++ } ++ ++ void cancelTimerToPassengerFromDriverAfterApplied() { ++ timerToPassengerFromDriverAfterApplied?.cancel(); ++ } ++ ++ Future postRideDetailsToServer() async { ++ if (mapEngine.polylineCoordinates.isEmpty) return false; ++ ++ LatLng startLoc = mapEngine.polylineCoordinates.first; ++ LatLng endLoc = mapEngine.polylineCoordinates.last; ++ ++ Map payload = { ++ "start_location": '${startLoc.latitude},${startLoc.longitude}', ++ "end_location": '${endLoc.latitude},${endLoc.longitude}', ++ "date": DateTime.now().toString(), ++ "time": DateTime.now().toString(), ++ "endtime": "00:00:00", ++ "price": totalPassenger.toStringAsFixed(2), ++ "passenger_id": box.read(BoxName.passengerID).toString(), ++ "driver_id": "0", ++ "status": "waiting", ++ "carType": box.read(BoxName.carType), ++ "price_for_driver": totalPassenger.toString(), ++ "price_for_passenger": totalME.toString(), ++ "distance": distance.toString(), ++ "passenger_name": box.read(BoxName.name).toString(), ++ "passenger_phone": box.read(BoxName.phone).toString(), ++ "passenger_token": box.read(BoxName.tokenFCM).toString(), ++ "passenger_email": box.read(BoxName.email).toString(), ++ "passenger_wallet": box.read(BoxName.passengerWalletTotal).toString(), ++ "passenger_rating": (passengerRate ?? 5.0).toString(), ++ "start_name": startNameAddress, ++ "end_name": endNameAddress, ++ "duration_text": "${(durationToRide / 60).floor()}", ++ "distance_text": "$distance", ++ "is_wallet": Get.find().isWalletChecked.toString(), ++ "has_steps": Get.find().wayPoints.length > 1 ++ ? 'true' ++ : 'false', ++ "step0": placesCoordinate.length > 0 ? placesCoordinate[0] : "", ++ "step1": placesCoordinate.length > 1 ? placesCoordinate[1] : "", ++ "step2": placesCoordinate.length > 2 ? placesCoordinate[2] : "", ++ "step3": placesCoordinate.length > 3 ? placesCoordinate[3] : "", ++ "step4": placesCoordinate.length > 4 ? placesCoordinate[4] : "", ++ }; ++ ++ Log.print(' 📦 Payload: $payload'); ++ ++ try { ++ var response = await CRUD().post( ++ link: "${AppLink.server}/ride/rides/add_ride.php", payload: payload); ++ ++ var jsonResponse = (response is String) ? jsonDecode(response) : response; ++ ++ if (jsonResponse['status'] == 'success') { ++ rideId = jsonResponse['message'].toString(); ++ Log.print("✅ Ride Created ID: $rideId"); ++ return true; ++ } else { ++ Log.print("❌ Ride Creation Failed: $response"); ++ return false; ++ } ++ } catch (e) { ++ Log.print("❌ Exception in postRide: $e"); ++ return false; ++ } ++ } ++ ++ Future rideAppliedFromDriver(bool isApplied) async { ++ Log.print('[rideAppliedFromDriver] 🚀 Starting logic...'); ++ await getUpdatedRideForDriverApply(rideId); ++ ++ if (['Speed', 'Awfar Car'].contains(box.read(BoxName.carType))) { ++ NotificationController().showNotification('Fixed Price'.tr, ++ 'The captain is responsible for the route.'.tr, 'ding'); ++ } else if (['Comfort', 'Lady'].contains(box.read(BoxName.carType))) { ++ NotificationController().showNotification('Attention'.tr, ++ 'The price may increase if the route changes.'.tr, 'ding'); ++ } ++ ++ isApplied = true; ++ statusRide = 'Apply'; ++ rideConfirm = false; ++ isSearchingWindow = false; ++ _isDriverAppliedLogicExecuted = true; ++ ++ update(); ++ ++ // إيقاف جلب السيارات المجاورة ومسحها، باستثناء السائق الذي قبل الطلب ++ mapEngine.reloadStartApp = false; ++ mapEngine.markers.removeWhere((marker) => marker.markerId.value != driverId.toString()); ++ mapEngine.update(); ++ ++ await getDriverCarsLocationToPassengerAfterApplied(); ++ ++ if (driverCarsLocationToPassengerAfterApplied.isNotEmpty) { ++ LatLng driverPos = driverCarsLocationToPassengerAfterApplied.last; ++ Log.print( ++ '[rideAppliedFromDriver] 📍 Driver at: $driverPos, Passenger at: $passengerLocation'); ++ await getInitialDriverDistanceAndDuration(driverPos, passengerLocation); ++ await drawDriverPathOnly(driverPos, passengerLocation); ++ mapEngine.fitCameraToPoints(driverPos, passengerLocation); ++ } ++ ++ startTimerFromDriverToPassengerAfterApplied(); ++ } ++ ++ Future getInitialDriverDistanceAndDuration( ++ LatLng driverPos, LatLng passengerPos) async { ++ final String apiUrl = 'https://routec.intaleq.xyz/route'; ++ final String apiKey = Env.mapKeyOsm; ++ final String origin = '${driverPos.latitude},${driverPos.longitude}'; ++ final String dest = '${passengerPos.latitude},${passengerPos.longitude}'; ++ ++ final Uri uri = Uri.parse( ++ '$apiUrl?origin=$origin&destination=$dest&steps=false&overview=false'); ++ ++ try { ++ final response = await http.get(uri, headers: {'X-API-KEY': apiKey}); ++ if (response.statusCode == 200) { ++ final data = jsonDecode(response.body); ++ if (data['status'] == 'ok') { ++ double durationSecondsRaw = (data['duration_s'] as num).toDouble(); ++ int finalDurationSeconds = ++ (durationSecondsRaw * kDurationScalar).toInt(); ++ double distanceMeters = (data['distance_m'] as num).toDouble(); ++ ++ updateDriverRouteMetrics( ++ etaSeconds: finalDurationSeconds, ++ distanceMeters: distanceMeters, ++ ); ++ ++ update(); ++ } ++ } ++ } catch (e) { ++ Log.print('Error getInitialDriverDistanceAndDuration: $e'); ++ } ++ } ++ ++ int durationToPassenger = 0; ++ String distanceByPassenger = ''; ++ ++ Future drawDriverPathOnly(LatLng driverPos, LatLng passengerPos) async { ++ final String apiUrl = 'https://routec.intaleq.xyz/route'; ++ final String apiKey = Env.mapKeyOsm; ++ final String origin = '${driverPos.latitude},${driverPos.longitude}'; ++ final String dest = '${passengerPos.latitude},${passengerPos.longitude}'; ++ ++ final Uri uri = Uri.parse( ++ '$apiUrl?origin=$origin&destination=$dest&steps=false&overview=full'); ++ ++ try { ++ final response = await http.get(uri, headers: {'X-API-KEY': apiKey}); ++ if (response.statusCode == 200) { ++ final data = jsonDecode(response.body); ++ if (data['status'] == 'ok' && data['polyline'] != null) { ++ final String pointsString = data['polyline']; ++ List decodedPoints = ++ await compute(decodePolylineIsolate, pointsString); ++ _currentDriverRoutePoints = decodedPoints; ++ final double decodedDistance = _pathDistanceMeters(decodedPoints); ++ if (decodedDistance > 0) { ++ _currentDriverRouteDistanceMeters = decodedDistance; ++ } ++ ++ polyLines = polyLines ++ .where((p) => ++ !p.polylineId.value.startsWith('driver_route') && ++ p.polylineId.value != 'main_route' && ++ p.polylineId.value != 'route_primary' && ++ p.polylineId.value != 'route_direct') ++ .toSet(); ++ ++ // رسم خط صلب (Solid) من السائق للراكب ++ final Polyline driverSolidPolyline = Polyline( ++ polylineId: const PolylineId('driver_route_solid'), ++ points: decodedPoints, ++ color: Colors.amber, // مسار القدوم باللون الأصفر ++ width: 5, ++ ); ++ polyLines.add(driverSolidPolyline); ++ update(); ++ } ++ } ++ } catch (e) { ++ Log.print('Error drawing driver path: $e'); ++ } ++ } ++ ++ void listenToRideStatusStream() { ++ rideStatusStream.listen((rideStatus) { ++ Log.print("Ride Status: $rideStatus"); ++ }, onError: (error) { ++ Log.print("Error in Ride Status Stream: $error"); ++ }); ++ } ++ ++ void start15SecondTimer(String rideId) {} ++ ++ void startUiCountdown() { ++ _uiCountdownTimer?.cancel(); ++ progress = 0; ++ remainingTime = durationTimer; ++ ++ _uiCountdownTimer = Timer.periodic(const Duration(seconds: 1), (timer) { ++ int i = timer.tick; ++ progress = i / durationTimer; ++ remainingTime = durationTimer - i; ++ ++ if (remainingTime <= 0) { ++ timer.cancel(); ++ rideConfirm = false; ++ timeToPassengerFromDriverAfterApplied += durationToPassenger; ++ timerEnded(); ++ } ++ update(); ++ }); ++ } ++ ++ double progress = 0; ++ int durationTimer = 9; ++ ++ void timerEnded() async { ++ runEvery30SecondsUntilConditionMet(); ++ isCancelRidePageShown = false; ++ update(); ++ } ++ ++ late String driverCarModel = '', driverCarMake = '', driverLicensePlate = ''; ++ ++ Future getUpdatedRideForDriverApply(String rideId) async { ++ if (rideId == 'yet' || rideId.isEmpty) return; ++ ++ try { ++ final res = await CRUD().get( ++ link: "${AppLink.server}/ride/rides/getRideOrderID.php", ++ payload: {'passengerID': box.read(BoxName.passengerID).toString()}); ++ ++ if (res != 'failure') { ++ var response = jsonDecode(res); ++ Log.print('getUpdatedRideForDriverApply Response: $response'); ++ ++ if (response['status'] == 'success' && ++ response['data'] != null && ++ response['data'] is Map) { ++ var data = response['data']; ++ ++ driverId = data['driver_id']?.toString() ?? ''; ++ driverPhone = data['phone']?.toString() ?? ''; ++ driverCarMake = data['make']?.toString() ?? ''; ++ model = data['model']?.toString() ?? ''; ++ colorHex = data['color_hex']?.toString() ?? ''; ++ carColor = data['color']?.toString() ?? ''; ++ make = data['make']?.toString() ?? ''; ++ licensePlate = data['car_plate']?.toString() ?? ''; ++ ++ String firstName = data['passengerName']?.toString() ?? ''; ++ String lastName = data['last_name']?.toString() ?? ''; ++ passengerName = ++ lastName.isNotEmpty ? "$firstName $lastName" : firstName; ++ driverName = data['driverName']?.toString() ?? ''; ++ driverToken = data['token']?.toString() ?? ''; ++ carYear = data['year']?.toString() ?? ''; ++ driverRate = data['ratingDriver']?.toString() ?? '5.0'; ++ ++ update(); ++ } ++ } ++ } catch (e) { ++ Log.print("Error in getUpdatedRideForDriverApply: $e"); ++ } ++ } ++ ++ String getLocationArea(double latitude, double longitude) { ++ LatLng passengerPoint = LatLng(latitude, longitude); ++ String previousCountry = box.read(BoxName.countryCode)?.toString() ?? ''; ++ String newCountry = 'Jordan'; ++ ++ if (isPointInPolygon(passengerPoint, CountryPolygons.jordanBoundary)) { ++ newCountry = 'Jordan'; ++ } else if (isPointInPolygon( ++ passengerPoint, CountryPolygons.syriaBoundary)) { ++ newCountry = 'Syria'; ++ } else if (isPointInPolygon( ++ passengerPoint, CountryPolygons.egyptBoundary)) { ++ newCountry = 'Egypt'; ++ } else { ++ newCountry = 'Jordan'; ++ } ++ ++ box.write(BoxName.countryCode, newCountry); ++ box.write(BoxName.serverChosen, AppLink.server); ++ ++ if (newCountry != previousCountry) { ++ unawaited(getKazanPercent()); ++ } ++ ++ return newCountry; ++ } ++ ++ bool isPointInPolygon(LatLng point, List polygon) { ++ int intersections = 0; ++ for (int i = 0; i < polygon.length; i++) { ++ LatLng vertex1 = polygon[i]; ++ LatLng vertex2 = polygon[(i + 1) % polygon.length]; ++ ++ if (_rayIntersectsSegment(point, vertex1, vertex2)) { ++ intersections++; ++ } ++ } ++ return intersections % 2 != 0; ++ } ++ ++ bool _rayIntersectsSegment(LatLng point, LatLng vertex1, LatLng vertex2) { ++ double px = point.longitude; ++ double py = point.latitude; ++ double v1x = vertex1.longitude; ++ double v1y = vertex1.latitude; ++ double v2x = vertex2.longitude; ++ double v2y = vertex2.latitude; ++ ++ if ((py < v1y && py < v2y) || (py > v1y && py > v2y)) { ++ return false; ++ } ++ double intersectX = v1x + (py - v1y) * (v2x - v1x) / (v2y - v1y); ++ return intersectX > px; ++ } ++ ++ String generateTrackingLink(String rideId, String driverId) { ++ String cleanRideId = rideId.toString().trim(); ++ String cleanDriverId = driverId.toString().trim(); ++ const String secretSalt = "Intaleq_Secure_Track_2025"; ++ ++ String rawString = "$cleanRideId$cleanDriverId$secretSalt"; ++ var bytes = utf8.encode(rawString); ++ var digest = md5.convert(bytes); ++ String token = digest.toString(); ++ ++ return "https://intaleqapp.com/track/index.php?id=$cleanRideId&token=$token"; ++ } ++ ++ calcualateDistsanceInMetet(LatLng prev, current) async { ++ double distance2 = Geolocator.distanceBetween( ++ prev.latitude, ++ prev.longitude, ++ current.latitude, ++ current.longitude, ++ ); ++ return distance2; ++ } ++ ++ uploadPassengerLocation() async { ++ await CRUD().post(link: AppLink.addpassengerLocation, payload: { ++ "passengerId": box.read(BoxName.passengerID), ++ "lat": passengerLocation.latitude.toString(), ++ "lng": passengerLocation.longitude.toString(), ++ "rideId": rideId.toString() ++ }); ++ } ++ ++ void _showRideStartNotifications() { ++ if (['Speed', 'Awfar Car'].contains(box.read(BoxName.carType))) { ++ NotificationController().showNotification('Fixed Price'.tr, ++ 'The captain is responsible for the route.'.tr, 'ding'); ++ } else if (['Comfort', 'Lady'].contains(box.read(BoxName.carType))) { ++ NotificationController().showNotification('Attention'.tr, ++ 'The price may increase if the route changes.'.tr, 'ding'); ++ } ++ } ++ ++ bool promoTaken = false; ++ final promo = TextEditingController(); ++ ++ void applyPromoCodeToPassenger(BuildContext context) async { ++ if (promoTaken == true) { ++ MyDialog().getDialog( ++ 'Promo Already Used'.tr, ++ 'You have already used this promo code.'.tr, ++ () => Get.back(), ++ ); ++ return; ++ } ++ ++ if (!promoFormKey.currentState!.validate()) return; ++ ++ const double minPromoLowSYP = 172; ++ const double minPromoHighSYP = 200; ++ ++ try { ++ final value = await CRUD().get( ++ link: AppLink.getPassengersPromo, ++ payload: {'promo_code': promo.text}, ++ ); ++ ++ if (value == 'failure') { ++ MyDialog().getDialog( ++ 'Promo Ended'.tr, ++ 'The promotion period has ended.'.tr, ++ () => Get.back(), ++ ); ++ return; ++ } ++ ++ final bool eligibleNow = (totalPassengerSpeed >= minPromoLowSYP) || ++ (totalPassengerBalash >= minPromoLowSYP) || ++ (totalPassengerComfort >= minPromoHighSYP) || ++ (totalPassengerElectric >= minPromoHighSYP) || ++ (totalPassengerLady >= minPromoHighSYP); ++ ++ if (!eligibleNow) { ++ Get.snackbar( ++ 'Lowest Price Achieved'.tr, ++ 'Cannot apply further discounts.'.tr, ++ backgroundColor: AppColor.yellowColor, ++ ); ++ return; ++ } ++ ++ final decode = jsonDecode(value); ++ if (decode["status"] != "success") { ++ MyDialog().getDialog( ++ 'Promo Ended'.tr, ++ 'The promotion period has ended.'.tr, ++ () => Get.back(), ++ ); ++ return; ++ } ++ ++ Get.snackbar('Promo Code Accepted'.tr, '', ++ backgroundColor: AppColor.greenColor); ++ ++ final firstElement = decode["message"][0]; ++ final int discountPercentage = ++ int.tryParse(firstElement['amount'].toString()) ?? 0; ++ ++ final double walletVal = double.tryParse( ++ box.read(BoxName.passengerWalletTotal)?.toString() ?? '0') ?? ++ 0.0; ++ ++ final bool isWalletNegative = walletVal < 0; ++ ++ double _applyDiscountPerTier({ ++ required double fare, ++ required double minThreshold, ++ required bool isWalletNegative, ++ }) { ++ if (fare < minThreshold) return fare; ++ ++ final double discount = fare * (discountPercentage / 100.0); ++ double result; ++ ++ if (isWalletNegative) { ++ double neg = (-1) * walletVal; ++ result = fare + neg - discount; ++ } else { ++ result = fare - discount; ++ } ++ ++ if (result < minThreshold) { ++ result = minThreshold; ++ } ++ return result.clamp(0.0, double.infinity); ++ } ++ ++ totalPassengerComfort = _applyDiscountPerTier( ++ fare: totalPassengerComfort, ++ minThreshold: minPromoHighSYP, ++ isWalletNegative: isWalletNegative, ++ ); ++ ++ totalPassengerElectric = _applyDiscountPerTier( ++ fare: totalPassengerElectric, ++ minThreshold: minPromoHighSYP, ++ isWalletNegative: isWalletNegative, ++ ); ++ ++ totalPassengerLady = _applyDiscountPerTier( ++ fare: totalPassengerLady, ++ minThreshold: minPromoHighSYP, ++ isWalletNegative: isWalletNegative, ++ ); ++ ++ totalPassengerSpeed = _applyDiscountPerTier( ++ fare: totalPassengerSpeed, ++ minThreshold: minPromoLowSYP, ++ isWalletNegative: isWalletNegative, ++ ); ++ ++ totalPassengerBalash = _applyDiscountPerTier( ++ fare: totalPassengerBalash, ++ minThreshold: minPromoLowSYP, ++ isWalletNegative: isWalletNegative, ++ ); ++ ++ totalDriver = totalDriver - (totalDriver * discountPercentage / 100.0); ++ promoTaken = true; ++ update(); ++ ++ Confetti.launch( ++ context, ++ options: const ConfettiOptions(particleCount: 100, spread: 70, y: 0.6), ++ ); ++ ++ Get.back(); ++ await Future.delayed(const Duration(milliseconds: 120)); ++ } catch (e) { ++ Get.snackbar('Error'.tr, e.toString(), ++ backgroundColor: AppColor.redColor); ++ } ++ } ++ ++ double getDistanceFromText(String distanceText) { ++ String distanceValue = distanceText.replaceAll(RegExp(r'[^0-9.]+'), ''); ++ double distance = double.parse(distanceValue); ++ return distance; ++ } ++ ++ double costForDriver = 0; ++ ++ Future bottomSheet() async { ++ const double minFareSYP = 160; ++ const double minBillableKm = 0.3; ++ const double ladyFlatAddon = 20; ++ const double airportAddonSYP = 200; ++ const double damascusAirportBoundAddon = 1400; ++ ++ const double electricPerKmUplift = 4; ++ const double electricFlatAddon = 10; ++ ++ const double longSpeedThresholdKm = 40.0; ++ const double longSpeedPerKm = 26.0; ++ ++ const double mediumDistThresholdKm = 25.0; ++ const double longDistThresholdKm = 35.0; ++ const double longTripPerMin = 6.0; ++ const int minuteCapMedium = 60; ++ const int minuteCapLong = 80; ++ const int freeMinutesLong = 10; ++ ++ const double extraReduction100 = 0.07; ++ const double maxReductionCap = 0.35; ++ ++ durationToAdd = Duration(seconds: durationToRide); ++ hours = durationToAdd.inHours; ++ minutes = (durationToAdd.inMinutes % 60).round(); ++ final DateTime currentTime = DateTime.now(); ++ newTime = currentTime.add(durationToAdd); ++ averageDuration = (durationToRide / 60) / distance; ++ final int waypointSurchargeMinutes = activeMenuWaypointCount * 5; ++ final int totalMinutes = ++ (durationToRide / 60).floor() + waypointSurchargeMinutes; ++ ++ bool _isAirport(String s) { ++ final t = s.toLowerCase(); ++ return t.contains('airport') || ++ s.contains('مطار') || ++ s.contains('المطار'); ++ } ++ ++ bool _isClub(String s) { ++ final t = s.toLowerCase(); ++ return t.contains('club') || ++ t.contains('nightclub') || ++ t.contains('night club') || ++ s.contains('ديسكو') || ++ s.contains('ملهى ليلي'); ++ } ++ ++ bool _isInsideDamascusAirportBounds(double lat, double lng) { ++ final double northLat = 33.415313; ++ final double southLat = 33.400265; ++ final double eastLng = 36.531505; ++ final double westLng = 36.499687; ++ ++ bool isLatInside = (lat <= northLat) && (lat >= southLat); ++ bool isLngInside = (lng <= eastLng) && (lng >= westLng); ++ return isLatInside && isLngInside; ++ } ++ ++ final double naturePerMin = naturePrice; ++ final double latePerMin = latePrice; ++ final double heavyPerMin = heavyPrice; ++ ++ double _perMinuteByTime(DateTime now, bool clubCtx) { ++ final h = now.hour; ++ if (h >= 21 || h < 1) return latePerMin; ++ if (h >= 1 && h < 5) return clubCtx ? (latePerMin * 2) : latePerMin; ++ if (h >= 14 && h <= 17) return heavyPerMin; ++ return naturePerMin; ++ } ++ ++ double _applyMinFare(double fare) => ++ (fare < minFareSYP) ? minFareSYP : fare; ++ ++ double _withCommission(double base) => ++ (base * (1 + kazan / 100)).ceilToDouble(); ++ ++ final bool airportCtx = ++ _isAirport(startNameAddress) || _isAirport(endNameAddress); ++ final bool clubCtx = _isClub(startNameAddress) || _isClub(endNameAddress); ++ ++ double destLat = 0.0; ++ double destLng = 0.0; ++ try { ++ destLat = myDestination.latitude; ++ destLng = myDestination.longitude; ++ } catch (_) { ++ if (locSearch.coordinatesWithoutEmpty.isNotEmpty) { ++ destLat = double.tryParse( ++ locSearch.coordinatesWithoutEmpty.last.split(',')[0]) ?? ++ 0.0; ++ destLng = double.tryParse( ++ locSearch.coordinatesWithoutEmpty.last.split(',')[1]) ?? ++ 0.0; ++ } ++ } ++ ++ final bool damascusAirportBoundCtx = ++ _isInsideDamascusAirportBounds(destLat, destLng); ++ final bool isInDamascusAirportBoundCtx = _isInsideDamascusAirportBounds( ++ newMyLocation.latitude.toDouble(), ++ newMyLocation.longitude.toDouble(), ++ ); ++ ++ final double billableDistance = ++ (distance < minBillableKm) ? minBillableKm : distance; ++ ++ final bool isLongSpeed = billableDistance > longSpeedThresholdKm; ++ final double perKmSpeedBaseFromServer = speedPrice; ++ final double perKmSpeed = ++ isLongSpeed ? longSpeedPerKm : perKmSpeedBaseFromServer; ++ ++ double reductionPct40 = 0.0; ++ if (perKmSpeedBaseFromServer > 0) { ++ reductionPct40 = (1.0 - (longSpeedPerKm / perKmSpeedBaseFromServer)) ++ .clamp(0.0, maxReductionCap); ++ } ++ final double reductionPct100 = ++ (reductionPct40 + extraReduction100).clamp(0.0, maxReductionCap); ++ double distanceReduction = 0.0; ++ if (billableDistance > 100.0) { ++ distanceReduction = reductionPct100; ++ } else if (billableDistance > 40.0) { ++ distanceReduction = reductionPct40; ++ } ++ ++ double effectivePerMin = _perMinuteByTime(currentTime, clubCtx); ++ int billableMinutes = totalMinutes; ++ if (billableDistance > longDistThresholdKm) { ++ effectivePerMin = longTripPerMin; ++ final int capped = ++ (billableMinutes > minuteCapLong) ? minuteCapLong : billableMinutes; ++ billableMinutes = capped - freeMinutesLong; ++ if (billableMinutes < 0) billableMinutes = 0; ++ } else if (billableDistance > mediumDistThresholdKm) { ++ effectivePerMin = longTripPerMin; ++ billableMinutes = (billableMinutes > minuteCapMedium) ++ ? minuteCapMedium ++ : billableMinutes; ++ } ++ ++ final double perKmComfortRaw = comfortPrice; ++ final double perKmDelivery = deliveryPrice; ++ final double perKmVanRaw = ++ (familyPrice > 0 ? familyPrice : (speedPrice + 13)); ++ final double perKmElectricRaw = perKmComfortRaw + electricPerKmUplift; ++ ++ double perKmComfort = perKmComfortRaw * (1.0 - distanceReduction); ++ double perKmElectric = perKmElectricRaw * (1.0 - distanceReduction); ++ double perKmVan = perKmVanRaw * (1.0 - distanceReduction); ++ perKmComfort = perKmComfort.clamp(0, double.infinity); ++ perKmElectric = perKmElectric.clamp(0, double.infinity); ++ perKmVan = perKmVan.clamp(0, double.infinity); ++ final double perKmBalash = (perKmSpeed - 5).clamp(0, double.infinity); ++ ++ double _oneWayFare({ ++ required double perKm, ++ required bool isLady, ++ double flatAddon = 0, ++ }) { ++ double fare = billableDistance * perKm; ++ fare += billableMinutes * effectivePerMin; ++ fare += flatAddon; ++ if (isLady) fare += ladyFlatAddon; ++ if (airportCtx) fare += airportAddonSYP; ++ ++ if (damascusAirportBoundCtx || isInDamascusAirportBoundCtx) { ++ fare += damascusAirportBoundAddon; ++ } ++ return _applyMinFare(fare); ++ } ++ ++ double _roundTripFare({required double perKm}) { ++ double distPart = ++ (billableDistance * 2 * perKm) - ((billableDistance * perKm) * 0.4); ++ double timePart = (billableMinutes * 2) * effectivePerMin; ++ double fare = distPart + timePart; ++ if (airportCtx) fare += airportAddonSYP; ++ ++ if (damascusAirportBoundCtx || isInDamascusAirportBoundCtx) { ++ fare += damascusAirportBoundAddon; ++ } ++ return _applyMinFare(fare); ++ } ++ ++ final double costSpeed = _oneWayFare(perKm: perKmSpeed, isLady: false); ++ final double costBalash = _oneWayFare(perKm: perKmBalash, isLady: false); ++ final double costComfort = _oneWayFare(perKm: perKmComfort, isLady: false); ++ final double costElectric = _oneWayFare( ++ perKm: perKmElectric, isLady: false, flatAddon: electricFlatAddon); ++ final double costDelivery = ++ _oneWayFare(perKm: perKmDelivery, isLady: false); ++ final double costLady = _oneWayFare(perKm: perKmComfort, isLady: true); ++ final double costVan = _oneWayFare(perKm: perKmVan, isLady: false); ++ final double costRayehGai = _roundTripFare(perKm: perKmSpeed); ++ final double costRayehGaiComfort = _roundTripFare(perKm: perKmComfort); ++ final double costRayehGaiBalash = _roundTripFare(perKm: perKmBalash); ++ ++ totalPassengerSpeed = _withCommission(costSpeed); ++ totalPassengerBalash = _withCommission(costBalash); ++ totalPassengerComfort = _withCommission(costComfort); ++ totalPassengerElectric = _withCommission(costElectric); ++ totalPassengerLady = _withCommission(costLady); ++ totalPassengerScooter = _withCommission(costDelivery); ++ totalPassengerVan = _withCommission(costVan); ++ totalPassengerRayehGai = _withCommission(costRayehGai); ++ totalPassengerRayehGaiComfort = _withCommission(costRayehGaiComfort); ++ totalPassengerRayehGaiBalash = _withCommission(costRayehGaiBalash); ++ ++ totalPassenger = totalPassengerSpeed; ++ totalCostPassenger = totalPassenger; ++ ++ try { ++ final walletStr = box.read(BoxName.passengerWalletTotal).toString(); ++ final walletVal = double.tryParse(walletStr) ?? 0.0; ++ if (walletVal < 0) { ++ final neg = (-1) * walletVal; ++ totalPassenger += neg; ++ totalPassengerComfort += neg; ++ totalPassengerElectric += neg; ++ totalPassengerLady += neg; ++ totalPassengerBalash += neg; ++ totalPassengerScooter += neg; ++ totalPassengerRayehGai += neg; ++ totalPassengerRayehGaiComfort += neg; ++ totalPassengerRayehGaiBalash += neg; ++ totalPassengerVan += neg; ++ } ++ } catch (e) { ++ Log.print("Error: $e"); ++ } ++ ++ update(); ++ mapEngine.changeBottomSheetShown(forceValue: true); ++ } ++ ++ // حساب المسار بين السائق والراكب وعرضه على الخريطة. ++ // ترسل هذه الدالة طلبًا للخادم للحصول على إحداثيات المسار وتفك تشفيره. ++ // ثم تقوم بتحديث المسافة والوقت وعرض الخطوط المناسبة على الخريطة. ++ Future calculateDriverToPassengerRoute( ++ LatLng driverPos, LatLng passengerPos, ++ {bool isBeginPhase = false}) async { ++ final Map queryParams = { ++ 'fromLat': driverPos.latitude.toString(), ++ 'fromLng': driverPos.longitude.toString(), ++ 'toLat': passengerPos.latitude.toString(), ++ 'toLng': passengerPos.longitude.toString(), ++ }; ++ final uri = ++ Uri.parse(AppLink.mapSaasRoute).replace(queryParameters: queryParams); ++ ++ Log.print('📍 Calculating Driver Route: $uri'); ++ ++ try { ++ final response = await http.get(uri, headers: { ++ 'x-api-key': Env.mapSaasKey, ++ }).timeout(const Duration(seconds: 20)); ++ ++ if (response.statusCode == 200) { ++ final responseData = json.decode(response.body); ++ ++ var routeData = responseData['routes'] != null ++ ? responseData['routes'][0] ++ : responseData; ++ ++ double durationSecondsRaw = (routeData['duration'] as num).toDouble(); ++ int finalDurationSeconds = ++ (durationSecondsRaw * kDurationScalar).toInt(); ++ double distanceMeters = (routeData['distance'] as num).toDouble(); ++ ++ updateDriverRouteMetrics( ++ etaSeconds: finalDurationSeconds, ++ distanceMeters: distanceMeters, ++ ); ++ _currentDriverRouteDistanceMeters = distanceMeters; ++ _currentDriverRouteDurationSeconds = finalDurationSeconds; ++ ++ int minutes = (finalDurationSeconds / 60).floor(); ++ int seconds = finalDurationSeconds % 60; ++ stringRemainingTimeToPassenger = ++ '$minutes:${seconds.toString().padLeft(2, '0')}'; ++ ++ Log.print( ++ '✅ Driver Route Info: $minutes min, ${distanceMeters.toInt()} m'); ++ ++ String pointsString = ++ routeData['points'] ?? routeData['geometry'] ?? ""; ++ if (pointsString.isNotEmpty) { ++ List decodedPoints = ++ await compute(decodePolylineIsolate, pointsString); ++ _currentDriverRoutePoints = decodedPoints; ++ final double decodedDistance = _pathDistanceMeters(decodedPoints); ++ if (decodedDistance > 0) { ++ _currentDriverRouteDistanceMeters = decodedDistance; ++ } ++ // مسح كل السلمات السابقة (الخط المستمر والمتقطع على حد سواء) ++ polyLines = polyLines ++ .where((p) => ++ !p.polylineId.value.startsWith('driver_route') && ++ p.polylineId.value != 'main_route' && ++ p.polylineId.value != 'route_primary' && ++ p.polylineId.value != 'route_direct') ++ .toSet(); ++ ++ if (isBeginPhase) { ++ // حالة Begin: لا نرسم مسار السائق القديم إطلاقاً لأنه وصل والآن الرحلة ستبدأ ++ polyLines = polyLines ++ .where((p) => !p.polylineId.value.startsWith('driver_route')) ++ .toSet(); ++ } else { ++ // مسح السلمات القديمة أولاً ++ polyLines = polyLines ++ .where((p) => ++ !p.polylineId.value.startsWith('driver_route') && ++ p.polylineId.value != 'main_route' && ++ p.polylineId.value != 'route_primary' && ++ p.polylineId.value != 'route_direct') ++ .toSet(); ++ // حالة Apply/Arrived: خط متصل صلب بدل المتقطع ++ polyLines = { ++ ...polyLines, ++ Polyline( ++ polylineId: const PolylineId('driver_route_solid'), ++ points: decodedPoints, ++ color: Colors.amber, // مسار القدوم باللون الأصفر ++ width: 5, ++ ) ++ }; ++ } ++ } ++ ++ mapEngine.fitCameraToPoints(driverPos, passengerPos); ++ update(); ++ } ++ } catch (e) { ++ Log.print('❌ Error calculating driver route: $e'); ++ } ++ } ++ ++ Future checkAndRecalculateIfDeviated( ++ LatLng driverPos, { ++ double? heading, ++ double? speed, ++ }) async { ++ if (_isRecalculatingRoute || _currentDriverRoutePoints.isEmpty) return; ++ ++ double minDistance = 100000.0; ++ int closestIdx = 0; ++ for (int idx = 0; idx < _currentDriverRoutePoints.length; idx++) { ++ final point = _currentDriverRoutePoints[idx]; ++ double dist = Geolocator.distanceBetween(driverPos.latitude, ++ driverPos.longitude, point.latitude, point.longitude); ++ if (dist < minDistance) { ++ minDistance = dist; ++ closestIdx = idx; ++ } ++ } ++ ++ final bool distanceDeviation = minDistance > _deviationThresholdMeters; ++ final bool headingDeviation = _isHeadingAwayFromRoute( ++ heading: heading, ++ speed: speed, ++ closestRouteIndex: closestIdx, ++ distanceFromRouteMeters: minDistance, ++ ); ++ ++ if (!headingDeviation) { ++ _routeHeadingMismatchCount = 0; ++ } else { ++ _routeHeadingMismatchCount++; ++ } ++ ++ if (distanceDeviation || _routeHeadingMismatchCount >= 2) { ++ Log.print( ++ "⚠️ Driver deviated (${minDistance.toStringAsFixed(1)} m, heading mismatch: $_routeHeadingMismatchCount). Recalculating route..."); ++ _routeHeadingMismatchCount = 0; ++ _isRecalculatingRoute = true; ++ if (statusRide == 'Begin' || ++ currentRideState.value == RideState.inProgress) { ++ await calculateDriverToPassengerRoute(driverPos, myDestination, ++ isBeginPhase: true); ++ } else { ++ await calculateDriverToPassengerRoute(driverPos, passengerLocation); ++ } ++ _isRecalculatingRoute = false; ++ } ++ } ++ ++ // تحديث الجزء المتبقي من المسار والمسافة والوقت بشكل تفاعلي. ++ // تحدد الدالة أقرب نقطة للسائق على المسار الحالي وتقوم بقص النقاط السابقة. ++ // ثم تعيد حساب المسافة والوقت المتبقيين محلياً وتحديث الخطوط على الخريطة. ++ void updateRemainingRoute(LatLng driverPos, {bool updateEta = true}) { ++ if (_currentDriverRoutePoints.isEmpty) return; ++ ++ int closestIdx = 0; ++ double minDistance = double.infinity; ++ for (int i = 0; i < _currentDriverRoutePoints.length; i++) { ++ double dist = Geolocator.distanceBetween( ++ driverPos.latitude, ++ driverPos.longitude, ++ _currentDriverRoutePoints[i].latitude, ++ _currentDriverRoutePoints[i].longitude); ++ if (dist < minDistance) { ++ minDistance = dist; ++ closestIdx = i; ++ } ++ } ++ ++ if (minDistance < 150.0) { ++ List remainingPoints = ++ _currentDriverRoutePoints.sublist(closestIdx); ++ ++ if (updateEta) { ++ final double remainingDistance = _pathDistanceMeters(remainingPoints); ++ int remainingDuration = _currentDriverRouteDurationSeconds; ++ if (remainingDistance > 0 && ++ _currentDriverRouteDistanceMeters > 0 && ++ _currentDriverRouteDurationSeconds > 0) { ++ remainingDuration = ++ ((_currentDriverRouteDurationSeconds * remainingDistance) / ++ _currentDriverRouteDistanceMeters) ++ .round(); ++ } ++ ++ remainingDuration = max(0, remainingDuration); ++ updateDriverRouteMetrics( ++ etaSeconds: remainingDuration, ++ distanceMeters: remainingDistance, ++ ); ++ } ++ ++ polyLines = polyLines ++ .where((p) => ++ !p.polylineId.value.startsWith('driver_route') && ++ p.polylineId.value != 'main_route' && ++ p.polylineId.value != 'route_primary' && ++ p.polylineId.value != 'route_direct') ++ .toSet(); ++ ++ if (statusRide == 'Begin' || ++ currentRideState.value == RideState.inProgress) { ++ // لا نرسم أي شيء في حالة البدء لأنه وصل ++ polyLines = polyLines ++ .where((p) => !p.polylineId.value.startsWith('driver_route')) ++ .toSet(); ++ } else { ++ polyLines = { ++ ...polyLines, ++ Polyline( ++ polylineId: const PolylineId('driver_route_solid'), ++ points: remainingPoints, ++ color: Colors.amber, ++ width: 5, ++ ), ++ }; ++ } ++ update(); ++ } ++ } ++ ++ Future getDriverCarsLocationToPassengerAfterApplied() async { ++ bool isRideActive = (statusRide == 'Apply' || ++ statusRide == 'Arrived' || ++ statusRide == 'Begin' || ++ currentRideState.value == RideState.driverApplied || ++ currentRideState.value == RideState.driverArrived || ++ currentRideState.value == RideState.inProgress); ++ ++ if (!isRideActive || ++ statusRide == 'Finished' || ++ statusRide == 'Cancel' || ++ currentRideState.value == RideState.finished || ++ currentRideState.value == RideState.noRide || ++ currentRideState.value == RideState.preCheckReview) { ++ return; ++ } ++ ++ if (_isFetchingDriverLocation) return; ++ _isFetchingDriverLocation = true; ++ ++ try { ++ var res = await CRUD().get( ++ link: AppLink.getDriverCarsLocationToPassengerAfterApplied, ++ payload: {'driver_id': driverId}); ++ ++ if (res != 'failure') { ++ var datadriverLocation = jsonDecode(res); ++ ++ if (datadriverLocation['message'] != null && ++ datadriverLocation['message'].isNotEmpty) { ++ var _data = datadriverLocation['message'][0]; ++ ++ LatLng newDriverPos = LatLng( ++ double.parse(_data['latitude'].toString()), ++ double.parse(_data['longitude'].toString())); ++ double newHeading = ++ double.tryParse(_data['heading']?.toString() ?? '0') ?? 0.0; ++ double speed = ++ double.tryParse(_data['speed']?.toString() ?? '0') ?? 0; ++ ++ if (driverCarsLocationToPassengerAfterApplied.length > 10) { ++ driverCarsLocationToPassengerAfterApplied.removeAt(0); ++ } ++ driverCarsLocationToPassengerAfterApplied.add(newDriverPos); ++ checkAndRecalculateIfDeviated( ++ newDriverPos, ++ heading: newHeading, ++ speed: speed, ++ ); ++ updateRemainingRoute(newDriverPos); ++ if (statusRide == 'Begin' || ++ currentRideState.value == RideState.inProgress) { ++ double zoom = 16.5; ++ if (speed > 0) { ++ zoom = 17.0 - ((speed - 10) / 70) * 2.5; ++ zoom = zoom.clamp(14.5, 17.0); ++ } ++ if (mapEngine.mapController != null) { ++ mapEngine.mapController!.animateCamera( ++ CameraUpdate.newLatLngZoom(newDriverPos, zoom)); ++ } ++ } ++ mapEngine.clearMarkersExceptStartEndAndDriver(); ++ reloadMarkerDriverCarsLocationToPassengerAfterApplied( ++ datadriverLocation); ++ } ++ } ++ update(); ++ } catch (e) { ++ Log.print('Error fetching driver location: $e'); ++ } finally { ++ _isFetchingDriverLocation = false; ++ } ++ } ++ ++ void reloadMarkerDriverCarsLocationToPassengerAfterApplied( ++ dynamic datadriverLocation) { ++ if (datadriverLocation == null || ++ datadriverLocation['message'] == null || ++ datadriverLocation['message'].isEmpty) { ++ return; ++ } ++ ++ var driverData = datadriverLocation['message'][0]; ++ LatLng newPosition = LatLng(double.parse(driverData['latitude'].toString()), ++ double.parse(driverData['longitude'].toString())); ++ double newHeading = ++ double.tryParse(driverData['heading'].toString()) ?? 0.0; ++ ++ String icon; ++ if (driverData['model'].toString().contains('دراجة') || ++ driverData['make'].toString().contains('دراجة')) { ++ icon = mapEngine.motoIcon; ++ } else if (driverData['gender'] == 'Female') { ++ icon = mapEngine.ladyIcon; ++ } else { ++ icon = mapEngine.carIcon; ++ } ++ ++ final String markerId = 'assigned_driver_marker'; ++ final mId = MarkerId(markerId); ++ final existingMarker = markers.cast().firstWhere( ++ (m) => m?.markerId == mId, ++ orElse: () => null, ++ ); ++ ++ if (existingMarker != null) { ++ mapEngine.smoothlyUpdateMarker( ++ existingMarker, newPosition, newHeading, icon); ++ } else { ++ markers = { ++ ...markers, ++ Marker( ++ markerId: mId, ++ position: newPosition, ++ rotation: newHeading, ++ icon: InlqBitmap.fromStyleImage(icon), ++ anchor: const Offset(0.5, 0.5), ++ ), ++ }; ++ update(); ++ } ++ } ++ ++ void updateDriverMarker(LatLng position, double heading) { ++ const String markerId = 'assigned_driver_marker'; ++ const mId = MarkerId(markerId); ++ ++ // Choose icon based on vehicle type ++ String icon; ++ if (model.contains('دراجة') || make.contains('دراجة')) { ++ icon = mapEngine.motoIcon; ++ } else { ++ icon = mapEngine.carIcon; ++ } ++ ++ final existingMarker = markers.cast().firstWhere( ++ (m) => m?.markerId == mId, ++ orElse: () => null, ++ ); ++ ++ if (existingMarker != null) { ++ mapEngine.smoothlyUpdateMarker(existingMarker, position, heading, icon); ++ } else { ++ markers = { ++ ...markers, ++ Marker( ++ markerId: mId, ++ position: position, ++ icon: InlqBitmap.fromStyleImage(icon), ++ rotation: heading, ++ anchor: const Offset(0.5, 0.5), ++ ), ++ }; ++ update(); ++ } ++ } ++ ++ Future runEvery30SecondsUntilConditionMet() async { ++ double tripDurationInMinutes = durationToPassenger / 5; ++ int loopCount = tripDurationInMinutes.ceil(); ++ for (var i = 0; i < loopCount; i++) { ++ await Future.delayed(const Duration(seconds: 5)); ++ if (rideTimerBegin == true || statusRide == 'Apply') { ++ await getDriverCarsLocationToPassengerAfterApplied(); ++ } ++ } ++ } ++ ++ Future runWhenRideIsBegin() async { ++ double tripDurationInMinutes = durationToRide / 6; ++ int loopCount = tripDurationInMinutes.ceil(); ++ mapEngine.clearMarkersExceptStartEndAndDriver(); ++ for (var i = 0; i < loopCount; i++) { ++ await Future.delayed(const Duration(seconds: 4)); ++ await getDriverCarsLocationToPassengerAfterApplied(); ++ } ++ } ++ ++ // بدء مراقب اتصال المقبس (Socket Watchdog). ++ // يتحقق دورياً كل 5 ثوانٍ من آخر تحديث تم استلامه عبر المقبس. ++ // في حال وجود خمول لأكثر من 15 ثانية، يجلب الموقع عبر واجهة التطبيق كطلب مفرد. ++ // وإذا زاد الخمول عن 30 ثانية، يبدأ آلية الاقتراع الدوري كخيار احتياطي. ++ void _startSocketWatchdog() { ++ _watchdogTimer?.cancel(); ++ Log.print("👀 Starting Socket Watchdog (Hybrid Mode)..."); ++ ++ _watchdogTimer = Timer.periodic(const Duration(seconds: 5), (timer) async { ++ if (currentRideState.value != RideState.driverApplied && ++ currentRideState.value != RideState.driverArrived && ++ currentRideState.value != RideState.inProgress) { ++ timer.cancel(); ++ return; ++ } ++ ++ final lastTime = mapSocket.lastDriverLocationTime ?? ++ DateTime.now().subtract(const Duration(minutes: 1)); ++ final difference = DateTime.now().difference(lastTime).inSeconds; ++ ++ if (difference < 15 && mapSocket.isSocketConnected) { ++ if (_locationPollingTimer != null && ++ _rideAcceptedViaSource == "Socket") { ++ Log.print("✅ Socket recovered. Stopping polling fallback."); ++ stopDriverLocationPolling(); ++ } ++ } else if (difference >= 15 && difference < 30) { ++ Log.print("⚠️ Socket silent for ${difference}s. Single API Poll..."); ++ await getDriverCarsLocationToPassengerAfterApplied(); ++ try { ++ String statusFromServer = await getRideStatus(rideId); ++ _handleServerStatusTransition(statusFromServer); ++ } catch (e) { ++ Log.print("Error polling ride status in watchdog: $e"); ++ } ++ } else if (difference >= 30) { ++ if (_locationPollingTimer == null) { ++ Log.print( ++ "🔴 Socket dead for ${difference}s. Activating polling fallback!"); ++ _startDriverLocationPollingWithTimer(); ++ } else { ++ await getDriverCarsLocationToPassengerAfterApplied(); ++ try { ++ String statusFromServer = await getRideStatus(rideId); ++ _handleServerStatusTransition(statusFromServer); ++ } catch (e) { ++ Log.print("Error polling ride status in watchdog: $e"); ++ } ++ } ++ } ++ }); ++ } ++ ++ // بدء الاقتراع الدوري لموقع السائق كخيار احتياطي عند توقف أو فشل المقبس. ++ // يقوم هذا التوقيت دورياً كل 6 ثوانٍ بجلب موقع السائق وتحديث حالة الرحلة. ++ void _startDriverLocationPollingWithTimer() { ++ Log.print("📍 Starting Driver Location Polling (6s interval)"); ++ _locationPollingTimer?.cancel(); ++ ++ _locationPollingTimer = Timer.periodic(Duration(seconds: 6), (timer) async { ++ if (currentRideState.value == RideState.finished || ++ currentRideState.value == RideState.cancelled || ++ currentRideState.value == RideState.noRide) { ++ timer.cancel(); ++ return; ++ } ++ await getDriverCarsLocationToPassengerAfterApplied(); ++ try { ++ String statusFromServer = await getRideStatus(rideId); ++ _handleServerStatusTransition(statusFromServer); ++ } catch (e) { ++ Log.print("Error polling ride status in fallback timer: $e"); ++ } ++ }); ++ } ++ ++ void _handleServerStatusTransition(String status) { ++ String lowerStatus = status.toLowerCase(); ++ Log.print( ++ "🔄 _handleServerStatusTransition status: $lowerStatus | Current state: ${currentRideState.value}"); ++ ++ if (lowerStatus == 'arrived' && ++ currentRideState.value != RideState.driverArrived) { ++ processDriverArrival("Polling"); ++ } else if ((lowerStatus == 'begin' || ++ lowerStatus == 'started' || ++ lowerStatus == 'inprogress') && ++ currentRideState.value != RideState.inProgress) { ++ processRideBegin(source: "Polling"); ++ } else if ((lowerStatus == 'finished' || lowerStatus == 'ended') && ++ currentRideState.value != RideState.finished && ++ currentRideState.value != RideState.preCheckReview) { ++ Log.print( ++ "🏁 Polling detected Finished. Releasing ride and moving to rating."); ++ stopAllTimers(); ++ currentRideState.value = RideState.preCheckReview; ++ tripFinishedFromDriver(); ++ _checkLastRideForReview(); ++ } else if (lowerStatus == 'cancelled' || lowerStatus == 'cancel') { ++ processRideCancelledByDriver({'reason': 'Cancelled by driver'}, ++ source: "Polling"); ++ } ++ } ++ ++ void stopDriverLocationPolling() { ++ Log.print("🛑 Stopping Location Polling"); ++ _locationPollingTimer?.cancel(); ++ _locationPollingTimer = null; ++ } ++ ++ Future _addRideToWaitingTable() async { ++ try { ++ LatLng startLoc = mapEngine.polylineCoordinates.first; ++ LatLng endLoc = mapEngine.polylineCoordinates.last; ++ await CRUD().post(link: AppLink.addWaitingRide, payload: { ++ 'id': rideId.toString(), ++ "start_location": '${startLoc.latitude},${startLoc.longitude}', ++ "end_location": '${endLoc.latitude},${endLoc.longitude}', ++ "date": DateTime.now().toString(), ++ "time": DateTime.now().toString(), ++ "price": totalPassenger.toStringAsFixed(2), ++ 'passenger_id': box.read(BoxName.passengerID).toString(), ++ 'status': 'waiting', ++ 'carType': box.read(BoxName.carType), ++ 'passengerRate': passengerRate.toStringAsFixed(2), ++ 'price_for_passenger': totalME.toStringAsFixed(2), ++ 'distance': distance.toStringAsFixed(1), ++ 'duration': duration.toStringAsFixed(1), ++ 'payment_method': ++ Get.find().isWalletChecked ? 'wallet' : 'cash', ++ "passenger_wallet": box.read(BoxName.passengerWalletTotal).toString(), ++ }); ++ Log.print('[WaitingTable] Ride $rideId added to waiting_ride table.'); ++ } catch (e) { ++ Log.print('Error adding ride to waiting_ride table: $e'); ++ } ++ } ++ ++ double totalME = 0; ++ double passengerRate = 5; ++ double comfortPrice = 45; ++ double speedPrice = 40; ++ double mashwariPrice = 40; ++ double familyPrice = 55; ++ double deliveryPrice = 1.2; ++ ++ Future getKazanPercent() async { ++ var res = await CRUD().get( ++ link: AppLink.getKazanPercent, ++ payload: {'country': box.read(BoxName.countryCode).toString()}, ++ ); ++ if (res != 'failure') { ++ var json = jsonDecode(res); ++ var dataList = json['data'] ?? json['message']; ++ ++ if (dataList != null && dataList is List && dataList.isNotEmpty) { ++ var firstRow = dataList[0]; ++ kazan = double.parse(firstRow['kazan'].toString()); ++ naturePrice = double.parse(firstRow['naturePrice'].toString()); ++ heavyPrice = double.parse(firstRow['heavyPrice'].toString()); ++ latePrice = double.parse(firstRow['latePrice'].toString()); ++ comfortPrice = double.parse(firstRow['comfortPrice'].toString()); ++ speedPrice = double.parse(firstRow['speedPrice'].toString()); ++ deliveryPrice = double.parse(firstRow['deliveryPrice'].toString()); ++ mashwariPrice = double.parse(firstRow['freePrice'].toString()); ++ familyPrice = double.parse(firstRow['familyPrice'].toString()); ++ fuelPrice = double.parse(firstRow['fuelPrice'].toString()); ++ } ++ } ++ } ++ ++ Future getPassengerRate() async { ++ var res = await CRUD().get( ++ link: AppLink.getPassengerRate, ++ payload: {'passenger_id': box.read(BoxName.passengerID)}); ++ if (res != 'failure') { ++ var json = jsonDecode(res); ++ var message = json['data'] ?? json['message']; ++ if (message['rating'] == null) { ++ passengerRate = 5.0; ++ } else { ++ var rating = message['rating']; ++ if (rating is String) { ++ passengerRate = double.tryParse(rating) ?? 5.0; ++ } else if (rating is num) { ++ passengerRate = rating.toDouble(); ++ } else { ++ passengerRate = 5.0; ++ } ++ } ++ } else { ++ passengerRate = 5.0; ++ } ++ } ++ ++ Future addFingerPrint() async { ++ String fingerPrint = await DeviceHelper.getDeviceFingerprint(); ++ await CRUD().postWallet(link: AppLink.addFingerPrint, payload: { ++ 'token': (box.read(BoxName.tokenFCM.toString())), ++ 'passengerID': box.read(BoxName.passengerID).toString(), ++ "fingerPrint": fingerPrint ++ }); ++ } ++ ++ Future firstTimeRunToGetCoupon() async { ++ if (box.read(BoxName.isFirstTime).toString() == '0' && ++ box.read(BoxName.isInstall).toString() == '1' && ++ box.read(BoxName.isGiftToken).toString() == '0') { ++ var promoCode, discount, validity; ++ var resPromo = await CRUD().get(link: AppLink.getPromoFirst, payload: { ++ "passengerID": box.read(BoxName.passengerID).toString(), ++ }); ++ if (resPromo != 'failure') { ++ var d1 = jsonDecode(resPromo); ++ promoCode = d1['message']['promo_code']; ++ discount = d1['message']['amount']; ++ validity = d1['message']['validity_end_date']; ++ } ++ box.write(BoxName.isFirstTime, '1'); ++ ++ Get.dialog( ++ AlertDialog( ++ contentPadding: EdgeInsets.zero, ++ content: SizedBox( ++ width: 300, ++ child: PromoBanner( ++ promoCode: promoCode, ++ discountPercentage: discount, ++ validity: validity, ++ ), ++ ), ++ ), ++ ); ++ } ++ } ++ ++ Future detectAndCacheDeviceTier() async { ++ bool isHighEnd = await DevicePerformanceManager.isHighEndDevice(); ++ Log.print("Device Analysis - Is Flagship/HighEnd? $isHighEnd"); ++ box.write(BoxName.lowEndMode, !isHighEnd); ++ } ++ ++ Future initilizeGetStorage() async { ++ if (box.read(BoxName.addWork) == null) { ++ box.write(BoxName.addWork, 'addWork'); ++ } ++ if (box.read(BoxName.addHome) == null) { ++ box.write(BoxName.addHome, 'addHome'); ++ } ++ if (box.read(BoxName.lowEndMode) == null) { ++ detectAndCacheDeviceTier(); ++ } ++ } ++ ++ Future selectDriverAndCarForMishwariTrip() async { ++ double latitudeOffset = 0.1; ++ double longitudeOffset = 0.12; ++ ++ double southwestLat = passengerLocation.latitude - latitudeOffset; ++ double northeastLat = passengerLocation.latitude + latitudeOffset; ++ double southwestLon = passengerLocation.longitude - longitudeOffset; ++ double northeastLon = passengerLocation.longitude + longitudeOffset; ++ ++ var payload = { ++ 'southwestLat': southwestLat.toString(), ++ 'northeastLat': northeastLat.toString(), ++ 'southwestLon': southwestLon.toString(), ++ 'northeastLon': northeastLon.toString(), ++ }; ++ ++ try { ++ var res = await CRUD().get( ++ link: AppLink.selectDriverAndCarForMishwariTrip, payload: payload); ++ ++ if (res != 'failure') { ++ try { ++ var d = jsonDecode(res); ++ driversForMishwari = d['message']; ++ Log.print('driversForMishwari: $driversForMishwari'); ++ update(); ++ } catch (e) { ++ Log.print("Error decoding JSON: $e"); ++ } ++ } ++ } catch (e) { ++ Log.print("Error Mishwari select: $e"); ++ } ++ } ++ ++ List driversForMishwari = []; ++ final Rx selectedDateTime = DateTime.now().obs; ++ ++ void updateDateTime(DateTime newDateTime) { ++ selectedDateTime.value = newDateTime; ++ } ++ ++ Future mishwariOption() async { ++ isLoading = true; ++ update(); ++ await selectDriverAndCarForMishwariTrip(); ++ Future.delayed(Duration.zero); ++ isLoading = false; ++ update(); ++ Get.to(() => CupertinoDriverListWidget()); ++ } ++ ++ bool isLoading = false; ++ var driverIdVip = ''; ++ ++ Future saveTripData( ++ Map driver, DateTime tripDateTime) async { ++ try { ++ LatLng startLoc = mapEngine.polylineCoordinates.first; ++ Map tripData = { ++ 'id': driver['driver_id'].toString(), ++ 'phone': driver['phone'], ++ 'gender': driver['gender'], ++ 'name': driver['NAME'], ++ 'name_english': driver['name_english'], ++ 'address': driver['address'], ++ 'religion': driver['religion'] ?? 'UnKnown', ++ 'age': driver['age'].toString(), ++ 'education': driver['education'] ?? 'UnKnown', ++ 'license_type': driver['license_type'] ?? 'UnKnown', ++ 'national_number': driver['national_number'] ?? 'UnKnown', ++ 'car_plate': driver['car_plate'], ++ 'make': driver['make'], ++ 'model': driver['model'], ++ 'year': driver['year'].toString(), ++ 'color': driver['color'], ++ 'color_hex': driver['color_hex'], ++ 'displacement': driver['displacement'], ++ 'fuel': driver['fuel'], ++ 'token': driver['token'], ++ 'rating': driver['rating'].toString(), ++ 'countRide': driver['ride_count'].toString(), ++ 'passengerId': box.read(BoxName.passengerID), ++ 'timeSelected': tripDateTime.toIso8601String(), ++ 'status': 'pending', ++ 'startNameAddress': startNameAddress.toString(), ++ 'locationCoordinate': '${startLoc.latitude},${startLoc.longitude}', ++ }; ++ Log.print('tripData: $tripData'); ++ ++ var response = ++ await CRUD().post(link: AppLink.addMishwari, payload: tripData); ++ ++ if (response != 'failure') { ++ var id = response['message']['id'].toString(); ++ await CRUD() ++ .post(link: '${AppLink.server}/ride/rides/add.php', payload: { ++ "start_location": '${startLoc.latitude},${startLoc.longitude}', ++ "end_location": '${startLoc.latitude},${startLoc.longitude}', ++ "date": DateTime.now().toString(), ++ "time": DateTime.now().toString(), ++ "endtime": DateTime.now().add(const Duration(hours: 2)).toString(), ++ "price": '50', ++ "passenger_id": box.read(BoxName.passengerID).toString(), ++ "driver_id": driver['driver_id'].toString(), ++ "status": "waiting", ++ 'carType': 'vip', ++ "price_for_driver": '50', ++ "price_for_passenger": '50', ++ "distance": '20', ++ "paymentMethod": 'cash', ++ }).then((value) { ++ if (value is String) { ++ final parsedValue = jsonDecode(value); ++ rideId = parsedValue['message']; ++ } else if (value is Map) { ++ rideId = value['message']; ++ } ++ }); ++ ++ driverIdVip = driver['driver_id'].toString(); ++ driverId = driver['driver_id'].toString(); ++ ++ DateTime timeSelected = DateTime.parse(tripDateTime.toIso8601String()); ++ Get.find().scheduleNotificationsForTimeSelected( ++ "Your trip is scheduled".tr, ++ "Don't forget your ride!".tr, ++ "tone1", ++ timeSelected); ++ ++ await NotificationService.sendNotification( ++ category: 'OrderVIP', ++ target: driver['token'].toString(), ++ title: 'OrderVIP'.tr, ++ body: '$rideId - VIP Trip', ++ isTopic: false, ++ tone: 'tone1', ++ driverList: [ ++ id, ++ rideId, ++ driver['id'], ++ passengerLocation.latitude.toString(), ++ startNameAddress.toString(), ++ passengerLocation.longitude.toString(), ++ (box.read(BoxName.name).toString().split(' ')[0]).toString(), ++ box.read(BoxName.passengerID).toString(), ++ box.read(BoxName.phone).toString(), ++ box.read(BoxName.email).toString(), ++ box.read(BoxName.passengerPhotoUrl).toString(), ++ box.read(BoxName.tokenFCM).toString(), ++ (driver['token'].toString()), ++ ], ++ ); ++ if (response['message'] == "Trip updated successfully") { ++ mySnackbarSuccess("Trip updated successfully".tr); ++ await NotificationService.sendNotification( ++ category: 'Order VIP Canceld', ++ target: response['previous_driver_token'].toString(), ++ title: 'Order VIP Canceld'.tr, ++ body: 'Passenger cancel order'.tr, ++ isTopic: false, ++ tone: 'cancel', ++ driverList: [], ++ ); ++ } ++ isBottomSheetShown = false; ++ update(); ++ Get.to(() => VipWaittingPage()); ++ } else { ++ throw Exception('Failed to save trip'); ++ } ++ } catch (e) { ++ Get.snackbar('Error'.tr, 'Failed to book trip: $e'.tr, ++ backgroundColor: AppColor.redColor); ++ } ++ } ++ ++ Future cancelVip(String token, tripId) async { ++ var res = await CRUD() ++ .post(link: AppLink.cancelMishwari, payload: {'id': tripId}); ++ if (res != 'failure') { ++ Get.back(); ++ mySnackbarSuccess('You canceled VIP trip'.tr); ++ } ++ } ++ ++ void sendToDriverAgain(String token) { ++ NotificationService.sendNotification( ++ category: 'Order VIP Canceld', ++ target: token.toString(), ++ title: 'Order VIP Canceld'.tr, ++ body: 'Passenger cancel order'.tr, ++ isTopic: false, ++ tone: 'cancel', ++ driverList: [], ++ ); ++ } ++ ++ Set notifiedDrivers = {}; ++ ++ Future processDriverArrival(String source) async { ++ if (currentRideState.value == RideState.driverArrived || ++ _isArrivalProcessed) { ++ Log.print("✋ Ignored Arrival from $source. Already processed."); ++ return; ++ } ++ ++ _isArrivalProcessed = true; ++ Log.print("🚖 Driver Arrived via $source! Processing..."); ++ ++ currentRideState.value = RideState.driverArrived; ++ statusRide = 'Arrived'; ++ await RideLiveNotification.showDriverArrived(driverName); ++ ++ uiInteractions.driverArrivePassengerDialoge(); ++ startTimerDriverWaitPassenger5Minute(); ++ ++ if (mapEngine.polylineCoordinates.isNotEmpty) { ++ mapEngine.playRouteAnimation( ++ mapEngine.polylineCoordinates, mapEngine.lastComputedBounds); ++ } ++ update(); ++ } ++ ++ Future processRideFinished(List driverList, ++ {String source = "Unknown"}) async { ++ if (currentRideState.value == RideState.finished || _isFinishProcessed) { ++ Log.print("✋ Ignored Finish Request from $source. Already Finished."); ++ return; ++ } ++ ++ _isFinishProcessed = true; ++ Log.print("🏁 Ride Finished via $source."); ++ ++ currentRideState.value = RideState.finished; ++ mapSocket.disposeRideSocket(); ++ stopDriverLocationPolling(); ++ if (Get.isRegistered()) { ++ Get.find().stopRecording(); ++ } ++ ++ if (Get.isDialogOpen == true) Get.back(); ++ ++ NotificationController().showNotification( ++ 'Alert'.tr, ++ "Please make sure not to leave any personal belongings in the car.".tr, ++ 'tone1', ++ ); ++ IosLiveActivityService.endRideActivity(); ++ PipService.disablePip(); ++ await RideLiveNotification.cancel(); ++ ++ if (driverList.length >= 4) { ++ String price = driverList[3].toString(); ++ Get.offAll(() => RateDriverFromPassenger(), arguments: { ++ 'driverId': driverList[0].toString(), ++ 'rideId': driverList[1].toString(), ++ 'price': price ++ }); ++ } ++ } ++ ++ Future processRideCancelledByDriver(dynamic data, ++ {String source = "Unknown"}) async { ++ if (_isCancelProcessed) return; ++ ++ _isCancelProcessed = true; ++ stopAllTimers(); ++ if (Get.isDialogOpen == true) Get.back(); ++ await RideLiveNotification.cancel(); ++ IosLiveActivityService.endRideActivity(); ++ PipService.disablePip(); ++ ++ Get.defaultDialog( ++ title: "Sorry 😔".tr, ++ titleStyle: ++ const TextStyle(color: Colors.red, fontWeight: FontWeight.bold), ++ barrierDismissible: false, ++ content: Column( ++ children: [ ++ const Icon(Icons.cancel_presentation, ++ size: 50, color: Colors.redAccent), ++ const SizedBox(height: 10), ++ Text( ++ "The driver cancelled the trip for an emergency reason.\nDo you want to search for another driver immediately?" ++ .tr, ++ textAlign: TextAlign.center, ++ ), ++ ], ++ ), ++ actions: [ ++ TextButton( ++ onPressed: () { ++ Get.back(); ++ handleNoDriverFound(); ++ }, ++ child: Text("Cancel Trip".tr, ++ style: const TextStyle(color: Colors.grey)), ++ ), ++ ElevatedButton.icon( ++ style: ++ ElevatedButton.styleFrom(backgroundColor: AppColor.primaryColor), ++ icon: const Icon(Icons.refresh, color: Colors.white), ++ label: Text("Search for another driver".tr, ++ style: const TextStyle(color: Colors.white)), ++ onPressed: () { ++ Get.back(); ++ retrySearchForDrivers(); ++ }, ++ ), ++ ], ++ ); ++ } ++ ++ void showNoDriverDialog() { ++ Get.defaultDialog( ++ title: "No Drivers Found".tr, ++ middleText: ++ "Sorry, there are no cars available of this type right now.".tr, ++ textConfirm: "Refresh Map".tr, ++ textCancel: "Cancel".tr, ++ confirmTextColor: Colors.white, ++ onConfirm: () { ++ Get.back(); ++ restCounter(); ++ stopAllTimers(); ++ clearControllersAndGoHome(); ++ }, ++ ); ++ } ++ ++ Future ++ calculateDistanceBetweenPassengerAndDriverBeforeCancelRide() async { ++ await getDriverCarsLocationToPassengerAfterApplied(); ++ double dist = Geolocator.distanceBetween( ++ passengerLocation.latitude, ++ passengerLocation.longitude, ++ driverCarsLocationToPassengerAfterApplied.last.latitude, ++ driverCarsLocationToPassengerAfterApplied.last.longitude, ++ ); ++ if (dist > 500) { ++ isCancelRidePageShown = true; ++ update(); ++ } else { ++ Get.defaultDialog( ++ barrierDismissible: false, ++ title: 'The Driver Will be in your location soon .'.tr, ++ middleText: 'The distance less than 500 meter.'.tr, ++ confirm: Column( ++ children: [ ++ MyElevatedButton( ++ kolor: AppColor.greenColor, ++ title: 'Ok'.tr, ++ onPressed: () { ++ Get.back(); ++ }, ++ ), ++ MyElevatedButton( ++ kolor: AppColor.redColor, ++ title: 'No, I want to cancel this trip'.tr, ++ onPressed: () { ++ Get.back(); ++ MyDialog().getDialog( ++ 'Attention'.tr, ++ 'You will be charged for the cost of the driver coming to your location.' ++ .tr, ++ () async { ++ Get.back(); ++ Get.find() ++ .payToDriverForCancelAfterAppliedAndHeNearYou(rideId); ++ }, ++ ); ++ }, ++ ), ++ ], ++ ), ++ ); ++ } ++ } ++ ++ Future cancelRideAfterRejectFromAll() async { ++ locSearch.clearPlacesDestination(); ++ mapEngine.clearPolyline(); ++ data = []; ++ await CRUD().post( ++ link: "${AppLink.server}/ride/rides/cancel_ride_by_passenger.php", ++ payload: { ++ "ride_id": rideId.toString(), ++ "reason": 'notApplyFromAnyDriver' ++ }); ++ ++ rideConfirm = false; ++ statusRide = 'Cancel'; ++ isSearchingWindow = false; ++ shouldFetch = false; ++ isPassengerChosen = false; ++ isCashConfirmPageShown = false; ++ isCashSelectedBeforeConfirmRide = false; ++ timeToPassengerFromDriverAfterApplied = 0; ++ mapEngine.changeCancelRidePageShow(); ++ remainingTime = 0; ++ update(); ++ } ++ ++ void selectReason0(int index, String note) { ++ selectedReason = index; ++ cancelNote = note; ++ update(); ++ } ++ ++ int selectedReasonIndex = -1; ++ String selectedReasonText = ""; ++ TextEditingController otherReasonController = TextEditingController(); ++ ++ void selectReason(int index, String reason) { ++ selectedReasonIndex = index; ++ selectedReasonText = reason; ++ update(); ++ } ++ ++ List data = []; ++ ++ void restCounter() { ++ locSearch.clearPlacesDestination(); ++ mapEngine.clearPolyline(); ++ data = []; ++ rideConfirm = false; ++ shouldFetch = false; ++ timeToPassengerFromDriverAfterApplied = 0; ++ update(); ++ } ++ ++ Future _checkAndRefreshMapStyle() async { ++ try { ++ final String styleJson = await rootBundle.loadString('assets/style.json'); ++ final Map decoded = json.decode(styleJson); ++ final String? currentVersion = ++ decoded['metadata'] != null ? decoded['metadata']['version'] : null; ++ ++ if (currentVersion == null) return; ++ final String lastVersion = box.read(BoxName.styleVersion) ?? "0.0.0"; ++ ++ if (currentVersion != lastVersion) { ++ Log.print( ++ "♻️ Map Style Version mismatch ($lastVersion -> $currentVersion). Purging offline cache..."); ++ await OfflineMapService.instance.clearCache(); ++ await Future.delayed(const Duration(milliseconds: 500)); ++ box.write(BoxName.styleVersion, currentVersion); ++ Log.print("✅ Style Version updated to $currentVersion"); ++ } ++ } catch (e) { ++ Log.print("⚠️ Style version check failed: $e"); ++ } ++ } ++ ++ void reinit() { ++ if (currentRideState.value != RideState.noRide && ++ currentRideState.value != RideState.cancelled) { ++ Log.print('ℹ️ reinit() skipped: ride is active'); ++ return; ++ } ++ Log.print('🔄 reinit() calling resetAllMapStates and restarting timers...'); ++ resetAllMapStates(); ++ stopAllTimers(); ++ currentRideState.value = RideState.noRide; ++ ++ // Restart location search ++ locSearch.getLocation(); ++ ++ // Restart lifecycle timers & stages ++ getLocationArea(passengerLocation.latitude, passengerLocation.longitude); ++ unawaited(_stagePricingAndState()); ++ unawaited(_stageNiceToHave()); ++ startMasterTimer(); ++ } ++ ++ void resetAllMapStates() { ++ Log.print('🧹 Resetting all map states to prevent sticky location bug'); ++ locSearch.clearPlacesDestination(); ++ locSearch.clearPlacesStart(); ++ locSearch.waypoints.clear(); ++ locSearch.clearAllMenuWaypoints(); ++ if (Get.isRegistered()) { ++ Get.find().reset(); ++ } ++ ++ // Call reset on mapEngine which handles clearing markers, polylines, animation timers and UI states ++ mapEngine.reset(); ++ data = []; ++ ++ locSearch.passengerStartLocationFromMap = false; ++ locSearch.startLocationFromMap = false; ++ isPickerShown = false; ++ locSearch.workLocationFromMap = false; ++ locSearch.homeLocationFromMap = false; ++ isAnotherOreder = false; ++ isWhatsAppOrder = false; ++ ++ myDestination = passengerLocation; ++ locSearch.hintTextDestinationPoint = 'Select your destination'.tr; ++ ++ locSearch.placeDestinationController.clear(); ++ locSearch.placeStartController.clear(); ++ ++ rideConfirm = false; ++ shouldFetch = true; // reset to true by default for next ride search polling ++ isDrawingRoute = false; ++ isLoading = false; ++ ++ // Reset RideLifecycleController specific search and lifecycle states ++ isSearchingWindow = false; ++ currentRideState.value = RideState.noRide; ++ statusRide = 'wait'; ++ statusRideVip = 'wait'; ++ statusRideFromStart = false; ++ isDriverInPassengerWay = false; ++ isDriverArrivePassenger = false; ++ _isArrivalProcessed = false; ++ _isFinishProcessed = false; ++ _isCancelProcessed = false; ++ _isAcceptanceProcessed = false; ++ _isRatingScreenOpen = false; ++ _isRecalculatingRoute = false; ++ _isRideStartedProcessed = false; ++ _isDriverAppliedLogicExecuted = false; ++ _isDriverArrivedLogicExecuted = false; ++ _isRideBeginLogicExecuted = false; ++ _currentDriverRoutePoints = []; ++ _currentDriverRouteDistanceMeters = 0.0; ++ _currentDriverRouteDurationSeconds = 0; ++ _driverEtaUpdatedAt = null; ++ _driverEtaSecondsAtUpdate = 0; ++ _driverEtaCountdownTicks = 0; ++ _routeHeadingMismatchCount = 0; ++ distanceByPassenger = ''; ++ durationToPassenger = 0; ++ stringRemainingTimeToPassenger = ''; ++ ++ update(); ++ } ++ ++ void _handleFatalError(String title, String message) { ++ if (Get.isBottomSheetOpen == true || Get.isDialogOpen == true) { ++ Get.back(); ++ } ++ if (Get.isSnackbarOpen) Get.closeCurrentSnackbar(); ++ ++ isDrawingRoute = false; ++ isLoading = false; ++ update(); ++ ++ Get.defaultDialog( ++ title: title, ++ titleStyle: AppStyle.title.copyWith(color: AppColor.redColor), ++ middleText: message, ++ middleTextStyle: AppStyle.subtitle, ++ barrierDismissible: false, ++ confirm: MyElevatedButton( ++ title: "Close".tr, ++ kolor: AppColor.redColor, ++ onPressed: () { ++ Get.back(); ++ clearControllersAndGoHome(); ++ }, ++ ), ++ ); ++ } ++ ++ String shortenAddress(String fullAddress) { ++ List parts = fullAddress.split('،'); ++ parts = parts.map((part) => part.trim()).toList(); ++ parts = parts.where((part) => part.isNotEmpty).toList(); ++ ++ String shortAddress = ''; ++ if (parts.isNotEmpty) { ++ shortAddress += parts[0]; ++ } ++ if (parts.length > 2) { ++ shortAddress += '، ${parts[2]}'; ++ } else if (parts.length > 1) { ++ shortAddress += '، ${parts[1]}'; ++ } ++ ++ if (parts.length > 1) { ++ shortAddress += '، ${parts.last}'; ++ } ++ ++ shortAddress = shortAddress ++ .split('،') ++ .where((part) => !RegExp(r'^[0-9 ]+$').hasMatch(part.trim())) ++ .join('er'); ++ ++ bool isEnglish = ++ RegExp(r'^[a-zA-Z0-9 ]+$').hasMatch(shortAddress.replaceAll('،', '')); ++ ++ if (isEnglish) { ++ List englishParts = shortAddress.split('،'); ++ if (englishParts.length > 2) { ++ shortAddress = ++ '${englishParts[0]}، ${englishParts[1]}، ${englishParts.last}'; ++ } else if (englishParts.length > 1) { ++ shortAddress = '${englishParts[0]}، ${englishParts.last}'; ++ } ++ } ++ return shortAddress; ++ } ++ ++ double distanceOfDestination = 0; ++ bool haveSteps = false; ++ ++ Future getMapPoints( ++ String originSteps, String destinationSteps, int index) async { ++ isWayPointStopsSheetUtilGetMap = false; ++ await nearbyDrivers.getCarsLocationByPassengerAndReloadMarker(); ++ update(); ++ ++ var url = ++ ('${AppLink.googleMapsLink}directions/json?&language=${box.read(BoxName.lang)}&avoid=tolls|ferries&destination=$destinationSteps&origin=$originSteps&key=${AK.mapAPIKEY}'); ++ var response = await CRUD().getGoogleApi(link: url, payload: {}); ++ ++ data = response['routes'][0]['legs']; ++ ++ int durationToRide0 = data[0]['duration']['value']; ++ durationToRide = durationToRide + durationToRide0; ++ distance = distanceOfDestination + (data[0]['distance']['value']) / 1000; ++ ++ update(); ++ final String pointsString = ++ response['routes'][0]["overview_polyline"]["points"]; ++ ++ List decodedPoints = ++ await compute(decodePolylineIsolate, pointsString); ++ for (int i = 0; i < decodedPoints.length; i++) { ++ mapEngine.polylineCoordinates.add(decodedPoints[i]); ++ } ++ ++ if (polyLines.isEmpty) { ++ var polyline = Polyline( ++ polylineId: PolylineId('route_$index'), ++ points: locSearch.polylineCoordinatesPointsAll[index], ++ width: 6, ++ color: const Color(0xFF2196F3), ++ ); ++ ++ polyLines = {...polyLines, polyline}; ++ rideConfirm = false; ++ update(); ++ } ++ } ++ ++ void updateCameraForDistanceAfterGetMap() { ++ LatLng coord1 = LatLng( ++ double.parse(locSearch.coordinatesWithoutEmpty.first.split(',')[0]), ++ double.parse(locSearch.coordinatesWithoutEmpty.first.split(',')[1])); ++ ++ LatLng coord2 = LatLng( ++ double.parse(locSearch.coordinatesWithoutEmpty.last.split(',')[0]), ++ double.parse(locSearch.coordinatesWithoutEmpty.last.split(',')[1])); ++ ++ LatLng northeastBound; ++ LatLng southwestBound; ++ ++ if (coord1.latitude > coord2.latitude) { ++ northeastBound = coord1; ++ southwestBound = coord2; ++ } else { ++ northeastBound = coord2; ++ southwestBound = coord1; ++ } ++ ++ LatLngBounds boundsObj = ++ LatLngBounds(northeast: northeastBound, southwest: southwestBound); ++ var cameraUpdate = CameraUpdate.newLatLngBounds(boundsObj, ++ left: 180, top: 180, right: 180, bottom: 180); ++ mapController!.animateCamera(cameraUpdate); ++ update(); ++ } ++ ++ int selectedIndex = -1; ++ void selectCarFromList(int index) { ++ selectedIndex = index; ++ carTypes.forEach((element) => element.isSelected = false); ++ carTypes[index].isSelected = true; ++ update(); ++ } ++ ++ Future showBottomSheet1() async { ++ await bottomSheet(); ++ isBottomSheetShown = true; ++ heightBottomSheetShown = 250; ++ update(); ++ } ++ ++ double calculateAngleBetweenLocations(LatLng start, LatLng end) { ++ double startLat = start.latitude * pi / 180; ++ double startLon = start.longitude * pi / 180; ++ double endLat = end.latitude * pi / 180; ++ double endLon = end.longitude * pi / 180; ++ ++ double dLon = endLon - startLon; ++ ++ double y = sin(dLon) * cos(endLat); ++ double x = ++ cos(startLat) * sin(endLat) - sin(startLat) * cos(endLat) * cos(dLon); ++ ++ double angle = atan2(y, x); ++ double angleDegrees = angle * 180 / pi; ++ ++ return angleDegrees; ++ } ++ ++ get dataCarsLocationByPassenger { ++ return nearbyDrivers.carsLocationByPassenger; ++ } ++ ++ set dataCarsLocationByPassenger(var val) { ++ nearbyDrivers.carsLocationByPassenger = val; ++ } ++ ++ double calculateBearing(double lat1, double lon1, double lat2, double lon2) { ++ return nearbyDrivers.calculateBearing(lat1, lon1, lat2, lon2); ++ } ++ ++ void analyzeBehavior(Position currentPosition, List routePoints) { ++ nearbyDrivers.analyzeBehavior(currentPosition, routePoints); ++ } ++ ++ void detectStops(Position currentPosition) { ++ nearbyDrivers.detectStops(currentPosition); ++ } ++ ++ Future getDirectionMap(String origin, String destination, ++ [List waypoints = const [], int attemptCount = 0]) async { ++ if (attemptCount == 0) { ++ isDrawingRoute = true; ++ update(); ++ if (isDrawingRoute) showDrawingBottomSheet(); ++ ++ await nearbyDrivers.getCarsLocationByPassengerAndReloadMarker(); ++ } ++ ++ if (origin.isEmpty) { ++ origin = '${passengerLocation.latitude},${passengerLocation.longitude}'; ++ } ++ ++ var coordDestination = destination.split(','); ++ double latDest = double.parse(coordDestination[0]); ++ double lngDest = double.parse(coordDestination[1]); ++ myDestination = LatLng(latDest, lngDest); ++ ++ Uri uri; ++ ++ var originCoords = origin.split(','); ++ final Map queryParams = { ++ 'fromLat': originCoords[0].trim(), ++ 'fromLng': originCoords[1].trim(), ++ 'toLat': latDest.toString(), ++ 'toLng': lngDest.toString(), ++ }; ++ ++ for (int i = 0; i < activeMenuWaypointCount; i++) { ++ final wp = menuWaypoints[i]; ++ if (wp != null) { ++ queryParams['stop${i + 1}Lat'] = wp.latitude.toString(); ++ queryParams['stop${i + 1}Lng'] = wp.longitude.toString(); ++ } ++ } ++ ++ uri = Uri.parse(AppLink.mapSaasRoute).replace(queryParameters: queryParams); ++ ++ Log.print( ++ 'Requesting Route URI (SaaS, Attempt: ${attemptCount + 1}): $uri'); ++ ++ http.Response response; ++ Map responseData; ++ ++ try { ++ response = await http.get(uri, headers: { ++ 'x-api-key': Env.mapSaasKey, ++ }).timeout(const Duration(seconds: 20)); ++ ++ responseData = json.decode(response.body); ++ ++ bool isRequestValid = response.statusCode == 200; ++ ++ if (!isRequestValid) { ++ if (attemptCount < 2) { ++ await _retryProcess(origin, destination, waypoints, attemptCount); ++ return; ++ } ++ _handleFatalError( ++ "Server Error".tr, "Connection failed. Please try again.".tr); ++ return; ++ } ++ ++ double apiDistanceMeters; ++ String pointsString; ++ dynamic routeData; ++ ++ apiDistanceMeters = (responseData['distance'] as num).toDouble(); ++ pointsString = responseData['points'] ?? ""; ++ routeData = responseData; ++ ++ var origCoords = origin.split(','); ++ double startLat = double.parse(origCoords[0]); ++ double startLng = double.parse(origCoords[1]); ++ ++ double aerialDistance = ++ Geolocator.distanceBetween(startLat, startLng, latDest, lngDest); ++ ++ if (apiDistanceMeters < 50.0 && aerialDistance > 200.0) { ++ Log.print( ++ "⚠️ Suspicious Route detected! Server: $apiDistanceMeters m | Aerial: $aerialDistance m"); ++ ++ if (attemptCount < 2) { ++ Log.print("🔄 Retrying request (Attempt ${attemptCount + 2})..."); ++ await Future.delayed(const Duration(seconds: 1)); ++ await getDirectionMap( ++ origin, destination, waypoints, attemptCount + 1); ++ return; ++ } else { ++ Log.print("❌ All retries failed. Calculating Route is impossible."); ++ _handleFatalError( ++ "Route Not Found".tr, ++ "We couldn't find a valid route to this destination. Please try selecting a different point." ++ .tr); ++ return; ++ } ++ } ++ ++ box.remove(BoxName.tripData); ++ box.write(BoxName.tripData, routeData); ++ ++ durationToRide = ++ ((routeData['duration'] as num) * kDurationScalar).toInt(); ++ double distanceOfTrip = apiDistanceMeters / 1000.0; ++ distance = distanceOfTrip; ++ ++ data = routeData['legs'] != null && routeData['legs'].isNotEmpty ++ ? (routeData['legs'][0]['steps'] ?? []) ++ : []; ++ ++ List decodedPoints = []; ++ if (pointsString.isNotEmpty) { ++ decodedPoints = await compute(decodePolylineIsolate, pointsString); ++ } ++ ++ if (decodedPoints.isEmpty) { ++ _handleFatalError("Map Error".tr, "Received empty route data.".tr); ++ return; ++ } ++ ++ mapEngine.polylineCoordinates.clear(); ++ mapEngine.polylineCoordinates.addAll(decodedPoints); ++ ++ final LatLng startLoc = mapEngine.polylineCoordinates.first; ++ final LatLng endLoc = mapEngine.polylineCoordinates.last; ++ ++ startNameAddress = responseData['startName'] ?? 'Start Point'.tr; ++ endNameAddress = responseData['endName'] ?? 'Destination'.tr; ++ Log.print('📍 ROUTE START: $startNameAddress'); ++ Log.print('📍 ROUTE END: $endNameAddress'); ++ ++ if (responseData['bbox'] != null) { ++ List bbox = responseData['bbox']; ++ if (bbox.length == 4) { ++ mapEngine.lastComputedBounds = LatLngBounds( ++ southwest: LatLng(bbox[1], bbox[0]), ++ northeast: LatLng(bbox[3], bbox[2]), ++ ); ++ } ++ } else { ++ double? minLat, maxLat, minLng, maxLng; ++ for (LatLng point in mapEngine.polylineCoordinates) { ++ minLat = ++ minLat == null ? point.latitude : min(minLat, point.latitude); ++ maxLat = ++ maxLat == null ? point.latitude : max(maxLat, point.latitude); ++ minLng = ++ minLng == null ? point.longitude : min(minLng, point.longitude); ++ maxLng = ++ maxLng == null ? point.longitude : max(maxLng, point.longitude); ++ } ++ if (minLat != null) { ++ mapEngine.lastComputedBounds = LatLngBounds( ++ northeast: LatLng(maxLat!, maxLng!), ++ southwest: LatLng(minLat!, minLng!)); ++ } ++ } ++ ++ if (isDrawingRoute) { ++ Log.print('🔔 Finalizing route drawing state'); ++ isDrawingRoute = false; ++ isLoading = false; ++ update(); ++ } ++ ++ durationToAdd = Duration(seconds: durationToRide); ++ hours = durationToAdd.inHours; ++ minutes = (durationToAdd.inMinutes % 60).round(); ++ ++ markers = { ++ Marker( ++ markerId: const MarkerId('start'), ++ position: startLoc, ++ icon: InlqBitmap.fromStyleImage('orange_marker'), ++ infoWindow: const InfoWindow(title: 'A'), ++ anchor: const Offset(0.5, 1.0), ++ ), ++ Marker( ++ markerId: const MarkerId('end'), ++ position: endLoc, ++ icon: InlqBitmap.fromStyleImage('violet_marker'), ++ infoWindow: const InfoWindow(title: 'B'), ++ anchor: const Offset(0.5, 1.0), ++ ), ++ }; ++ ++ for (int i = 0; i < activeMenuWaypointCount; i++) { ++ final wp = menuWaypoints[i]; ++ if (wp != null) { ++ final bool isFirstWaypoint = i == 0; ++ markers.add(Marker( ++ markerId: MarkerId('waypoint_$i'), ++ position: wp, ++ icon: InlqBitmap.fromStyleImage( ++ isFirstWaypoint ? 'orange_marker' : 'violet_marker'), ++ infoWindow: ++ InfoWindow(title: isFirstWaypoint ? 'Stop 1' : 'Stop 2'), ++ anchor: const Offset(0.5, 1.0), ++ )); ++ } ++ } ++ ++ if (polyLines.isNotEmpty) mapEngine.clearPolyline(); ++ ++ rideConfirm = false; ++ isMarkersShown = true; ++ update(); ++ ++ await bottomSheet(); ++ ++ await mapEngine.playRouteAnimation( ++ mapEngine.polylineCoordinates, mapEngine.lastComputedBounds); ++ } catch (e, stackTrace) { ++ if (isDrawingRoute) { ++ isDrawingRoute = false; ++ isLoading = false; ++ update(); ++ } ++ ++ Log.print('🚨 CRITICAL ERROR IN getDirectionMap: $e'); ++ Log.print('🚨 STACKTRACE: $stackTrace'); ++ ++ if (attemptCount < 2) { ++ await _retryProcess(origin, destination, waypoints, attemptCount); ++ } else { ++ _handleFatalError("Connection Error".tr, ++ "Please check your internet and try again.".tr); ++ } ++ } ++ } ++ ++ Future _retryProcess(String origin, String dest, List waypoints, ++ int currentAttempt) async { ++ Log.print( ++ "🔄 Exception or Error caught. Retrying in 1s... (Attempt ${currentAttempt + 1})"); ++ await Future.delayed(const Duration(seconds: 1)); ++ getDirectionMap(origin, dest, waypoints, currentAttempt + 1); ++ } ++ ++ bool _isUsingFallback = false; ++ ++ void _startPollingFallback() { ++ if (_isUsingFallback) return; ++ ++ Log.print('🔄 Starting Polling Fallback Mode'); ++ _isUsingFallback = true; ++ ++ startMasterTimer(); ++ } ++ ++ Future _restorePolyline(String polylineString) async { ++ try { ++ List points = ++ await compute(decodePolylineIsolate, polylineString); ++ ++ mapEngine.polylineCoordinates.clear(); ++ mapEngine.polylineCoordinates.addAll(points); ++ ++ mapEngine.clearPolyline(); ++ mapEngine.polyLines = { ++ ...mapEngine.polyLines, ++ Polyline( ++ polylineId: const PolylineId('route_direct'), ++ points: mapEngine.polylineCoordinates, ++ color: const Color(0xFF2196F3), ++ width: 6, ++ ) ++ }; ++ ++ update(); ++ } catch (e) { ++ Log.print('Error restoring polyline: $e'); ++ } ++ } ++ ++ Future processRideAcceptance( ++ {Map? driverData, required String source}) async { ++ if (_isAcceptanceProcessed || ++ currentRideState.value == RideState.driverApplied || ++ currentRideState.value == RideState.driverArrived || ++ currentRideState.value == RideState.inProgress) { ++ Log.print("✋ Ignored Acceptance from $source. Already processed."); ++ return; ++ } ++ ++ _rideAcceptedViaSource = source; ++ ++ _isAcceptanceProcessed = true; ++ _isDriverAppliedLogicExecuted = true; ++ Log.print("🚀 Winner: $source triggered acceptance! Processing..."); ++ ++ _masterTimer?.cancel(); ++ ++ currentRideState.value = RideState.driverApplied; ++ statusRide = 'Apply'; ++ isSearchingWindow = false; ++ ++ if (driverData != null && driverData.isNotEmpty) { ++ Log.print("📥 Populating Data from $source payload..."); ++ _fillDriverDataLocally(driverData); ++ } else { ++ Log.print("⚠️ No Data in Payload. Fallback to API."); ++ await getUpdatedRideForDriverApply(rideId); ++ } ++ ++ await IosLiveActivityService.startRideActivity( ++ rideId: rideId, ++ driverName: driverName, ++ carDetails: '$make • $carColor', ++ etaText: stringRemainingTimeToPassenger, ++ progress: 0.0, ++ ); ++ ++ _showRideStartNotifications(); ++ final etaText = stringRemainingTimeToPassenger; ++ final carInfo = '$make • $model • $licensePlate'; ++ ++ await RideLiveNotification.showDriverOnWay( ++ driverName: driverName, ++ etaText: etaText, ++ carInfo: carInfo, ++ ); ++ ++ update(); ++ ++ await getDriverCarsLocationToPassengerAfterApplied(); ++ _startSocketWatchdog(); ++ ++ if (driverCarsLocationToPassengerAfterApplied.isNotEmpty) { ++ LatLng driverPos = driverCarsLocationToPassengerAfterApplied.last; ++ ++ await calculateDriverToPassengerRoute(driverPos, passengerLocation); ++ ++ startTimerFromDriverToPassengerAfterApplied(); ++ } ++ ++ PipService.enablePip(); ++ ++ if (source == "Socket" && mapSocket.isSocketConnected) { ++ Log.print( ++ "🧠 Smart Mode: Socket accepted ride. Skipping polling, relying on WebSocket."); ++ } else { ++ Log.print("🔄 Fallback Mode: $source accepted ride. Starting polling."); ++ _startDriverLocationPollingWithTimer(); ++ } ++ } ++ ++ void _fillDriverDataLocally(Map data) { ++ try { ++ driverId = data['driver_id']?.toString() ?? ''; ++ driverPhone = data['phone']?.toString() ?? ''; ++ ++ String fName = (data['first_name'] ?? data['driver_first_name'] ?? '') ++ .toString() ++ .trim(); ++ String lName = (data['last_name'] ?? data['driver_last_name'] ?? '') ++ .toString() ++ .trim(); ++ final socketDriverName = ++ (data['driverName'] ?? data['driver_name'] ?? '').toString().trim(); ++ driverName = socketDriverName.isNotEmpty ++ ? socketDriverName ++ : [fName, lName].where((part) => part.isNotEmpty).join(' '); ++ ++ make = data['make']?.toString() ?? ''; ++ model = data['model']?.toString() ?? ''; ++ carColor = data['color']?.toString() ?? ''; ++ colorHex = data['color_hex']?.toString() ?? ''; ++ licensePlate = data['car_plate']?.toString() ?? ''; ++ carYear = data['year']?.toString() ?? ''; ++ ++ driverRate = data['ratingDriver']?.toString() ?? '5.0'; ++ driverToken = data['token']?.toString() ?? ''; ++ ++ update(); ++ } catch (e) { ++ Log.print("Error parsing socket driver data: $e"); ++ } ++ } ++ ++ Future cancelRide() async { ++ if (selectedReasonIndex == -1) { ++ Get.snackbar( ++ 'Attention'.tr, ++ 'Please select a reason first'.tr, ++ snackPosition: SnackPosition.BOTTOM, ++ backgroundColor: Colors.orange, ++ colorText: Colors.white, ++ ); ++ return; ++ } ++ ++ String finalReason = selectedReasonText; ++ if (finalReason == "Other".tr) { ++ if (otherReasonController.text.trim().isEmpty) { ++ Get.snackbar("Attention".tr, "Please write the reason...".tr, ++ backgroundColor: Colors.red, colorText: Colors.white); ++ return; ++ } ++ finalReason = otherReasonController.text.trim(); ++ } ++ ++ Get.back(); ++ if (isCancelRidePageShown) { ++ mapEngine.changeCancelRidePageShow(); ++ } ++ ++ resetAllMapStates(); ++ ++ stopAllTimers(); ++ currentRideState.value = RideState.cancelled; ++ await RideLiveNotification.cancel(); ++ IosLiveActivityService.endRideActivity(); ++ PipService.disablePip(); ++ ++ if (rideId != 'yet' && rideId != null) { ++ Log.print( ++ '📡 Sending Cancel Request to Server with Reason: $finalReason'); ++ ++ try { ++ await CRUD().post( ++ link: "${AppLink.server}/ride/rides/cancel_ride_by_passenger.php", ++ payload: { ++ "ride_id": rideId.toString(), ++ "reason": finalReason, ++ "driver_token": driverToken, ++ }, ++ ); ++ } catch (e) { ++ Log.print("Error cancelling on server: $e"); ++ } ++ } ++ ++ clearControllersAndGoHome(); ++ } ++ ++ Future getAIKey(String key) async { ++ var res = ++ await CRUD().get(link: AppLink.getapiKey, payload: {"keyName": key}); ++ if (res != 'failure') { ++ var d = jsonDecode(res)['message']; ++ return d[key].toString(); ++ } ++ return null; ++ } ++ ++ Future getRideStatus(String rideId) async { ++ final response = await CRUD().get( ++ link: "${AppLink.rideServerSide}/ride/rides/getRideStatus.php", ++ payload: {'id': rideId}); ++ Log.print(response); ++ Log.print('2176'); ++ return jsonDecode(response)['data']; ++ } ++ ++ void handleActiveRideOnStartup(dynamic data) { ++ try { ++ if (data == null || data['has_active_ride'] != true) { ++ Log.print('[Startup] No active ride'); ++ currentRideState.value = RideState.noRide; ++ startMasterTimer(); ++ return; ++ } ++ ++ Log.print('[Startup] ✅ Active ride found!'); ++ ++ var rideData = data['ride']; ++ rideId = rideData['ride_id'].toString(); ++ currentRideId = rideId; ++ driverId = rideData['driver_id']?.toString() ?? ''; ++ ++ String status = rideData['status']?.toString().toLowerCase() ?? ''; ++ ++ if (status == 'waiting' || status == 'searching') { ++ currentRideState.value = RideState.searching; ++ isSearchingWindow = true; ++ } else if (status == 'apply' || status == 'applied') { ++ currentRideState.value = RideState.driverApplied; ++ statusRide = 'Apply'; ++ ++ mapSocket.socket.emit('subscribe_driver_location', { ++ 'ride_id': rideId, ++ 'driver_id': driverId, ++ }); ++ ++ if (rideData['driver_info'] != null) { ++ var dInfo = rideData['driver_info']; ++ passengerName = dInfo['first_name']?.toString() ?? ''; ++ driverPhone = dInfo['phone']?.toString() ?? ''; ++ model = dInfo['model']?.toString() ?? ''; ++ licensePlate = dInfo['license_plate']?.toString() ?? ''; ++ } ++ } else if (status == 'arrived') { ++ currentRideState.value = RideState.driverArrived; ++ statusRide = 'Arrived'; ++ isDriverArrivePassenger = true; ++ } else if (status == 'begin' || status == 'started') { ++ currentRideState.value = RideState.inProgress; ++ statusRide = 'Begin'; ++ rideTimerBegin = true; ++ ++ if (rideData['polyline'] != null) { ++ _restorePolyline(rideData['polyline']); ++ } ++ ++ rideIsBeginPassengerTimer(); ++ } ++ ++ update(); ++ startMasterTimer(); ++ } catch (e) { ++ Log.print('[Startup] Error: $e'); ++ currentRideState.value = RideState.noRide; ++ startMasterTimer(); ++ } ++ } ++ ++ Future handleNoDriverFound() async { ++ stopAllTimers(); ++ await RideLiveNotification.cancel(); ++ IosLiveActivityService.endRideActivity(); ++ PipService.disablePip(); ++ _isCancelProcessed = false; ++ currentRideState.value = RideState.noRide; ++ resetAllMapStates(); ++ clearControllersAndGoHome(); ++ ++ Get.defaultDialog( ++ title: "We apologize 😔".tr, ++ middleText: "No drivers found at the moment.\nPlease try again later.".tr, ++ confirm: ElevatedButton( ++ onPressed: () => Navigator.pop(Get.context!), ++ child: Text("Ok".tr), ++ ), ++ ); ++ } ++ ++ bool isDriversDataValid() { ++ return dataCarsLocationByPassenger != 'failure' && ++ dataCarsLocationByPassenger != null && ++ (dataCarsLocationByPassenger is Map) && ++ dataCarsLocationByPassenger.containsKey('message') && ++ dataCarsLocationByPassenger['message'] != null; ++ } ++ ++ void retrySearchForDrivers() async { ++ _isCancelProcessed = false; ++ isSearchingWindow = true; ++ currentRideState.value = RideState.searching; ++ driversStatusForSearchWindow = 'Searching for nearby drivers...'.tr; ++ update(); ++ ++ try { ++ Log.print("🔄 Retrying search for ride ID: $rideId"); ++ ++ var payload = { ++ "ride_id": rideId.toString(), ++ "passenger_id": box.read(BoxName.passengerID).toString(), ++ "passenger_name": box.read(BoxName.name).toString(), ++ "passenger_phone": box.read(BoxName.phone).toString(), ++ "passenger_email": box.read(BoxName.email).toString(), ++ "passenger_token": box.read(BoxName.tokenFCM).toString(), ++ "passenger_wallet": box.read(BoxName.passengerWalletTotal).toString(), ++ "passenger_rating": "5.0", ++ "start_lat": startLocation.latitude.toString(), ++ "start_lng": startLocation.longitude.toString(), ++ "end_lat": endLocation.latitude.toString(), ++ "end_lng": endLocation.longitude.toString(), ++ "start_name": startNameAddress, ++ "end_name": endNameAddress, ++ "distance": distance.toString(), ++ "distance_text": distanceByPassenger, ++ "duration_text": durationToPassenger.toString(), ++ "price": totalPassenger.toString(), ++ "price_for_driver": costForDriver.toString(), ++ "car_type": box.read(BoxName.carType).toString(), ++ "is_wallet": Get.find().isWalletChecked.toString(), ++ "has_steps": Get.find().wayPoints.length > 1 ++ ? "true" ++ : "false", ++ }; ++ ++ var response = await CRUD().post( ++ link: "${AppLink.rideServerSide}/rides/retry_search_drivers.php", ++ payload: payload, ++ ); ++ ++ if (response['status'] == 'success') { ++ Log.print("✅ Search reset successfully."); ++ startSearchingTimer(); ++ } else { ++ Log.print("❌ Failed to reset search: $response"); ++ handleNoDriverFound(); ++ } ++ } catch (e) { ++ Log.print("❌ Exception in retrySearchForDrivers: $e"); ++ handleNoDriverFound(); ++ } ++ } ++ ++ Future startSearchingTimer() async { ++ _searchTimer?.cancel(); ++ int seconds = 0; ++ ++ Log.print("⏳ Search Timer Started (90s)..."); ++ await RideLiveNotification.showSearching(driversStatusForSearchWindow); ++ ++ _searchTimer = Timer.periodic(const Duration(seconds: 1), (timer) { ++ seconds++; ++ ++ if (currentRideState.value != RideState.searching) { ++ timer.cancel(); ++ return; ++ } ++ ++ if (seconds >= 90) { ++ timer.cancel(); ++ handleNoDriverFound(); ++ } ++ }); ++ } ++ ++ void showNoDriversDialog() { ++ Get.dialog( ++ BackdropFilter( ++ filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5), ++ child: CupertinoAlertDialog( ++ title: Text("No Car or Driver Found in your area.".tr, ++ style: AppStyle.title ++ .copyWith(fontSize: 20, fontWeight: FontWeight.bold)), ++ content: Text("No Car or Driver Found in your area.".tr, ++ style: AppStyle.title.copyWith(fontSize: 16)), ++ actions: [ ++ CupertinoDialogAction( ++ onPressed: () { ++ Get.back(); ++ clearControllersAndGoHome(); ++ }, ++ child: ++ Text('OK'.tr, style: TextStyle(color: AppColor.greenColor)), ++ ), ++ ], ++ ), ++ ), ++ barrierDismissible: false, ++ ); ++ } ++ ++ Future getDistanceFromDriverAfterAcceptedRide( ++ String origin, String destination) async { ++ String apiKey = Env.mapKeyOsm; ++ if (origin.isEmpty) { ++ origin = '${passengerLocation.latitude},${passengerLocation.longitude}'; ++ } ++ var uri = Uri.parse( ++ '$dynamicApiUrl?origin=$origin&destination=$destination&steps=false&overview=false'); ++ Log.print('uri: $uri'); ++ ++ http.Response response; ++ Map responseData; ++ ++ try { ++ response = await http.get( ++ uri, ++ headers: { ++ 'X-API-KEY': apiKey, ++ }, ++ ).timeout(const Duration(seconds: 20)); ++ ++ if (response.statusCode != 200) { ++ Log.print('Error from API: ${response.statusCode}'); ++ isLoading = false; ++ update(); ++ return; ++ } ++ if (Get.isBottomSheetOpen ?? false) { ++ Get.back(); ++ } ++ isDrawingRoute = false; ++ ++ responseData = json.decode(response.body); ++ Log.print('responseData: $responseData'); ++ ++ if (responseData['status'] != 'ok') { ++ Log.print('API returned an error: ${responseData['message']}'); ++ isLoading = false; ++ update(); ++ return; ++ } ++ } catch (e) { ++ Log.print('Failed to get directions: $e'); ++ isLoading = false; ++ update(); ++ return; ++ } ++ } ++ ++ Future _stageNiceToHave() async { ++ Log.print('🚀 MapPassengerController: Starting _stageNiceToHave'); ++ ++ await Future.wait([ ++ Future(() async { ++ try { ++ Log.print('🔍 Loading Favorites...'); ++ await locSearch.getFavioratePlaces(); ++ } catch (e) { ++ Log.print("Error: $e"); ++ } ++ }), ++ Future(() async { ++ try { ++ Log.print('🔍 Loading Waypoints...'); ++ locSearch.readyWayPoints(); ++ } catch (e) { ++ Log.print("Error: $e"); ++ } ++ }), ++ Future(() async { ++ try { ++ Log.print('🔍 Loading Rate...'); ++ await getPassengerRate(); ++ } catch (e) { ++ Log.print("Error: $e"); ++ } ++ }), ++ Future(() async { ++ try { ++ Log.print('🔍 Loading Coupons...'); ++ await firstTimeRunToGetCoupon(); ++ } catch (e) { ++ Log.print("Error: $e"); ++ } ++ }), ++ ]); ++ Log.print('✅ MapPassengerController: _stageNiceToHave complete'); ++ try { ++ cardNumber = await SecureStorage().readData(BoxName.cardNumber); ++ } catch (e) { ++ Log.print("Error: $e"); ++ } ++ } ++ ++ Future _stagePricingAndState() async { ++ try { ++ await getKazanPercent(); ++ } catch (e) { ++ Log.print("Error: $e"); ++ } ++ try { ++ await _checkInitialRideStatus(); ++ } catch (e) { ++ Log.print("Error: $e"); ++ } ++ _applyLowEndModeIfNeeded(); ++ } ++ ++ void _applyLowEndModeIfNeeded() { ++ // Placeholder comment from original ++ } ++ ++ void showDrawingBottomSheet() { ++ Log.print( ++ '🔔 showDrawingBottomSheet called. isDrawingRoute: $isDrawingRoute'); ++ ++ final context = Get.context; ++ if (context == null) return; ++ ++ WidgetsBinding.instance.addPostFrameCallback((_) { ++ // Close any existing open dialogs first ++ if (Get.isDialogOpen == true) { ++ Get.back(); ++ } ++ ++ Get.dialog( ++ Dialog( ++ backgroundColor: Colors.transparent, ++ elevation: 0, ++ child: Container( ++ padding: const EdgeInsets.all(24), ++ width: 180, ++ decoration: BoxDecoration( ++ color: Colors.white.withOpacity(0.95), ++ borderRadius: BorderRadius.circular(24), ++ boxShadow: [ ++ BoxShadow( ++ color: Colors.black.withOpacity(0.15), ++ blurRadius: 20, ++ spreadRadius: 5, ++ ) ++ ], ++ ), ++ child: Column( ++ mainAxisSize: MainAxisSize.min, ++ mainAxisAlignment: MainAxisAlignment.center, ++ crossAxisAlignment: CrossAxisAlignment.center, ++ children: [ ++ // App Logo ++ Image.asset( ++ 'assets/images/logo.gif', ++ height: 64, ++ errorBuilder: (context, error, stackTrace) => const Icon( ++ Icons.map, ++ size: 64, ++ color: AppColor.primaryColor, ++ ), ++ ), ++ const SizedBox(height: 16), ++ const SizedBox( ++ width: 24, ++ height: 24, ++ child: MyCircularProgressIndicator(), ++ ), ++ const SizedBox(height: 16), ++ Text( ++ 'Drawing route on map...'.tr, ++ style: const TextStyle( ++ fontWeight: FontWeight.bold, ++ fontSize: 14, ++ color: AppColor.primaryColor, ++ ), ++ textAlign: TextAlign.center, ++ ), ++ ], ++ ), ++ ), ++ ), ++ barrierDismissible: false, ++ ); ++ ++ // Auto-dismiss after exactly 2 seconds ++ Future.delayed(const Duration(seconds: 2), () { ++ if (Get.isDialogOpen == true) { ++ Get.back(); ++ } ++ }); ++ }); ++ } ++ ++ @override ++ void onInit() async { ++ super.onInit(); ++ await _checkAndRefreshMapStyle(); ++ Get.put(DeepLinkController(), permanent: true); ++ await initilizeGetStorage(); ++ getLocationArea(passengerLocation.latitude, passengerLocation.longitude); ++ unawaited(_stagePricingAndState()); ++ unawaited(_stageNiceToHave()); ++ startMasterTimer(); ++ } ++ ++ @override ++ void onClose() { ++ stopAllTimers(); ++ if (!_timerStreamController.isClosed) { ++ _timerStreamController.close(); ++ } ++ if (!_beginRideStreamController.isClosed) { ++ _beginRideStreamController.close(); ++ } ++ if (!_rideStatusStreamController.isClosed) { ++ _rideStatusStreamController.close(); ++ } ++ if (!timerController.isClosed) { ++ timerController.close(); ++ } ++ super.onClose(); ++ } ++ ++ void clearControllersAndGoHome() { ++ Get.offAll(() => const MapPagePassenger()); ++ } ++ ++ /// Builds a Set of short [Polyline] segments that simulate a dashed line. ++ /// intaleq_maps (MapLibre) doesn't support `patterns`, so we manually ++ /// split the route into dash/gap alternating segments. ++ Set _buildDashedPolylines({ ++ required List points, ++ required double dashLengthMeters, ++ required double gapLengthMeters, ++ required Color color, ++ required int width, ++ required String idPrefix, ++ }) { ++ final Set result = {}; ++ if (points.length < 2) return result; ++ ++ int segmentIndex = 0; ++ bool isDash = true; ++ double remaining = dashLengthMeters; ++ List currentSegment = [points[0]]; ++ ++ for (int i = 0; i < points.length - 1; i++) { ++ final LatLng a = points[i]; ++ final LatLng b = points[i + 1]; ++ double segLen = _haversineDistance(a, b); ++ double covered = 0.0; ++ ++ while (covered < segLen) { ++ double leftInSeg = segLen - covered; ++ if (remaining <= leftInSeg) { ++ // interpolate the endpoint of this dash/gap ++ double fraction = (covered + remaining) / segLen; ++ LatLng interp = LatLng( ++ a.latitude + fraction * (b.latitude - a.latitude), ++ a.longitude + fraction * (b.longitude - a.longitude), ++ ); ++ currentSegment.add(interp); ++ ++ if (isDash && currentSegment.length >= 2) { ++ result.add(Polyline( ++ polylineId: PolylineId('${idPrefix}_seg_$segmentIndex'), ++ points: List.from(currentSegment), ++ color: color, ++ width: width, ++ )); ++ } ++ ++ final double consumed = remaining; ++ segmentIndex++; ++ isDash = !isDash; ++ remaining = isDash ? dashLengthMeters : gapLengthMeters; ++ currentSegment = [interp]; ++ covered += consumed; ++ } else { ++ currentSegment.add(b); ++ covered = segLen; ++ remaining -= leftInSeg; ++ } ++ } ++ } ++ ++ // Flush last dash segment ++ if (isDash && currentSegment.length >= 2) { ++ result.add(Polyline( ++ polylineId: PolylineId('${idPrefix}_seg_$segmentIndex'), ++ points: List.from(currentSegment), ++ color: color, ++ width: width, ++ )); ++ } ++ ++ return result; ++ } ++ ++ /// Haversine distance in meters between two LatLng points. ++ LatLng? _parseLatLng(String? raw) { ++ if (raw == null || raw.trim().isEmpty) return null; ++ final parts = raw.split(','); ++ if (parts.length < 2) return null; ++ final lat = double.tryParse(parts[0].trim()); ++ final lng = double.tryParse(parts[1].trim()); ++ if (lat == null || lng == null) return null; ++ if (lat == 0 && lng == 0) return null; ++ return LatLng(lat, lng); ++ } ++ ++ bool _isHeadingAwayFromRoute({ ++ required double? heading, ++ required double? speed, ++ required int closestRouteIndex, ++ required double distanceFromRouteMeters, ++ }) { ++ if (heading == null || speed == null || speed < 2.5) return false; ++ if (_currentDriverRoutePoints.length < 2) return false; ++ if (distanceFromRouteMeters < 10) return false; ++ ++ int fromIndex = closestRouteIndex; ++ int toIndex = ++ min(closestRouteIndex + 1, _currentDriverRoutePoints.length - 1); ++ if (fromIndex == toIndex && fromIndex > 0) { ++ fromIndex--; ++ } ++ if (fromIndex == toIndex) return false; ++ ++ final double routeBearing = _bearingBetween( ++ _currentDriverRoutePoints[fromIndex], ++ _currentDriverRoutePoints[toIndex], ++ ); ++ final double angleDiff = _angleDifference(heading, routeBearing); ++ return angleDiff > 110; ++ } ++ ++ double _bearingBetween(LatLng a, LatLng b) { ++ final double lat1 = a.latitude * pi / 180; ++ final double lat2 = b.latitude * pi / 180; ++ final double dLng = (b.longitude - a.longitude) * pi / 180; ++ final double y = sin(dLng) * cos(lat2); ++ final double x = cos(lat1) * sin(lat2) - sin(lat1) * cos(lat2) * cos(dLng); ++ return (atan2(y, x) * 180 / pi + 360) % 360; ++ } ++ ++ double _angleDifference(double a, double b) { ++ final double diff = ((a - b + 540) % 360) - 180; ++ return diff.abs(); ++ } ++ ++ double _pathDistanceMeters(List points) { ++ if (points.length < 2) return 0.0; ++ double total = 0.0; ++ for (int i = 0; i < points.length - 1; i++) { ++ total += _haversineDistance(points[i], points[i + 1]); ++ } ++ return total; ++ } ++ ++ double _haversineDistance(LatLng a, LatLng b) { ++ const R = 6371000.0; ++ final dLat = (b.latitude - a.latitude) * pi / 180; ++ final dLng = (b.longitude - a.longitude) * pi / 180; ++ final sinLat = sin(dLat / 2); ++ final sinLng = sin(dLng / 2); ++ final h = sinLat * sinLat + ++ cos(a.latitude * pi / 180) * ++ cos(b.latitude * pi / 180) * ++ sinLng * ++ sinLng; ++ return 2 * R * atan2(pow(h, 0.5).toDouble(), pow(1 - h, 0.5).toDouble()); ++ } ++} diff --git a/siro_admin/.env b/siro_admin/.env deleted file mode 100644 index a6c3df8..0000000 --- a/siro_admin/.env +++ /dev/null @@ -1,118 +0,0 @@ -basicAuthCredentials=wqnmqqsjyvwjv:nqrYJP@1737XrXlBl -basicCompareFaces=zjujluqfpj:nqrYjp@1737XrXlBl -basicCompareFacesURL='https://face-detect-f6924392c4c7.herokuapp.com/compare_faces' -accountSIDTwillo=QFx0qy456juj383n9xuy2194q629q1fj0y7XrXlBl -serverAPI=QQQQobSrrFi:QVQ87xU7zwCvmZzZdaxuS2f23Y4mz7MzyOzr8od2br6KYyeFaTVLG3K3hx5ZaUyx7eYvAYpAVdKk-286NTRi3zs9iSOnXtXRIxswg3KecBmsl3VxJ9wO-vIpwu4Pv7dkHkXniuxMSDgWXrXlBl -mapAPIKEY=AIzaSyCFsWBqvkXzk1Gb-bCGxwqTwJQKIeHjH64 -email=@intaleqapp.com -mapAPIKEYIOS=AIzaSyDzGO9a-1IDMLD2FxhmOO9ONL1gMssFa9g -twilloRecoveryCode=CAU79DHPH1BjE9PUH4ETXTSXZXrXlBl -apiKeyHere=g_WNUb5L-tripz7-F8omHpUmgIzH7ETeH9xZ8RwGG9_G8zX9A -authTokenTwillo=70u98ju0214oxx4q0u74028u021u4qu65XrXlBl -chatGPTkey=zg-4C26q4SYgBKQeHZDqkWowC9XrxgUEfUy9JRw2rm6Q2adb3kjwXrXlBl -transactionCloude=Qhcwuilomqcoib:QVO_JNYED2XWA26YXKC2TP:YK1DVH6SJB31N3PE1UXrXlBl -visionApi=3pALsqSSYTvzp69Q5FMIgbzjG6Z1zktJXrXlBl -chatGPTkeySefer=zg-IiR3i4ooza3Yvhvb9rZk1C9XrxgUE0l8jRRZrHj3Qe5QXPlqVXrXlBl -chatGPTkeySeferNew=zg-Z4oAJcAROgNXjgrEIU8fKC9XrxgUE4Qtrrlq1yiux0jL3dITSXrXlBl -secretKey=zg_ropj_57Iiv6pMFCBFq3C2n6IXlmjykpxDmW93SW3vvXh68UA9T5FORTWgWsT37StKsOPdwDdsy8qR9srMUluahs3nPHvgBa33tGk90vV5XrXlBl -stripe_publishableKe=vg_propj_57Iiv6MFCBFq3C2n6kNJnZByV6nuDtXe9IjEPOfhmpDtWmt3MLR0gQpiHcQmAFMUPrZc3QiCDjxBZLbxDC3efxWxz33bWH1ZgrsXrXlBl -llamaKey=RR-EuyoFDUvfRDBoj46fZKAtKJ3voM8Mt768cPeJV7GNdAkPTKdY8Odm9n4ggGqI5GyoXrXlBl -serverPHP=https://api.sefer.live/sefer -seferAlexandriaServer=https://seferalexandria.site/sefer -seferPaymentServer=https://seferpw.shop/sefer -# seferCairoServer=https://sefer.click/sefer -seferCairoServer=https://server.sefer.live/sefer.click/sefer -seferGizaServer=https://gizasefer.online/sefer -whatappID=3699397362811879 -whatsapp=EAAOtbZBSUK74BOzW9yb74EgApQYtI88nYtE9jQi9QnLGpw3FQpc5dxIlDgVJzcMywEBqNYf3s8pkk6cZB5Q0tkKuSOZBsOvMZA3Tcth0IlBHSaMVtcRZCsaTKNSUpfLRGRb0rhLezNFllpYBgmnfbhUazSZBYXdr40nmN4QEgweK2eqYQnTTNuryTOyBkKZB1MXMw6U7QnTRQDxHbUVlqgIRTrhaooZD -cohere=Aulwd8y5SPWos0hJhlG0toUf8gOhUUrpf5Q2TPmVGXrXlBl -claudeAiAPI=zg-qbc-qvo39l-xWOxIGwWTOzCFBnIYSKKhfyz_KVAvrH-6_4ZEJL68G_QBH26oeTOMMoQug9KuOjjKSP_A4S3SUDlbxR9duVzoQ-MkX_UQQQXrXlBl -payPalClientId=QALymlfNI5Tzt4s-ysoz6vD4_nqX0SUtkC_qYV-Ugk5gaM_8Z-kg4L53k8Uux_4jEWXDkNpXGSWPpIzDFXrXlBl -payPalClientIdLive=QZFkjAoZfGtngNserll6r3cC56Xl1sVLQkn5dMbyebhzJY59EQ3hz7YxaEqEDYPTUFcQWqvePaQ5UJJVRXrXlBl -payPalSecret=JBAAvqJQGUsKD0Zjh4KjeczxfBFx-38SdlbIS56VRM8NDfe6mjMeZJhNLJek5XgQCqKCHtRf6MjRy-f8XrXlBl -payPalSecretLive=JQDATqkknDfiFpEAN60KB4pGpDaJjyqBAd9jxMBPpzWU1P1k3H1jZhQjn73EHsKQna74P8p98hgOnMaWPWXrXlBl -geminiApi=QOmqZsQYm08vlOqjI7klVJfvP4WBFEoemjgy396iXrXlBl -geminiApiMasa=QOmqZsQIpdM4BRsKmaDJOP7dZp5-c6NWfch7PAlQXrXlBl -agoraAppId=71880f2j636o509j24y5294480y30u848XrXlBl -agoraAppCertificate=j17q944u49390jhq758u1649448q2y6xfuXrXlBl -usernamePayMob=37319104052XrXlBl -passwordPayMob='g@nkD2#99k!hD_.wXrXlBl' -integrationIdPayMob=0237630XrXlBl -payMobApikey='MDrGqKEWS1rVqhjggHvEPDvPjJ7vZDBExrO7S3BEBgrlfUwTA3i5RnP5ZnvoL3M2S9rEBgrlNTdexH5pTPf7NJrvy1reZJv1Tn7zf7vTIDywjHg1C7Ley38HTDyNA3v7TPfdxJrax1rwPmPtMJyzqKEYZeghq3MuLUrFH3A1AgHcH15CZ9UaZTLOxnw0BTdzHHrBArisZerUMUUzZ1BnBeEijHvNjYLnS1BUICMhSmPhA15ifHyVqKEMHWyKLbyuIPvcH9UeL3vZyDf=cvcXrXlBlbbbbb' -integrationIdPayMobWallet=0277739XrXlBl -ocpApimSubscriptionKey=0f5dacccdbce4131b1a5f952996302e3 -smsPasswordEgypt="J)Vh=qb/@MXrXlBl" -chatGPTkeySeferNew4=zg-vlie-2l1ZlpximLJ6wQOvbb4TnC9XrxgUEyVQIu6TID4qP4FUUqoS5XrXlBl -anthropicAIkeySeferNew=zg-qbc-qvo39-mn4VdMQ5nuJeIYhMN4PDYr7qox3-t2i1Lh7aNTDfYF-Gf8whUJZCs47EeelKn8_UcmUMmiSLaf0UJg0DvUlQrDt-76CRrkQQXrXlBl -llama3Key=kzg_uTXy3e9DBbCQ1FnMGmxYwTKysx9US1burxJj4fFwOje4LZBUFKJS1XrXlBl -payMobOutClientSecrret='xyjjRlkahJM0Xc38WjApCOh8bvgL9slFpNdM9YeCu9AhLqboKMPtmSvc2N9O4tXxFLV2JAV6stBSTAGFGCVubGe6MNpc7MzJnZ3SiT6GpavBoCLWkUvVbdSDaM0zHvuBOXrXlBl' -payMobOutClient_id='Z05ut48dVkkS2gI2zenFFcKsfDKfHAU0WELqKyJ0LXrXlBl' -payMobOutPassword='D2zJFxkE#LNk3vz38z2dYxpNfWXrXlBl' -payMobOutUserName='zjujl_qvo_fwkjfgjlXrXlBl' -keyOfApp=balsev@7696tabnaazesmeheregzpfjoXrXrBr -initializationVector=qxfyjukwoegrnbivXrXrBr -privateKeyFCM=WZSHwLUNI/wlyLUyIZHYf/pgOo6JZplTQqKK2HJmuSJ+r4Iygz/W+03uFPFS4iLv4AIuZ5+wFBDU9gf240fgjhjJgq1bwiW4TrlTh4YhEtHjiPTBCielwIcYFrhrlD4xLTHQC8feSZuZ4t3wZISRfqjuIyu58yhG5H64RifbD5efjzE6KJCivhIpXcK5k1t32lMnlLKzPkSqW2znCXYhRNOQEL+sAllmQNpHVy7LAgr829Jl5AoEuHmYeeCLOIzV5oMdHpQGDDAaG+bo9Yda4n3S1NXNAwU3h8uWsXaAHS1mkgb49+gTJQLfhrxdj2jOHB2HaUA7IyypVXTDuEZzYrYs/+yK2HvmFld/Fqt7ndWqenfl4Qu6+r/JUEHhaGMFNkiChvtVHjLHDOBw7Zrtm5kDzwrvybCVZSrZAwJvudT7eZjRlYrdm2s+v5Q4wVayBslBW02KT/VrXJsuPJKtI7l2jHzIV6M0vmMXU8rlah2gSVl9ZX8mLxcQm7iWbLyWX0S4hixngw3N+j7wltAxYodfkCdJj0BdeH0ZCCKlbANs+lQf5hIzjkC7RcSc2xRnMn1mcyqUlK0BiniSgBSixD3JdpG8UTEYU5nfTVdgsx+fcvje5Dloo6zblKbIVje8vh5MSFjM2yr4nOpbQu95vOW/jSYUjm2WGppCmpBVyWYglp4AlnwDNFL01p3jq+1YixPTZjnp4Bm4XGiGIUnmjBeC18CQ53rg+aWvE7UlOMsoirgU1Y+tAxzbx74xtYfgNjavyD+GtUWkOZPtKSTeR+0uBrfTehFK24QypP5OT3dRbAwRVneySDJOpcQA9xReYpJgoW29GzNLNNoEW+65HIqYQ7WkVj0Z16YOma/WhR4MSHWpOmqxVAYOsGpZw9QnSrY/CFN8uKhYPC4RGONHmk5CP0rTNA0syrBS0XPFsJ8vhgJmB2wjUs46IDX5tFreS7q4axsOSxZMWSQlRHcxSdwFVAepBIfoGWHSUmE0sxpsz+ewCdYtZrWYE0jwEqiTiKR1M4hpn9P1mI0CHri6uRUY2Im86kuEGA5GE9U287rOubVCfC+IxU4vOnNi05fN4lJutdXjweHN7L1ZJ4H0AsFfs8Q3HSHKbn5MTJUlF2rlhNomMlLJnRrDzYiSJ6wIbBXzT8h23WXPMNrTkbh8WkPugEPrp0LTyJI2wurEhhPIlqJwFcpjVVsDmFKmTqMegJsj9C8kHixQ/kyT0AtQ3qTVxgHP/9nxyuglVzdezqlB09yOjVnq/xU+nnTx2RX90Lpf192D23rSvtvfG4LAs2vloKljKG0yIGntFJbikCsv1bQfXwa4cXb6niks4v7irCjLzEtyIDzjYaaSJc0gs69tyumG0bc7AjJa4AvrDtFchN2m9PXGFoOHC0eDMqfANc2VztcYlFEMH0Fp/VsIuiTOSI9Tsb8wjRlrew13EqWUXN48srVHaFfyXUCbSpeelnqCe21EwGOpfgqgUcu/5WdtYH+e7F0Z3xtV6lZNqV7mWYuyyf9C9PviFh0ZECKXivg6vrP4pqDSvuu79ZkR0aTf43NPvGRIIR6Hbjt+Msi3CKsRlLrN8sslxFfB4ZYpQcGmDxTd0vvnarfu0ezz5GU4AXA3Eb4rYdaoB3MRxvbRF/2NMdqb+M5iPTVgRZ7vmDsIogu4O4kgpYNjPE2B66Qz/CbRI6CYFAnF3usKjnNl9k5bFL8d6x+EOZaXm2bZhML5K//tB2TsGl5Bw7sNggC56KqOEOg6WnDIoy4NzzImd8IEamuZdkiaaRl8+/P3Mz+b325kZzAj2e/5feXoup8V/H4edIsIGeIjHNuU+otJ8LQ9EnMFGaZfkiboH7feG1W/n8sZAlusmwcpeISNbskCmQKO44oI8G0WWBpLNo4/5NN1V4XuPGVoIhxQSObLDBHoRttmMNHp3dWv+R9SMxOuswXZYsLUJD5vLD3i9ZzBuLrBdiKgFk7rVFvTrz1CIiBDKeFtvMiEfEtSSQkI5nnh1dHSxRRBrmGa/UME/dCdRGlvTZuHGnq+PgJFlhC3oYLBhOJcw65asHKm94tgLeGeWZ9UytEfuvuL2gIAUUql0sLjgnWBoz84XCkNVMP2fB0Ci6NAbRfE1zJh8PVHezFvvEOl8KvVkLqFtzRqgTvkLV/cjG8bvJsTaHklejY14iv+pG0gYZ4Gkia5jvSzGa3IZEqhOG5hXmEBLcBcfp7ApQ5Ezopt9EJVm4+kRW5nWB6YPiqbzfz8Ab7/uV6GIWSJoG7f0kW1keUtL9SS2n2OxG3S0XWJrYoN9udVviFdl5GqDqTfc4odY9v4fdV3bMgU009S9y6dNRhi3RUTaNIcZHAVbEL0VXzXOi/r4ICjMFXvWVF8xY8RdJPedu9HIbCTq+TPzOgpHoANzm8Rjm2i6J5TLUfqdS7NIHig8M5lni80PlOlnmgvjf5s6PwatrbN6QKMxk8bg6LoI2yGy5ICJ5dncvcR/GgTxHEpz3aknTdMqJMfyST7CmIpTOULEO4zmiKrWYvvlEmaax7j1fJoz4Y1Z29Zm7+mG9lGrCUnsU9CZoAr/d+flJnSWwdwhL/RXhu+pbkdu2gTmg9ar4mwoGYp9GoaefgCIupiL4T3JekNS/MvmZFbiGxl4TVVobj5MsYHawLs5C9AdzjEuK6ktqAr0o1ycBwfj66kuqSnU7KQedmlDs3XmlAqdGk6V2BEs7/b+bfuUJw1FcYf9MVXMQnN1pbDKJVtb+Zrf+AYQ9etUPpsoDxom2NJRgjjdsLkLIPxEZ6HJRAEcnHx49ER+zbdL+7MKolBRzlW4mZHLYkscfx7bqWZsH5PtjDp9Ed1xbHpmwFbv7XV2mYfST6Nu8dLYk/6wkyZybv8hNe1Wj/4o+iMRnOsCUasT9GKF2ezoej1RPzN3GjqR0gfrndn40fXFn4E2n8HP8SKeChiNf++HEzbzd9a7djXE3Xon8/baEaTUBKZUoIZ9OFypU+Ueo0CJpI9CzEipfXp3lGImVhsdQJ2AwRnY6HkXS74sd840HyYzDGL0B8mVvgQwYJQyC+xHRmNUFO9ugmhOmXQjVnkST9XqJpm/vwTAY28C/Al1iKmMjFqWBBNkyRJd6lTus87niZr+tpzBPLW6PZDaAcS5aTPS/dv01W5gLeEhA== -sss_pass=wqnmqqsjyvwv:nqrmYJP@17378XrXlBl -sss_encryptionSalt=zg-vklie-2l1ZlpxiLJ6wQOvbb4TnC9XrxgUEyVQIu6TID4qP4FUUqoS5XrXlBl -addd=BlBlNl -getLocationAreaLinks =https://api.tripz-egypt.com/tripz/ride/location/get_location_area_links.php -anthropicAIkeySeferNewHamzaayedpython=zg-qbc-qvo39-vCB-WnzEwFNArO0YlTapvfhtmguKWsXJSKqg_NZSjHBYVXMZK1yUK88SobdckV0KuPaBh0c_WHtGsRO_439PBk-e2QqgkQQXrXlBl -emailService=seferservice@gmail.com -allowed=TripzDriver: -allowedWallet=TripzWallet: -passnpassenger=hbgbitbXrXrBr -ALLOWED_ADMIN_PHONES=963992952235,962790849027,962787021927,963942542053,962772735902,971529155811 -newId=new -a=q -b=x -c=f -d=y -e=j -f=u -g=k -h=w -i=o -j=e -k=g -l=r -m=n -n=b -o=i -p=v -q=a -r=l -s=z -t=c -u=h -v=p -w=t -x=d -y=s -z=m - -A=Q -B=X -C=F -D=Y -E=J -F=U -G=K -H=W -I=O -J=E -K=G -L=R -M=N -N=B -O=I -P=V -Q=A -R=L -S=Z -T=C -U=H -V=P -W=T -X=D -Y=S -Z=M \ No newline at end of file diff --git a/siro_admin/.gitignore b/siro_admin/.gitignore index 3820a95..aa09d9b 100644 --- a/siro_admin/.gitignore +++ b/siro_admin/.gitignore @@ -43,3 +43,8 @@ app.*.map.json /android/app/debug /android/app/profile /android/app/release + +# Sensitive keys & environment files +key.properties +*.env +**/lib/env/env.g.dart diff --git a/siro_admin/lib/env/env.g.dart b/siro_admin/lib/env/env.g.dart deleted file mode 100644 index e5386f1..0000000 --- a/siro_admin/lib/env/env.g.dart +++ /dev/null @@ -1,13886 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'env.dart'; - -// ************************************************************************** -// EnviedGenerator -// ************************************************************************** - -// coverage:ignore-file -// ignore_for_file: type=lint -// generated_from: .env -final class _Env { - static const List _enviedkeyaddd = [ - 3639547328, - 3604945773, - 2122401710, - 2462070888, - 3591682056, - 1606802798, - ]; - - static const List _envieddataaddd = [ - 3639547266, - 3604945665, - 2122401772, - 2462070788, - 3591682118, - 1606802690, - ]; - - static final String addd = String.fromCharCodes(List.generate( - _envieddataaddd.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataaddd[i] ^ _enviedkeyaddd[i])); - - static const List _enviedkeyinitializationVector = [ - 2362868231, - 3613761660, - 3594254486, - 1193890640, - 3944692661, - 863159804, - 1982782648, - 3829180114, - 522678821, - 3766715662, - 4228228860, - 2956824767, - 840560948, - 1048683886, - 1537273655, - 1701876547, - 2800059058, - 2207745156, - 707752800, - 1535776780, - 1594371041, - 3473870700, - ]; - - static const List _envieddatainitializationVector = [ - 2362868342, - 3613761540, - 3594254576, - 1193890601, - 3944692703, - 863159689, - 1982782675, - 3829180069, - 522678858, - 3766715755, - 4228228763, - 2956824781, - 840560986, - 1048683788, - 1537273694, - 1701876533, - 2800059114, - 2207745270, - 707752760, - 1535776894, - 1594370979, - 3473870622, - ]; - - static final String initializationVector = String.fromCharCodes( - List.generate( - _envieddatainitializationVector.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatainitializationVector[i] ^ - _enviedkeyinitializationVector[i])); - - static const List _enviedkeyALLOWED_ADMIN_PHONES = [ - 3735938135, - 3983484378, - 2502056804, - 2665605909, - 468841969, - 3723387112, - 1378951267, - 3922122207, - 667061045, - 1177725799, - 3626906473, - 417965022, - 1501544317, - 1858813860, - 1393709298, - 3841290890, - 3191431969, - 2291175516, - 2672947242, - 118052153, - 395536353, - 1571191371, - 3342462709, - 2981072207, - 4167802749, - 3805913403, - 25587435, - 1429976250, - 4288281717, - 3946439750, - 371893742, - 3644971775, - 3414035311, - 1870619756, - 569654986, - 4151565873, - 2208735762, - 1083551360, - 4165784648, - 3267065951, - 2983122076, - 2784431973, - 3356321984, - 3785740634, - 2853492539, - 1849298139, - 4189328812, - 714499737, - 445699347, - 2876754013, - 3758072007, - 3491758359, - 3655362824, - 2585374409, - 520229163, - 815042461, - 1987285706, - 3267529110, - 4037806034, - 2524326630, - 1967302585, - 3111918401, - 1625888435, - 2984124586, - 1049721354, - 210804317, - 3960657690, - 3292182210, - 2883285292, - 4252517104, - 2967098557, - 3897435563, - 4075896716, - 3658708715, - 3373310029, - 3897326883, - 2232709252, - ]; - - static const List _envieddataALLOWED_ADMIN_PHONES = [ - 3735938158, - 3983484396, - 2502056791, - 2665605932, - 468841928, - 3723387098, - 1378951258, - 3922122218, - 667060999, - 1177725781, - 3626906458, - 417965035, - 1501544273, - 1858813853, - 1393709252, - 3841290936, - 3191431958, - 2291175525, - 2672947226, - 118052097, - 395536341, - 1571191410, - 3342462661, - 2981072253, - 4167802698, - 3805913367, - 25587410, - 1429976204, - 4288281671, - 3946439793, - 371893718, - 3644971720, - 3414035295, - 1870619742, - 569655035, - 4151565832, - 2208735776, - 1083551415, - 4165784676, - 3267065958, - 2983122090, - 2784431958, - 3356322041, - 3785740654, - 2853492489, - 1849298158, - 4189328792, - 714499755, - 445699363, - 2876754024, - 3758072052, - 3491758395, - 3655362865, - 2585374463, - 520229145, - 815042474, - 1987285757, - 3267529124, - 4037806053, - 2524326613, - 1967302540, - 3111918456, - 1625888387, - 2984124568, - 1049721382, - 210804324, - 3960657709, - 3292182259, - 2883285273, - 4252517058, - 2967098500, - 3897435546, - 4075896761, - 3658708702, - 3373310069, - 3897326866, - 2232709301, - ]; - - static final String ALLOWED_ADMIN_PHONES = String.fromCharCodes( - List.generate( - _envieddataALLOWED_ADMIN_PHONES.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataALLOWED_ADMIN_PHONES[i] ^ - _enviedkeyALLOWED_ADMIN_PHONES[i])); - - static const List _enviedkeyprivateKeyFCM = [ - 1133569861, - 2631336878, - 782153632, - 3201336902, - 631837952, - 2983168461, - 2488817414, - 138437677, - 924063199, - 3540607729, - 2070108395, - 2167491381, - 434036476, - 1432021185, - 4144709208, - 94957733, - 679660153, - 3468280030, - 307374396, - 1973917614, - 1347149425, - 2963091380, - 2396741114, - 2817505428, - 4202675606, - 1406883659, - 2190498116, - 3329056432, - 1323004755, - 4248062020, - 3737353370, - 1429733983, - 3668953609, - 689400931, - 3502322733, - 2315400353, - 124038168, - 4194882108, - 1999808299, - 1707724489, - 3439846153, - 2075405552, - 2785861829, - 3569473982, - 719832864, - 2072039208, - 2590617166, - 2107349762, - 3957510575, - 1162496764, - 2962114505, - 1300460645, - 240394541, - 3044154837, - 1183866882, - 21608530, - 3414611900, - 907026076, - 2466175683, - 4104339034, - 56647811, - 3490584428, - 585253290, - 1773541519, - 3763318258, - 1034154581, - 916870818, - 3104025930, - 3187985713, - 3347377442, - 381142488, - 1606802673, - 3262608688, - 437353484, - 1578303889, - 149421296, - 3608042017, - 3361863123, - 1837541265, - 3716700516, - 3596562113, - 3885056969, - 696365646, - 888073150, - 170835444, - 2643784874, - 3048307244, - 2677804177, - 2293018754, - 205837962, - 1819491680, - 1388816286, - 690842338, - 696985779, - 749153595, - 941841807, - 3662725343, - 385753401, - 1568503017, - 801506070, - 755000588, - 1272570947, - 3901600844, - 1238393689, - 3281418721, - 402614831, - 2874449435, - 1720402571, - 644537186, - 3787686263, - 400335132, - 4149775985, - 651382867, - 1659014845, - 3314643250, - 4038224847, - 86756982, - 2724725795, - 2307744074, - 1006463809, - 2647955156, - 797104864, - 2977598600, - 2606919403, - 895351011, - 1137660579, - 3030760962, - 1376428480, - 4261854716, - 307433750, - 4046778369, - 3221461974, - 2437346913, - 853871860, - 3451972203, - 2428265377, - 3139192743, - 699417121, - 2546447415, - 3646938900, - 321779133, - 4132651889, - 3150897467, - 3322784952, - 3321636334, - 3809206748, - 887152366, - 2725284811, - 3118585773, - 2302426343, - 2923495170, - 808817138, - 2122448850, - 4288522695, - 694121430, - 666217562, - 3456731245, - 2945634787, - 4286515422, - 2584304587, - 196624664, - 2923573934, - 495440833, - 4230033715, - 2919325867, - 1637322538, - 2441024399, - 2066037195, - 1429637805, - 3454747749, - 2992198813, - 2316066249, - 2059728876, - 1641836343, - 3372473717, - 2281518438, - 2027233573, - 2084138463, - 3906451211, - 1822877348, - 1411675113, - 892586474, - 2691798255, - 4171111378, - 1618388892, - 3628305835, - 2112352703, - 2769352428, - 3328390363, - 3547862795, - 1951111245, - 1752301420, - 3950840413, - 3733917162, - 3483625891, - 3961284589, - 1053919361, - 2364245161, - 1762251231, - 2577990521, - 3062140881, - 76894006, - 3323006640, - 3566856329, - 321653386, - 1222582341, - 3906125557, - 3207183368, - 3711704945, - 2803585006, - 1579690602, - 1561335837, - 248277811, - 1511629644, - 4225595823, - 2048236877, - 871098161, - 922796299, - 3165496228, - 2188132616, - 3314920527, - 3899363545, - 1939636581, - 111225829, - 577925552, - 484552429, - 1960109918, - 2716368548, - 3176433050, - 3601674852, - 373094431, - 2397954284, - 507596265, - 3453886844, - 1584313311, - 4078107846, - 3760649765, - 3169407464, - 2241899375, - 2176340713, - 2075366135, - 2166317154, - 2776336562, - 2892757776, - 4053008249, - 606525909, - 3377027328, - 2926964734, - 3454311800, - 3183173859, - 2486185933, - 4254240230, - 657283525, - 1197887020, - 2566237529, - 3361480729, - 3303665481, - 2777540161, - 3481688656, - 530972315, - 1141952260, - 2353730578, - 1567130567, - 1774672774, - 2759099133, - 1145398618, - 1784341895, - 2877327789, - 2283701774, - 2329358478, - 3749851982, - 889304613, - 1407703919, - 9934745, - 1632474055, - 1128381742, - 4157149222, - 901339165, - 1997833028, - 3348345862, - 918882200, - 389368392, - 1785766030, - 1011183425, - 4172425641, - 2970446214, - 3427424722, - 4065890984, - 279599603, - 3540241583, - 2107657045, - 374833093, - 2808540459, - 1133677443, - 3450784415, - 505192918, - 2761197512, - 1878885764, - 2093190413, - 365593111, - 1267461888, - 263440731, - 242490921, - 3436981670, - 70931106, - 4263682805, - 4108319982, - 3082011976, - 3638304801, - 547834987, - 1389281340, - 1165726954, - 3532323510, - 3738090780, - 2792799813, - 895056376, - 1766733245, - 2756468658, - 549127955, - 3658594335, - 3100293428, - 2189838935, - 4240567890, - 1320408354, - 1775420312, - 3106963550, - 2404621187, - 551952344, - 3979317860, - 1851160549, - 3178850306, - 2371135928, - 199118558, - 744433864, - 4252019171, - 827710697, - 3649106148, - 3901895857, - 876060027, - 117735217, - 444923369, - 3958565026, - 3825503616, - 1196211577, - 3964911068, - 1134815533, - 2104701277, - 2438251647, - 2077693689, - 1504095835, - 2972422661, - 1154532591, - 4124853811, - 2246290968, - 2099240424, - 2876187390, - 2798467629, - 1421449888, - 597729286, - 457387489, - 1499153086, - 1356594391, - 342601730, - 2132311059, - 791338823, - 883040089, - 11072842, - 1547956814, - 1127479410, - 1382813745, - 3083564782, - 57757933, - 1401265901, - 2223697359, - 4278517488, - 1442793572, - 1895302586, - 4037320066, - 1850828558, - 2690015012, - 1241674724, - 3116064231, - 845564284, - 25946255, - 4215149116, - 495055099, - 1672810856, - 1204097683, - 3789428282, - 3105344471, - 694575177, - 3452289136, - 1029896650, - 3360023878, - 164477778, - 4194287977, - 3710042738, - 3439994604, - 3530844732, - 3464877910, - 250768676, - 2766091923, - 1692725460, - 3990760111, - 2500143420, - 2288225360, - 1120586667, - 563203221, - 3827538083, - 960944785, - 187284559, - 1096897051, - 1599201569, - 366218183, - 327599743, - 552809433, - 922286152, - 1335459361, - 2540585017, - 583506026, - 2326404622, - 1027286907, - 3070665969, - 4015090822, - 3982905225, - 410023694, - 3395195240, - 1554582003, - 697806544, - 2638679054, - 4147142389, - 1346305553, - 3207189746, - 2321219320, - 3015285020, - 3277202443, - 1000205120, - 992239189, - 3971910935, - 266289801, - 3185455376, - 4205129433, - 2741042716, - 2288302182, - 2924512860, - 3159675473, - 2649659344, - 1431390315, - 3351345691, - 1985322899, - 2504948082, - 471514768, - 3592582188, - 590265372, - 1231874856, - 1822441545, - 3449101578, - 2881651809, - 1492681265, - 2787205964, - 3976134151, - 3773098695, - 2394435645, - 1109809125, - 4231449935, - 864895676, - 4110130427, - 3618915408, - 196919553, - 346361940, - 3415490747, - 405335608, - 2276418656, - 1980412698, - 2625528959, - 2125893390, - 3628088945, - 3876730320, - 4116584122, - 320861233, - 2570392315, - 2756479778, - 4260304638, - 3722879874, - 3046178060, - 1720565074, - 2770560359, - 912014247, - 1154114722, - 2398392697, - 1783089126, - 1546460693, - 204668283, - 3121352792, - 3639528845, - 2152218359, - 1312788810, - 568247798, - 124319166, - 493021345, - 1547026962, - 2251559632, - 133996748, - 2144224585, - 773611792, - 3955830954, - 410084503, - 4066825166, - 2042725973, - 1466951922, - 1930121934, - 3751731583, - 361596211, - 2154918619, - 1958735028, - 4253100770, - 1798276894, - 796014125, - 3181768284, - 2472538625, - 3746473395, - 3164354617, - 3774315671, - 2820211049, - 268279305, - 2116129449, - 101727936, - 3223098426, - 4163090882, - 1977979211, - 2069783619, - 3630469021, - 2808477081, - 2394277830, - 4273755936, - 3873756994, - 667433975, - 3543325367, - 948678910, - 3523633187, - 1065600406, - 3800848741, - 1630971465, - 2177742386, - 2169259565, - 2527662988, - 4265041234, - 1500582561, - 3783705696, - 1219124428, - 3964508217, - 1843670546, - 3654084756, - 171050360, - 664491242, - 4182800760, - 194504482, - 2724588151, - 803791207, - 2335734629, - 932536954, - 351277826, - 1745733698, - 808433890, - 3277785720, - 2268331000, - 4176006785, - 2783846944, - 2846749061, - 341760371, - 850652957, - 610136542, - 2125879925, - 1340989414, - 287096459, - 1590747309, - 2427885451, - 751554186, - 2647150186, - 4237391446, - 3763136313, - 3877298003, - 3014249088, - 3382389926, - 1631535685, - 3892604528, - 113578899, - 3571572828, - 3302253936, - 3064374549, - 3206349864, - 2304578579, - 1103680231, - 4182756619, - 353717522, - 946679590, - 112641226, - 2779609073, - 1652604443, - 4080136425, - 3861737353, - 3360215362, - 2959948846, - 3936470531, - 496941515, - 3375407516, - 3321262667, - 2335640285, - 3420603744, - 2677533980, - 3790770659, - 2069993412, - 2151268909, - 2625185327, - 1011602061, - 3094312259, - 2220111798, - 2329340907, - 3911596573, - 3635139597, - 4146685830, - 3763946467, - 3210305447, - 3929977614, - 4213604714, - 1070862604, - 3587716369, - 2324660711, - 1605219041, - 2500305989, - 3259861265, - 500582470, - 645426666, - 1542921866, - 1183594901, - 1566358777, - 1552607413, - 2615143441, - 843226814, - 571961800, - 2857771574, - 465828970, - 601724430, - 3630549817, - 4084906952, - 2289304527, - 2558936247, - 3620204471, - 800809787, - 3744817556, - 2527129768, - 478466184, - 2168202326, - 2362424043, - 4052881586, - 3740065985, - 230857130, - 2241446618, - 1087691895, - 3587787557, - 2274741308, - 3417159623, - 4195474105, - 3893812568, - 3619955078, - 1578592705, - 2342460548, - 1683392078, - 2424908660, - 1447503745, - 1685376648, - 3466313082, - 1339474830, - 831909307, - 4010134187, - 4003025695, - 3647011103, - 3782079027, - 1160932240, - 3494656117, - 1611197802, - 3567142312, - 2890077562, - 1602408714, - 472657297, - 494625495, - 106509046, - 3347756256, - 3240199890, - 1273640400, - 26328659, - 2157031379, - 694426882, - 2082449845, - 774225448, - 688955111, - 4171164651, - 3058172874, - 61808759, - 1890125294, - 3204378621, - 4036249412, - 1905152169, - 759081607, - 2643053294, - 2246357200, - 3577076693, - 3576965660, - 750521532, - 1446725730, - 883595268, - 1475256966, - 2754936968, - 2532626023, - 3976380384, - 4115602181, - 724209976, - 2743069868, - 2983502064, - 1884538091, - 3328099115, - 1306827026, - 1015926185, - 114388389, - 4148184582, - 3881534154, - 2154958112, - 2450264130, - 3423207432, - 3639858265, - 3685208575, - 2223382220, - 4143454651, - 3912117573, - 467726856, - 3747956614, - 1746667826, - 3642126639, - 2068865283, - 537066502, - 2219668398, - 3421188369, - 648060539, - 3174434539, - 1127238559, - 1260696570, - 1992801776, - 34669648, - 17786083, - 4172341182, - 2469189081, - 457767094, - 3315289129, - 628490177, - 1850498949, - 4132167689, - 1156111078, - 2607661973, - 3405842724, - 2122074618, - 2366415263, - 1017403904, - 703133706, - 1760782699, - 3950005746, - 2807076851, - 1892815493, - 4156622339, - 2949253480, - 1178452343, - 2923127021, - 2587988428, - 3219952967, - 3779832106, - 14674864, - 1178460628, - 430504797, - 1826964531, - 1641653160, - 1317393430, - 4018237409, - 2188499764, - 777463477, - 3341084647, - 1785473, - 1713958817, - 614600943, - 3882370691, - 3128770783, - 1747566540, - 3560074175, - 1039036639, - 812324281, - 1619256219, - 2502372977, - 3670497790, - 3042560186, - 1123065506, - 2583224593, - 2948298476, - 3021771220, - 1862104365, - 3597646031, - 3599995142, - 4030691110, - 2123585285, - 1992908341, - 733281288, - 3813398125, - 1870147575, - 3504460331, - 1736758862, - 3156067818, - 2750377685, - 2363934059, - 3310351310, - 3940047939, - 1578662503, - 294427273, - 806089294, - 3920958925, - 3896806913, - 1772829750, - 2344489042, - 1265846348, - 475622136, - 662357139, - 165396475, - 2749199175, - 2183375711, - 3937428306, - 803615728, - 509709769, - 3873466926, - 2172599902, - 527606578, - 40303553, - 2699653290, - 38353546, - 1822726436, - 3768380641, - 1927148863, - 1213421154, - 3186182600, - 1913248570, - 511826924, - 3822177471, - 2419777522, - 1875814791, - 817855974, - 63454356, - 3947190794, - 2325675557, - 3285547154, - 3102442928, - 1841049208, - 1444547977, - 419067849, - 1590144695, - 265849933, - 1789005293, - 1424217182, - 1030839968, - 4257727578, - 3034123782, - 1007958822, - 2610961415, - 2970216120, - 3058962717, - 3615507348, - 48179697, - 3002918546, - 3441672934, - 566382837, - 110545911, - 812350987, - 1870470422, - 1245308854, - 323897161, - 2936813890, - 2674566443, - 219377895, - 1086446979, - 1786499149, - 144398345, - 654537929, - 2395886380, - 1593335389, - 2828518475, - 3459698537, - 1787827162, - 3810757740, - 2425988724, - 4178554753, - 1418362991, - 2480692275, - 2288666395, - 3459457223, - 1653714464, - 3731039555, - 865008166, - 2292709319, - 3261752425, - 2470550971, - 1107107438, - 3714430210, - 1121490436, - 293329602, - 2146244605, - 3054248248, - 2798515481, - 2715429072, - 4123553916, - 2453465842, - 4180585184, - 311332054, - 3282685475, - 4196003183, - 143646618, - 2050741420, - 1130798427, - 2188270850, - 4182413865, - 3889327424, - 717038200, - 1009152937, - 1280770314, - 4264392438, - 605672675, - 2896879432, - 957372392, - 1032615488, - 2621739278, - 199467483, - 4230448746, - 3549149555, - 521016138, - 2846462485, - 274724402, - 2227908930, - 2967834491, - 3726412176, - 579648251, - 1013096723, - 3301766709, - 2500389133, - 4006393540, - 4012932388, - 698395652, - 2204303095, - 3219551077, - 573519650, - 1909653846, - 4023286709, - 123080637, - 3736361396, - 3419621647, - 2826723183, - 814724082, - 1073700179, - 2563994063, - 1474276044, - 3921991874, - 122646162, - 2077323014, - 1103992956, - 2139345490, - 3853409110, - 2154581931, - 1243065267, - 500043562, - 1292680936, - 872953662, - 516336047, - 2294151816, - 4067812227, - 1088621338, - 121581226, - 1270078291, - 995339050, - 2544655218, - 4275700282, - 2370560230, - 3170631092, - 4147771399, - 1641718137, - 395411316, - 3433033355, - 1661882323, - 3987552376, - 3985644864, - 2936838944, - 438444009, - 697124692, - 2325803091, - 2273501883, - 533683780, - 13177462, - 747666779, - 3544100246, - 3873810869, - 3732873649, - 1481766347, - 1348019810, - 38996467, - 1620496508, - 2700206985, - 1957448167, - 3321330398, - 3403978183, - 2542259279, - 1244737682, - 106824734, - 2889180192, - 2782979491, - 2208137029, - 1135795692, - 3243972639, - 1477336891, - 275111510, - 1786613380, - 1659228641, - 2054362147, - 196128659, - 816620318, - 4083877296, - 3716624455, - 1336671579, - 2764677258, - 801329804, - 3366317922, - 1011799852, - 3574425990, - 252138862, - 2894646204, - 2921304524, - 2462859333, - 229342323, - 3046504195, - 1508719358, - 665505174, - 2469489928, - 263479122, - 3365977587, - 4261148481, - 3654190026, - 3936839214, - 3988208864, - 3988430575, - 1451897393, - 3965115073, - 3686032844, - 3415467986, - 4020497039, - 1210122981, - 2111071161, - 2570070402, - 3947896005, - 1503190038, - 3504941178, - 2530459290, - 1800983033, - 924077923, - 41849044, - 1222720690, - 3158856279, - 1788061356, - 3691114006, - 1027122576, - 3321318183, - 3555481304, - 3531688759, - 214117354, - 1346508230, - 662442319, - 3812607766, - 2052640697, - 1608986287, - 3290855551, - 1643300988, - 1991073084, - 3768055435, - 868909615, - 1931155292, - 2551164463, - 683039949, - 2130756541, - 872271052, - 742932555, - 3602591999, - 3939291231, - 3967503725, - 88820413, - 4228851038, - 3346700824, - 718168795, - 1679949945, - 1011812910, - 4131325877, - 2366209749, - 1256096480, - 4274545458, - 88884764, - 857900399, - 614948171, - 1354041529, - 3050802805, - 446338994, - 1992706190, - 1701237523, - 1504018483, - 1341283007, - 190528434, - 4201618879, - 427878121, - 3521422876, - 3171400211, - 2453520335, - 2715250006, - 2878017940, - 407841248, - 1076646473, - 2902096371, - 1119626292, - 2644871628, - 3293596912, - 1974815981, - 1844661658, - 3463913199, - 2148341356, - 1291573129, - 2169246774, - 4121523571, - 1001828332, - 1201094370, - 2768247760, - 1187741609, - 2584658511, - 3298403860, - 19508848, - 2376541090, - 1834240020, - 2795223449, - 1569675949, - 2083566175, - 197356987, - 2187510641, - 735841287, - 1676166370, - 1470742301, - 1775423233, - 313697778, - 4150418127, - 1340236397, - 244289640, - 2419636179, - 1468768426, - 3948651692, - 4190434742, - 4240184606, - 1648085376, - 236983302, - 890850159, - 4132623352, - 1702226389, - 1275783591, - 1282324080, - 1068123143, - 2507371542, - 3567002196, - 2326254609, - 903986714, - 4275863676, - 681934685, - 3449788131, - 3658543841, - 3971267199, - 906890718, - 3220537935, - 3721238507, - 3424824871, - 4071298409, - 2350348109, - 851103759, - 308738713, - 3633342221, - 3294051521, - 60850191, - 4205293793, - 112318405, - 2392678001, - 4245426678, - 2813800834, - 544585601, - 862804006, - 635702554, - 1037318155, - 3062389050, - 1788723177, - 909046233, - 2633211423, - 1512124241, - 219688759, - 208669461, - 2341111368, - 1558771255, - 3962134562, - 3793702001, - 3678482635, - 3083064327, - 2224088978, - 121834241, - 3974743012, - 3285910810, - 2301078604, - 3991408963, - 1754131096, - 1115088084, - 742363327, - 1940874780, - 3815841784, - 3751295090, - 2438487767, - 505244835, - 2737497806, - 3686088508, - 3642212743, - 745390046, - 1171532585, - 1037089278, - 1222170202, - 3339498824, - 2420183829, - 1812185947, - 1685491936, - 2054045418, - 2916731872, - 625306470, - 2885097492, - 1531527709, - 881885921, - 4123938006, - 1223959919, - 2997456306, - 986868988, - 3499204297, - 2002259562, - 702456339, - 2180569369, - 573224295, - 3359535526, - 2265103784, - 4007182087, - 1269646626, - 3540842803, - 796051949, - 938241824, - 2538303668, - 2742240836, - 143742622, - 1113882340, - 2339965923, - 3861371050, - 1940827655, - 373043328, - 290172225, - 3309138253, - 2228544140, - 2697368471, - 314268289, - 3275936664, - 1292638624, - 3619702518, - 4134658547, - 460321722, - 3287938525, - 1056154816, - 176670928, - 21652761, - 1897619159, - 1048386769, - 3446694257, - 759789818, - 114313737, - 2656037254, - 3619510905, - 4025392287, - 2133557404, - 701572259, - 1063247232, - 2433408365, - 1329294200, - 3455774275, - 1060649066, - 372371712, - 54151955, - 4157273347, - 1028934354, - 1059536099, - 3705266405, - 2249471159, - 3723179480, - 1685144388, - 3532165340, - 426031484, - 3992264923, - 3558187790, - 789327435, - 113797040, - 3197466334, - 1846132324, - 3662284891, - 373999464, - 3527638615, - 3168581028, - 1873953465, - 1547610536, - 4188855756, - 3909799158, - 2439098621, - 1366914310, - 2552185808, - 3438947932, - 164270865, - 367726794, - 464460335, - 3684470355, - 2811443539, - 2800117708, - 577716947, - 2360729156, - 3199339255, - 2042468055, - 322152159, - 350449120, - 1338453446, - 2169901454, - 1137834952, - 1224674633, - 819627284, - 866288235, - 3684373329, - 2802084515, - 883000174, - 2124730087, - 1794186586, - 1843025586, - 1107572822, - 1553821135, - 2255976869, - 2971962377, - 1294016499, - 2779781987, - 1121528448, - 2599103176, - 52551025, - 1715784134, - 172080132, - 2909339926, - 2925801155, - 2758545856, - 2591511611, - 2537649007, - 3218650284, - 3620977964, - 2091529962, - 1908561698, - 4140639129, - 1468559223, - 3031446487, - 1538303396, - 3024701952, - 931817408, - 3315385342, - 530706375, - 776942776, - 1066889725, - 860858484, - 1380983184, - 3488107159, - 2352861314, - 768524800, - 3324839858, - 2985439478, - 2632570243, - 1269085623, - 591371703, - 3614267960, - 3634334422, - 494364802, - 2201954755, - 1822851462, - 912761235, - 3560975604, - 2823473984, - 2726516714, - 3900329550, - 3046312437, - 3202027504, - 3749404375, - 4111460380, - 3394432115, - 845091950, - 3547437680, - 2438586161, - 891753793, - 2658014682, - 3263079018, - 3181132990, - 498702745, - 1919031597, - 1885259403, - 1033195185, - 2152110138, - 2916981284, - 3597923267, - 963475408, - 2390133622, - 1279020008, - 1532292933, - 3533828736, - 3410363086, - 4086929538, - 2384284057, - 736527609, - 921831372, - 978761557, - 3581033526, - 184754562, - 1142912374, - 3579159488, - 3754076721, - 3195299577, - 3924528446, - 3367661173, - 2664527432, - 3060833069, - 87824822, - 3341591958, - 1787431305, - 2190200087, - 724746739, - 2362957509, - 1893647833, - 631707054, - 3600263608, - 3112000274, - 1195347200, - 1980784380, - 1587897178, - 1505502520, - 730808362, - 2077493665, - 1766424643, - 4169095394, - 3023491856, - 1907255295, - 1400247029, - 3439802081, - 2353421540, - 2598206379, - 241608182, - 2800597438, - 1865113119, - 2692612767, - 655943462, - 3036801590, - 4273840964, - 1531071759, - 1388648520, - 4046738566, - 2566906236, - 3190630157, - 1259094407, - 2588960543, - 881378174, - 4029007816, - 1036716304, - 1440834157, - 1045545551, - 1611580430, - 3074999947, - 3160852020, - 125510633, - 1948935563, - 2528898967, - 1349973772, - 790409835, - 933146308, - 3340496196, - 2161701996, - 2203562878, - 127500008, - 2241686805, - 301650182, - 1189877354, - 2069676893, - 2149373784, - 3925298089, - 2363633682, - 316935579, - 222701616, - 1656250469, - 2585556171, - 2344566725, - 1641407839, - 2733425029, - 3458390770, - 3862744850, - 2081559914, - 1101703091, - 4213220658, - 2871617336, - 3821441362, - 1284486133, - 1295341230, - 231768760, - 3688216658, - 434412803, - 2085597648, - 1178947430, - 1499668892, - 332651778, - 848688163, - 783466160, - 2232129444, - 1984278409, - 54161174, - 480180255, - 1460924608, - 2764823444, - 1193698181, - 130579953, - 4246187486, - 2272443719, - 3890368520, - 3817991883, - 1891017621, - 3116376438, - 1838640984, - 202212626, - 548912036, - 1276402547, - 2627209043, - 3559295082, - 136668629, - 1463185400, - 3996451093, - 1195997667, - 3703309471, - 966209630, - 1495349351, - 3818068441, - 998187068, - 465377358, - 2740367724, - 393280358, - 1284923405, - 1224681054, - 2296772677, - 792366488, - 1312887012, - 563043339, - 3204722308, - 2362148183, - 3991589490, - 3812760383, - 2376309831, - 3955295751, - 3155646167, - 718545282, - 426415781, - 160354117, - 658523776, - 2523118847, - 1301823518, - 493847556, - 4056626100, - 2397998927, - 2294563523, - 1640569883, - 1159193250, - 1855737923, - 2179119641, - 2264199499, - 1222836974, - 3897707605, - 3276299004, - 941543841, - 3250950662, - 4256183038, - 3233880332, - 1087109928, - 952749216, - 404554848, - 1410748259, - 2627152206, - 979574335, - 2707691282, - 1014678495, - 2734357556, - 1706931807, - 1748581111, - 448295008, - 592225319, - 4161750555, - 3212838838, - 412410368, - 4235477535, - 1807215053, - 542939498, - 1486293348, - 2157680973, - 2605658979, - 3385782260, - 1415388200, - 1442117433, - 222759435, - 1396810624, - 3570065468, - 2736080123, - 2834358471, - 766728789, - 825544721, - 2946948111, - 2901144947, - 3302059408, - 1587854930, - 924399321, - 4038690213, - 3466316021, - 1867950097, - 3055097144, - 1209191984, - 561463795, - 1873204665, - 2398002966, - 1880272881, - 3725511575, - 1620394432, - 1896123096, - 707343813, - 3089248093, - 3628971900, - 2382386013, - 237300537, - 3375790093, - 3131500864, - 3130912993, - 810002296, - 2443950534, - 3073420942, - 2776473731, - 1723254889, - 480346138, - 2162458117, - 2901340480, - 1459347184, - 4157536243, - 1658113007, - 2653696984, - 3483498847, - 2172581735, - 2945148912, - 369575878, - 2708837085, - 3017439704, - 572356532, - 1687730610, - 3303917138, - 4185775922, - 1542629751, - 1823588786, - 758034504, - 207137758, - 4118907251, - 3551679917, - 579289547, - 130012826, - 3056847841, - 3298176158, - 1631448630, - 3883850502, - 1781666917, - 226013389, - 1191195298, - 162910956, - 2421225516, - 3472833153, - 3105014764, - 2998279280, - 989511785, - 3122448433, - 4031112951, - 798915717, - 3124120701, - 622880500, - 1550632339, - 3582512921, - 1897853716, - 3955800050, - 2843608771, - 1783793539, - 1234540424, - 2841204267, - 3078276773, - 1897041741, - 2644748275, - 2075116374, - 3566638157, - 2545072199, - 2705581137, - 2034593660, - 1102733534, - 563102184, - 3562036002, - 1559012396, - 3081027664, - 4277200768, - 29819565, - 952516671, - 288733278, - 3944002185, - 2580949299, - 2180907477, - 701845585, - 147266494, - 370347954, - 3271320914, - 2691392956, - 2383884939, - 3524671230, - 3939649359, - 1745553757, - 3201374308, - 1372111071, - 3219710016, - 848485099, - 667408098, - 3285356951, - 1335687640, - 3644214032, - 2613006793, - 4205559384, - 1312637482, - 1614630442, - 1683627778, - 1208640814, - 2834070964, - 3592578939, - 2358819530, - 1995443443, - 3413826791, - 1776126225, - 1410383724, - 2955630995, - 2993512709, - 3236365815, - 597697885, - 3130855621, - 872085356, - 3088552112, - 3059305796, - 2016688539, - 769456081, - 1704353282, - 2894459066, - 3397853542, - 3442669343, - 2849401363, - 2439338168, - 1765298122, - 3770362729, - 2012197456, - 1236698075, - 2547134040, - 3583709679, - 1222346076, - 66929888, - 1810978692, - 140921618, - 147006822, - 716546132, - 272190641, - 4270199030, - 4112878406, - 3459132459, - 2205334703, - 2655240614, - 3460427508, - 4004166094, - 2733896947, - 2662276621, - 1235355454, - 2080490449, - 3835662405, - 2012775645, - 3831435577, - 896042505, - 847436101, - 2690167462, - 2480708720, - 34486415, - 780307332, - 1206065551, - 3684584401, - 109239563, - 1177388715, - 186055213, - 542130796, - 431317280, - 4172245957, - 659717852, - 3115120197, - 3389111893, - 612902486, - 3093454626, - 994194711, - 3302496409, - 2727804191, - 3326713816, - 2909645288, - 4081309302, - 3915134216, - 1723404026, - 3538120273, - 3346690791, - 173973591, - 3745427415, - 3605615924, - 792777225, - 3898488257, - 2851691638, - 1310137959, - 3972391863, - 2800499039, - 2126178226, - 1804903581, - 1573085093, - 3765347565, - 1947401503, - 2004990656, - 1992294665, - 794994487, - 3989725101, - 4052205259, - 4275133517, - 999898079, - 680324738, - 653725421, - 4071639383, - 413310260, - 1532627122, - 1109186269, - 1454507956, - 1285781862, - 1986139826, - 2716119693, - 1215969748, - 4236644205, - 4222317536, - 3465516680, - 235341523, - 2665785469, - 2109288089, - 3865225401, - 3901456815, - 3743371368, - 2847912006, - 1626006640, - 2457976716, - 3706719984, - 2633385040, - 2583230270, - 4011067946, - 4054333465, - 693261516, - 2607135999, - 2466950594, - 2361552982, - 3954587369, - 761811183, - 3009769247, - 862264806, - 3029405918, - 2092574479, - 3841904830, - 3016847299, - 3730784953, - 504024660, - 2701889065, - 1117738707, - 3634064406, - 3718762989, - 1744136614, - 576863562, - 2218173951, - 1287233228, - 3397782987, - 4199567582, - 796784456, - 1140293975, - 4199890228, - 3894449046, - 1599629633, - 534382349, - 2188664287, - 1188379575, - 2149173101, - 2940426567, - 1090797480, - 659007153, - 1390171376, - 827457145, - 1830598549, - 4268312346, - 2538285263, - 3432324116, - 2356562845, - 618449305, - 59317845, - 32078972, - 1432616549, - 594046403, - 4005397838, - 406342850, - 2458307266, - 3622090042, - 567965828, - 2332609232, - 3913110002, - 4262951031, - 2223365504, - 3342426145, - 2937615989, - 2775839252, - 789924065, - 2547858218, - 4095742257, - 3553568936, - 2794396975, - 2669775774, - 3492940828, - 767973272, - 2223966928, - 1943349271, - 2397350853, - 1721534631, - 2284745909, - 3407740702, - 2117904330, - 3232034135, - 16565437, - 1931391428, - 3733107895, - 4226045835, - 4041262527, - 808886639, - 866728119, - 796865561, - 516940011, - 2539355172, - 3942135406, - 4094999671, - 2693105972, - 1495848373, - 2649483499, - 2160589651, - 2962242307, - 3100995731, - 3301101694, - 2928207080, - 3820618865, - 1087878141, - 2958883758, - 2394205737, - 1361447768, - 2272811034, - 485504121, - 3294843171, - 2682287413, - 678219958, - 2324071209, - 3963482046, - 3007126565, - 1199614094, - 3164538217, - 4161981055, - 2778925309, - 62318500, - 2375538984, - 1469419268, - 1541960944, - 4137797337, - 3249238236, - 361601412, - 3415181848, - 3260509721, - 22562218, - 1067118319, - 2385726306, - 1385555483, - 1365689652, - 812527706, - 2566479528, - 4102252052, - 1339610123, - 1617514438, - 803772757, - 1830781896, - 3612102768, - 3759491386, - 4122435767, - 2036628786, - 4064824456, - 1405949265, - 1439853342, - 3933859233, - 1375799685, - 1727029396, - 3830298066, - 3621177512, - 776904443, - 3379551387, - 3354675417, - 2449813983, - 899493340, - 305076528, - 2320614618, - 2993808680, - 947776775, - 2833196371, - 2012448162, - 2485862213, - 454484984, - 1523595724, - 4242593197, - 372556332, - 1103298205, - 1648831464, - 4146669427, - 3328164483, - 988612572, - 247392334, - 1866213727, - 4150811684, - 1147567956, - 1034212146, - 96214741, - 2690679643, - 3567190262, - 383537089, - 305717567, - 2233806836, - 1230730955, - 1081378770, - 3219338543, - 3352036722, - 1759154670, - 410897617, - 2266534987, - 20622638, - 966731278, - 3881030600, - 1681142506, - 4180658998, - 508491304, - 2075219988, - 862057009, - 3811486827, - 166193849, - 1952208041, - 287050949, - 4108801649, - 3634814712, - 1441695148, - 4165943291, - 985297823, - 1950886509, - 326103870, - 52511222, - 3840171038, - 1544404498, - 1483779274, - 2509714717, - 4191272942, - 196893263, - 1752138771, - 1387920548, - 3203092670, - 3305714185, - 4020283615, - 1033783069, - 873274938, - 2512442229, - 4050706134, - 50652793, - 1076717860, - 866310729, - 2170861381, - 893749831, - 2773398050, - 475134716, - 2354613553, - 2314268426, - 1221954161, - 1136667736, - 1313435602, - 887229486, - 1360766549, - 2670668048, - 2341728973, - 1931118129, - 3373726746, - 1111218235, - 3520098808, - 1688835919, - 2940851490, - 2064836337, - 3968979974, - 3836060039, - 2942295937, - 484909846, - 57105482, - 893060117, - 3098559078, - 2646028589, - 1116334295, - 1386055093, - 2672179584, - 3465976289, - 2445951345, - 3624670035, - 1585735041, - 2706230734, - 2994891082, - 3515469200, - 1276669673, - 512187229, - 3497635883, - 218620959, - 245089060, - 4175591573, - 4155493712, - 2748673947, - 1833505305, - 2012082323, - 2709336153, - 2120857677, - 137903570, - 488916174, - 2781208725, - 2409478547, - 274592367, - 199488141, - 2342346857, - 3601780140, - 1121367165, - 3549771550, - 3076621128, - 567283226, - 3387958259, - 2030339307, - 1104740183, - 612459272, - 300767297, - 3050650430, - 2239182820, - 4159761668, - 2869764213, - 634694700, - 1106345469, - 2997451018, - 1843299496, - 430102189, - 526441779, - 1780104658, - 367387616, - 478601672, - 2464829660, - 1470568604, - 59858364, - 3322874822, - 1861332475, - 4272110389, - 2809523345, - 592218826, - 245752776, - 1160055635, - 2650328612, - 4116988655, - 2035975809, - 1888310709, - 385128325, - 705277784, - 2618129717, - 1873449709, - 2767331868, - 2978152928, - 101342520, - 496164299, - 3628094966, - 3617214560, - 3276401446, - 2823749437, - 3226661064, - 2505966670, - 2070046543, - 201965594, - 992372321, - 808827653, - 3757676062, - 2428492155, - 1976500081, - 374480624, - 1080514698, - 2981903116, - 2278910404, - 2881090894, - 1587947707, - 2995760558, - 4065642765, - 1419256387, - 2879122765, - 799732641, - 2237576159, - 2722571965, - 1945610873, - 1061221753, - 3737822677, - 3766401862, - 1794205272, - 1324118887, - 1406627255, - 1246070016, - 1663528532, - 1697199377, - 1725153851, - 1644109796, - 1555884116, - 2104188347, - 1983559692, - 410269419, - 88182632, - 2259001816, - 3545896554, - 1498254232, - 158757275, - 2086802999, - 1006471606, - 1388264984, - 2489082808, - 4121338482, - 2933397352, - 1328272844, - 2440478625, - 1874429555, - 4165076217, - 3618125529, - 426429240, - 3523227024, - 2221326617, - 1036420585, - 3084730014, - 2249454689, - 3627764096, - 2906922667, - 4069859704, - 3551319880, - 2008056542, - 4263884021, - 805474434, - 414460148, - 3631091911, - 4255385980, - 3566702050, - 3056142898, - 1412413851, - 1628335335, - 2988130790, - 1804321993, - 1260149734, - 313631333, - 1940664513, - 1251075071, - 142103746, - 253384927, - 3517416342, - 3340640409, - 426880898, - 3294484280, - 635363223, - 268138771, - 1492613435, - 4200722223, - 3285686445, - 801295415, - 2024943366, - 590788642, - 4058601891, - 2569141838, - 4203227446, - 3873029901, - 2938957729, - 2653323508, - 875351910, - 1225934695, - 3959624100, - 2491580690, - 2130038220, - 4156378275, - 2785882154, - 734574384, - 1648103801, - 3995559814, - 2769178231, - 715734292, - 851342658, - 4066600511, - 2873167890, - 367737717, - 2708556174, - 3095462268, - 2954581929, - 3596167017, - 416437246, - 3630899926, - 2652177164, - 4082497993, - 2092525777, - 4097981814, - 1798161626, - 921570821, - 2954127455, - 2903455637, - 2304798331, - 1258114076, - 3817191942, - 2909483557, - 2182250342, - 1650253435, - 1959237982, - 1275159542, - 3262458027, - 1272009741, - 452811378, - 4207284227, - 4014068428, - 2116331737, - 3821668701, - 2218821031, - 1832698056, - 993485847, - 3496889697, - 2641214206, - 1989726922, - 3632025556, - 3072807082, - 871546261, - 2112654627, - 3554921765, - 3035598716, - 3203667416, - 1926566103, - 3703963239, - 1744429225, - 2894885156, - 1619369871, - 3567760734, - 66603957, - 3634627448, - 1775619436, - 669243776, - 345554509, - 3410469602, - 1155755481, - 2545915127, - 1881644965, - 3014832373, - 991894728, - 2556172215, - 3344954145, - 1093682578, - 536721482, - 412887058, - 1927162005, - 598758544, - 1718573963, - 1056186033, - 3316535915, - 3595128100, - 1130595155, - 3859435741, - 909947405, - 1719271667, - 3984005418, - 1953576045, - 3439367892, - 1566598941, - 2942150553, - 3026742395, - 2447170263, - 3686824913, - 33431627, - 725397196, - 2320663736, - 1675683707, - 2299446991, - 3516433167, - 2048939642, - 75279992, - 2544154819, - 3300029692, - 3032144185, - 2785830866, - 2021781582, - 418522114, - 2390722409, - 197680384, - 1642831884, - 1118262832, - 1200601984, - 3464739706, - 515926247, - 1725239855, - 3994742718, - 3240728689, - 3145738916, - 1844532595, - 1620264703, - 4241585686, - 1317499201, - 572389138, - 717366194, - 1894941473, - 2632625749, - 1146787616, - 2682002716, - 191357974, - 1139509089, - 1281516716, - 2167935776, - 144366546, - 3850560335, - 2955928694, - 2476854219, - 1240245570, - 1201598779, - 3315121249, - 2067079794, - 2242637161, - 2647850380, - 3701580543, - 3720909783, - 1981567153, - 2939632748, - 3130494051, - 2236039992, - 4000430705, - 1741562167, - 2404004319, - 1683735303, - 57955420, - 3003892787, - 1345733127, - 4112811755, - 3929418014, - 1702502253, - 1563779786, - 131126007, - 3456434934, - 2711946303, - 1514661889, - 593277233, - 2310979980, - 2627253169, - 2196991012, - 734788614, - 1638451115, - 2011170818, - 2234624678, - 2644747730, - 1442906572, - 3186977457, - 3041580290, - 3056574755, - 3726946839, - 777432113, - 3096870562, - 2958583246, - 3198704593, - 968653965, - 2339592898, - 631523788, - 3180919056, - 828636999, - 578695087, - 2899843089, - 3000388853, - 3269720827, - 3037015468, - 3799598340, - 3149305514, - 2046835764, - 3530890661, - 30989217, - 2186509969, - 1179096544, - 2221010045, - 338765984, - 769504530, - 3971239329, - 2393081891, - 1544565497, - 865242040, - 3393553025, - 3524464797, - 3304062897, - 1546646632, - 3279691281, - 178822623, - 4081273624, - 88444244, - 2680632895, - 1275199310, - 2416414327, - 2419760906, - 3715897336, - 132751751, - 1119530060, - 1004169983, - 495930802, - 3413915054, - 899768813, - 3645578141, - 2499698472, - 132509074, - 25905020, - 3287880606, - 788515436, - 642323619, - 3147546391, - 3581174189, - 979602050, - 1611369111, - 2161460860, - 1095063350, - 4182558068, - 958677274, - 3492305733, - 1557372272, - 2654290688, - 566444553, - 2701083799, - 2781307160, - 1273578824, - 1387975524, - 597850620, - 2236234562, - 1466168507, - 3557657442, - 2574663791, - 4108434188, - 162027958, - 2621084243, - 403011392, - 1391061706, - 973642241, - 972433327, - 3904424455, - 1591050333, - 3027468230, - 480562783, - 847391513, - 10278627, - 891807608, - 234893054, - 1990103225, - 2718435746, - 2962618303, - 2457477564, - 2173705506, - 2840711582, - 359129712, - 1862207146, - 3179005379, - 1645874423, - 679472815, - 2797899962, - 893909343, - 3298150223, - 2373596744, - 845944693, - 743626006, - 1101645519, - 4118046404, - 3085126686, - 190442081, - 1429251740, - 3631205207, - 3554760933, - 4126353593, - 2783261338, - 2895926954, - 3712938542, - 3519916747, - 3954611278, - 3504723419, - 2842753149, - 570258929, - 1757758471, - 3191712789, - 959844640, - 3815947667, - 3894098372, - 4252794364, - 568847264, - 14599528, - 3247617154, - 4256259000, - 132921261, - 611627908, - 461842468, - 721786692, - 235906061, - 3838181019, - 2693917919, - 3584801911, - 1303671174, - 2715956353, - 2478140784, - 1156883438, - 304296391, - 4257481663, - 3383377257, - 2816549394, - 3609758812, - 965337833, - 663464027, - 2101116297, - 870118525, - 3961827375, - 1411666870, - 4042208149, - 1437767791, - 3011320579, - 628908785, - 3715862143, - 787455080, - 215407873, - 2354427590, - 3501402696, - 341761754, - 2789621373, - 2795910607, - 2196949108, - 506787737, - 2444762931, - 882455973, - 1775227796, - 3463655326, - 1613425836, - 1710055573, - 2954483535, - 428135136, - 3208103298, - 356408642, - 339078097, - 2783728495, - 1608672140, - 3468999018, - 1715268472, - 1775704350, - 2095354732, - 1816748505, - 630996696, - 3054793907, - 1376617684, - 2095298720, - 62048030, - 4177859766, - 1899791136, - 2051127621, - 196664096, - 3319551239, - 1662947943, - 258417225, - 4038741950, - 400172047, - 2774932803, - 1935359644, - 2920157004, - 70999116, - 2298111745, - 3155118629, - 954252591, - 3035077840, - 3365721730, - 3259958182, - 2966262046, - 3966771287, - 1664706857, - 1549210707, - 644267327, - 3625779575, - 35847691, - 4268504338, - 104221165, - 3793167289, - 1434899001, - 516380518, - 305714125, - 3997280967, - 3452590542, - 3101574501, - 2438551534, - 1487302260, - 699799524, - 1896565321, - 179635869, - 3577458627, - 2390294651, - 3440160896, - 1366242928, - 2623409152, - 3227684413, - 1771283579, - 1860070108, - 2525129864, - 639424412, - 3866671112, - 2583778912, - 3087668664, - 2565874715, - 4124409137, - 1716978928, - 2495926582, - 105275754, - 504654714, - 439824806, - 139092718, - 235256401, - 2052436662, - 3482201335, - 1668293439, - 3987504941, - 1030894756, - 1802687410, - 3849872306, - 1729194751, - 628020551, - 2758654744, - 3275824514, - 3396547984, - 2947249082, - 2719480175, - 2248726512, - 1528548733, - 981143734, - 3855057208, - 1889465921, - 717326424, - 3888793784, - 273177519, - 3318606717, - 2015221742, - 2498667698, - 1776840459, - 1340254574, - 2212922953, - 2588648618, - 1204650422, - 2486401588, - 1128711606, - 4071028195, - 3938015337, - 626760926, - 3422307161, - 3731948034, - 1910812643, - 829867537, - 600054897, - 846276067, - 1319580669, - 3615631593, - 747621539, - 1554392620, - 3653393404, - 3912733739, - 2977154303, - 1155671362, - 2833202039, - 2279065852, - 3013201083, - 3987119844, - 3274777164, - 1140056491, - 1816979270, - 2179608264, - 3678482641, - 3814469882, - 2355321349, - 2570806568, - 3322662929, - 1190205366, - 1292030150, - 445850460, - 1007609938, - 3203863267, - 4141964052, - 1966808952, - 1308343639, - 2379169556, - 392323325, - 2481626447, - 382317520, - 4182472484, - 2023490882, - 3775512433, - 1114127645, - 732212353, - 329275296, - 3657781914, - 2294505523, - 1622386862, - 405801504, - 3621219582, - 3355243220, - 1442897733, - 3394995933, - 770248982, - 1364846309, - 3024153508, - 3538800296, - 2652257210, - 210120814, - 1301948456, - 1247565194, - 2146699552, - 1320374747, - 897290956, - 3862254402, - 799831514, - 1914207686, - 3377904074, - 2607906779, - 4027092094, - 2763947902, - 1014475090, - 896406142, - 3514973274, - 3879235491, - 4012732357, - 3867478648, - 1414327534, - 2649597369, - 3662261765, - 2995439723, - 1996639143, - 4039511578, - 2765791850, - 3303435928, - 637778770, - 3898457532, - 518685469, - 986059285, - 1574901180, - 3032251472, - 245461152, - 3766190817, - 1353320356, - 1935265353, - 1973837543, - 3278804152, - 3214093049, - 2957835849, - 4091085412, - 255294461, - 1414770257, - 2217535651, - 1675408608, - 3831909459, - 3020670293, - 1716921447, - 3386562423, - 1988740673, - 261017061, - 2290787173, - 1983824509, - 3086118463, - 1254847698, - 4067049756, - 249698925, - 1498678668, - 784028945, - 439729327, - 4110883659, - 1613350294, - 4105915048, - 1813130890, - 679455672, - 3976052199, - 3001295100, - 2104820791, - 1162900241, - 1648044795, - 2514587003, - 2421180327, - 2283890084, - 1404122291, - 4282148353, - 1644006856, - 3614130090, - 423899502, - 2013836853, - 3009479094, - 363710018, - 1155199644, - 628882044, - 2369525976, - 3548378291, - 203495038, - 1558133755, - 2037293560, - 1180976695, - 2702892550, - 3361665033, - 3573942797, - 3246684700, - 4184909529, - 3113930097, - 3314026953, - 3543006383, - 1777684129, - 738987135, - 2408860120, - 3375406352, - 3410541010, - 2483402029, - 874265845, - 2728628655, - 2465254087, - 2763032499, - 1773018277, - 3091717447, - 3056048261, - 1627578063, - 396052709, - 799842788, - 4040195010, - 642912987, - 3176656976, - 1805691900, - 3531813876, - 4064329377, - 517657685, - 3683563198, - 2227722455, - 1853029411, - 3503447177, - 3163192579, - 1056555873, - 2381084898, - 781559930, - 2363496964, - 254498858, - 2476145011, - 4269432702, - 3103258864, - 2392439970, - 268597184, - 2516299829, - 1081588250, - 2566867051, - 1638912980, - 3024289361, - 3157978367, - 834525239, - 3419277855, - 3891176424, - 2309185042, - 3221257532, - 3004541492, - 1137530167, - 571926164, - 210118804, - 4293182733, - 2869369615, - 2784618711, - 3305896418, - 1489585285, - 3381035791, - 3790732453, - 4028183673, - 2653638877, - 2736737496, - 3797140749, - 962515952, - 2258143939, - 3564546745, - 1895130685, - 2228287067, - 2312197179, - 2626222586, - 2181090467, - 3689166059, - 3520225258, - 136758821, - 1431487264, - 2930236352, - 154402183, - 2738491176, - 344509447, - 1896458563, - 3779882758, - 2133529153, - 4286044837, - 2605636908, - 820659421, - 1811842380, - 3962094203, - 3687915725, - 2155975204, - 3928836465, - 3691703484, - 1904018067, - 1881354507, - 872419897, - 4278198967, - 2885521375, - 1376745644, - 3236945500, - 1671716578, - 370644230, - 101468213, - 284769845, - 634980179, - 1605335079, - 1282158086, - 2660914309, - 854331859, - 1000704825, - 699019275, - 2780029826, - 1260383123, - 2779903100, - 582743027, - 3718843428, - 1408230665, - 607437045, - 2934336625, - 115661440, - 4263553504, - 4276473889, - 370169645, - 2853087279, - 1027669514, - 1720229658, - 3409791618, - 285337640, - 1345790346, - 2943146913, - 2685478280, - 1487297211, - 2969341527, - 2458040056, - 214515308, - 3687721365, - 3667625811, - 1898369902, - 4230564065, - 223641391, - 3069294888, - 4116721754, - 1141151693, - 3584477412, - 384051122, - 3317163361, - 4072972608, - 1029203332, - 3860139765, - 3715612346, - 2510677815, - 612600386, - 3268435666, - 3097314045, - 370003995, - 1322283467, - 2435703924, - 1160258396, - 3171459393, - 2335321812, - 2673338575, - 4025907049, - 3884845380, - 3818902821, - 3795803746, - 147850781, - 3685404652, - 3974796711, - 356681341, - 1011203652, - 1562517675, - 2845328796, - 1736512821, - 988217836, - 181135306, - 3685976776, - 1256118881, - 3209965382, - 3363408560, - 466254918, - 1238802260, - 2587721293, - 292142954, - 3507044472, - 3171441275, - 1280320593, - 1455646407, - 3644414763, - 1408953435, - 4061979931, - 3356361782, - 3625119726, - 2573263907, - 3703724993, - 200726756, - 3890873677, - 1126147796, - 3196707360, - 730509394, - 789995795, - 4048947872, - 2517783772, - 4044958699, - 1400738798, - 2018024119, - 1708076552, - 4025504600, - 3137500897, - 1286235926, - 1493096642, - 2608737939, - 3110030890, - 2642728182, - 1595719543, - 364408439, - 2079077365, - 4193186130, - 2554702561, - 2507932143, - 1215331901, - 2013306107, - 1017301148, - 922684791, - 1736386310, - 1626170381, - 3727348039, - 2689656388, - 2440555730, - ]; - - static const List _envieddataprivateKeyFCM = [ - 1133569810, - 2631336948, - 782153715, - 3201336846, - 631838071, - 2983168385, - 2488817491, - 138437731, - 924063126, - 3540607710, - 2070108316, - 2167491417, - 434036357, - 1432021133, - 4144709133, - 94957788, - 679660080, - 3468279940, - 307374452, - 1973917687, - 1347149335, - 2963091355, - 2396741002, - 2817505523, - 4202675673, - 1406883620, - 2190498162, - 3329056506, - 1323004681, - 4248062004, - 3737353462, - 1429733899, - 3668953688, - 689400850, - 3502322790, - 2315400426, - 124038186, - 4194882164, - 1999808353, - 1707724452, - 3439846268, - 2075405475, - 2785861775, - 3569473941, - 719832914, - 2072039196, - 2590617095, - 2107349883, - 3957510600, - 1162496646, - 2962114534, - 1300460594, - 240394502, - 3044154853, - 1183866929, - 21608487, - 3414611962, - 907026124, - 2466175621, - 4104338953, - 56647863, - 3490584325, - 585253350, - 1773541625, - 3763318214, - 1034154516, - 916870891, - 3104025919, - 3187985771, - 3347377431, - 381142515, - 1606802566, - 3262608758, - 437353550, - 1578303957, - 149421221, - 3608042008, - 3361863092, - 1837541367, - 3716700502, - 3596562165, - 3885057017, - 696365608, - 888073177, - 170835358, - 2643784898, - 3048307270, - 2677804251, - 2293018853, - 205838075, - 1819491665, - 1388816380, - 690842261, - 696985818, - 749153644, - 941841851, - 3662725259, - 385753419, - 1568502917, - 801506114, - 755000676, - 1272570999, - 3901600789, - 1238393649, - 3281418660, - 402614875, - 2874449491, - 1720402657, - 644537099, - 3787686183, - 400335176, - 4149775923, - 651382800, - 1659014868, - 3314643287, - 4038224803, - 86756865, - 2724725866, - 2307744041, - 1006463768, - 2647955090, - 797104786, - 2977598688, - 2606919321, - 895350927, - 1137660647, - 3030761014, - 1376428472, - 4261854640, - 307433794, - 4046778441, - 3221461895, - 2437346850, - 853871820, - 3451972109, - 2428265412, - 3139192820, - 699417211, - 2546447426, - 3646938958, - 321779081, - 4132651781, - 3150897416, - 3322784975, - 3321636276, - 3809206677, - 887152317, - 2725284761, - 3118585803, - 2302426262, - 2923495272, - 808817031, - 2122448795, - 4288522686, - 694121379, - 666217583, - 3456731221, - 2945634714, - 4286515382, - 2584304524, - 196624685, - 2923573990, - 495440887, - 4230033671, - 2919325945, - 1637322563, - 2441024489, - 2066037161, - 1429637865, - 3454747728, - 2992198904, - 2316066223, - 2059728774, - 1641836365, - 3372473648, - 2281518416, - 2027233646, - 2084138389, - 3906451272, - 1822877389, - 1411675039, - 892586370, - 2691798182, - 4171111330, - 1618388932, - 3628305864, - 2112352756, - 2769352409, - 3328390320, - 3547862842, - 1951111225, - 1752301407, - 3950840431, - 3733917062, - 3483625966, - 3961284483, - 1053919469, - 2364245221, - 1762251156, - 2577990403, - 3062140801, - 76894045, - 3323006691, - 3566856440, - 321653469, - 1222582391, - 3906125455, - 3207183462, - 3711704882, - 2803584950, - 1579690547, - 1561335925, - 248277857, - 1511629570, - 4225595872, - 2048236828, - 871098228, - 922796359, - 3165496207, - 2188132731, - 3314920462, - 3899363509, - 1939636489, - 111225736, - 577925601, - 484552355, - 1960109870, - 2716368620, - 3176433100, - 3601674781, - 373094440, - 2397954208, - 507596200, - 3453886747, - 1584313261, - 4078107902, - 3760649751, - 3169407441, - 2241899301, - 2176340613, - 2075366082, - 2166317091, - 2776336605, - 2892757845, - 4053008140, - 606525853, - 3377027437, - 2926964647, - 3454311709, - 3183173766, - 2486185870, - 4254240170, - 657283466, - 1197887077, - 2566237475, - 3361480783, - 3303665532, - 2777540142, - 3481688605, - 530972415, - 1141952332, - 2353730658, - 1567130518, - 1774672833, - 2759099065, - 1145398558, - 1784341958, - 2877327820, - 2283701833, - 2329358501, - 3749851948, - 889304650, - 1407703894, - 9934784, - 1632474019, - 1128381775, - 4157149202, - 901339251, - 1997833079, - 3348345941, - 918882217, - 389368326, - 1785766102, - 1011183375, - 4172425704, - 2970446321, - 3427424647, - 4065890971, - 279599515, - 3540241559, - 2107656992, - 374833042, - 2808540504, - 1133677531, - 3450784510, - 505192855, - 2761197440, - 1878885847, - 2093190460, - 365593210, - 1267461995, - 263440700, - 242490955, - 3436981650, - 70931099, - 4263682782, - 4108319881, - 3082011932, - 3638304875, - 547834938, - 1389281392, - 1165726860, - 3532323550, - 3738090862, - 2792799805, - 895056284, - 1766733271, - 2756468608, - 549128057, - 3658594384, - 3100293500, - 2189838869, - 4240567904, - 1320408426, - 1775420409, - 3106963467, - 2404621250, - 551952367, - 3979317805, - 1851160476, - 3178850427, - 2371135944, - 199118472, - 744433808, - 4252019127, - 827710637, - 3649106065, - 3901895924, - 876059937, - 117735243, - 444923312, - 3958565072, - 3825503705, - 1196211466, - 3964911091, - 1134815494, - 2104701220, - 2438251572, - 2077693643, - 1504095763, - 2972422771, - 1154532482, - 4124853877, - 2246291060, - 2099240332, - 2876187345, - 2798467691, - 1421449937, - 597729394, - 457387478, - 1499153104, - 1356594355, - 342601813, - 2132311138, - 791338786, - 883040055, - 11072812, - 1547956770, - 1127479366, - 1382813792, - 3083564699, - 57757915, - 1401265862, - 2223697341, - 4278517471, - 1442793518, - 1895302639, - 4037320135, - 1850828614, - 2690015052, - 1241674629, - 3116064160, - 845564209, - 25946313, - 4215149170, - 495054992, - 1672810753, - 1204097744, - 3789428306, - 3105344417, - 694575165, - 3452289062, - 1029896578, - 3360023852, - 164477726, - 4194287905, - 3710042678, - 3439994531, - 3530844798, - 3464877857, - 250768659, - 2766091977, - 1692725414, - 3990760155, - 2500143441, - 2288225381, - 1120586688, - 563203281, - 3827538137, - 960944870, - 187284541, - 1096897133, - 1599201624, - 366218149, - 327599676, - 552809359, - 922286098, - 1335459442, - 2540585035, - 583505968, - 2326404687, - 1027286796, - 3070665915, - 4015090928, - 3982905340, - 410023786, - 3395195196, - 1554581956, - 697806517, - 2638679124, - 4147142303, - 1346305603, - 3207189662, - 2321219233, - 3015285102, - 3277202543, - 1000205101, - 992239207, - 3971911012, - 266289826, - 3185455462, - 4205129452, - 2741042765, - 2288302162, - 2924512811, - 3159675399, - 2649659313, - 1431390226, - 3351345753, - 1985322976, - 2504947998, - 471514834, - 3592582267, - 590265388, - 1231874842, - 1822441474, - 3449101662, - 2881651790, - 1492681319, - 2787205950, - 3976134239, - 3773098637, - 2394435662, - 1109809040, - 4231449887, - 864895734, - 4110130352, - 3618915364, - 196919624, - 346361955, - 3415490775, - 405335562, - 2276418570, - 1980412754, - 2625528837, - 2125893447, - 3628088871, - 3876730342, - 4116584183, - 320861185, - 2570392205, - 2756479823, - 4260304563, - 3722879962, - 3046178137, - 1720565098, - 2770560277, - 912014283, - 1154114755, - 2398392593, - 1783089108, - 1546460786, - 204668200, - 3121352718, - 3639528929, - 2152218318, - 1312788752, - 568247726, - 124319110, - 493021388, - 1547027038, - 2251559592, - 133996719, - 2144224536, - 773611901, - 3955830941, - 410084606, - 4066825113, - 2042725943, - 1466951870, - 1930121911, - 3751731496, - 361596267, - 2154918635, - 1958735079, - 4253100758, - 1798276982, - 796014148, - 3181768228, - 2472538735, - 3746473428, - 3164354638, - 3774315684, - 2820210983, - 268279330, - 2116129475, - 101727991, - 3223098445, - 4163090862, - 1977979199, - 2069783554, - 3630469093, - 2808477120, - 2394277801, - 4273755972, - 3873756964, - 667433884, - 3543325428, - 948678810, - 3523633257, - 1065600508, - 3800848725, - 1630971403, - 2177742422, - 2169259592, - 2527663044, - 4265041250, - 1500582651, - 3783705635, - 1219124367, - 3964508274, - 1843670654, - 3654084854, - 171050297, - 664491172, - 4182800651, - 194504457, - 2724588059, - 803791158, - 2335734531, - 932536911, - 351277930, - 1745733643, - 808433816, - 3277785618, - 2268330899, - 4176006850, - 2783846935, - 2846749143, - 341760272, - 850653006, - 610136509, - 2125879879, - 1340989342, - 287096537, - 1590747331, - 2427885510, - 751554276, - 2647150171, - 4237391419, - 3763136346, - 3877297962, - 3014249201, - 3382390003, - 1631535657, - 3892604475, - 113578915, - 3571572766, - 3302253849, - 3064374651, - 3206349889, - 2304578624, - 1103680128, - 4182756681, - 353717569, - 946679631, - 112641202, - 2779609013, - 1652604456, - 4080136355, - 3861737453, - 3360215346, - 2959948905, - 3936470587, - 496941470, - 3375407560, - 3321262606, - 2335640196, - 3420603701, - 2677533993, - 3790770573, - 2069993378, - 2151268985, - 2625185401, - 1011602153, - 3094312228, - 2220111813, - 2329340819, - 3911596598, - 3635139691, - 4146685925, - 3763946389, - 3210305485, - 3929977707, - 4213604703, - 1070862664, - 3587716477, - 2324660616, - 1605218958, - 2500306035, - 3259861355, - 500582436, - 645426566, - 1542921921, - 1183594999, - 1566358704, - 1552607459, - 2615143547, - 843226843, - 571961840, - 2857771584, - 465828866, - 601724475, - 3630549876, - 4084906907, - 2289304457, - 2558936285, - 3620204538, - 800809737, - 3744817645, - 2527129818, - 478466236, - 2168202296, - 2362423972, - 4052881602, - 3740065955, - 230857211, - 2241446575, - 1087691854, - 3587787536, - 2274741322, - 3417159560, - 4195474158, - 3893812599, - 3619955180, - 1578592658, - 2342460637, - 1683392027, - 2424908574, - 1447503852, - 1685376698, - 3466313005, - 1339474889, - 831909323, - 4010134235, - 4003025756, - 3647011186, - 3782079043, - 1160932306, - 3494656035, - 1611197715, - 3567142399, - 2890077475, - 1602408813, - 472657405, - 494625447, - 106508994, - 3347756193, - 3240199870, - 1273640382, - 26328612, - 2157031319, - 694426956, - 2082449907, - 774225508, - 688955095, - 4171164634, - 3058172858, - 61808708, - 1890125188, - 3204378508, - 4036249455, - 1905152152, - 759081694, - 2643053191, - 2246357160, - 3577076613, - 3576965704, - 750521574, - 1446725640, - 883595370, - 1475257078, - 2754937020, - 2532625957, - 3976380301, - 4115602225, - 724210016, - 2743069931, - 2983501977, - 1884538028, - 3328099170, - 1306827079, - 1015926215, - 114388424, - 4148184684, - 3881534088, - 2154958149, - 2450264065, - 3423207481, - 3639858273, - 3685208508, - 2223382173, - 4143454606, - 3912117622, - 467726970, - 3747956705, - 1746667801, - 3642126670, - 2068865364, - 537066608, - 2219668459, - 3421188390, - 648060462, - 3174434439, - 1127238608, - 1260696503, - 1992801667, - 34669631, - 17785994, - 4172341196, - 2469189054, - 457767139, - 3315289112, - 628490136, - 1850498990, - 4132167805, - 1156111015, - 2607662061, - 3405842782, - 2122074520, - 2366415335, - 1017403959, - 703133758, - 1760782611, - 3950005638, - 2807076778, - 1892815587, - 4156622436, - 2949253414, - 1178452253, - 2923126924, - 2587988410, - 3219952958, - 3779832174, - 14674843, - 1178460563, - 430504745, - 1826964582, - 1641653247, - 1317393533, - 4018237358, - 2188499822, - 777463525, - 3341084563, - 1785546, - 1713958898, - 614600891, - 3882370790, - 3128770701, - 1747566567, - 3560074127, - 1039036586, - 812324347, - 1619256297, - 2502372887, - 3670497706, - 3042560223, - 1123065546, - 2583224663, - 2948298407, - 3021771238, - 1862104345, - 3597645982, - 3599995263, - 4030691158, - 2123585365, - 1992908288, - 733281351, - 3813398073, - 1870147524, - 3504460367, - 1736758812, - 3156067720, - 2750377620, - 2363933980, - 3310351260, - 3940047893, - 1578662409, - 294427372, - 806089271, - 3920958878, - 3896806981, - 1772829820, - 2344488989, - 1265846332, - 475622043, - 662357186, - 165396410, - 2749199230, - 2183375655, - 3937428224, - 803615637, - 509709712, - 3873466974, - 2172599828, - 527606613, - 40303534, - 2699653373, - 38353592, - 1822726429, - 3768380582, - 1927148869, - 1213421100, - 3186182532, - 1913248628, - 511826850, - 3822177488, - 2419777463, - 1875814864, - 817855949, - 63454370, - 3947190847, - 2325675629, - 3285547227, - 3102442945, - 1841049121, - 1444548056, - 419067902, - 1590144736, - 265849894, - 1789005243, - 1424217140, - 1030839952, - 4257727488, - 3034123831, - 1007958800, - 2610961502, - 2970216183, - 3058962800, - 3615507445, - 48179678, - 3002918597, - 3441672846, - 566382759, - 110545859, - 812351046, - 1870470469, - 1245308926, - 323897118, - 2936813874, - 2674566500, - 219377802, - 1086447090, - 1786499125, - 144398431, - 654537864, - 2395886453, - 1593335314, - 2828518456, - 3459698478, - 1787827114, - 3810757686, - 2425988611, - 4178554808, - 1418362942, - 2480692317, - 2288666440, - 3459457205, - 1653714553, - 3731039596, - 865008229, - 2292709249, - 3261752359, - 2470550915, - 1107107355, - 3714430281, - 1121490540, - 293329563, - 2146244525, - 3054248315, - 2798515501, - 2715428994, - 4123553851, - 2453465789, - 4180585134, - 311331998, - 3282685518, - 4196003076, - 143646639, - 2050741487, - 1130798347, - 2188270898, - 4182413915, - 3889327380, - 717038134, - 1009153000, - 1280770362, - 4264392325, - 605672602, - 2896879418, - 957372330, - 1032615443, - 2621739326, - 199467395, - 4230448698, - 3549149493, - 521016121, - 2846462559, - 274724362, - 2227908916, - 2967834387, - 3726412279, - 579648177, - 1013096830, - 3301766775, - 2500389183, - 4006393523, - 4012932430, - 698395729, - 2204302980, - 3219551057, - 573519636, - 1909653791, - 4023286769, - 123080677, - 3736361345, - 3419621755, - 2826723113, - 814723968, - 1073700150, - 2563994012, - 1474276091, - 3921991859, - 122646182, - 2077323111, - 1103992836, - 2139345441, - 3853409049, - 2154582008, - 1243065291, - 500043632, - 1292680869, - 872953705, - 516336124, - 2294151897, - 4067812335, - 1088621384, - 121581282, - 1270078256, - 995339090, - 2544655137, - 4275700318, - 2370560145, - 3170631154, - 4147771473, - 1641718072, - 395411217, - 3433033467, - 1661882257, - 3987552305, - 3985644838, - 2936838991, - 438443950, - 697124611, - 2325803035, - 2273501928, - 533683729, - 13177371, - 747666718, - 3544100262, - 3873810886, - 3732873673, - 1481766331, - 1348019729, - 38996361, - 1620496471, - 2700207084, - 1957448080, - 3321330333, - 3403978147, - 2542259222, - 1244737766, - 106824772, - 2889180242, - 2782979572, - 2208136988, - 1135795625, - 3243972655, - 1477336913, - 275111457, - 1786613441, - 1659228560, - 2054362186, - 196128711, - 816620407, - 4083877371, - 3716624405, - 1336671594, - 2764677319, - 801329848, - 3366317834, - 1011799900, - 3574426088, - 252138839, - 2894646252, - 2921304573, - 2462859304, - 229342266, - 3046504243, - 1508719293, - 665505246, - 2469490042, - 263479099, - 3365977541, - 4261148468, - 3654189976, - 3936839291, - 3988208825, - 3988430557, - 1451897464, - 3965115052, - 3686032884, - 3415468004, - 4020497124, - 1210122896, - 2111071228, - 2570070469, - 3947895940, - 1503190051, - 3504941117, - 2530459359, - 1800982976, - 924077878, - 41849062, - 1222720650, - 3158856288, - 1788061406, - 3691114073, - 1027122661, - 3321318213, - 3555481230, - 3531688820, - 214117260, - 1346508165, - 662442340, - 3812607839, - 2052640705, - 1608986362, - 3290855499, - 1643300874, - 1991073139, - 3768055525, - 868909665, - 1931155253, - 2551164447, - 683039992, - 2130756571, - 872270978, - 742932607, - 3602591891, - 3939291157, - 3967503640, - 88820425, - 4228851002, - 3346700864, - 718168753, - 1679949838, - 1011812939, - 4131325949, - 2366209691, - 1256096471, - 4274545534, - 88884781, - 857900341, - 614948097, - 1354041485, - 3050802749, - 446338946, - 1992706255, - 1701237600, - 1504018549, - 1341283033, - 190528449, - 4201618823, - 427878072, - 3521422895, - 3171400283, - 2453520284, - 2715249950, - 2878018015, - 407841154, - 1076646439, - 2902096326, - 1119626361, - 2644871576, - 3293596858, - 1974815928, - 1844661750, - 3463913129, - 2148341342, - 1291573243, - 2169246810, - 4121523483, - 1001828258, - 1201094285, - 2768247741, - 1187741668, - 2584658467, - 3298403928, - 19508794, - 2376541132, - 1834240070, - 2795223531, - 1569676009, - 2083566117, - 197357026, - 2187510552, - 735841364, - 1676166312, - 1470742315, - 1775423350, - 313697723, - 4150418093, - 1340236335, - 244289584, - 2419636137, - 1468768510, - 3948651668, - 4190434782, - 4240184620, - 1648085427, - 236983377, - 890850103, - 4132623272, - 1702226328, - 1275783657, - 1282323970, - 1068123219, - 2507371645, - 3567002166, - 2326254713, - 903986722, - 4275863595, - 681934646, - 3449788083, - 3658543764, - 3971267096, - 906890651, - 3220537887, - 3721238425, - 3424824919, - 4071298393, - 2350348033, - 851103835, - 308738784, - 3633342279, - 3294051464, - 60850237, - 4205293718, - 112318384, - 2392677891, - 4245426611, - 2813800938, - 544585705, - 862804086, - 635702611, - 1037318247, - 3062389067, - 1788723107, - 909046190, - 2633211481, - 1512124210, - 219688775, - 208669567, - 2341111326, - 1558771297, - 3962134609, - 3793701941, - 3678482598, - 3083064385, - 2224089049, - 121834348, - 3974742960, - 3285910891, - 2301078529, - 3991408934, - 1754131199, - 1115088030, - 742363340, - 1940874870, - 3815841729, - 3751295025, - 2438487791, - 505244872, - 2737497734, - 3686088533, - 3642212863, - 745389967, - 1171532550, - 1037089173, - 1222170147, - 3339498780, - 2420183845, - 1812185882, - 1685491860, - 2054045371, - 2916731859, - 625306391, - 2885097536, - 1531527755, - 881885849, - 4123937969, - 1223959847, - 2997456354, - 986868947, - 3499204336, - 2002259460, - 702456427, - 2180569440, - 573224210, - 3359535553, - 2265103812, - 4007182161, - 1269646680, - 3540842839, - 796051848, - 938241882, - 2538303685, - 2742240808, - 143742684, - 1113882324, - 2339965914, - 3861371091, - 1940827720, - 373043434, - 290172183, - 3309138211, - 2228544253, - 2697368504, - 314268409, - 3275936717, - 1292638603, - 3619702424, - 4134658461, - 460321774, - 3287938469, - 1056154866, - 176670850, - 21652801, - 1897619182, - 1048386785, - 3446694205, - 759789706, - 114313839, - 2656037303, - 3619510848, - 4025392301, - 2133557464, - 701572241, - 1063247283, - 2433408287, - 1329294123, - 3455774261, - 1060648990, - 372371830, - 54152053, - 4157273412, - 1028934374, - 1059536047, - 3705266340, - 2249471172, - 3723179498, - 1685144370, - 3532165296, - 426031379, - 3992264848, - 3558187874, - 789327393, - 113797115, - 3197466265, - 1846132308, - 3662284834, - 373999393, - 3527638544, - 3168581066, - 1873953485, - 1547610606, - 4188855686, - 3909799060, - 2439098516, - 1366914413, - 2552185747, - 3438947887, - 164270951, - 367726843, - 464460365, - 3684470274, - 2811443509, - 2800117652, - 577716900, - 2360729125, - 3199339203, - 2042468020, - 322152071, - 350449026, - 1338453488, - 2169901536, - 1137834913, - 1224674594, - 819627367, - 866288223, - 3684373287, - 2802084500, - 883000071, - 2124730005, - 1794186521, - 1843025624, - 1107572762, - 1553821109, - 2255976928, - 2971962493, - 1294016394, - 2779781930, - 1121528516, - 2599103154, - 52550939, - 1715784095, - 172080229, - 2909340023, - 2925801104, - 2758545802, - 2591511640, - 2537648991, - 3218650315, - 3620978015, - 2091529948, - 1908561691, - 4140639213, - 1468559118, - 3031446434, - 1538303433, - 3024702023, - 931817456, - 3315385244, - 530706340, - 776942735, - 1066889660, - 860858398, - 1380983258, - 3488107254, - 2352861366, - 768524865, - 3324839876, - 2985439364, - 2632570311, - 1269085635, - 591371761, - 3614267995, - 3634334398, - 494364876, - 2201954801, - 1822851563, - 912761258, - 3560975524, - 2823473944, - 2726516653, - 3900329480, - 3046312346, - 3202027455, - 3749404319, - 4111460447, - 3394432067, - 845091851, - 3547437620, - 2438586236, - 891753776, - 2658014652, - 3263078955, - 3181133040, - 498702842, - 1919031583, - 1885259485, - 1033195211, - 2152110158, - 2916981319, - 3597923226, - 963475388, - 2390133552, - 1279019949, - 1532292872, - 3533828808, - 3410363134, - 4086929604, - 2384284137, - 736527574, - 921831322, - 978761510, - 3581033599, - 184754679, - 1142912287, - 3579159444, - 3754076798, - 3195299498, - 3924528503, - 3367661132, - 2664527388, - 3060833118, - 87824852, - 3341591982, - 1787431422, - 2190200189, - 724746657, - 2362957481, - 1893647787, - 631707083, - 3600263631, - 3112000291, - 1195347251, - 1980784313, - 1587897131, - 1505502575, - 730808447, - 2077493753, - 1766424589, - 4169095382, - 3023491880, - 1907255180, - 1400246919, - 3439802039, - 2353421484, - 2598206410, - 241608112, - 2800597464, - 1865113190, - 2692612807, - 655943539, - 3036801653, - 4273840934, - 1531071836, - 1388648504, - 4046738659, - 2566906137, - 3190630241, - 1259094505, - 2588960622, - 881378109, - 4029007789, - 1036716322, - 1440834140, - 1045545482, - 1611580537, - 3075000012, - 3160852091, - 125510553, - 1948935661, - 2528899056, - 1349973885, - 790409740, - 933146257, - 3340496167, - 2161701913, - 2203562833, - 127499997, - 2241686850, - 301650274, - 1189877278, - 2069676804, - 2149373712, - 3925298050, - 2363633783, - 316935596, - 222701686, - 1656250453, - 2585556113, - 2344566774, - 1641407783, - 2733425137, - 3458390692, - 3862744868, - 2081559814, - 1101703145, - 4213220732, - 2871617353, - 3821441284, - 1284486082, - 1295341251, - 231768815, - 3688216587, - 434412918, - 2085597609, - 1178947359, - 1499668986, - 332651835, - 848688224, - 783466121, - 2232129524, - 1984278527, - 54161279, - 480180313, - 1460924584, - 2764823460, - 1193698271, - 130579892, - 4246187421, - 2272443660, - 3890368592, - 3817991842, - 1891017699, - 3116376337, - 1838641006, - 202212708, - 548912086, - 1276402467, - 2627209063, - 3559295002, - 136668580, - 1463185340, - 3996451142, - 1195997589, - 3703309546, - 966209579, - 1495349328, - 3818068448, - 998187110, - 465377317, - 2740367678, - 393280342, - 1284923500, - 1224680970, - 2296772643, - 792366508, - 1312886999, - 563043397, - 3204722388, - 2362148129, - 3991589429, - 3812760429, - 2376309774, - 3955295822, - 3155646085, - 718545332, - 426415853, - 160354087, - 658523882, - 2523118731, - 1301823541, - 493847625, - 4056626119, - 2397998886, - 2294563568, - 1640569944, - 1159193321, - 1855737904, - 2179119691, - 2264199463, - 1222836898, - 3897707559, - 3276298930, - 941543833, - 3250950773, - 4256182925, - 3233880416, - 1087109968, - 952749286, - 404554758, - 1410748193, - 2627152250, - 979574373, - 2707691339, - 1014678447, - 2734357605, - 1706931772, - 1748581040, - 448294925, - 592225379, - 4161750627, - 3212838882, - 412410468, - 4235477551, - 1807215035, - 542939420, - 1486293258, - 2157680940, - 2605658897, - 3385782162, - 1415388253, - 1442117385, - 222759534, - 1396810746, - 3570065478, - 2736080078, - 2834358400, - 766728704, - 825544741, - 2946948174, - 2901144875, - 3302059473, - 1587854945, - 924399260, - 4038690247, - 3466315969, - 1867950179, - 3055097185, - 1209192020, - 561463698, - 1873204694, - 2398003028, - 1880272834, - 3725511642, - 1620394386, - 1896123040, - 707343795, - 3089248063, - 3628971822, - 2382385947, - 237300502, - 3375790143, - 3131500814, - 3130912940, - 810002204, - 2443950519, - 3073421036, - 2776473768, - 1723254820, - 480346159, - 2162458220, - 2901340432, - 1459347108, - 4157536165, - 1658112904, - 2653696906, - 3483498757, - 2172581712, - 2945148806, - 369575851, - 2708837017, - 3017439659, - 572356605, - 1687730653, - 3303917109, - 4185775943, - 1542629699, - 1823588861, - 758034556, - 207137717, - 4118907156, - 3551679965, - 579289490, - 130012884, - 3056847755, - 3298176206, - 1631448691, - 3883850548, - 1781666855, - 226013435, - 1191195284, - 162910909, - 2421225558, - 3472833198, - 3105014703, - 2998279186, - 989511739, - 3122448504, - 4031112897, - 798915782, - 3124120612, - 622880434, - 1550632402, - 3582513015, - 1897853778, - 3955800001, - 2843608758, - 1783793648, - 1234540483, - 2841204289, - 3078276811, - 1897041667, - 2644748191, - 2075116399, - 3566638118, - 2545072242, - 2705581107, - 2034593594, - 1102733458, - 563102160, - 3562036038, - 1559012378, - 3081027624, - 4277200811, - 29819624, - 952516720, - 288733188, - 3944002280, - 2580949355, - 2180907448, - 701845603, - 147266524, - 370348008, - 3271320890, - 2691393009, - 2383884999, - 3524671179, - 3939649284, - 1745553778, - 3201374283, - 1372111019, - 3219709954, - 848485081, - 667408054, - 3285357028, - 1335687583, - 3644214140, - 2613006844, - 4205559322, - 1312637533, - 1614630429, - 1683627889, - 1208640864, - 2834070995, - 3592578844, - 2358819465, - 1995443398, - 3413826769, - 1776126298, - 1410383645, - 2955631068, - 2993512768, - 3236365752, - 597697850, - 3130855667, - 872085307, - 3088552158, - 3059305728, - 2016688594, - 769456062, - 1704353403, - 2894459022, - 3397853480, - 3442669413, - 2849401449, - 2439338225, - 1765298087, - 3770362637, - 2012197480, - 1236698002, - 2547133981, - 3583709582, - 1222346033, - 66929813, - 1810978782, - 140921718, - 147006733, - 716546109, - 272190672, - 4270198935, - 4112878356, - 3459132487, - 2205334679, - 2655240589, - 3460427483, - 4004166046, - 2733896896, - 2662276672, - 1235355460, - 2080490490, - 3835662375, - 2012775662, - 3831435531, - 896042556, - 847436078, - 2690167548, - 2480708618, - 34486478, - 780307438, - 1206065597, - 3684584372, - 109239588, - 1177388702, - 186055243, - 542130697, - 431317368, - 4172245930, - 659717801, - 3115120181, - 3389111917, - 612902400, - 3093454605, - 994194783, - 3302496429, - 2727804282, - 3326713788, - 2909645217, - 4081309189, - 3915134273, - 1723403965, - 3538120244, - 3346690734, - 173973565, - 3745427359, - 3605615994, - 792777340, - 3898488212, - 2851691613, - 1310137864, - 3972391875, - 2800498965, - 2126178186, - 1804903633, - 1573085172, - 3765347540, - 1947401562, - 2004990638, - 1992294724, - 794994545, - 3989725162, - 4052205226, - 4275133463, - 999898041, - 680324841, - 653725316, - 4071639349, - 413310299, - 1532627194, - 1109186282, - 1454507986, - 1285781763, - 1986139893, - 2716119740, - 1215969667, - 4236644162, - 4222317454, - 3465516720, - 235341472, - 2665785383, - 2109288152, - 3865225429, - 3901456858, - 3743371291, - 2847911979, - 1626006535, - 2457976815, - 3706719872, - 2633385013, - 2583230327, - 4011068025, - 4054333527, - 693261486, - 2607135884, - 2466950569, - 2361552917, - 3954587268, - 761811134, - 3009769300, - 862264745, - 3029405930, - 2092574523, - 3841904849, - 3016847242, - 3730784897, - 504024595, - 2701889049, - 1117738628, - 3634064449, - 3718762927, - 1744136662, - 576863494, - 2218173873, - 1287233187, - 3397783039, - 4199567601, - 796784509, - 1140293913, - 4199890298, - 3894449063, - 1599629591, - 534382393, - 2188664199, - 1188379586, - 2149173053, - 2940426496, - 1090797566, - 659007198, - 1390171321, - 827457041, - 1830598637, - 4268312395, - 2538285212, - 3432324187, - 2356562943, - 618449365, - 59317777, - 32078910, - 1432616493, - 594046380, - 4005397788, - 406342838, - 2458307254, - 3622090071, - 567965897, - 2332609182, - 3913109946, - 4262950919, - 2223365555, - 3342426181, - 2937615906, - 2775839330, - 789924042, - 2547858296, - 4095742216, - 3553569019, - 2794397026, - 2669775846, - 3492940883, - 767973357, - 2223966883, - 1943349344, - 2397350813, - 1721534717, - 2284745964, - 3407740781, - 2117904262, - 3232034050, - 16565495, - 1931391360, - 3733107842, - 4226045949, - 4041262579, - 808886571, - 866728068, - 796865648, - 516939986, - 2539355262, - 3942135316, - 4094999605, - 2693105985, - 1495848441, - 2649483417, - 2160589585, - 2962242407, - 3100995834, - 3301101621, - 2928206991, - 3820618807, - 1087878038, - 2958883737, - 2394205787, - 1361447694, - 2272811100, - 485504015, - 3294843255, - 2682287431, - 678219980, - 2324071192, - 3963482109, - 3007126636, - 1199614183, - 3164538155, - 4161980987, - 2778925238, - 62318529, - 2375539054, - 1469419376, - 1541960838, - 4137797268, - 3249238197, - 361601473, - 3415181950, - 3260509788, - 22562270, - 1067118268, - 2385726257, - 1385555530, - 1365689695, - 812527635, - 2566479517, - 4102252154, - 1339610213, - 1617514414, - 803772772, - 1830781868, - 3612102712, - 3759491433, - 4122435791, - 2036628832, - 4064824538, - 1405949203, - 1439853420, - 3933859276, - 1375799746, - 1727029493, - 3830298109, - 3621177597, - 776904374, - 3379551454, - 3354675446, - 2449813947, - 899493279, - 305076564, - 2320614536, - 2993808751, - 947776875, - 2833196325, - 2012448246, - 2485862175, - 454484877, - 1523595652, - 4242593258, - 372556354, - 1103298284, - 1648831427, - 4146669347, - 3328164580, - 988612502, - 247392264, - 1866213683, - 4150811724, - 1147567895, - 1034212097, - 96214714, - 2690679554, - 3567190202, - 383537027, - 305717591, - 2233806779, - 1230730881, - 1081378737, - 3219338584, - 3352036676, - 1759154651, - 410897584, - 2266534968, - 20622694, - 966731333, - 3881030565, - 1681142483, - 4180658946, - 508491356, - 2075220083, - 862057085, - 3811486734, - 166193918, - 1952208076, - 287050898, - 4108801579, - 3634814657, - 1441695225, - 4165943170, - 985297899, - 1950886440, - 326103896, - 52511107, - 3840171112, - 1544404583, - 1483779206, - 2509714735, - 4191272841, - 196893190, - 1752138834, - 1387920625, - 3203092715, - 3305714296, - 4020283571, - 1033783085, - 873274953, - 2512442169, - 4050706108, - 50652702, - 1076717898, - 866310686, - 2170861319, - 893749800, - 2773398104, - 475134660, - 2354613509, - 2314268498, - 1221954098, - 1136667699, - 1313435548, - 887229560, - 1360766488, - 2670668096, - 2341729023, - 1931118167, - 3373726808, - 1111218187, - 3520098747, - 1688835878, - 2940851476, - 2064836287, - 3968980039, - 3836060133, - 2942296019, - 484909936, - 57105423, - 893060132, - 3098559004, - 2646028647, - 1116334271, - 1386055053, - 2672179664, - 3465976247, - 2445951289, - 3624670006, - 1585735163, - 2706230664, - 2994891068, - 3515469286, - 1276669612, - 512187154, - 3497635911, - 218620967, - 245089135, - 4175591651, - 4155493638, - 2748674032, - 1833505365, - 2012082402, - 2709336095, - 2120857657, - 137903528, - 488916124, - 2781208804, - 2409478644, - 274592315, - 199488251, - 2342346754, - 3601780192, - 1121367083, - 3549771569, - 3076621099, - 567283312, - 3387958196, - 2030339283, - 1104740149, - 612459390, - 300767243, - 3050650445, - 2239182768, - 4159761765, - 2869764157, - 634694727, - 1106345361, - 2997451119, - 1843299522, - 430102260, - 526441730, - 1780104678, - 367387529, - 478601662, - 2464829687, - 1470568684, - 59858427, - 3322874870, - 1861332380, - 4272110444, - 2809523403, - 592218878, - 245752719, - 1160055608, - 2650328653, - 4116988558, - 2035975860, - 1888310751, - 385128435, - 705277707, - 2618129743, - 1873449642, - 2767331965, - 2978152915, - 101342577, - 496164241, - 3628094899, - 3617214481, - 3276401486, - 2823749490, - 3226661007, - 2505966715, - 2070046503, - 201965634, - 992372236, - 808827712, - 3757676124, - 2428492087, - 1976499986, - 374480562, - 1080514793, - 2981903210, - 2278910388, - 2881090937, - 1587947770, - 2995760606, - 4065642844, - 1419256438, - 2879122696, - 799732699, - 2237576112, - 2722571981, - 1945610765, - 1061221696, - 3737822608, - 3766401804, - 1794205198, - 1324118794, - 1406627203, - 1246070059, - 1663528511, - 1697199427, - 1725153900, - 1644109777, - 1555884090, - 2104188396, - 1983559758, - 410269405, - 88182577, - 2259001736, - 3545896451, - 1498254313, - 158757369, - 2086803021, - 1006471632, - 1388265058, - 2489082752, - 4121338419, - 2933397258, - 1328272891, - 2440478606, - 1874429446, - 4165076143, - 3618125551, - 426429311, - 3523227097, - 2221326670, - 1036420538, - 3084730068, - 2249454606, - 3627764167, - 2906922652, - 4069859614, - 3551319928, - 2008056501, - 4263883938, - 805474483, - 414460063, - 3631091874, - 4255385897, - 3566701974, - 3056142974, - 1412413858, - 1628335284, - 2988130741, - 1804322043, - 1260149640, - 313631319, - 1940664462, - 1251074951, - 142103685, - 253384940, - 3517416389, - 3340640425, - 426880986, - 3294484335, - 635363293, - 268138849, - 1492613474, - 4200722240, - 3285686499, - 801295374, - 2024943475, - 590788678, - 4058601973, - 2569141816, - 4203227487, - 3873029963, - 2938957765, - 2653323416, - 875351891, - 1225934624, - 3959624149, - 2491580758, - 2130038205, - 4156378359, - 2785882188, - 734574419, - 1648103757, - 3995559913, - 2769178131, - 715734349, - 851342715, - 4066600521, - 2873167910, - 367737619, - 2708556266, - 3095462186, - 2954581914, - 3596166923, - 416437171, - 3630899889, - 2652177241, - 4082498041, - 2092525793, - 4097981775, - 1798161545, - 921570876, - 2954127398, - 2903455651, - 2304798239, - 1258114130, - 3817192020, - 2909483597, - 2182250255, - 1650253384, - 1959237900, - 1275159459, - 3262458111, - 1272009836, - 452811324, - 4207284298, - 4014068399, - 2116331651, - 3821668629, - 2218821094, - 1832698014, - 993485941, - 3496889636, - 2641214130, - 1989726970, - 3632025474, - 3072807154, - 871546351, - 2112654715, - 3554921834, - 3035598613, - 3203667447, - 1926566053, - 3703963219, - 1744429280, - 2894885223, - 1619369957, - 3567760659, - 66604019, - 3634627360, - 1775619354, - 669243863, - 345554459, - 3410469540, - 1155755489, - 2545915023, - 1881645052, - 3014832333, - 991894682, - 2556172243, - 3344954219, - 1093682626, - 536721455, - 412887158, - 1927162080, - 598758569, - 1718574019, - 1056186104, - 3316535817, - 3595128167, - 1130595079, - 3859435692, - 909947430, - 1719271591, - 3984005498, - 1953575959, - 3439367835, - 1566599034, - 2942150633, - 3026742323, - 2447170232, - 3686824848, - 33431557, - 725397174, - 2320663765, - 1675683651, - 2299446941, - 3516433253, - 2048939543, - 75279946, - 2544154794, - 3300029642, - 3032144243, - 2785830887, - 2021781530, - 418522190, - 2390722364, - 197680486, - 1642831997, - 1118262868, - 1200602067, - 3464739661, - 515926185, - 1725239910, - 3994742774, - 3240728600, - 3145738947, - 1844532555, - 1620264626, - 4241585699, - 1317499181, - 572389244, - 717366235, - 1894941465, - 2632625765, - 1146787696, - 2682002800, - 191358041, - 1139509005, - 1281516738, - 2167935821, - 144366517, - 3850560313, - 2955928604, - 2476854189, - 1240245623, - 1201598792, - 3315121239, - 2067079714, - 2242637086, - 2647850477, - 3701580427, - 3720909733, - 1981567187, - 2939632674, - 3130494037, - 2236040041, - 4000430650, - 1741562234, - 2404004263, - 1683735404, - 57955428, - 3003892817, - 1345733216, - 4112811741, - 3929418066, - 1702502146, - 1563779715, - 131125957, - 3456434831, - 2711946360, - 1514662008, - 593277188, - 2310980037, - 2627253234, - 2196991086, - 734788659, - 1638451151, - 2011170924, - 2234624709, - 2644747684, - 1442906543, - 3186977507, - 3041580333, - 3056574820, - 3726946928, - 777432165, - 3096870618, - 2958583174, - 3198704532, - 968654077, - 2339592888, - 631523839, - 3180919153, - 828636972, - 578695105, - 2899843141, - 3000388753, - 3269720758, - 3037015517, - 3799598414, - 3149305575, - 2046835794, - 3530890716, - 30989298, - 2186510021, - 1179096535, - 2221009982, - 338766029, - 769504603, - 3971239377, - 2393081975, - 1544565430, - 865242093, - 3393553101, - 3524464856, - 3304062974, - 1546646620, - 3279691371, - 178822578, - 4081273713, - 88444191, - 2680632909, - 1275199257, - 2416414254, - 2419761020, - 3715897230, - 132751851, - 1119529993, - 1004169874, - 495930835, - 3413915087, - 899768725, - 3645578154, - 2499698498, - 132509091, - 25904922, - 3287880660, - 788515331, - 642323673, - 3147546403, - 3581174260, - 979602099, - 1611369165, - 2161460814, - 1095063311, - 4182557998, - 958677367, - 3492305778, - 1557372251, - 2654290797, - 566444622, - 2701083822, - 2781307252, - 1273578767, - 1387975446, - 597850559, - 2236234519, - 1466168533, - 3557657361, - 2574663738, - 4108434229, - 162028021, - 2621084169, - 403011375, - 1391061643, - 973642355, - 972433280, - 3904424547, - 1591050358, - 3027468192, - 480562739, - 847391571, - 10278541, - 891807531, - 234892969, - 1990103246, - 2718435782, - 2962618312, - 2457477588, - 2173705582, - 2840711601, - 359129634, - 1862207218, - 3179005355, - 1645874306, - 679472772, - 2797899978, - 893909309, - 3298150180, - 2373596716, - 845944576, - 743626020, - 1101645480, - 4118046352, - 3085126771, - 190441990, - 1429251749, - 3631205174, - 3554760855, - 4126353549, - 2783261431, - 2895927005, - 3712938561, - 3519916684, - 3954611223, - 3504723371, - 2842753092, - 570258870, - 1757758568, - 3191712884, - 959844677, - 3815947765, - 3894098339, - 4252794303, - 568847337, - 14599453, - 3247617266, - 4256259025, - 132921313, - 611627952, - 461842544, - 721786743, - 235906119, - 3838181118, - 2693917876, - 3584801849, - 1303671253, - 2715956398, - 2478140733, - 1156883352, - 304296362, - 4257481701, - 3383377199, - 2816549488, - 3609758773, - 965337774, - 663463971, - 2101116389, - 870118473, - 3961827451, - 1411666912, - 4042208195, - 1437767680, - 3011320673, - 628908699, - 3715862090, - 787455013, - 215407986, - 2354427551, - 3501402624, - 341761723, - 2789621258, - 2795910531, - 2196948999, - 506787756, - 2444762992, - 882455964, - 1775227861, - 3463655418, - 1613425878, - 1710055679, - 2954483466, - 428135061, - 3208103369, - 356408692, - 339078074, - 2783728411, - 1608672253, - 3468998955, - 1715268362, - 1775704366, - 2095354627, - 1816748520, - 630996641, - 3054793936, - 1376617622, - 2095298775, - 62048120, - 4177859804, - 1899791126, - 2051127667, - 196664139, - 3319551346, - 1662947862, - 258417178, - 4038741968, - 400172122, - 2774932852, - 1935359703, - 2920156957, - 70999081, - 2298111845, - 3155118664, - 954252611, - 3035077780, - 3365721841, - 3259958165, - 2966262086, - 3966771258, - 1664706885, - 1549210642, - 644267342, - 3625779475, - 35847756, - 4268504441, - 104221147, - 3793167343, - 1434898955, - 516380452, - 305714056, - 3997280948, - 3452590585, - 3101574474, - 2438551436, - 1487302239, - 699799430, - 1896565295, - 179635944, - 3577458582, - 2390294577, - 3440161015, - 1366242881, - 2623409222, - 3227684446, - 1771283490, - 1860070074, - 2525129905, - 639424465, - 3866671198, - 2583778872, - 3087668725, - 2565874762, - 4124409183, - 1716978878, - 2495926535, - 105275674, - 504654616, - 439824866, - 139092645, - 235256347, - 2052436704, - 3482201219, - 1668293469, - 3987504902, - 1030894846, - 1802687424, - 3849872340, - 1729194708, - 628020486, - 2758654785, - 3275824595, - 3396548009, - 2947249119, - 2719480091, - 2248726437, - 1528548653, - 981143750, - 3855057227, - 1889465902, - 717326364, - 3888793792, - 273177536, - 3318606608, - 2015221724, - 2498667772, - 1776840513, - 1340254524, - 2212922926, - 2588648640, - 1204650460, - 2486401616, - 1128711621, - 4071028143, - 3938015234, - 626760850, - 3422307088, - 3731948114, - 1910812571, - 829867604, - 600054827, - 846276053, - 1319580597, - 3615631523, - 747621617, - 1554392685, - 3653393337, - 3912733768, - 2977154193, - 1155671306, - 2833201935, - 2279065800, - 3013201026, - 3987119777, - 3274777118, - 1140056448, - 1816979260, - 2179608234, - 3678482613, - 3814469814, - 2355321390, - 2570806559, - 3322663004, - 1190205437, - 1292030121, - 445850416, - 1007609872, - 3203863217, - 4141964142, - 1966808852, - 1308343552, - 2379169568, - 392323216, - 2481626389, - 382317464, - 4182472552, - 2023490843, - 3775512346, - 1114127726, - 732212450, - 329275334, - 3657781986, - 2294505476, - 1622386892, - 405801553, - 3621219497, - 3355243150, - 1442897718, - 3394995861, - 770248995, - 1364846261, - 3024153552, - 3538800322, - 2652257278, - 210120734, - 1301948433, - 1247565263, - 2146699588, - 1320374762, - 897290932, - 3862254368, - 799831442, - 1914207670, - 3377904039, - 2607906732, - 4027092024, - 2763947804, - 1014475044, - 896406089, - 3514973186, - 3879235573, - 4012732407, - 3867478549, - 1414327479, - 2649597407, - 3662261846, - 2995439679, - 1996639121, - 4039511636, - 2765791775, - 3303435936, - 637778742, - 3898457584, - 518685508, - 986059390, - 1574901139, - 3032251494, - 245461207, - 3766190730, - 1353320413, - 1935265299, - 1973837470, - 3278804186, - 3214092943, - 2957835889, - 4091085324, - 255294387, - 1414770228, - 2217535634, - 1675408567, - 3831909433, - 3020670330, - 1716921427, - 3386562328, - 1988740714, - 261016972, - 2290787112, - 1983824431, - 3086118481, - 1254847645, - 4067049839, - 249698862, - 1498678745, - 784029040, - 439729372, - 4110883615, - 1613350319, - 4105915119, - 1813130945, - 679455742, - 3976052181, - 3001295001, - 2104820813, - 1162900350, - 1648044702, - 2514586897, - 2421180310, - 2283890166, - 1404122339, - 4282148475, - 1644006790, - 3614130073, - 423899433, - 2013836895, - 3009479111, - 363709968, - 1155199660, - 628881947, - 2369525950, - 3548378305, - 203494928, - 1558133663, - 2037293462, - 1180976643, - 2702892598, - 3361665135, - 3573942869, - 3246684762, - 4184909495, - 3113930053, - 3314026892, - 3543006365, - 1777684175, - 738987079, - 2408860048, - 3375406400, - 3410541034, - 2483402110, - 874265790, - 2728628682, - 2465254020, - 2763032539, - 1773018316, - 3091717385, - 3056048355, - 1627578084, - 396052686, - 799842732, - 4040194951, - 642912929, - 3176656946, - 1805691782, - 3531813776, - 4064329368, - 517657652, - 3683563145, - 2227722419, - 1853029449, - 3503447249, - 3163192646, - 1056555858, - 2381084858, - 781559829, - 2363497066, - 254498834, - 2476144988, - 4269432604, - 3103258769, - 2392440039, - 268597153, - 2516299873, - 1081588303, - 2566866985, - 1638912927, - 3024289291, - 3157978282, - 834525272, - 3419277910, - 3891176370, - 2309185067, - 3221257587, - 3004541554, - 1137530190, - 571926244, - 210118849, - 4293182758, - 2869369690, - 2784618674, - 3305896333, - 1489585333, - 3381035852, - 3790732527, - 4028183561, - 2653638804, - 2736737505, - 3797140814, - 962515850, - 2258143878, - 3564546768, - 1895130701, - 2228287037, - 2312197219, - 2626222474, - 2181090448, - 3689165959, - 3520225197, - 136758892, - 1431487309, - 2930236310, - 154402287, - 2738491227, - 344509539, - 1896458514, - 3779882828, - 2133529203, - 4286044900, - 2605636955, - 820659343, - 1811842338, - 3962094114, - 3687915771, - 2155975276, - 3928836378, - 3691703524, - 1904018112, - 1881354556, - 872419853, - 4278198980, - 2885521339, - 1376745620, - 3236945512, - 1671716562, - 370644302, - 101468236, - 284769900, - 634980137, - 1605335139, - 1282158145, - 2660914377, - 854331875, - 1000704891, - 699019315, - 2780029935, - 1260383173, - 2779902986, - 582742932, - 3718843509, - 1408230782, - 607436972, - 2934336571, - 115661521, - 4263553433, - 4276473954, - 370169606, - 2853087319, - 1027669570, - 1720229704, - 3409791727, - 285337702, - 1345790431, - 2943146983, - 2685478343, - 1487297154, - 2969341474, - 2458039967, - 214515201, - 3687721469, - 3667625756, - 1898369795, - 4230564025, - 223641470, - 3069294914, - 4116721676, - 1141151651, - 3584477327, - 384051169, - 3317163317, - 4072972665, - 1029203420, - 3860139652, - 3715612400, - 2510677831, - 612600367, - 3268435709, - 3097313931, - 370004076, - 1322283423, - 2435703861, - 1160258309, - 3171459443, - 2335321836, - 2673338508, - 4025907014, - 3884845317, - 3818902857, - 3795803731, - 147850868, - 3685404583, - 3974796746, - 356681264, - 1011203630, - 1562517741, - 2845328877, - 1736512866, - 988217774, - 181135240, - 3685976710, - 1256118794, - 3209965375, - 3363408610, - 466254860, - 1238802224, - 2587721339, - 292142854, - 3507044396, - 3171441166, - 1280320546, - 1455646463, - 3644414748, - 1408953397, - 4061980018, - 3356361836, - 3625119644, - 2573263880, - 3703724981, - 200726676, - 3890873655, - 1126147734, - 3196707440, - 730509342, - 789995844, - 4048947862, - 2517783692, - 4044958641, - 1400738730, - 2018024150, - 1708076617, - 4025504571, - 3137500850, - 1286235939, - 1493096611, - 2608737991, - 3110030970, - 2642728101, - 1595719512, - 364408339, - 2079077251, - 4193186146, - 2554702544, - 2507932088, - 1215331848, - 2013306012, - 1017301200, - 922684690, - 1736386371, - 1626170469, - 3727347974, - 2689656441, - 2440555759, - ]; - - static final String privateKeyFCM = String.fromCharCodes(List.generate( - _envieddataprivateKeyFCM.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataprivateKeyFCM[i] ^ _enviedkeyprivateKeyFCM[i])); - - static const List _enviedkeypassnpassenger = [ - 2488819431, - 2770223150, - 2582335575, - 2610561879, - 2411505875, - 1657282424, - 2400061973, - 1985533252, - 4982124, - 3405874632, - 4088173917, - 168716871, - 1460210415, - ]; - - static const List _envieddatapassnpassenger = [ - 2488819343, - 2770223180, - 2582335536, - 2610561845, - 2411505850, - 1657282316, - 2400062071, - 1985533212, - 4982046, - 3405874576, - 4088173871, - 168716805, - 1460210333, - ]; - - static final String passnpassenger = String.fromCharCodes(List.generate( - _envieddatapassnpassenger.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatapassnpassenger[i] ^ _enviedkeypassnpassenger[i])); - - static const List _enviedkeynewId = [ - 3031355905, - 2427189358, - 4227842261, - ]; - - static const List _envieddatanewId = [ - 3031356015, - 2427189259, - 4227842210, - ]; - - static final String newId = String.fromCharCodes(List.generate( - _envieddatanewId.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatanewId[i] ^ _enviedkeynewId[i])); - - static const List _enviedkeyallowed = [ - 571556174, - 1938322362, - 2450700270, - 3883374647, - 2501284320, - 589521911, - 2333171601, - 2952046055, - 3394402264, - 765042122, - 3480784058, - 1478648951, - ]; - - static const List _envieddataallowed = [ - 571556122, - 1938322376, - 2450700167, - 3883374663, - 2501284250, - 589521843, - 2333171683, - 2952045966, - 3394402222, - 765042095, - 3480784072, - 1478648909, - ]; - - static final String allowed = String.fromCharCodes(List.generate( - _envieddataallowed.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataallowed[i] ^ _enviedkeyallowed[i])); - - static const List _enviedkeybasicAuthCredentials = [ - 1171627515, - 2920834, - 1773476736, - 1662360174, - 3976040406, - 420027252, - 2188556584, - 2766592129, - 326216410, - 3265762873, - 3780778546, - 3561706076, - 21086913, - 574055011, - 3882614780, - 1826192253, - 3474285061, - 3822251971, - 2387425596, - 3594997982, - 1521373709, - 4284943469, - 2531332148, - 1426969750, - 1118645882, - 1075537670, - 569556090, - 978228654, - 4161679133, - 2395031260, - 380630070, - ]; - - static const List _envieddatabasicAuthCredentials = [ - 1171627404, - 2920947, - 1773476846, - 1662360067, - 3976040359, - 420027141, - 2188556635, - 2766592235, - 326216355, - 3265762895, - 3780778565, - 3561706038, - 21086903, - 574055001, - 3882614674, - 1826192140, - 3474285175, - 3822251930, - 2387425654, - 3594997902, - 1521373773, - 4284943452, - 2531332099, - 1426969765, - 1118645837, - 1075537758, - 569555976, - 978228726, - 4161679217, - 2395031198, - 380630106, - ]; - - static final String basicAuthCredentials = String.fromCharCodes( - List.generate( - _envieddatabasicAuthCredentials.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatabasicAuthCredentials[i] ^ - _enviedkeybasicAuthCredentials[i])); - - static const List _enviedkeybasicCompareFaces = [ - 2619977277, - 3663038405, - 2607741389, - 1493848637, - 3168440982, - 2922050375, - 1637496925, - 3485178165, - 2577893418, - 1320091529, - 358422193, - 3956561098, - 3865055531, - 3228809269, - 194868560, - 1207514434, - 3953247386, - 2209440152, - 3279222745, - 592735149, - 3806977348, - 790419202, - 3293672064, - 2229699769, - 162266597, - 2376414881, - 1154960442, - 3956440468, - ]; - - static const List _envieddatabasicCompareFaces = [ - 2619977287, - 3663038383, - 2607741368, - 1493848663, - 3168441082, - 2922050354, - 1637496876, - 3485178195, - 2577893466, - 1320091619, - 358422155, - 3956561060, - 3865055578, - 3228809287, - 194868489, - 1207514408, - 3953247466, - 2209440216, - 3279222760, - 592735130, - 3806977399, - 790419253, - 3293672152, - 2229699787, - 162266557, - 2376414925, - 1154960504, - 3956440568, - ]; - - static final String basicCompareFaces = String.fromCharCodes( - List.generate( - _envieddatabasicCompareFaces.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatabasicCompareFaces[i] ^ _enviedkeybasicCompareFaces[i])); - - static const List _enviedkeybasicCompareFacesURL = [ - 1346303975, - 2629076685, - 2970965832, - 558341252, - 548577589, - 4014912986, - 3777192577, - 3989160753, - 3957276480, - 4162203919, - 3049854352, - 724067773, - 3297673131, - 906535930, - 3377634195, - 832648210, - 4144867747, - 4103292733, - 124892029, - 2492806706, - 1038049038, - 786664172, - 2157258951, - 1881524520, - 3686067592, - 3042675886, - 3111736241, - 2506046267, - 764724622, - 997676373, - 3116583509, - 2275122009, - 2732506655, - 4203471349, - 3647882059, - 2832153296, - 3544329552, - 3333848209, - 3098941436, - 179874878, - 4253300882, - 1937986626, - 2194413499, - 723497112, - 4131989256, - 97391730, - 4264680715, - 4152555737, - 3043272639, - 639178387, - 4190211238, - 274626550, - 827003188, - 3381416721, - 623732000, - 3400423116, - 801088801, - 1732870145, - 2309896388, - 518112003, - ]; - - static const List _envieddatabasicCompareFacesURL = [ - 1346303887, - 2629076665, - 2970965820, - 558341364, - 548577606, - 4014912992, - 3777192622, - 3989160734, - 3957276454, - 4162204014, - 3049854451, - 724067800, - 3297673094, - 906535838, - 3377634294, - 832648294, - 4144867782, - 4103292766, - 124891913, - 2492806687, - 1038049128, - 786664154, - 2157259006, - 1881524506, - 3686067644, - 3042675869, - 3111736200, - 2506046217, - 764724717, - 997676385, - 3116583478, - 2275122030, - 2732506673, - 4203471261, - 3647882030, - 2832153250, - 3544329535, - 3333848314, - 3098941321, - 179874911, - 4253300962, - 1937986610, - 2194413461, - 723497211, - 4131989351, - 97391647, - 4264680740, - 4152555706, - 3043272656, - 639178494, - 4190211286, - 274626455, - 827003206, - 3381416820, - 623732095, - 3400423082, - 801088832, - 1732870242, - 2309896353, - 518112112, - ]; - - static final String basicCompareFacesURL = String.fromCharCodes( - List.generate( - _envieddatabasicCompareFacesURL.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatabasicCompareFacesURL[i] ^ - _enviedkeybasicCompareFacesURL[i])); - - static const List _enviedkeyaccountSIDTwillo = [ - 4061742007, - 3599962607, - 1635104436, - 2389009084, - 2034372200, - 3565771371, - 1726104097, - 3366616123, - 2662269498, - 2354541721, - 2460343423, - 1613949928, - 3801075804, - 2445061548, - 1768226310, - 745100707, - 4271583822, - 1185092190, - 1052663448, - 2021863819, - 2938391466, - 3189594433, - 229378354, - 1683737623, - 1509479591, - 1718166343, - 3103556867, - 453424511, - 4132595251, - 1579233130, - 4251866744, - 2580267701, - 3036822815, - 2007268182, - 145513440, - 3130610447, - 831047080, - 3331115302, - 3908007566, - 2106450412, - 2677853752, - ]; - - static const List _envieddataaccountSIDTwillo = [ - 4061742054, - 3599962537, - 1635104460, - 2389009036, - 2034372121, - 3565771282, - 1726104085, - 3366616078, - 2662269452, - 2354541811, - 2460343306, - 1613949826, - 3801075823, - 2445061524, - 1768226357, - 745100749, - 4271583863, - 1185092134, - 1052663533, - 2021863922, - 2938391448, - 3189594480, - 229378315, - 1683737635, - 1509479638, - 1718166385, - 3103556913, - 453424454, - 4132595266, - 1579233115, - 4251866654, - 2580267743, - 3036822831, - 2007268143, - 145513431, - 3130610519, - 831047130, - 3331115390, - 3908007650, - 2106450350, - 2677853780, - ]; - - static final String accountSIDTwillo = String.fromCharCodes( - List.generate( - _envieddataaccountSIDTwillo.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataaccountSIDTwillo[i] ^ _enviedkeyaccountSIDTwillo[i])); - - static const List _enviedkeyserverAPI = [ - 2293015959, - 2926936416, - 754713994, - 1879177331, - 3010367632, - 2331019857, - 1981454485, - 2022062379, - 70733539, - 2385910867, - 4181703881, - 3811532071, - 2083581455, - 2024042842, - 872991547, - 2096731808, - 3687220286, - 1079788284, - 2972148923, - 3463026642, - 702866374, - 3833629760, - 3254795387, - 1748563216, - 1425761115, - 1114265423, - 1291897108, - 3508612605, - 4170163035, - 64332401, - 4001548807, - 593052420, - 2738184806, - 3949311381, - 4030058807, - 433727145, - 1412218154, - 984455934, - 3018343098, - 607855449, - 3831988072, - 3988357687, - 2020725381, - 1608151706, - 3038453786, - 311730672, - 294232048, - 1259710598, - 3134368654, - 1212166389, - 3021130905, - 4092652837, - 3607733940, - 3624672522, - 3325104542, - 2343446236, - 1940698349, - 3741285099, - 576553194, - 2753508854, - 1533348535, - 953434871, - 3183028239, - 188764603, - 237251648, - 412548870, - 927203250, - 3059078396, - 1706005021, - 513065983, - 1244466660, - 1156042268, - 1643413036, - 1233060717, - 501636137, - 3310073628, - 704059199, - 1593488971, - 1269263079, - 1263949358, - 2810813537, - 3514255579, - 1027853145, - 2559804475, - 504400660, - 2908260781, - 3891590208, - 1988350317, - 3793199272, - 1138964747, - 2931313742, - 1249563942, - 1775933755, - 680400221, - 4217916984, - 2770259341, - 738612783, - 2484845867, - 3547361336, - 910699503, - 1325736454, - 1224765566, - 711030438, - 1283633041, - 48458527, - 655012284, - 1770237206, - 531760275, - 87583876, - 1962181311, - 3646947175, - 839419762, - 3563905313, - 2872121407, - 3280777072, - 3217748352, - 2164796486, - 2913284242, - 2905637391, - 2831279558, - 1468848219, - 2550222175, - 3982541680, - 2995326993, - 4035210995, - 267043828, - 716873193, - 1116245303, - 1822772839, - 927480690, - 3097843470, - 3851424742, - 3994979247, - 2542882136, - 3999272813, - 1478207279, - 2410291106, - 3137210450, - 2933337757, - 3196350738, - 1453871709, - 2931724670, - 1070266193, - 1472563550, - 3427297970, - 3645735156, - 2112201060, - 3442776882, - 2593705571, - 839101667, - 374945482, - 284772623, - 3598299129, - 2573901293, - 2786779760, - 3198178720, - 3250698064, - 3986009591, - ]; - - static const List _envieddataserverAPI = [ - 2293016006, - 2926936369, - 754714075, - 1879177250, - 3010367743, - 2331019827, - 1981454534, - 2022062425, - 70733457, - 2385910805, - 4181703840, - 3811532061, - 2083581534, - 2024042764, - 872991594, - 2096731800, - 3687220233, - 1079788164, - 2972148974, - 3463026661, - 702866364, - 3833629751, - 3254795320, - 1748563302, - 1425761078, - 1114265365, - 1291897198, - 3508612519, - 4170163007, - 64332304, - 4001548927, - 593052529, - 2738184757, - 3949311399, - 4030058833, - 433727131, - 1412218137, - 984455847, - 3018343054, - 607855412, - 3831987986, - 3988357632, - 2020725448, - 1608151776, - 3038453859, - 311730623, - 294231946, - 1259710708, - 3134368694, - 1212166298, - 3021131005, - 4092652823, - 3607733974, - 3624672632, - 3325104552, - 2343446167, - 1940698292, - 3741285010, - 576553103, - 2753508784, - 1533348566, - 953434787, - 3183028313, - 188764663, - 237251591, - 412548917, - 927203321, - 3059078351, - 1706005109, - 513065863, - 1244466641, - 1156042310, - 1643413069, - 1233060664, - 501636176, - 3310073700, - 704059144, - 1593488942, - 1269263038, - 1263949400, - 2810813472, - 3514255490, - 1027853097, - 2559804538, - 504400706, - 2908260809, - 3891590155, - 1988350214, - 3793199237, - 1138964793, - 2931313782, - 1249563920, - 1775933813, - 680400137, - 4217917034, - 2770259428, - 738612764, - 2484845905, - 3547361355, - 910699478, - 1325736559, - 1224765485, - 711030505, - 1283633151, - 48458567, - 655012296, - 1770237262, - 531760321, - 87583949, - 1962181319, - 3646947092, - 839419653, - 3563905350, - 2872121356, - 3280777019, - 3217748453, - 2164796453, - 2913284304, - 2905637474, - 2831279541, - 1468848183, - 2550222188, - 3982541606, - 2995327081, - 4035210937, - 267043789, - 716873118, - 1116245368, - 1822772810, - 927480580, - 3097843527, - 3851424662, - 3994979288, - 2542882093, - 3999272793, - 1478207359, - 2410291156, - 3137210469, - 2933337849, - 3196350841, - 1453871637, - 2931724565, - 1070266121, - 1472563504, - 3427298011, - 3645735041, - 2112200988, - 3442776959, - 2593705520, - 839101607, - 374945453, - 284772696, - 3598299041, - 2573901215, - 2786779688, - 3198178764, - 3250698002, - 3986009499, - ]; - - static final String serverAPI = String.fromCharCodes(List.generate( - _envieddataserverAPI.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataserverAPI[i] ^ _enviedkeyserverAPI[i])); - - static const List _enviedkeymapAPIKEY = [ - 590595859, - 1725547051, - 710486845, - 1227915785, - 2549895144, - 688514078, - 3943369896, - 3858000073, - 869856315, - 848858417, - 435215866, - 2514344073, - 1588727850, - 2309094374, - 965634129, - 1998686686, - 4095429781, - 3708319268, - 2120152229, - 4103649435, - 4102909837, - 2905227452, - 494799181, - 3532194356, - 4103156907, - 3555540401, - 2752131075, - 2032733869, - 1504269994, - 1766878288, - 1883341851, - 2651616596, - 779141393, - 2296724889, - 1004035135, - 445861254, - 1623814505, - 304800323, - 4036018663, - ]; - - static const List _envieddatamapAPIKEY = [ - 590595922, - 1725547106, - 710486855, - 1227915880, - 2549895099, - 688514151, - 3943369963, - 3858000015, - 869856328, - 848858470, - 435215800, - 2514344184, - 1588727900, - 2309094285, - 965634057, - 1998686628, - 4095429886, - 3708319253, - 2120152290, - 4103649529, - 4102909856, - 2905227486, - 494799118, - 3532194419, - 4103156947, - 3555540422, - 2752131186, - 2032733945, - 1504270045, - 1766878234, - 1883341898, - 2651616543, - 779141464, - 2296724988, - 1004035191, - 445861356, - 1623814433, - 304800373, - 4036018643, - ]; - - static final String mapAPIKEY = String.fromCharCodes(List.generate( - _envieddatamapAPIKEY.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatamapAPIKEY[i] ^ _enviedkeymapAPIKEY[i])); - - static const List _enviedkeytwilloRecoveryCode = [ - 3061181226, - 711391497, - 4095166760, - 1023880297, - 1881687363, - 2641927194, - 2425000206, - 2521734215, - 1014044374, - 2699701736, - 3823094162, - 1444617229, - 3912188074, - 1273144673, - 817689102, - 85385811, - 1084488378, - 3544249515, - 854844610, - 1298892397, - 1626466121, - 3984551581, - 1141458084, - 3261001117, - 3898644321, - 995741513, - 4053079005, - 759468828, - 1405019929, - 4203215804, - 1255405236, - ]; - - static const List _envieddatatwilloRecoveryCode = [ - 3061181289, - 711391560, - 4095166845, - 1023880286, - 1881687418, - 2641927262, - 2425000262, - 2521734167, - 1014044318, - 2699701721, - 3823094224, - 1444617319, - 3912188143, - 1273144664, - 817689182, - 85385734, - 1084488434, - 3544249503, - 854844551, - 1298892345, - 1626466065, - 3984551625, - 1141458167, - 3261001157, - 3898644283, - 995741457, - 4053078959, - 759468868, - 1405020021, - 4203215870, - 1255405272, - ]; - - static final String twilloRecoveryCode = String.fromCharCodes( - List.generate( - _envieddatatwilloRecoveryCode.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatatwilloRecoveryCode[i] ^ _enviedkeytwilloRecoveryCode[i])); - - static const List _enviedkeyauthTokenTwillo = [ - 819342226, - 788789891, - 3123247776, - 1481241070, - 131911166, - 4108653561, - 3716173209, - 1119431390, - 1550093162, - 2509594978, - 2860707611, - 2111091813, - 4054343762, - 3411344303, - 1994883266, - 3969747323, - 1882528013, - 3978866887, - 1319130456, - 3700576663, - 3709959726, - 2119958655, - 382328356, - 3154706001, - 3101953264, - 539908562, - 1029018845, - 3103710034, - 1952580682, - 3757216819, - 305274852, - 946291334, - 3010737308, - 1257562287, - 96545321, - 2074025436, - 4085510880, - 3435203013, - 2957985435, - ]; - - static const List _envieddataauthTokenTwillo = [ - 819342245, - 788789939, - 3123247829, - 1481241047, - 131911110, - 4108653459, - 3716173292, - 1119431406, - 1550093144, - 2509594963, - 2860707631, - 2111091722, - 4054343722, - 3411344343, - 1994883318, - 3969747210, - 1882528061, - 3978866866, - 1319130479, - 3700576675, - 3709959710, - 2119958605, - 382328348, - 3154705956, - 3101953216, - 539908576, - 1029018860, - 3103709991, - 1952580734, - 3757216834, - 305274769, - 946291376, - 3010737321, - 1257562359, - 96545371, - 2074025348, - 4085510796, - 3435202951, - 2957985527, - ]; - - static final String authTokenTwillo = String.fromCharCodes(List.generate( - _envieddataauthTokenTwillo.length, - (int i) => i, - growable: false, - ).map( - (int i) => _envieddataauthTokenTwillo[i] ^ _enviedkeyauthTokenTwillo[i])); - - static const List _enviedkeychatGPTkey = [ - 2373063976, - 961934885, - 534858355, - 830900214, - 3199666739, - 720552233, - 113100068, - 2200605260, - 556295078, - 67647025, - 1451807346, - 2491370255, - 2893404701, - 1879305313, - 3133612886, - 3070369966, - 862113390, - 2037984315, - 3795516698, - 312857166, - 3742379061, - 1217962401, - 2010433459, - 2228418192, - 2231876400, - 3729060013, - 2441381393, - 731976795, - 557686674, - 2618343914, - 1377745390, - 1623097872, - 3730022414, - 902078926, - 2859139402, - 1566082863, - 2480423706, - 4033392722, - 1931234461, - 2591610421, - 3013673505, - 1732686785, - 2986393469, - 1881665331, - 860727576, - 1734306062, - 495896289, - 2800158209, - 471241334, - 2438296124, - 4062945115, - 2688029754, - 1961162835, - 1186389968, - 107649520, - 2714634333, - 2851633431, - 197373554, - ]; - - static const List _envieddatachatGPTkey = [ - 2373064018, - 961934914, - 534858334, - 830900162, - 3199666800, - 720552219, - 113100050, - 2200605245, - 556295058, - 67647074, - 1451807275, - 2491370344, - 2893404767, - 1879305258, - 3133612807, - 3070369995, - 862113318, - 2037984353, - 3795516766, - 312857151, - 3742379102, - 1217962486, - 2010433500, - 2228418279, - 2231876467, - 3729059988, - 2441381449, - 731976745, - 557686762, - 2618343821, - 1377745339, - 1623097941, - 3730022504, - 902078875, - 2859139379, - 1566082838, - 2480423760, - 4033392640, - 1931234538, - 2591610375, - 3013673555, - 1732686764, - 2986393419, - 1881665378, - 860727594, - 1734306159, - 495896197, - 2800158307, - 471241285, - 2438296151, - 4062945073, - 2688029773, - 1961162763, - 1186389922, - 107649448, - 2714634289, - 2851633493, - 197373470, - ]; - - static final String chatGPTkey = String.fromCharCodes(List.generate( - _envieddatachatGPTkey.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatachatGPTkey[i] ^ _enviedkeychatGPTkey[i])); - - static const List _enviedkeytransactionCloude = [ - 1118941550, - 4099935787, - 173571499, - 3973513861, - 2437807982, - 1298203410, - 2065872094, - 510006101, - 1802609342, - 913683503, - 970036513, - 1338211370, - 2072089381, - 829805509, - 1524997266, - 2082051612, - 1857851532, - 2270814699, - 2407687675, - 2593046736, - 1458174257, - 3566124664, - 2756991287, - 2472475135, - 512460199, - 700164825, - 111889193, - 255851361, - 2412891345, - 3059660993, - 4294813237, - 190284628, - 4288139700, - 1940195597, - 1231020279, - 204048557, - 1814049298, - 2890749594, - 1995384340, - 1458073577, - 54859711, - 3726054855, - 2770635461, - 3788671078, - 2687647528, - 3032352966, - 4129921504, - 4197172041, - 2218114342, - 2204224811, - 523808078, - 225969632, - 1060955425, - 3050302343, - 2739866115, - 3758726503, - 2871157659, - 1930976711, - 1574507384, - 1567738871, - 2104303443, - 3409050505, - ]; - - static const List _envieddatatransactionCloude = [ - 1118941503, - 4099935811, - 173571528, - 3973513970, - 2437807899, - 1298203515, - 2065872050, - 510006074, - 1802609363, - 913683550, - 970036546, - 1338211397, - 2072089420, - 829805479, - 1524997288, - 2082051661, - 1857851610, - 2270814628, - 2407687588, - 2593046682, - 1458174335, - 3566124577, - 2756991346, - 2472475067, - 512460181, - 700164737, - 111889278, - 255851296, - 2412891363, - 3059661047, - 4294813292, - 190284556, - 4288139775, - 1940195662, - 1231020229, - 204048633, - 1814049346, - 2890749600, - 1995384397, - 1458073506, - 54859662, - 3726054787, - 2770635411, - 3788671022, - 2687647518, - 3032352917, - 4129921450, - 4197171979, - 2218114325, - 2204224794, - 523808000, - 225969619, - 1060955505, - 3050302402, - 2739866162, - 3758726450, - 2871157699, - 1930976693, - 1574507296, - 1567738779, - 2104303377, - 3409050597, - ]; - - static final String transactionCloude = String.fromCharCodes( - List.generate( - _envieddatatransactionCloude.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatatransactionCloude[i] ^ _enviedkeytransactionCloude[i])); - - static const List _enviedkeyvisionApi = [ - 4242309064, - 3151994194, - 2380760007, - 304141338, - 1141936832, - 174192233, - 200721148, - 1366498521, - 3994849747, - 198064029, - 2463099604, - 1181848525, - 3585832905, - 1502567312, - 3741612627, - 1967290201, - 803376063, - 3996968427, - 1831735777, - 676746421, - 2813831933, - 3101088886, - 715804512, - 2542397118, - 3053186523, - 135963899, - 1418413242, - 1709277287, - 1585287105, - 2608667577, - 3086633796, - 2447653279, - 1487281515, - 4061373748, - 1061157679, - 1486038403, - 3512903590, - 1236737199, - ]; - - static const List _envieddatavisionApi = [ - 4242309115, - 3151994146, - 2380759942, - 304141398, - 1141936819, - 174192152, - 200721071, - 1366498442, - 3994849674, - 198064073, - 2463099554, - 1181848503, - 3585832889, - 1502567334, - 3741612650, - 1967290120, - 803376010, - 3996968365, - 1831735724, - 676746492, - 2813831834, - 3101088788, - 715804442, - 2542397140, - 3053186460, - 135963853, - 1418413280, - 1709277270, - 1585287099, - 2608667602, - 3086633776, - 2447653333, - 1487281459, - 4061373766, - 1061157751, - 1486038511, - 3512903652, - 1236737219, - ]; - - static final String visionApi = String.fromCharCodes(List.generate( - _envieddatavisionApi.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatavisionApi[i] ^ _enviedkeyvisionApi[i])); - - static const List _enviedkeysecretKey = [ - 21976699, - 1452998254, - 3036621410, - 7204005, - 1217430364, - 1670749229, - 482443604, - 3787147714, - 3697591561, - 742636372, - 542298477, - 1900028264, - 2091851107, - 2847672537, - 1775609193, - 1293392594, - 1735553420, - 3561282980, - 3663882305, - 1047022619, - 3447458639, - 1502752036, - 578647052, - 3493309161, - 1961326923, - 554654685, - 692809793, - 3912080221, - 1833041368, - 2063027993, - 3304308332, - 1294912617, - 3735434889, - 1311730222, - 2176507922, - 1363188572, - 1907861464, - 1954860693, - 2228680260, - 2918092799, - 767117478, - 977702458, - 2461801236, - 1854573550, - 226743729, - 2276742753, - 3203858729, - 1142276358, - 3167166563, - 1552026201, - 189479665, - 1089169811, - 1002861696, - 2952471421, - 3754954323, - 3381138527, - 1639641755, - 3649951534, - 797070922, - 69860492, - 951331360, - 3765322333, - 3952633267, - 817477413, - 2581543012, - 1550755402, - 3117745567, - 2274389987, - 1661625387, - 3329340226, - 2697431099, - 310408627, - 540379112, - 671549684, - 4246332165, - 1313335061, - 2495209344, - 3269290275, - 1460499156, - 2475981176, - 1545086440, - 2148364716, - 835386431, - 2721291697, - 1837033020, - 4222541807, - 3025058180, - 682141564, - 2338650966, - 3765002432, - 731039597, - 137641532, - 3496992292, - 211059179, - 1827626144, - 2351567086, - 239064065, - 2671650538, - 1949697983, - 2184859639, - 129349646, - 924743146, - 394532272, - 546076401, - 1956982163, - 3377099016, - 1504616618, - 856480505, - 3127793245, - 4195545612, - 3577865707, - 546718952, - 1097498367, - 721435183, - ]; - - static const List _envieddatasecretKey = [ - 21976577, - 1452998153, - 3036621373, - 7204055, - 1217430323, - 1670749277, - 482443582, - 3787147677, - 3697591612, - 742636387, - 542298404, - 1900028161, - 2091851029, - 2847672559, - 1775609113, - 1293392543, - 1735553482, - 3561283047, - 3663882243, - 1047022685, - 3447458622, - 1502752023, - 578647119, - 3493309147, - 1961326885, - 554654699, - 692809736, - 3912080133, - 1833041332, - 2063028084, - 3304308230, - 1294912528, - 3735434978, - 1311730270, - 2176508010, - 1363188504, - 1907861429, - 1954860738, - 2228680317, - 2918092748, - 767117557, - 977702509, - 2461801255, - 1854573464, - 226743751, - 2276742713, - 3203858753, - 1142276400, - 3167166555, - 1552026124, - 189479600, - 1089169834, - 1002861780, - 2952471368, - 3754954261, - 3381138448, - 1639641801, - 3649951610, - 797070877, - 69860587, - 951331447, - 3765322286, - 3952633319, - 817477398, - 2581542995, - 1550755353, - 3117745643, - 2274389928, - 1661625432, - 3329340173, - 2697431147, - 310408663, - 540379039, - 671549616, - 4246332257, - 1313335142, - 2495209465, - 3269290267, - 1460499109, - 2475981098, - 1545086417, - 2148364767, - 835386445, - 2721291772, - 1837033065, - 4222541699, - 3025058289, - 682141469, - 2338650942, - 3765002419, - 731039582, - 137641554, - 3496992372, - 211059107, - 1827626198, - 2351566985, - 239064131, - 2671650443, - 1949697932, - 2184859588, - 129349754, - 924743085, - 394532315, - 546076360, - 1956982179, - 3377099134, - 1504616700, - 856480460, - 3127793157, - 4195545726, - 3577865651, - 546718852, - 1097498301, - 721435203, - ]; - - static final String secretKey = String.fromCharCodes(List.generate( - _envieddatasecretKey.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatasecretKey[i] ^ _enviedkeysecretKey[i])); - - static const List _enviedkeystripePublishableKe = [ - 852742872, - 1267117993, - 503617470, - 1227210553, - 2107322754, - 629662297, - 1647470630, - 4015924574, - 830318470, - 3170081617, - 3637973033, - 788582207, - 4290426641, - 351432888, - 3692598474, - 177929365, - 3310512599, - 1303155240, - 2881829959, - 1786735677, - 38833684, - 1110730400, - 2898366826, - 1140664119, - 1811663489, - 1181053236, - 265553710, - 1401588207, - 3805654817, - 571396201, - 2225462231, - 4053735026, - 2220028632, - 1790914927, - 2360028602, - 2052396718, - 3100582716, - 2213480629, - 2781025944, - 3164842593, - 4137208770, - 3273862597, - 1525887355, - 3861438604, - 347768894, - 1364438944, - 3682299133, - 1246189992, - 2163071351, - 2263627641, - 2880507300, - 128701581, - 3981557139, - 4287695248, - 3819246629, - 4076488269, - 4191833813, - 3991586521, - 4011393507, - 2964934600, - 2703871376, - 3337092834, - 1054416731, - 1597148239, - 3123200130, - 1236696155, - 2577532411, - 1727996216, - 2507691163, - 48480224, - 1257280029, - 1667721827, - 1106142015, - 694710280, - 4219128825, - 793984548, - 2454521291, - 3787230524, - 2791698277, - 2133664514, - 251781124, - 3690268377, - 3394026555, - 1741346204, - 1099332453, - 1195251920, - 3617564075, - 499799394, - 1149001320, - 3196589237, - 973074427, - 2630431583, - 1298595435, - 2138223436, - 3825256479, - 733165633, - 1821275026, - 1900219900, - 882412125, - 3291640377, - 3685282013, - 1359362228, - 1806858115, - 2108102838, - 1204058960, - 2250910429, - 3725157861, - 2139320964, - 3752972078, - 3110196582, - 2072562545, - 1090174480, - 1575782319, - 2705828397, - ]; - - static const List _envieddatastripePublishableKe = [ - 852742830, - 1267118030, - 503617505, - 1227210569, - 2107322864, - 629662262, - 1647470678, - 4015924532, - 830318553, - 3170081636, - 3637973022, - 788582262, - 4290426744, - 351432910, - 3692598524, - 177929432, - 3310512529, - 1303155307, - 2881829893, - 1786735739, - 38833765, - 1110730387, - 2898366761, - 1140664069, - 1811663599, - 1181053186, - 265553733, - 1401588129, - 3805654891, - 571396103, - 2225462157, - 4053734960, - 2220028577, - 1790914873, - 2360028556, - 2052396736, - 3100582729, - 2213480689, - 2781026028, - 3164842553, - 4137208743, - 3273862652, - 1525887282, - 3861438694, - 347768955, - 1364439024, - 3682299058, - 1246190030, - 2163071263, - 2263627540, - 2880507348, - 128701641, - 3981557223, - 4287695303, - 3819246664, - 4076488249, - 4191833830, - 3991586452, - 4011393455, - 2964934554, - 2703871392, - 3337092741, - 1054416650, - 1597148223, - 3123200235, - 1236696083, - 2577532312, - 1727996265, - 2507691254, - 48480161, - 1257280091, - 1667721774, - 1106142058, - 694710360, - 4219128715, - 793984638, - 2454521256, - 3787230479, - 2791698228, - 2133664619, - 251781191, - 3690268317, - 3394026577, - 1741346276, - 1099332391, - 1195251850, - 3617564135, - 499799296, - 1149001232, - 3196589297, - 973074360, - 2630431596, - 1298595342, - 2138223402, - 3825256551, - 733165590, - 1821275114, - 1900219782, - 882412142, - 3291640330, - 3685281983, - 1359362275, - 1806858187, - 2108102791, - 1204058890, - 2250910394, - 3725157783, - 2139321079, - 3752972150, - 3110196500, - 2072562473, - 1090174588, - 1575782381, - 2705828417, - ]; - - static final String stripePublishableKe = String.fromCharCodes( - List.generate( - _envieddatastripePublishableKe.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatastripePublishableKe[i] ^ - _enviedkeystripePublishableKe[i])); - - static const List _enviedkeychatGPTkeySefer = [ - 1132355700, - 2616724811, - 4205165985, - 2527290338, - 2146395996, - 3243284861, - 3407574293, - 3576653388, - 2798493378, - 1894911129, - 1555304931, - 3730703163, - 1669589981, - 2105350927, - 4086765581, - 3812593271, - 3363213248, - 1464244491, - 3102964009, - 1945033573, - 2223495306, - 2951049579, - 2215848300, - 3311874590, - 2212415185, - 3916148226, - 1867222140, - 3526574019, - 1328262358, - 4246540573, - 2624840385, - 2481823204, - 653533026, - 2856072332, - 3549493501, - 56765761, - 2387997616, - 2703564721, - 1539159159, - 899993527, - 153098900, - 2041834298, - 2972517624, - 1850715488, - 207628368, - 3318888898, - 2094521065, - 1071133446, - 3614717711, - 2241551134, - 865998752, - 3053364456, - 2928984891, - 4047901208, - 2069660987, - 1499741840, - 2518915131, - 851825950, - ]; - - static const List _envieddatachatGPTkeySefer = [ - 1132355598, - 2616724780, - 4205165964, - 2527290283, - 2146395957, - 3243284783, - 3407574310, - 3576653349, - 2798493430, - 1894911222, - 1555304844, - 3730703169, - 1669589948, - 2105350972, - 4086765652, - 3812593153, - 3363213224, - 1464244605, - 3102964043, - 1945033564, - 2223495416, - 2951049521, - 2215848199, - 3311874607, - 2212415122, - 3916148283, - 1867222052, - 3526574001, - 1328262318, - 4246540666, - 2624840340, - 2481823137, - 653533010, - 2856072416, - 3549493445, - 56765739, - 2387997666, - 2703564771, - 1539159085, - 899993541, - 153098972, - 2041834320, - 2972517579, - 1850715441, - 207628341, - 3318888951, - 2094521016, - 1071133534, - 3614717791, - 2241551218, - 865998801, - 3053364414, - 2928984931, - 4047901290, - 2069661027, - 1499741948, - 2518915193, - 851826034, - ]; - - static final String chatGPTkeySefer = String.fromCharCodes(List.generate( - _envieddatachatGPTkeySefer.length, - (int i) => i, - growable: false, - ).map( - (int i) => _envieddatachatGPTkeySefer[i] ^ _enviedkeychatGPTkeySefer[i])); - - static const List _enviedkeyllamaKey = [ - 1046758203, - 395008810, - 1953335401, - 2453937327, - 3279053365, - 1317244565, - 3574039562, - 1215902332, - 1644280699, - 518881544, - 3844689288, - 501085620, - 1349721798, - 2543356164, - 961930120, - 2818059939, - 3469485470, - 495624143, - 2760936556, - 2425296758, - 3500690850, - 2773468800, - 1918639328, - 2232542112, - 4208402208, - 1334575062, - 794476552, - 1469116811, - 2141997342, - 2257055320, - 3738100120, - 2800440337, - 2089922040, - 1630009804, - 138746912, - 3777561700, - 2821301478, - 2593962585, - 3273791986, - 576637506, - 410833351, - 3638804837, - 151198496, - 494283407, - 3064398941, - 3295715808, - 3928421722, - 1572458343, - 2771449688, - 3691682050, - 2193264043, - 3187159780, - 3304236798, - 1172781432, - 4020314708, - 1406058279, - 1733425633, - 74657417, - 870365763, - 4238651139, - 1606537654, - 4235541775, - 685386054, - 4129252757, - 2847373843, - 2912633518, - 681412129, - 743116068, - 1543224887, - 2061637412, - 4204939294, - 173568990, - 1114381103, - 3421798646, - ]; - - static const List _envieddatallamaKey = [ - 1046758249, - 395008888, - 1953335364, - 2453937386, - 3279053376, - 1317244652, - 3574039653, - 1215902266, - 1644280639, - 518881629, - 3844689406, - 501085650, - 1349721748, - 2543356224, - 961930186, - 2818059980, - 3469485556, - 495624187, - 2760936538, - 2425296656, - 3500690936, - 2773468875, - 1918639265, - 2232542164, - 4208402283, - 1334575004, - 794476603, - 1469116925, - 2141997425, - 2257055253, - 3738100128, - 2800440412, - 2089921932, - 1630009851, - 138746902, - 3777561692, - 2821301381, - 2593962505, - 3273791895, - 576637448, - 410833297, - 3638804818, - 151198567, - 494283457, - 3064398905, - 3295715745, - 3928421681, - 1572458295, - 2771449612, - 3691682121, - 2193264079, - 3187159741, - 3304236742, - 1172781367, - 4020314672, - 1406058314, - 1733425624, - 74657511, - 870365815, - 4238651236, - 1606537681, - 4235541832, - 685386039, - 4129252828, - 2847373862, - 2912633577, - 681412184, - 743116107, - 1543224943, - 2061637462, - 4204939334, - 173568946, - 1114381165, - 3421798554, - ]; - - static final String llamaKey = String.fromCharCodes(List.generate( - _envieddatallamaKey.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatallamaKey[i] ^ _enviedkeyllamaKey[i])); - - static const List _enviedkeyserverPHP = [ - 136784060, - 3329979825, - 3963111006, - 275155448, - 1346893870, - 3643081673, - 844539938, - 3201830972, - 2240275309, - 1976641573, - 882466245, - 3994694885, - 2903906195, - 3937636000, - 777269346, - 754464604, - 2551192637, - 2699808318, - 2110753149, - 3808933615, - 2299845352, - 147834543, - 249091391, - 1721998470, - 1997931045, - 3728953200, - 1675657642, - 234794800, - ]; - - static const List _envieddataserverPHP = [ - 136784084, - 3329979845, - 3963110954, - 275155336, - 1346893917, - 3643081715, - 844539917, - 3201830931, - 2240275212, - 1976641621, - 882466220, - 3994694859, - 2903906272, - 3937636037, - 777269252, - 754464569, - 2551192655, - 2699808272, - 2110753041, - 3808933510, - 2299845278, - 147834570, - 249091344, - 1721998581, - 1997931072, - 3728953110, - 1675657679, - 234794818, - ]; - - static final String serverPHP = String.fromCharCodes(List.generate( - _envieddataserverPHP.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataserverPHP[i] ^ _enviedkeyserverPHP[i])); - - static const List _enviedkeyseferAlexandriaServer = [ - 2678342472, - 911184417, - 2158768204, - 998467215, - 3083374296, - 2149883830, - 892800160, - 2754182323, - 3199574306, - 966044870, - 3598396201, - 3181074056, - 2231062873, - 3018774722, - 3637627180, - 1675789918, - 866711761, - 1880740419, - 491729161, - 3288189254, - 2033470673, - 2654508839, - 4227816290, - 3944220878, - 2714480020, - 1508824018, - 1179598114, - 2526469296, - 2392336840, - 1655593147, - 3989870417, - 2957024241, - 1306650807, - 399063647, - ]; - - static const List _envieddataseferAlexandriaServer = [ - 2678342432, - 911184469, - 2158768184, - 998467327, - 3083374251, - 2149883788, - 892800143, - 2754182300, - 3199574353, - 966044835, - 3598396239, - 3181074157, - 2231062827, - 3018774691, - 3637627200, - 1675789883, - 866711721, - 1880740386, - 491729255, - 3288189218, - 2033470627, - 2654508878, - 4227816195, - 3944220896, - 2714480103, - 1508823995, - 1179598166, - 2526469333, - 2392336871, - 1655593160, - 3989870388, - 2957024151, - 1306650834, - 399063597, - ]; - - static final String seferAlexandriaServer = String.fromCharCodes( - List.generate( - _envieddataseferAlexandriaServer.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataseferAlexandriaServer[i] ^ - _enviedkeyseferAlexandriaServer[i])); - - static const List _enviedkeywhatsapp = [ - 1865934477, - 470239689, - 4036471296, - 2160427406, - 4118066865, - 3283361244, - 4148590103, - 2500913758, - 3289510749, - 1650314614, - 1689493709, - 1358346019, - 2070078769, - 3913518243, - 3148768190, - 1442781110, - 1288086312, - 2062794235, - 3417590733, - 1651368454, - 1137143026, - 1513122744, - 2443321653, - 3154740397, - 841859175, - 2183935495, - 1415577355, - 2260587322, - 66539239, - 1801389163, - 956515969, - 3199754478, - 1713026935, - 2082575629, - 1922876038, - 425039213, - 2361743019, - 3868512309, - 3152855175, - 559820798, - 1118478308, - 2542036464, - 1364373848, - 2369241172, - 2988243622, - 227104355, - 3591056375, - 216746303, - 1962914655, - 2531420995, - 2939317724, - 3872885702, - 3282738572, - 3232671827, - 2264249589, - 1898464521, - 4236397185, - 3566093731, - 1658336297, - 2160936377, - 2776951058, - 860904727, - 3229909217, - 1150176268, - 3616654759, - 2700939400, - 3978798356, - 2201402828, - 108076149, - 3678927331, - 3067768326, - 1570754358, - 2217817676, - 1560848988, - 3784628055, - 4227127211, - 3635899623, - 2097722833, - 2420759675, - 618408425, - 3948031410, - 1690510567, - 1742737049, - 3552709002, - 3804175656, - 2525481113, - 3146825753, - 1998711895, - 2050727943, - 2829149535, - 788978160, - 1175696898, - 4170331080, - 2338259788, - 690172299, - 3854564381, - 2304396960, - 793199571, - 1568159346, - 1733125859, - 389177205, - 3698411061, - 3776076497, - 3844170192, - 202938393, - 2677636715, - 3597470318, - 2271388930, - 67407118, - 2804378997, - 2088523376, - 3648477881, - 2176057080, - 1418674012, - 3338953122, - 1497437562, - 2119728353, - 2628484369, - 1475170805, - 1055053098, - 1855099557, - 829431043, - 1553910249, - 173321112, - 3116769201, - 1053798782, - 1074206741, - 1180452413, - 780930116, - 4025252875, - 3344965525, - 774922988, - 1420761348, - 2576861369, - 3479691063, - 4260517407, - 3923144396, - 776879607, - 2784374088, - 3627545051, - 3170443413, - 56931634, - 534230463, - 413627036, - 158846251, - 374867456, - 2947920902, - 3312242211, - 3920439140, - 3757628273, - 3326871813, - 1129616875, - 2173889050, - 3273611449, - 2209014709, - 1054893635, - 274588319, - 1030060936, - 1225990859, - 1967920099, - 1500357118, - 4158317299, - 2715634413, - 3247534722, - 226355008, - 1060797540, - 3163788606, - 3886604503, - 1010193593, - 3169025688, - 4091748588, - 1310616799, - 1364105843, - 897660430, - 737780023, - 983087932, - 2622267459, - 1260736875, - 3246297987, - 3882012242, - 1276679860, - 635742828, - 1086973666, - 2918529318, - 3092934762, - 1735849887, - 125155234, - 2076129520, - 2445611883, - 854280602, - 3106518390, - 3672910932, - 3305019311, - 3335188740, - 3527337138, - 728200086, - 58950914, - 764490865, - 4100716152, - 3652135408, - 3997937220, - 1317895054, - 2815449943, - 660033916, - 4278045327, - 2833551708, - 3429833982, - 276938524, - 1553950989, - 1694119636, - 1740963759, - 1751476734, - 3750656267, - 3534508835, - 608920604, - 994882155, - 244482147, - 2962744634, - 663156684, - 2256811906, - 1076536936, - 140128007, - 2215911479, - 3196140294, - 3410165268, - ]; - - static const List _envieddatawhatsapp = [ - 1865934536, - 470239624, - 4036471361, - 2160427457, - 4118066885, - 3283361214, - 4148590157, - 2500913692, - 3289510670, - 1650314531, - 1689493638, - 1358346004, - 2070078725, - 3913518305, - 3148768241, - 1442781132, - 1288086399, - 2062794178, - 3417590708, - 1651368548, - 1137142981, - 1513122700, - 2443321712, - 3154740426, - 841859110, - 2183935607, - 1415577434, - 2260587363, - 66539155, - 1801389090, - 956516025, - 3199754454, - 1713026841, - 2082575700, - 1922876146, - 425039144, - 2361742994, - 3868512351, - 3152855254, - 559820695, - 1118478301, - 2542036385, - 1364373814, - 2369241112, - 2988243681, - 227104275, - 3591056256, - 216746252, - 1962914585, - 2531420946, - 2939317676, - 3872885669, - 3282738617, - 3232671799, - 2264249485, - 1898464576, - 4236397293, - 3566093799, - 1658336334, - 2160936431, - 2776951128, - 860904813, - 3229909122, - 1150176321, - 3616654814, - 2700939519, - 3978798417, - 2201402766, - 108076036, - 3678927277, - 3067768415, - 1570754384, - 2217817727, - 1560848943, - 3784628079, - 4227127259, - 3635899532, - 2097722810, - 2420759629, - 618408330, - 3948031464, - 1690510501, - 1742737068, - 3552709083, - 3804175640, - 2525481197, - 3146825842, - 1998711836, - 2050728050, - 2829149452, - 788978111, - 1175696984, - 4170331018, - 2338259775, - 690172356, - 3854564459, - 2304397037, - 793199497, - 1568159283, - 1733125840, - 389177121, - 3698411094, - 3776076453, - 3844170168, - 202938409, - 2677636642, - 3597470210, - 2271388992, - 67407174, - 2804378918, - 2088523281, - 3648477940, - 2176057006, - 1418673960, - 3338953153, - 1497437480, - 2119728315, - 2628484434, - 1475170694, - 1055053131, - 1855099633, - 829431112, - 1553910183, - 173321163, - 3116769252, - 1053798670, - 1074206835, - 1180452465, - 780930070, - 4025252940, - 3344965575, - 774922894, - 1420761396, - 2576861387, - 3479691103, - 4260517459, - 3923144361, - 776879501, - 2784374022, - 3627544989, - 3170443513, - 56931678, - 534230479, - 413627077, - 158846313, - 374867559, - 2947921003, - 3312242253, - 3920439042, - 3757628179, - 3326871917, - 1129616830, - 2173889147, - 3273611459, - 2209014758, - 1054893593, - 274588381, - 1030061009, - 1225990803, - 1967920007, - 1500357004, - 4158317255, - 2715634397, - 3247534828, - 226354989, - 1060797482, - 3163788554, - 3886604422, - 1010193660, - 3169025791, - 4091748507, - 1310616762, - 1364105784, - 897660476, - 737780050, - 983087949, - 2622267418, - 1260736826, - 3246298093, - 3882012166, - 1276679904, - 635742754, - 1086973591, - 2918529364, - 3092934675, - 1735849931, - 125155309, - 2076129417, - 2445611817, - 854280689, - 3106518333, - 3672910862, - 3305019373, - 3335188789, - 3527337215, - 728200142, - 58950991, - 764490758, - 4100716110, - 3652135333, - 3997937267, - 1317895135, - 2815449913, - 660033832, - 4278045405, - 2833551629, - 3429833914, - 276938596, - 1553951045, - 1694119606, - 1740963834, - 1751476648, - 3750656359, - 3534508882, - 608920699, - 994882082, - 244482097, - 2962744686, - 663156670, - 2256812010, - 1076536841, - 140128104, - 2215911512, - 3196140380, - 3410165328, - ]; - - static final String whatsapp = String.fromCharCodes(List.generate( - _envieddatawhatsapp.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatawhatsapp[i] ^ _enviedkeywhatsapp[i])); - - static const List _enviedkeywhatappID = [ - 3123272374, - 3828651595, - 4029932330, - 1607246416, - 1779628122, - 2831414386, - 639956309, - 814357000, - 3090170036, - 3378591476, - 258323974, - 3049708808, - 3852322243, - 3653663471, - 1679480947, - 4101228167, - ]; - - static const List _envieddatawhatappID = [ - 3123272325, - 3828651645, - 4029932307, - 1607246441, - 1779628137, - 2831414347, - 639956322, - 814357051, - 3090169986, - 3378591430, - 258324030, - 3049708857, - 3852322290, - 3653663447, - 1679480900, - 4101228222, - ]; - - static final String whatappID = String.fromCharCodes(List.generate( - _envieddatawhatappID.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatawhatappID[i] ^ _enviedkeywhatappID[i])); - - static const List _enviedkeyseferPaymentServer = [ - 3135591403, - 4052118669, - 1252878878, - 2326376361, - 2892565907, - 3141608763, - 3337838895, - 3127217716, - 522732804, - 673504242, - 3008226015, - 812786587, - 996271070, - 2014188411, - 2361945143, - 4265052590, - 3070533467, - 620957098, - 1474692178, - 3022997745, - 1899596157, - 4187766408, - 2427871948, - 20441730, - 493532712, - 3269520029, - ]; - - static const List _envieddataseferPaymentServer = [ - 3135591299, - 4052118777, - 1252878954, - 2326376409, - 2892565984, - 3141608705, - 3337838848, - 3127217691, - 522732919, - 673504151, - 3008225977, - 812786686, - 996271020, - 2014188299, - 2361945152, - 4265052544, - 3070533416, - 620957122, - 1474692157, - 3022997633, - 1899596114, - 4187766523, - 2427871913, - 20441828, - 493532749, - 3269520111, - ]; - - static final String seferPaymentServer = String.fromCharCodes( - List.generate( - _envieddataseferPaymentServer.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataseferPaymentServer[i] ^ _enviedkeyseferPaymentServer[i])); - - static const List _enviedkeyseferCairoServer = [ - 4203282252, - 4137070837, - 2250967405, - 453566573, - 2752956968, - 1903263830, - 1889272289, - 611470739, - 1702129731, - 1876620994, - 454451364, - 3000433964, - 768284265, - 1321939726, - 2940756997, - 1044479748, - 3437110981, - 1265925004, - 998980043, - 2127742623, - 3514062751, - 3448706290, - 3197411473, - 3572048172, - 3923224580, - 988084329, - 315672878, - 1485538712, - 2629567749, - 3100733085, - 106899519, - 2854528337, - 837501440, - 1433498020, - 891021752, - 1149349037, - 2218971392, - 1623064706, - 3794151780, - 811867401, - 1158037355, - 2900434970, - 1244093694, - ]; - - static const List _envieddataseferCairoServer = [ - 4203282212, - 4137070721, - 2250967321, - 453566493, - 2752957019, - 1903263852, - 1889272270, - 611470780, - 1702129712, - 1876620967, - 454451414, - 3000434010, - 768284172, - 1321939836, - 2940757035, - 1044479863, - 3437110944, - 1265925098, - 998980014, - 2127742701, - 3514062769, - 3448706206, - 3197411576, - 3572048218, - 3923224673, - 988084294, - 315672925, - 1485538813, - 2629567843, - 3100733176, - 106899533, - 2854528383, - 837501539, - 1433498056, - 891021777, - 1149349070, - 2218971499, - 1623064749, - 3794151703, - 811867500, - 1158037261, - 2900435071, - 1244093580, - ]; - - static final String seferCairoServer = String.fromCharCodes( - List.generate( - _envieddataseferCairoServer.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataseferCairoServer[i] ^ _enviedkeyseferCairoServer[i])); - - static const List _enviedkeyseferGizaServer = [ - 3386422574, - 658945938, - 3147852946, - 3436382974, - 2617576302, - 4107446200, - 1496752726, - 4156773746, - 915030253, - 1661851596, - 4145152485, - 2290014793, - 937712491, - 1057345618, - 1199060917, - 245219112, - 1900102055, - 2784879724, - 3531510454, - 1245124105, - 415336105, - 4005162117, - 1594071004, - 3641158419, - 3326798233, - 226565801, - 3600506810, - 1957536236, - 2818146872, - 1278273604, - ]; - - static const List _envieddataseferGizaServer = [ - 3386422598, - 658946022, - 3147853030, - 3436382862, - 2617576221, - 4107446146, - 1496752761, - 4156773725, - 915030154, - 1661851557, - 4145152415, - 2290014760, - 937712408, - 1057345591, - 1199060947, - 245219149, - 1900102101, - 2784879682, - 3531510489, - 1245124199, - 415336133, - 4005162220, - 1594070962, - 3641158518, - 3326798262, - 226565850, - 3600506847, - 1957536138, - 2818146909, - 1278273590, - ]; - - static final String seferGizaServer = String.fromCharCodes(List.generate( - _envieddataseferGizaServer.length, - (int i) => i, - growable: false, - ).map( - (int i) => _envieddataseferGizaServer[i] ^ _enviedkeyseferGizaServer[i])); - - static const List _enviedkeychatGPTkeySeferNew = [ - 670343961, - 2099436572, - 2748487954, - 410161662, - 2391316034, - 207643226, - 1482437577, - 1832494595, - 1720304821, - 2671997039, - 2928148491, - 561934326, - 1099778348, - 710596425, - 4099460131, - 3158026226, - 1801115082, - 108515838, - 762927687, - 2545011948, - 1646378309, - 2741216438, - 4148253487, - 4111334840, - 196042494, - 3750793718, - 1602169483, - 1706765565, - 1875609236, - 719986160, - 3637640023, - 2150028780, - 2446428740, - 778221324, - 1197846423, - 642707837, - 991110745, - 4239328672, - 2166327981, - 197916721, - 390785125, - 1740014208, - 19358397, - 2071127388, - 3942569885, - 2525572915, - 2260455209, - 190236529, - 3833237399, - 1717926805, - 461272987, - 1259175192, - 1829157857, - 3751862755, - 3093813446, - 4257394174, - 3064644496, - 2690120205, - ]; - - static const List _envieddatachatGPTkeySeferNew = [ - 670344035, - 2099436667, - 2748487999, - 410161572, - 2391316086, - 207643189, - 1482437512, - 1832494665, - 1720304854, - 2671996974, - 2928148569, - 561934265, - 1099778379, - 710596359, - 4099460219, - 3158026136, - 1801115053, - 108515724, - 762927618, - 2545011877, - 1646378256, - 2741216398, - 4148253513, - 4111334899, - 196042429, - 3750793679, - 1602169555, - 1706765455, - 1875609324, - 719986071, - 3637639938, - 2150028713, - 2446428784, - 778221405, - 1197846499, - 642707727, - 991110699, - 4239328716, - 2166328028, - 197916672, - 390785052, - 1740014313, - 19358408, - 2071127332, - 3942569901, - 2525572953, - 2260455269, - 190236482, - 3833237491, - 1717926876, - 461273039, - 1259175243, - 1829157817, - 3751862673, - 3093813406, - 4257394066, - 3064644562, - 2690120289, - ]; - - static final String chatGPTkeySeferNew = String.fromCharCodes( - List.generate( - _envieddatachatGPTkeySeferNew.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatachatGPTkeySeferNew[i] ^ _enviedkeychatGPTkeySeferNew[i])); - - static const List _enviedkeycohere = [ - 1045774623, - 2744562576, - 1084731650, - 106832296, - 1127252310, - 3505122781, - 3450952233, - 1816065711, - 4086632613, - 2016421943, - 3197997299, - 4117044866, - 2349760624, - 2068792646, - 3008799040, - 3460651405, - 2340769555, - 642391604, - 984870091, - 1610370150, - 3710112192, - 3224999419, - 4186071622, - 3744637460, - 4195497261, - 3623198901, - 1835508085, - 3545387579, - 1677395378, - 3109543583, - 568039885, - 513044574, - 2085317912, - 1389830393, - 237991368, - 49936519, - 2408640372, - 1119872736, - 2956844789, - 738253549, - 2595880821, - 119058790, - 117257915, - 2562399525, - 2490971307, - 3386261537, - 4273516650, - ]; - - static const List _envieddatacohere = [ - 1045774686, - 2744562661, - 1084731758, - 106832351, - 1127252274, - 3505122789, - 3450952272, - 1816065690, - 4086632694, - 2016421991, - 3197997220, - 4117044973, - 2349760515, - 2068792694, - 3008799016, - 3460651463, - 2340769659, - 642391640, - 984870028, - 1610370134, - 3710112180, - 3224999316, - 4186071571, - 3744637554, - 4195497237, - 3623198930, - 1835508026, - 3545387603, - 1677395431, - 3109543626, - 568039871, - 513044526, - 2085318014, - 1389830348, - 237991321, - 49936565, - 2408640288, - 1119872688, - 2956844696, - 738253499, - 2595880754, - 119058750, - 117257929, - 2562399613, - 2490971335, - 3386261603, - 4273516550, - ]; - - static final String cohere = String.fromCharCodes(List.generate( - _envieddatacohere.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatacohere[i] ^ _enviedkeycohere[i])); - - static const List _enviedkeyclaudeAiAPI = [ - 1286261501, - 1227360073, - 2952728173, - 2354259663, - 2734802162, - 1302820208, - 3065292227, - 3507239645, - 4078311878, - 2112675487, - 648610177, - 2118298054, - 2638050511, - 1937932531, - 2642632417, - 42054778, - 1009858078, - 1088733390, - 2630739162, - 3645657724, - 1242478334, - 3956356083, - 1865989582, - 4206381823, - 378815095, - 1887896035, - 1629228110, - 681546834, - 2895863875, - 2077738296, - 3089149287, - 1767475329, - 2277836263, - 4276644060, - 1019715367, - 3728570410, - 1051861764, - 3274295669, - 3481367260, - 2276933372, - 2027178921, - 3230921621, - 3883618989, - 3234434263, - 1075262783, - 1422076536, - 3391696697, - 248256319, - 4232634116, - 1708850093, - 2900579530, - 1748486427, - 324082811, - 313911562, - 3328504268, - 690200481, - 4097209222, - 2072968481, - 761748753, - 1480151332, - 2438613159, - 263392568, - 2949935942, - 2665525141, - 1169719388, - 594734272, - 1829781356, - 4056791317, - 3082688623, - 3035704111, - 992106038, - 1881981912, - 2942930372, - 1864236852, - 2976155710, - 2554631886, - 1193741133, - 2613181932, - 225078980, - 2025245188, - 4092831578, - 2173858450, - 623467418, - 2758772568, - 4051468311, - 2728777548, - 2346801758, - 2071179120, - 1925714863, - 3163977090, - 1229827609, - 471409727, - 3108392502, - 760689892, - 1665919829, - 572445798, - 3954887991, - 1347529306, - 2191862636, - 470979311, - 4025576152, - 3631889940, - 4022823024, - 2787080048, - 2771745443, - 2012572480, - 3626893289, - 1917492338, - 3873399792, - 1093713953, - 4019497347, - 3981403722, - 2406730306, - 2912208786, - 2147799941, - ]; - - static const List _envieddataclaudeAiAPI = [ - 1286261383, - 1227360046, - 2952728128, - 2354259646, - 2734802064, - 1302820115, - 3065292270, - 3507239596, - 4078311856, - 2112675568, - 648610226, - 2118298111, - 2638050467, - 1937932510, - 2642632345, - 42054701, - 1009858129, - 1088733366, - 2630739091, - 3645657659, - 1242478217, - 3956356004, - 1865989530, - 4206381744, - 378814989, - 1887895968, - 1629228040, - 681546768, - 2895863853, - 2077738353, - 3089149246, - 1767475410, - 2277836204, - 4276643991, - 1019715407, - 3728570444, - 1051861885, - 3274295567, - 3481367171, - 2276933303, - 2027179007, - 3230921684, - 3883619035, - 3234434213, - 1075262839, - 1422076501, - 3391696655, - 248256352, - 4232634160, - 1708850167, - 2900579471, - 1748486481, - 324082743, - 313911612, - 3328504308, - 690200550, - 4097209305, - 2072968560, - 761748819, - 1480151404, - 2438613141, - 263392526, - 2949935913, - 2665525232, - 1169719304, - 594734223, - 1829781281, - 4056791384, - 3082688512, - 3035704190, - 992106051, - 1881981887, - 2942930429, - 1864236927, - 2976155723, - 2554631809, - 1193741095, - 2613181830, - 225078927, - 2025245271, - 4092831498, - 2173858509, - 623467483, - 2758772588, - 4051468356, - 2728777599, - 2346801677, - 2071179045, - 1925714923, - 3163977198, - 1229827707, - 471409735, - 3108392548, - 760689885, - 1665919793, - 572445715, - 3954888033, - 1347529248, - 2191862531, - 470979262, - 4025576181, - 3631890009, - 4022822939, - 2787079976, - 2771745532, - 2012572437, - 3626893240, - 1917492259, - 3873399713, - 1093714041, - 4019497457, - 3981403666, - 2406730286, - 2912208848, - 2147800041, - ]; - - static final String claudeAiAPI = String.fromCharCodes(List.generate( - _envieddataclaudeAiAPI.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataclaudeAiAPI[i] ^ _enviedkeyclaudeAiAPI[i])); - - static const List _enviedkeypayPalClientId = [ - 1158962379, - 307677221, - 615712910, - 2091728334, - 1835747518, - 3983445529, - 2925963708, - 2565680115, - 2379419404, - 1390035600, - 3628420267, - 977164944, - 4248863076, - 2089289321, - 2888202633, - 4141985015, - 3955937220, - 3662612321, - 944909612, - 2547814107, - 1964166411, - 1366326452, - 2945845854, - 471938061, - 2315401231, - 2837215939, - 4113056208, - 1804517706, - 1272698707, - 356483835, - 3976334097, - 3479103913, - 40618663, - 3876402308, - 1584600206, - 1734468373, - 2325869756, - 2628653592, - 1200498657, - 304578131, - 4084429047, - 3466811532, - 2367252697, - 1484687295, - 3692688838, - 741868302, - 1227885823, - 1347642999, - 2623240903, - 2311775255, - 1257099472, - 1499881622, - 3567469936, - 167880220, - 2013398832, - 1993595998, - 1940972656, - 3051157831, - 2514663168, - 4226507786, - 2972368284, - 416284699, - 3995589828, - 4181110079, - 3713709091, - 3251077871, - 1999364607, - 2107411583, - 1633375779, - 3722134016, - 368224648, - 385303178, - 3449035994, - 1180190181, - 4089557288, - 47956423, - 3102393398, - 1816001500, - 315426149, - 3117497924, - 840224386, - 1584246848, - 990038207, - 3527220974, - 722112166, - 3773320437, - 1447054960, - ]; - - static const List _envieddatapayPalClientId = [ - 1158962330, - 307677284, - 615712962, - 2091728311, - 1835747539, - 3983445621, - 2925963738, - 2565680061, - 2379419461, - 1390035621, - 3628420351, - 977165034, - 4248862992, - 2089289309, - 2888202746, - 4141984986, - 3955937213, - 3662612242, - 944909635, - 2547814049, - 1964166461, - 1366326466, - 2945845786, - 471938105, - 2315401296, - 2837215917, - 4113056161, - 1804517650, - 1272698723, - 356483752, - 3976334148, - 3479103965, - 40618700, - 3876402375, - 1584600273, - 1734468452, - 2325869797, - 2628653646, - 1200498636, - 304578054, - 4084428944, - 3466811623, - 2367252716, - 1484687320, - 3692688807, - 741868355, - 1227885728, - 1347642959, - 2623240861, - 2311775290, - 1257099451, - 1499881713, - 3567469892, - 167880272, - 2013398789, - 1993596013, - 1940972571, - 3051157887, - 2514663253, - 4226507903, - 2972368356, - 416284740, - 3995589872, - 4181110101, - 3713709158, - 3251077816, - 1999364519, - 2107411515, - 1633375816, - 3722134094, - 368224760, - 385303250, - 3449035933, - 1180190134, - 4089557375, - 47956375, - 3102393414, - 1816001429, - 315426079, - 3117497856, - 840224452, - 1584246808, - 990038221, - 3527220918, - 722112202, - 3773320375, - 1447054876, - ]; - - static final String payPalClientId = String.fromCharCodes(List.generate( - _envieddatapayPalClientId.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatapayPalClientId[i] ^ _enviedkeypayPalClientId[i])); - - static const List _enviedkeypayPalSecret = [ - 739732313, - 2664767087, - 3572624635, - 1907728500, - 1861724185, - 2142646064, - 1931393997, - 2697781641, - 1210895087, - 2084852298, - 1135444872, - 3420476071, - 2841772834, - 3524405220, - 661189914, - 3976958655, - 1062936559, - 3056130150, - 184616341, - 2599483555, - 4253680559, - 1986033411, - 1452412727, - 4092960152, - 751659217, - 1985211052, - 2241786935, - 828446056, - 398348400, - 3295906472, - 3802132728, - 148240941, - 2536173005, - 2048208747, - 3195521388, - 3987349740, - 829115356, - 683912346, - 2027393185, - 31934422, - 2313609525, - 3287629605, - 1613062420, - 4034510835, - 2921832973, - 3354260814, - 2289945782, - 2184901124, - 2656934831, - 4012045457, - 3963477787, - 334752317, - 1421499989, - 41542685, - 3321454589, - 3063175331, - 2013768162, - 1527425867, - 3270244073, - 2648257151, - 313269852, - 3743230470, - 198051244, - 393316185, - 33594026, - 3723537188, - 3120929165, - 4000357751, - 2281273248, - 3503743097, - 1657804135, - 1750641043, - 720525904, - 1626843600, - 4215304532, - 2628940815, - 3035320362, - 2869518997, - 2716962910, - 387463954, - 2997368722, - 3555306019, - 2326419286, - 2406185964, - 106284720, - 69484099, - ]; - - static const List _envieddatapayPalSecret = [ - 739732243, - 2664767021, - 3572624570, - 1907728437, - 1861724271, - 2142646081, - 1931393927, - 2697781720, - 1210895016, - 2084852255, - 1135444987, - 3420476140, - 2841772902, - 3524405204, - 661189952, - 3976958677, - 1062936455, - 3056130130, - 184616414, - 2599483593, - 4253680586, - 1986033504, - 1452412749, - 4092960224, - 751659191, - 1985211118, - 2241786993, - 828445968, - 398348381, - 3295906459, - 3802132672, - 148241022, - 2536172969, - 2048208647, - 3195521294, - 3987349669, - 829115279, - 683912367, - 2027393175, - 31934336, - 2313609575, - 3287629672, - 1613062444, - 4034510781, - 2921833033, - 3354260776, - 2289945811, - 2184901170, - 2656934850, - 4012045563, - 3963477846, - 334752344, - 1421499919, - 41542743, - 3321454485, - 3063175405, - 2013768110, - 1527425793, - 3270243980, - 2648257044, - 313269865, - 3743230558, - 198051275, - 393316104, - 33594089, - 3723537237, - 3120929222, - 4000357684, - 2281273320, - 3503742989, - 1657804085, - 1750641141, - 720525926, - 1626843549, - 4215304510, - 2628940893, - 3035320403, - 2869519032, - 2716962872, - 387463978, - 2997368778, - 3555306065, - 2326419214, - 2406185856, - 106284786, - 69484079, - ]; - - static final String payPalSecret = String.fromCharCodes(List.generate( - _envieddatapayPalSecret.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatapayPalSecret[i] ^ _enviedkeypayPalSecret[i])); - - static const List _enviedkeygeminiApi = [ - 3345560342, - 2922573360, - 1206957034, - 3220621402, - 3050097607, - 672497970, - 1763652323, - 2964366469, - 260724265, - 1619853423, - 2893504212, - 543645032, - 1855933033, - 1572595655, - 2621250033, - 499168338, - 3832536323, - 1874863324, - 901521756, - 106465515, - 408371901, - 425942735, - 3316378247, - 2041707989, - 1277518095, - 1172032096, - 3879689643, - 2959900401, - 2185145793, - 1175924965, - 2580909975, - 447396632, - 1735402539, - 667490449, - 194829623, - 2359972406, - 2335681577, - 3443479920, - 3425854100, - 1346354876, - 2687030839, - 4201914926, - 433105072, - 3281090046, - 1123559874, - 2746285635, - ]; - - static const List _envieddatageminiApi = [ - 3345560391, - 2922573439, - 1206956935, - 3220621355, - 3050097565, - 672497985, - 1763652274, - 2964366556, - 260724292, - 1619853407, - 2893504236, - 543644958, - 1855932933, - 1572595592, - 2621249920, - 499168312, - 3832536394, - 1874863339, - 901521719, - 106465415, - 408371947, - 425942661, - 3316378337, - 2041707939, - 1277518175, - 1172032084, - 3879689724, - 2959900339, - 2185145735, - 1175924896, - 2580910072, - 447396733, - 1735402566, - 667490555, - 194829648, - 2359972431, - 2335681562, - 3443479881, - 3425854114, - 1346354901, - 2687030895, - 4201914972, - 433105128, - 3281089938, - 1123559808, - 2746285615, - ]; - - static final String geminiApi = String.fromCharCodes(List.generate( - _envieddatageminiApi.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatageminiApi[i] ^ _enviedkeygeminiApi[i])); - - static const List _enviedkeygeminiApiMasa = [ - 2881515655, - 3243653102, - 3919061164, - 529731162, - 2789203300, - 1614747035, - 1520454485, - 197748373, - 1136974296, - 2701090237, - 2670231970, - 1873094193, - 3568739763, - 369177359, - 1742142770, - 1762870963, - 1684266105, - 3143254790, - 2025583498, - 3751467200, - 2942208825, - 3918528191, - 4213025600, - 1752012011, - 2963148183, - 2146182955, - 197502139, - 1484527997, - 194812885, - 2782339502, - 490271811, - 4270919468, - 2235264425, - 178856990, - 3783115939, - 3890150072, - 3296843513, - 549847513, - 3362130755, - 4028884949, - 4174997294, - 2134697142, - 4282717313, - 2018022131, - 3105267020, - 2379364791, - ]; - - static const List _envieddatageminiApiMasa = [ - 2881515734, - 3243653025, - 3919061185, - 529731115, - 2789203262, - 1614747112, - 1520454404, - 197748444, - 1136974248, - 2701090265, - 2670232047, - 1873094149, - 3568739825, - 369177437, - 1742142785, - 1762871032, - 1684266004, - 3143254887, - 2025583566, - 3751467146, - 2942208886, - 3918528239, - 4213025655, - 1752011919, - 2963148237, - 2146183003, - 197502094, - 1484527952, - 194812854, - 2782339480, - 490271757, - 4270919547, - 2235264463, - 178857085, - 3783115979, - 3890150031, - 3296843433, - 549847448, - 3362130735, - 4028884868, - 4174997366, - 2134697156, - 4282717401, - 2018022047, - 3105266958, - 2379364827, - ]; - - static final String geminiApiMasa = String.fromCharCodes(List.generate( - _envieddatageminiApiMasa.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatageminiApiMasa[i] ^ _enviedkeygeminiApiMasa[i])); - - static const List _enviedkeyagoraAppId = [ - 3089331006, - 3560766277, - 825969137, - 906493642, - 3507883174, - 3629478722, - 716145019, - 736618674, - 3814543006, - 531262085, - 1069707472, - 1794745024, - 1799477682, - 3997601683, - 2384816050, - 1180863786, - 922162112, - 3729452903, - 1820971096, - 661727629, - 377334609, - 1832494407, - 3063815916, - 1221571281, - 3714335252, - 309885433, - 1556167695, - 2537322565, - 3970383379, - 2095609686, - 2280663226, - 1009151530, - 578649856, - 994147052, - 3565099187, - 1606180888, - 1625646757, - 507544281, - 3074868305, - ]; - - static const List _envieddataagoraAppId = [ - 3089330953, - 3560766324, - 825969097, - 906493682, - 3507883158, - 3629478692, - 716144969, - 736618712, - 3814543016, - 531262134, - 1069707494, - 1794745007, - 1799477639, - 3997601699, - 2384816011, - 1180863808, - 922162162, - 3729452883, - 1820971041, - 661727672, - 377334627, - 1832494462, - 3063815896, - 1221571301, - 3714335276, - 309885385, - 1556167798, - 2537322614, - 3970383395, - 2095609635, - 2280663170, - 1009151518, - 578649912, - 994146996, - 3565099201, - 1606180928, - 1625646793, - 507544219, - 3074868285, - ]; - - static final String agoraAppId = String.fromCharCodes(List.generate( - _envieddataagoraAppId.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataagoraAppId[i] ^ _enviedkeyagoraAppId[i])); - - static const List _enviedkeyagoraAppCertificate = [ - 3690479738, - 2491892003, - 3380135185, - 4178313776, - 355299000, - 1512500202, - 4131100492, - 1598833776, - 2234394556, - 3844317455, - 2753898166, - 2893052929, - 1930225798, - 1129918226, - 4250912199, - 3782575902, - 2789606497, - 739785026, - 491873921, - 1492281286, - 2654777686, - 1100222529, - 1006688894, - 886277114, - 748931844, - 2647871976, - 1819981845, - 2568220181, - 616719616, - 3098653489, - 2516170827, - 3623309345, - 2538829850, - 3098051278, - 4220928193, - 2594251663, - 3217786871, - 2443608156, - 4099109288, - 3557800709, - ]; - - static const List _envieddataagoraAppCertificate = [ - 3690479632, - 2491891986, - 3380135206, - 4178313793, - 355298945, - 1512500190, - 4131100536, - 1598833669, - 2234394504, - 3844317494, - 2753898117, - 2893052984, - 1930225846, - 1129918328, - 4250912175, - 3782575983, - 2789606486, - 739785079, - 491873977, - 1492281267, - 2654777703, - 1100222583, - 1006688842, - 886277059, - 748931888, - 2647871964, - 1819981869, - 2568220260, - 616719666, - 3098653512, - 2516170877, - 3623309401, - 2538829948, - 3098051259, - 4220928153, - 2594251773, - 3217786799, - 2443608112, - 4099109354, - 3557800809, - ]; - - static final String agoraAppCertificate = String.fromCharCodes( - List.generate( - _envieddataagoraAppCertificate.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataagoraAppCertificate[i] ^ - _enviedkeyagoraAppCertificate[i])); - - static const List _enviedkeypayPalClientIdLive = [ - 3498212718, - 2040045360, - 1454338361, - 2925702768, - 4032876285, - 330197820, - 2964508372, - 4290089181, - 4088742651, - 3184626717, - 1125682327, - 1288414844, - 2532221751, - 3393819830, - 1255156312, - 2081028481, - 1786731466, - 2556256597, - 2074018026, - 4278464473, - 3690208954, - 789657379, - 1499646751, - 2108045939, - 2387099979, - 4212594781, - 1185264404, - 3443914588, - 484521154, - 1692885126, - 1808261924, - 308124766, - 3104586301, - 3054522469, - 452743987, - 4115752992, - 3679384335, - 756182608, - 769834775, - 103870765, - 2361154858, - 880981506, - 268938416, - 781623876, - 3893743452, - 3239800154, - 1147112662, - 4214232654, - 2699205678, - 630232630, - 1395784349, - 2568589887, - 3672114013, - 3304610955, - 2379491329, - 1864385115, - 2066528676, - 219147460, - 2637806174, - 1205524959, - 2664432498, - 1587265586, - 4163318448, - 1661196011, - 3867917677, - 1063528552, - 3109017888, - 3949690742, - 1045420231, - 191834221, - 1746801123, - 3330559930, - 2439707600, - 755220539, - 929533834, - 1202916867, - 909027002, - 3009628763, - 3574240305, - 2962886476, - 1748507431, - 4245650729, - 2109266774, - 3185727328, - 4003696869, - 3613827171, - 2744545564, - ]; - - static const List _envieddatapayPalClientIdLive = [ - 3498212671, - 2040045418, - 1454338431, - 2925702683, - 4032876183, - 330197885, - 2964508347, - 4290089095, - 4088742557, - 3184626778, - 1125682403, - 1288414738, - 2532221776, - 3393819896, - 1255156267, - 2081028580, - 1786731448, - 2556256569, - 2074017926, - 4278464495, - 3690208968, - 789657360, - 1499646844, - 2108045872, - 2387100030, - 4212594795, - 1185264460, - 3443914544, - 484521203, - 1692885237, - 1808262002, - 308124690, - 3104586348, - 3054522382, - 452744029, - 4115752981, - 3679384427, - 756182557, - 769834869, - 103870804, - 2361154895, - 880981600, - 268938456, - 781623870, - 3893743382, - 3239800067, - 1147112675, - 4214232695, - 2699205739, - 630232679, - 1395784366, - 2568589911, - 3672113959, - 3304611004, - 2379491416, - 1864385059, - 2066528709, - 219147393, - 2637806127, - 1205524890, - 2664432438, - 1587265643, - 4163318496, - 1661195967, - 3867917624, - 1063528494, - 3109017923, - 3949690663, - 1045420176, - 191834140, - 1746801045, - 3330559967, - 2439707520, - 755220570, - 929533915, - 1202916918, - 909027055, - 3009628689, - 3574240379, - 2962886426, - 1748507509, - 4245650801, - 2109266724, - 3185727288, - 4003696777, - 3613827105, - 2744545648, - ]; - - static final String payPalClientIdLive = String.fromCharCodes( - List.generate( - _envieddatapayPalClientIdLive.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatapayPalClientIdLive[i] ^ _enviedkeypayPalClientIdLive[i])); - - static const List _enviedkeypayPalSecretLive = [ - 1686803173, - 2549344406, - 2999418297, - 981626647, - 1527658308, - 4017623410, - 1723825857, - 4100347843, - 3032197825, - 1138415466, - 1003701203, - 514593984, - 2985297447, - 3253769350, - 3982308256, - 1067056987, - 2330571008, - 2838835968, - 1679919862, - 922383968, - 3522006032, - 4214936532, - 4114126476, - 2367435495, - 928096466, - 3805436937, - 2633603398, - 1111413243, - 1579940898, - 308985158, - 2491025730, - 3597640978, - 3804648423, - 3533580722, - 1856231693, - 2075258072, - 2571185761, - 313383712, - 1165529499, - 2509825669, - 2363882239, - 2527332889, - 3617498090, - 3356063982, - 808951948, - 3000210089, - 3164426459, - 2293343536, - 67466769, - 2311640352, - 1534605779, - 1632261458, - 3598863213, - 15219130, - 1635084602, - 3113121575, - 2119034386, - 847082734, - 3747580858, - 2004700801, - 3829608622, - 3984960622, - 2171756218, - 3054571568, - 3367881948, - 803605721, - 764673468, - 3721621437, - 3506835852, - 909939506, - 1403965023, - 2340131697, - 2519720416, - 904668221, - 4276524814, - 3753718784, - 2516371154, - 1589183634, - 181349719, - 3828000718, - 67709880, - 671390186, - 3173014221, - 3465463940, - 941857293, - 4037575635, - 2172377945, - 296532492, - ]; - - static const List _envieddatapayPalSecretLive = [ - 1686803119, - 2549344455, - 2999418365, - 981626710, - 1527658256, - 4017623299, - 1723825834, - 4100347816, - 3032197807, - 1138415406, - 1003701173, - 514593961, - 2985297505, - 3253769462, - 3982308325, - 1067056922, - 2330571086, - 2838836022, - 1679919814, - 922383915, - 3522006098, - 4214936544, - 4114126588, - 2367435424, - 928096418, - 3805437005, - 2633603367, - 1111413169, - 1579940936, - 308985151, - 2491025715, - 3597641040, - 3804648358, - 3533580758, - 1856231732, - 2075258034, - 2571185689, - 313383789, - 1165529561, - 2509825749, - 2363882127, - 2527332963, - 3617498045, - 3356063931, - 808951997, - 3000210169, - 3164426474, - 2293343579, - 67466786, - 2311640424, - 1534605794, - 1632261432, - 3598863159, - 15219154, - 1635084651, - 3113121613, - 2119034492, - 847082713, - 3747580809, - 2004700868, - 3829608678, - 3984960541, - 2171756273, - 3054571617, - 3367881906, - 803605688, - 764673419, - 3721621385, - 3506835932, - 909939466, - 1403964975, - 2340131656, - 2519720408, - 904668245, - 4276524905, - 3753718863, - 2516371132, - 1589183711, - 181349686, - 3828000665, - 67709928, - 671390141, - 3173014165, - 3465464054, - 941857365, - 4037575615, - 2172377883, - 296532576, - ]; - - static final String payPalSecretLive = String.fromCharCodes( - List.generate( - _envieddatapayPalSecretLive.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatapayPalSecretLive[i] ^ _enviedkeypayPalSecretLive[i])); - - static const List _enviedkeyintegrationIdPayMob = [ - 1417526965, - 3263383533, - 91540503, - 1899043115, - 441464185, - 1408303186, - 739953865, - 373704305, - 2877724056, - 1385385587, - 1213934967, - 1982766086, - 2741497519, - ]; - - static const List _envieddataintegrationIdPayMob = [ - 1417526917, - 3263383519, - 91540516, - 1899043100, - 441464143, - 1408303201, - 739953913, - 373704233, - 2877724138, - 1385385515, - 1213934875, - 1982766148, - 2741497539, - ]; - - static final String integrationIdPayMob = String.fromCharCodes( - List.generate( - _envieddataintegrationIdPayMob.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataintegrationIdPayMob[i] ^ - _enviedkeyintegrationIdPayMob[i])); - - static const List _enviedkeypasswordPayMob = [ - 1112005101, - 1529182612, - 2713540861, - 795328389, - 1645747591, - 830558058, - 3235663825, - 2402337045, - 1704058611, - 1807481934, - 4114759014, - 2442548906, - 3879069201, - 1254582425, - 1835722365, - 1675986163, - 2985281344, - 3972423584, - 3430383610, - 3697632766, - 1092163911, - 3949013966, - ]; - - static const List _envieddatapasswordPayMob = [ - 1112005002, - 1529182676, - 2713540755, - 795328494, - 1645747651, - 830558040, - 3235663858, - 2402337068, - 1704058570, - 1807481893, - 4114758983, - 2442548930, - 3879069269, - 1254582470, - 1835722323, - 1675986052, - 2985281304, - 3972423634, - 3430383522, - 3697632658, - 1092163845, - 3949013922, - ]; - - static final String passwordPayMob = String.fromCharCodes(List.generate( - _envieddatapasswordPayMob.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatapasswordPayMob[i] ^ _enviedkeypasswordPayMob[i])); - - static const List _enviedkeyusernamePayMob = [ - 404532329, - 2709626969, - 581294901, - 3232867313, - 1847531785, - 3160654111, - 1403524875, - 2787863372, - 4118201515, - 2889116121, - 1132769932, - 2720512716, - 1077363859, - 2108498877, - 3720923995, - 2714342127, - 1746163795, - ]; - - static const List _envieddatausernamePayMob = [ - 404532314, - 2709626990, - 581294854, - 3232867264, - 1847531824, - 3160654126, - 1403524923, - 2787863416, - 4118201499, - 2889116140, - 1132769982, - 2720512660, - 1077363937, - 2108498917, - 3720923959, - 2714342061, - 1746163775, - ]; - - static final String usernamePayMob = String.fromCharCodes(List.generate( - _envieddatausernamePayMob.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatausernamePayMob[i] ^ _enviedkeyusernamePayMob[i])); - - static const List _enviedkeypayMobApikey = [ - 2156512160, - 2749747479, - 2969388392, - 4055118126, - 3045577699, - 490203723, - 1774417868, - 1107059065, - 3170744337, - 1084230053, - 1865849046, - 2877134478, - 702377432, - 1226091863, - 26846506, - 3996652510, - 1411496581, - 2926602357, - 2700119870, - 2606836392, - 1354578579, - 1033924352, - 74228097, - 4170247195, - 873360593, - 2748318779, - 2263315153, - 2826384014, - 3582413331, - 2221990706, - 3944242822, - 3029543767, - 2872488480, - 1835503418, - 3659818944, - 2366662398, - 1008586299, - 2826666190, - 1329641716, - 3652989632, - 2935593741, - 1687202690, - 1526780746, - 2343408140, - 3808135129, - 3118221645, - 3732165185, - 1281794021, - 130140203, - 283700504, - 2589836030, - 4183975573, - 590339126, - 1029997274, - 967061642, - 1997594046, - 2908052586, - 358914832, - 2178363839, - 460103444, - 1129576238, - 3718201627, - 347568641, - 769425599, - 67474002, - 3005327881, - 2720134884, - 1890740325, - 2287546695, - 4181183831, - 9909565, - 657273669, - 1540255763, - 1937567420, - 2689046926, - 2801055376, - 3156051618, - 827077985, - 3720991582, - 1381992539, - 2387310779, - 1094848860, - 778372855, - 2351797210, - 677595179, - 1764857131, - 2702644448, - 1499750759, - 3964245161, - 706925967, - 822010807, - 2825696467, - 3655535118, - 1923752780, - 941429714, - 876276332, - 2311983886, - 1078529168, - 2475054251, - 982128516, - 4151418621, - 4166218094, - 3719554534, - 3677111207, - 1854762695, - 2494078977, - 2791331835, - 147021843, - 3307971400, - 2841905408, - 2160860031, - 1755134641, - 2919044266, - 2997840411, - 233600554, - 1894569097, - 3800206825, - 3277743361, - 3598016087, - 3622885952, - 3019330690, - 3073259091, - 428008179, - 17697518, - 189165416, - 2223665148, - 3524318539, - 1425751564, - 1235952693, - 3407110963, - 3444172054, - 3902980920, - 3380627945, - 2195283964, - 3433027888, - 3040448066, - 2612876586, - 4010989892, - 2098590187, - 1412304955, - 1104308905, - 3647129655, - 2064800519, - 3677870624, - 3366286947, - 2161821326, - 1245059411, - 181993155, - 2333166070, - 3087212255, - 3414822859, - 2663797591, - 1585226605, - 2439119269, - 1102516543, - 312816208, - 1807883815, - 2906527926, - 1131150783, - 515039613, - 3639364064, - 462548574, - 3481604820, - 409454027, - 2163281407, - 2048657469, - 2316664516, - 3525401088, - 1948308916, - 2874566167, - 2877090138, - 2375647808, - 1798523337, - 440692631, - 2568342811, - 626165605, - 770246022, - 553625395, - 1903599032, - 2936931736, - 1916980224, - 1183337777, - 3303541017, - 219135959, - 3387217171, - 606048426, - 3502987509, - 2774556799, - 2852112371, - 1220500395, - 222217586, - 639136462, - 516121620, - 2739283643, - 186450556, - 4211827752, - 1479788747, - 1096524592, - 166573123, - 3096252948, - 1318236592, - 3224218270, - 801477577, - 1079487725, - 1911596875, - 4118436121, - 2947939205, - 2409539994, - 1117520408, - 1221013606, - 736949044, - 1715723768, - 3531267653, - 2584008039, - 1549863685, - 978921404, - 1940456683, - 1948395538, - 4075485643, - 1734480163, - 3011498975, - 476682628, - 448623030, - 1888546377, - 1542374769, - 3544407226, - 2788333141, - 831247260, - 2655087416, - 2435564998, - 2703729490, - 2303253015, - 3362011500, - 2373933917, - 212219962, - 3941400335, - 2542751906, - 1293962739, - 133112821, - 2159734784, - 2114068651, - 1906882530, - 470947538, - 2888653229, - 810525124, - 2409353275, - 3303289369, - 2147064768, - 985776000, - 3920845653, - 3522395285, - 3328873357, - 1626979618, - 618591160, - 3285925362, - 1813887464, - 2533894586, - 1524897332, - 2094947551, - 4281721758, - 685207670, - 3758574822, - 3008126681, - 1168427282, - 1600196531, - 72800162, - 824806799, - 1395876299, - 1798202691, - 1223761745, - 691756726, - 4019761135, - 3124667227, - 4072198595, - 308739772, - 2164639394, - 2133827489, - 3751235874, - 3080714168, - 315849707, - 2039632867, - 3550041251, - 652991768, - 3057667210, - 52448976, - 540248956, - ]; - - static const List _envieddatapayMobApikey = [ - 2156512237, - 2749747539, - 2969388314, - 4055118185, - 3045577618, - 490203648, - 1774417801, - 1107058990, - 3170744386, - 1084230036, - 1865848996, - 2877134552, - 702377385, - 1226091839, - 26846528, - 3996652473, - 1411496674, - 2926602301, - 2700119880, - 2606836461, - 1354578627, - 1033924420, - 74228215, - 4170247243, - 873360571, - 2748318833, - 2263315174, - 2826384120, - 3582413385, - 2221990774, - 3944242884, - 3029543698, - 2872488536, - 1835503432, - 3659818895, - 2366662345, - 1008586344, - 2826666237, - 1329641654, - 3652989573, - 2935593807, - 1687202789, - 1526780728, - 2343408224, - 3808135103, - 3118221592, - 3732165174, - 1281793969, - 130140266, - 283700523, - 2589835927, - 4183975584, - 590339172, - 1029997236, - 967061722, - 1997593995, - 2908052528, - 358914942, - 2178363849, - 460103547, - 1129576290, - 3718201640, - 347568716, - 769425549, - 67473921, - 3005327920, - 2720134806, - 1890740256, - 2287546629, - 4181183792, - 9909583, - 657273641, - 1540255837, - 1937567464, - 2689047018, - 2801055477, - 3156051674, - 827077929, - 3720991595, - 1381992491, - 2387310831, - 1094848780, - 778372753, - 2351797229, - 677595237, - 1764857185, - 2702644370, - 1499750673, - 3964245200, - 706926014, - 822010821, - 2825696438, - 3655535188, - 1923752710, - 941429668, - 876276317, - 2311983962, - 1078529278, - 2475054236, - 982128638, - 4151418523, - 4166218073, - 3719554448, - 3677111283, - 1854762638, - 2494079045, - 2791331714, - 147021924, - 3307971362, - 2841905480, - 2160859928, - 1755134592, - 2919044329, - 2997840428, - 233600614, - 1894569196, - 3800206736, - 3277743410, - 3598016111, - 3622885896, - 3019330774, - 3073259031, - 428008074, - 17697440, - 189165353, - 2223665103, - 3524318525, - 1425751611, - 1235952737, - 3407111011, - 3444172144, - 3902980956, - 3380627857, - 2195283894, - 3433027906, - 3040448035, - 2612876626, - 4010989941, - 2098590105, - 1412304972, - 1104308985, - 3647129690, - 2064800599, - 3677870676, - 3366286894, - 2161821380, - 1245059370, - 181993145, - 2333165959, - 3087212180, - 3414822798, - 2663797518, - 1585226551, - 2439119296, - 1102516568, - 312816184, - 1807883862, - 2906527877, - 1131150834, - 515039496, - 3639364012, - 462548491, - 3481604774, - 409453965, - 2163281335, - 2048657422, - 2316664453, - 3525401137, - 1948308981, - 2874566256, - 2877090066, - 2375647779, - 1798523265, - 440692646, - 2568342830, - 626165542, - 770246108, - 553625354, - 1903599085, - 2936931833, - 1916980314, - 1183337829, - 3303541077, - 219135896, - 3387217259, - 606048452, - 3502987394, - 2774556751, - 2852112305, - 1220500479, - 222217494, - 639136436, - 516121692, - 2739283699, - 186450446, - 4211827818, - 1479788682, - 1096524610, - 166573098, - 3096253031, - 1318236650, - 3224218363, - 801477563, - 1079487672, - 1911596806, - 4118436172, - 2947939280, - 2409540064, - 1117520450, - 1221013591, - 736949110, - 1715723670, - 3531267591, - 2584007938, - 1549863744, - 978921429, - 1940456577, - 1948395610, - 4075485629, - 1734480237, - 3011498933, - 476682717, - 448623098, - 1888546343, - 1542374690, - 3544407179, - 2788333079, - 831247305, - 2655087473, - 2435564933, - 2703729439, - 2303253119, - 3362011455, - 2373933872, - 212220010, - 3941400423, - 2542751971, - 1293962690, - 133112768, - 2159734889, - 2114068685, - 1906882474, - 470947499, - 2888653307, - 810525109, - 2409353328, - 3303289436, - 2147064717, - 985776072, - 3920845570, - 3522395372, - 3328873414, - 1626979694, - 618591194, - 3285925259, - 1813887389, - 2533894643, - 1524897380, - 2094947497, - 4281721853, - 685207614, - 3758574815, - 3008126604, - 1168427383, - 1600196607, - 72800145, - 824806905, - 1395876241, - 1798202682, - 1223761685, - 691756752, - 4019761106, - 3124667192, - 4072198581, - 308739807, - 2164639482, - 2133827539, - 3751235962, - 3080714196, - 315849641, - 2039632783, - 3550041281, - 652991866, - 3057667304, - 52448946, - 540248862, - ]; - - static final String payMobApikey = String.fromCharCodes(List.generate( - _envieddatapayMobApikey.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatapayMobApikey[i] ^ _enviedkeypayMobApikey[i])); - - static const List _enviedkeyintegrationIdPayMobWallet = [ - 2199029462, - 1381762579, - 1035389835, - 2301212620, - 4098779353, - 3813714428, - 2159906595, - 295151910, - 3441193566, - 1120499211, - 2567959827, - 2022953168, - 3116052433, - ]; - - static const List _envieddataintegrationIdPayMobWallet = [ - 2199029478, - 1381762593, - 1035389884, - 2301212667, - 4098779374, - 3813714383, - 2159906586, - 295151998, - 3441193516, - 1120499283, - 2567959935, - 2022953106, - 3116052413, - ]; - - static final String integrationIdPayMobWallet = String.fromCharCodes( - List.generate( - _envieddataintegrationIdPayMobWallet.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataintegrationIdPayMobWallet[i] ^ - _enviedkeyintegrationIdPayMobWallet[i])); - - static const List _enviedkeysmsPasswordEgypt = [ - 3416621437, - 2031660888, - 1803482199, - 1352858980, - 1516850406, - 1348524184, - 3677227258, - 2021089538, - 1120716056, - 670289654, - 3686735344, - 3856174016, - 2305451887, - 4146413048, - 3244789741, - 4019214010, - ]; - - static const List _envieddatasmsPasswordEgypt = [ - 3416621367, - 2031660913, - 1803482113, - 1352858892, - 1516850395, - 1348524265, - 3677227160, - 2021089581, - 1120716120, - 670289595, - 3686735272, - 3856174002, - 2305451831, - 4146412948, - 3244789679, - 4019214038, - ]; - - static final String smsPasswordEgypt = String.fromCharCodes( - List.generate( - _envieddatasmsPasswordEgypt.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatasmsPasswordEgypt[i] ^ _enviedkeysmsPasswordEgypt[i])); - - static const List _enviedkeyocpApimSubscriptionKey = [ - 471176146, - 3158385045, - 580764052, - 654174929, - 4059514860, - 1272579671, - 4095434934, - 3165298524, - 3806199178, - 3538617412, - 4152409965, - 4153174060, - 2042008369, - 1334546813, - 3544781497, - 3847315324, - 1636423954, - 1869134391, - 368343637, - 2407576772, - 198035226, - 173339932, - 3665559839, - 1727260147, - 2130362298, - 985458494, - 4067927666, - 2202745536, - 2776427237, - 3656714239, - 2749346742, - 1107135976, - ]; - - static const List _envieddataocpApimSubscriptionKey = [ - 471176162, - 3158385139, - 580764065, - 654174901, - 4059514765, - 1272579636, - 4095434965, - 3165298495, - 3806199278, - 3538617382, - 4152409870, - 4153174089, - 2042008325, - 1334546764, - 3544781450, - 3847315277, - 1636424048, - 1869134342, - 368343604, - 2407576817, - 198035324, - 173339941, - 3665559850, - 1727260097, - 2130362243, - 985458439, - 4067927620, - 2202745587, - 2776427221, - 3656714189, - 2749346771, - 1107135963, - ]; - - static final String ocpApimSubscriptionKey = String.fromCharCodes( - List.generate( - _envieddataocpApimSubscriptionKey.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataocpApimSubscriptionKey[i] ^ - _enviedkeyocpApimSubscriptionKey[i])); - - static const List _enviedkeychatGPTkeySeferNew4 = [ - 2381442616, - 1867050637, - 1397252667, - 1775411544, - 3840979633, - 3025154038, - 1191771697, - 217270836, - 2916178439, - 1708425003, - 423480389, - 351531955, - 1560090944, - 3774372051, - 1859158980, - 1964496969, - 3308470848, - 3841356476, - 1340198113, - 2031263291, - 1260489717, - 153442885, - 1798276891, - 3155755755, - 123182835, - 3402530082, - 3411128957, - 4146893217, - 3046525917, - 2529868346, - 246774735, - 53148358, - 2826543583, - 3147410771, - 301328377, - 3954622922, - 523596434, - 3780117733, - 4075924512, - 3832510985, - 329586729, - 3709059156, - 3194696216, - 1621661668, - 979641468, - 399429110, - 2468123070, - 539744562, - 1147386824, - 1269822379, - 2752899845, - 2107213675, - 1361273282, - 2575308338, - 1313382092, - 4291789407, - 469771489, - 2395687230, - 2729380322, - 1936146089, - 1533014559, - 2597884613, - 146758073, - ]; - - static const List _envieddatachatGPTkeySeferNew4 = [ - 2381442626, - 1867050730, - 1397252630, - 1775411502, - 3840979677, - 3025153951, - 1191771732, - 217270809, - 2916178485, - 1708425031, - 423480436, - 351532009, - 1560090924, - 3774372003, - 1859158972, - 1964496928, - 3308470829, - 3841356528, - 1340198059, - 2031263245, - 1260489602, - 153442836, - 1798276948, - 3155755677, - 123182737, - 3402530112, - 3411128905, - 4146893301, - 3046525875, - 2529868409, - 246774774, - 53148318, - 2826543533, - 3147410731, - 301328286, - 3954622879, - 523596503, - 3780117660, - 4075924598, - 3832511064, - 329586784, - 3709059105, - 3194696238, - 1621661616, - 979641397, - 399429042, - 2468123018, - 539744579, - 1147386776, - 1269822367, - 2752899907, - 2107213630, - 1361273239, - 2575308355, - 1313382051, - 4291789324, - 469771476, - 2395687270, - 2729380240, - 1936146161, - 1533014643, - 2597884551, - 146758101, - ]; - - static final String chatGPTkeySeferNew4 = String.fromCharCodes( - List.generate( - _envieddatachatGPTkeySeferNew4.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatachatGPTkeySeferNew4[i] ^ - _enviedkeychatGPTkeySeferNew4[i])); - - static const List _enviedkeyanthropicAIkeySeferNew = [ - 440415033, - 3481077323, - 2351371344, - 288481861, - 1686766284, - 3622131985, - 1517759729, - 162218873, - 604728260, - 3916034383, - 726836953, - 1390373222, - 1313828993, - 3953920014, - 1210100472, - 636672723, - 2614778888, - 3256229455, - 4178701107, - 2175295549, - 581987297, - 2324410691, - 993526411, - 590897688, - 4131950141, - 1288350918, - 3047320354, - 1322424989, - 1550581193, - 2878806244, - 3233091400, - 1142932090, - 614521182, - 2419880789, - 1035341765, - 1673493904, - 4101051446, - 796536829, - 1331670153, - 1267654245, - 3078736492, - 464054371, - 2826108800, - 2985689774, - 2771215091, - 1285536431, - 2315560808, - 3514480796, - 4030336050, - 2950480752, - 2178285607, - 4178841704, - 2986715985, - 3530745786, - 615901237, - 881855124, - 3373546339, - 1444811969, - 4146566305, - 2821320265, - 2982736412, - 3308881966, - 3052128729, - 3831551676, - 2766571643, - 2433159288, - 2796477796, - 1324992066, - 399061202, - 642755973, - 4143477333, - 2707469362, - 3720826222, - 3400605387, - 2739617522, - 3017961433, - 3390862920, - 513520140, - 2251179580, - 624584094, - 2370674769, - 1669622004, - 11589773, - 236105173, - 2483386644, - 3949126604, - 1604768598, - 1317378690, - 2286953704, - 3045210649, - 1178973471, - 3464784953, - 2463864209, - 2261523411, - 1877928610, - 3336578558, - 2891378150, - 4046181905, - 3691642705, - 1096972210, - 1439704108, - 4159831330, - 4293511786, - 2769129919, - 410562615, - 420517500, - 3728341081, - 2369774650, - 4150826016, - 843207388, - 1237388578, - 546503206, - 502978408, - 1103967478, - 411610807, - ]; - - static const List _envieddataanthropicAIkeySeferNew = [ - 440415043, - 3481077292, - 2351371389, - 288481844, - 1686766254, - 3622132082, - 1517759708, - 162218760, - 604728242, - 3916034336, - 726836970, - 1390373215, - 1313829036, - 3953920099, - 1210100374, - 636672743, - 2614778974, - 3256229419, - 4178701182, - 2175295596, - 581987284, - 2324410669, - 993526526, - 590897746, - 4131950168, - 1288350863, - 3047320443, - 1322425077, - 1550581124, - 2878806186, - 3233091452, - 1142932010, - 614521114, - 2419880716, - 1035341751, - 1673493927, - 4101051463, - 796536722, - 1331670257, - 1267654230, - 3078736449, - 464054295, - 2826108850, - 2985689799, - 2771215042, - 1285536483, - 2315560704, - 3514480811, - 4030336083, - 2950480702, - 2178285683, - 4178841644, - 2986715959, - 3530745827, - 615901299, - 881855161, - 3373546276, - 1444811943, - 4146566297, - 2821320254, - 2982736500, - 3308882043, - 3052128659, - 3831551718, - 2766571576, - 2433159179, - 2796477776, - 1324992117, - 399061143, - 642756064, - 4143477296, - 2707469406, - 3720826149, - 3400605349, - 2739617482, - 3017961350, - 3390862877, - 513520239, - 2251179601, - 624584139, - 2370674716, - 1669621913, - 11589860, - 236105094, - 2483386712, - 3949126573, - 1604768560, - 1317378738, - 2286953661, - 3045210707, - 1178973560, - 3464784905, - 2463864277, - 2261523365, - 1877928695, - 3336578450, - 2891378103, - 4046181987, - 3691642645, - 1096972230, - 1439704065, - 4159831317, - 4293511772, - 2769129980, - 410562661, - 420517390, - 3728341042, - 2369774699, - 4150826097, - 843207300, - 1237388624, - 546503294, - 502978308, - 1103967412, - 411610843, - ]; - - static final String anthropicAIkeySeferNew = String.fromCharCodes( - List.generate( - _envieddataanthropicAIkeySeferNew.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataanthropicAIkeySeferNew[i] ^ - _enviedkeyanthropicAIkeySeferNew[i])); - - static const List _enviedkeyllama3Key = [ - 3572481898, - 2198763672, - 4266389949, - 194977134, - 4108211437, - 2053667721, - 4103250415, - 923461869, - 3689102089, - 4215912861, - 2840020339, - 1291843711, - 3066303235, - 637162077, - 4089840734, - 2755384350, - 266516998, - 2147734435, - 1971112343, - 893601327, - 1059802444, - 3038118734, - 4176920206, - 2125561606, - 1790473939, - 635573349, - 1755219331, - 952592272, - 2828598413, - 1470709880, - 1365805985, - 1017727377, - 483877279, - 2633096056, - 1736628348, - 744976085, - 2060718974, - 172374259, - 1424671706, - 2531482868, - 930335001, - 2798422613, - 65834050, - 1179104162, - 1307565357, - 2186467103, - 2324931291, - 2761073838, - 658395544, - 297981328, - 3032132029, - 2554868846, - 298738134, - 2354744510, - 397407695, - 3291252503, - 2706569827, - 1382292102, - 1277793008, - 3186033650, - 1988297014, - 1037048923, - 3595786289, - ]; - - static const List _envieddatallama3Key = [ - 3572481793, - 2198763746, - 4266389978, - 194977073, - 4108211352, - 2053667805, - 4103250359, - 923461780, - 3689102138, - 4215912952, - 2840020298, - 1291843643, - 3066303297, - 637162047, - 4089840669, - 2755384399, - 266517047, - 2147734501, - 1971112441, - 893601378, - 1059802379, - 3038118691, - 4176920310, - 2125561695, - 1790473892, - 635573297, - 1755219400, - 952592361, - 2828598526, - 1470709760, - 1365805976, - 1017727428, - 483877324, - 2633096009, - 1736628254, - 744976032, - 2060718860, - 172374155, - 1424671632, - 2531482782, - 930335021, - 2798422579, - 65833988, - 1179104213, - 1307565410, - 2186467189, - 2324931262, - 2761073818, - 658395604, - 297981386, - 3032132095, - 2554868795, - 298738064, - 2354744565, - 397407621, - 3291252548, - 2706569810, - 1382292190, - 1277792898, - 3186033578, - 1988297050, - 1037048857, - 3595786333, - ]; - - static final String llama3Key = String.fromCharCodes(List.generate( - _envieddatallama3Key.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatallama3Key[i] ^ _enviedkeyllama3Key[i])); - - static const List _enviedkeypayMobOutClientSecrret = [ - 1791175069, - 4274302398, - 2640019683, - 226626444, - 2129466949, - 3370573502, - 1838185322, - 1661460518, - 1471552216, - 284247277, - 592558703, - 2721247847, - 1411044004, - 1716699342, - 2602920259, - 3248471857, - 2400803405, - 3542688653, - 97726941, - 1327359358, - 3921043617, - 2743794380, - 3779296726, - 302543532, - 1934107464, - 1886556912, - 3105507418, - 3013174638, - 546582165, - 2866756923, - 3375057284, - 40608270, - 2700307707, - 2281798243, - 3064205456, - 2435585786, - 471262151, - 1109633429, - 2268316166, - 220452796, - 2358948626, - 776422409, - 1219598009, - 116682801, - 3881474372, - 3413318048, - 1380917233, - 444744348, - 2278996499, - 1955318953, - 1142785951, - 269692139, - 1689414586, - 3364295709, - 3609160927, - 3828025868, - 2102524012, - 339941484, - 456355302, - 1281294123, - 3294899989, - 24023387, - 1078560164, - 4187133903, - 3881470412, - 3894452684, - 1532438968, - 2730357960, - 3633287995, - 2545592955, - 3230220363, - 1650489044, - 3083570276, - 2876810793, - 3154138833, - 3601137810, - 3383259116, - 1843399614, - 3785140761, - 3903839396, - 3703132483, - 521417572, - 3493042551, - 2660676881, - 502128880, - 458791535, - 347561458, - 3488775302, - 2954583900, - 1932780718, - 1968040293, - 1221461083, - 805690927, - 1397152166, - 9419300, - 3022184595, - 2819076579, - 3037437633, - 1069227510, - 3543696866, - 644361757, - 4066100141, - 1908720734, - 1699522416, - 3173902814, - 1127523762, - 800611780, - 3004873618, - 1208922121, - 3134865091, - 4141647798, - 2736322675, - 3237776966, - 1290198067, - 491594743, - 3082583214, - 3801718029, - 1980363941, - 781258854, - 2566488484, - 2698709985, - 3449578448, - 593576507, - 2843511536, - 1103580082, - 2040065597, - 1101635704, - 434408713, - 80044955, - 150216274, - 2548439424, - 1537205109, - 671175664, - 2357986282, - 1040240055, - ]; - - static const List _envieddatapayMobOutClientSecrret = [ - 1791175141, - 4274302407, - 2640019593, - 226626534, - 2129466903, - 3370573522, - 1838185217, - 1661460551, - 1471552176, - 284247207, - 592558626, - 2721247831, - 1411044092, - 1716699309, - 2602920304, - 3248471817, - 2400803354, - 3542688743, - 97726876, - 1327359246, - 3921043682, - 2743794307, - 3779296702, - 302543508, - 1934107434, - 1886556806, - 3105507389, - 3013174562, - 546582188, - 2866756936, - 3375057384, - 40608328, - 2700307595, - 2281798189, - 3064205556, - 2435585719, - 471262206, - 1109633484, - 2268316259, - 220452863, - 2358948711, - 776422448, - 1219598072, - 116682841, - 3881474312, - 3413318097, - 1380917139, - 444744435, - 2278996568, - 1955319012, - 1142785999, - 269692063, - 1689414615, - 3364295758, - 3609160873, - 3828025967, - 2102523998, - 339941410, - 456355295, - 1281294180, - 3294900001, - 24023343, - 1078560252, - 4187133879, - 3881470346, - 3894452608, - 1532439022, - 2730358010, - 3633288049, - 2545592890, - 3230220317, - 1650489058, - 3083570199, - 2876810845, - 3154138771, - 3601137857, - 3383259064, - 1843399679, - 3785140830, - 3903839458, - 3703132420, - 521417511, - 3493042465, - 2660676964, - 502128786, - 458791464, - 347561367, - 3488775344, - 2954583825, - 1932780768, - 1968040213, - 1221461048, - 805690904, - 1397152235, - 9419358, - 3022184665, - 2819076493, - 3037437595, - 1069227461, - 3543696817, - 644361844, - 4066100217, - 1908720744, - 1699522359, - 3173902766, - 1127523795, - 800611762, - 3004873680, - 1208922214, - 3134865024, - 4141647866, - 2736322596, - 3237776941, - 1290198118, - 491594625, - 3082583288, - 3801718127, - 1980363969, - 781258805, - 2566488544, - 2698709888, - 3449578397, - 593576459, - 2843511434, - 1103580154, - 2040065611, - 1101635597, - 434408779, - 80045012, - 150216202, - 2548439538, - 1537205037, - 671175580, - 2357986216, - 1040240091, - ]; - - static final String payMobOutClientSecrret = String.fromCharCodes( - List.generate( - _envieddatapayMobOutClientSecrret.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatapayMobOutClientSecrret[i] ^ - _enviedkeypayMobOutClientSecrret[i])); - - static const List _enviedkeyallowedWallet = [ - 1694229894, - 3999798160, - 448883603, - 3004281707, - 3728431091, - 4197831559, - 3505724573, - 2577029677, - 2137661136, - 4217007177, - 1756899448, - 518319248, - ]; - - static const List _envieddataallowedWallet = [ - 1694229970, - 3999798242, - 448883706, - 3004281627, - 3728430985, - 4197831632, - 3505724668, - 2577029697, - 2137661116, - 4217007148, - 1756899340, - 518319274, - ]; - - static final String allowedWallet = String.fromCharCodes(List.generate( - _envieddataallowedWallet.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataallowedWallet[i] ^ _enviedkeyallowedWallet[i])); - - static const List _enviedkeypayMobOutClient_id = [ - 979983630, - 2508789854, - 3342679617, - 414951138, - 1079222340, - 2328078156, - 772570862, - 2864880607, - 1647329883, - 1977857149, - 1422043970, - 3625133941, - 3119399678, - 3958275097, - 2809221326, - 1471069410, - 694611393, - 928648581, - 175362392, - 1623958064, - 1600744102, - 2501977433, - 959253698, - 1257331100, - 1074547703, - 1176503077, - 1546625303, - 3098776092, - 1533226722, - 2812471837, - 1112951286, - 1602675172, - 3208237481, - 3504868848, - 1642540271, - 779799845, - 2883949092, - 1503722689, - 3681385494, - 2420641192, - 3494475686, - 3926374187, - 3655378190, - 1480693833, - 873781787, - 3137712878, - 3158057581, - ]; - - static const List _envieddatapayMobOutClient_id = [ - 979983700, - 2508789870, - 3342679668, - 414951063, - 1079222320, - 2328078200, - 772570838, - 2864880571, - 1647329805, - 1977857046, - 1422043945, - 3625133862, - 3119399628, - 3958275198, - 2809221255, - 1471069392, - 694611387, - 928648672, - 175362358, - 1623958134, - 1600744160, - 2501977402, - 959253641, - 1257331183, - 1074547601, - 1176503137, - 1546625372, - 3098776186, - 1533226666, - 2812471900, - 1112951203, - 1602675156, - 3208237566, - 3504868789, - 1642540195, - 779799892, - 2883949167, - 1503722680, - 3681385564, - 2420641176, - 3494475754, - 3926374259, - 3655378300, - 1480693777, - 873781879, - 3137712812, - 3158057473, - ]; - - static final String payMobOutClient_id = String.fromCharCodes( - List.generate( - _envieddatapayMobOutClient_id.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatapayMobOutClient_id[i] ^ _enviedkeypayMobOutClient_id[i])); - - static const List _enviedkeypayMobOutPassword = [ - 3777244660, - 912864580, - 876854029, - 31397964, - 2402256236, - 3558089177, - 405282331, - 1026183174, - 2007236667, - 2400875168, - 2067671069, - 3379238164, - 3326887990, - 2036026928, - 1366655300, - 1593480823, - 1064143790, - 1275708644, - 3766542030, - 1537117210, - 86300338, - 2374149402, - 2174478652, - 1104011002, - 3591848939, - 668153194, - 1201352467, - 1107268086, - 3108266920, - 1789980402, - 688174663, - 4268912646, - ]; - - static const List _envieddatapayMobOutPassword = [ - 3777244592, - 912864630, - 876854135, - 31397894, - 2402256170, - 3558089121, - 405282416, - 1026183235, - 2007236632, - 2400875244, - 2067671123, - 3379238271, - 3326887941, - 2036026950, - 1366655294, - 1593480772, - 1064143766, - 1275708574, - 3766542076, - 1537117310, - 86300395, - 2374149474, - 2174478668, - 1104010932, - 3591848845, - 668153149, - 1201352523, - 1107267972, - 3108266992, - 1789980318, - 688174597, - 4268912746, - ]; - - static final String payMobOutPassword = String.fromCharCodes( - List.generate( - _envieddatapayMobOutPassword.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatapayMobOutPassword[i] ^ _enviedkeypayMobOutPassword[i])); - - static const List _enviedkeypayMobOutUserName = [ - 1918639183, - 2401964853, - 3565683034, - 1895964189, - 3596231414, - 1862637613, - 2056930245, - 1566061619, - 2875080933, - 1883383284, - 183134750, - 3712444261, - 4202700050, - 2336494786, - 2509515411, - 324331526, - 2761085601, - 4075221958, - 2606528383, - 2298152803, - 2759530582, - 3789793797, - 4268109091, - 338600608, - ]; - - static const List _envieddatapayMobOutUserName = [ - 1918639157, - 2401964895, - 3565682991, - 1895964279, - 3596231322, - 1862637682, - 2056930228, - 1566061637, - 2875080842, - 1883383211, - 183134840, - 3712444178, - 4202700153, - 2336494760, - 2509515509, - 324331617, - 2761085643, - 4075221930, - 2606528295, - 2298152721, - 2759530510, - 3789793897, - 4268109153, - 338600652, - ]; - - static final String payMobOutUserName = String.fromCharCodes( - List.generate( - _envieddatapayMobOutUserName.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatapayMobOutUserName[i] ^ _enviedkeypayMobOutUserName[i])); - - static const List _enviedkeyA = [3669847309]; - - static const List _envieddataA = [3669847388]; - - static final String A = String.fromCharCodes(List.generate( - _envieddataA.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataA[i] ^ _enviedkeyA[i])); - - static const List _enviedkeyB = [2691187575]; - - static const List _envieddataB = [2691187503]; - - static final String B = String.fromCharCodes(List.generate( - _envieddataB.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataB[i] ^ _enviedkeyB[i])); - - static const List _enviedkeyC = [1476171811]; - - static const List _envieddataC = [1476171877]; - - static final String C = String.fromCharCodes(List.generate( - _envieddataC.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataC[i] ^ _enviedkeyC[i])); - - static const List _enviedkeyD = [2692972781]; - - static const List _envieddataD = [2692972724]; - - static final String D = String.fromCharCodes(List.generate( - _envieddataD.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataD[i] ^ _enviedkeyD[i])); - - static const List _enviedkeyE = [346088415]; - - static const List _envieddataE = [346088341]; - - static final String E = String.fromCharCodes(List.generate( - _envieddataE.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataE[i] ^ _enviedkeyE[i])); - - static const List _enviedkeyF = [3306563796]; - - static const List _envieddataF = [3306563713]; - - static final String F = String.fromCharCodes(List.generate( - _envieddataF.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataF[i] ^ _enviedkeyF[i])); - - static const List _enviedkeyG = [740311107]; - - static const List _envieddataG = [740311048]; - - static final String G = String.fromCharCodes(List.generate( - _envieddataG.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataG[i] ^ _enviedkeyG[i])); - - static const List _enviedkeyH = [1937341364]; - - static const List _envieddataH = [1937341411]; - - static final String H = String.fromCharCodes(List.generate( - _envieddataH.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataH[i] ^ _enviedkeyH[i])); - - static const List _enviedkeyI = [2115946541]; - - static const List _envieddataI = [2115946594]; - - static final String I = String.fromCharCodes(List.generate( - _envieddataI.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataI[i] ^ _enviedkeyI[i])); - - static const List _enviedkeyJ = [3314402949]; - - static const List _envieddataJ = [3314403008]; - - static final String J = String.fromCharCodes(List.generate( - _envieddataJ.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataJ[i] ^ _enviedkeyJ[i])); - - static const List _enviedkeyK = [620434005]; - - static const List _envieddataK = [620433938]; - - static final String K = String.fromCharCodes(List.generate( - _envieddataK.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataK[i] ^ _enviedkeyK[i])); - - static const List _enviedkeyL = [1180655650]; - - static const List _envieddataL = [1180655728]; - - static final String L = String.fromCharCodes(List.generate( - _envieddataL.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataL[i] ^ _enviedkeyL[i])); - - static const List _enviedkeyM = [3139361766]; - - static const List _envieddataM = [3139361704]; - - static final String M = String.fromCharCodes(List.generate( - _envieddataM.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataM[i] ^ _enviedkeyM[i])); - - static const List _enviedkeyN = [3049045212]; - - static const List _envieddataN = [3049045150]; - - static final String N = String.fromCharCodes(List.generate( - _envieddataN.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataN[i] ^ _enviedkeyN[i])); - - static const List _enviedkeyO = [2266599974]; - - static const List _envieddataO = [2266600047]; - - static final String O = String.fromCharCodes(List.generate( - _envieddataO.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataO[i] ^ _enviedkeyO[i])); - - static const List _enviedkeyP = [1074033543]; - - static const List _envieddataP = [1074033617]; - - static final String P = String.fromCharCodes(List.generate( - _envieddataP.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataP[i] ^ _enviedkeyP[i])); - - static const List _enviedkeyQ = [2647546717]; - - static const List _envieddataQ = [2647546652]; - - static final String Q = String.fromCharCodes(List.generate( - _envieddataQ.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataQ[i] ^ _enviedkeyQ[i])); - - static const List _enviedkeyR = [3790845943]; - - static const List _envieddataR = [3790845883]; - - static final String R = String.fromCharCodes(List.generate( - _envieddataR.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataR[i] ^ _enviedkeyR[i])); - - static const List _enviedkeyS = [43300891]; - - static const List _envieddataS = [43300929]; - - static final String S = String.fromCharCodes(List.generate( - _envieddataS.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataS[i] ^ _enviedkeyS[i])); - - static const List _enviedkeyT = [3507578833]; - - static const List _envieddataT = [3507578770]; - - static final String T = String.fromCharCodes(List.generate( - _envieddataT.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataT[i] ^ _enviedkeyT[i])); - - static const List _enviedkeyU = [3499348722]; - - static const List _envieddataU = [3499348666]; - - static final String U = String.fromCharCodes(List.generate( - _envieddataU.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataU[i] ^ _enviedkeyU[i])); - - static const List _enviedkeyV = [1770507908]; - - static const List _envieddataV = [1770507988]; - - static final String V = String.fromCharCodes(List.generate( - _envieddataV.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataV[i] ^ _enviedkeyV[i])); - - static const List _enviedkeyW = [710768163]; - - static const List _envieddataW = [710768247]; - - static final String W = String.fromCharCodes(List.generate( - _envieddataW.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataW[i] ^ _enviedkeyW[i])); - - static const List _enviedkeyX = [1231391567]; - - static const List _envieddataX = [1231391499]; - - static final String X = String.fromCharCodes(List.generate( - _envieddataX.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataX[i] ^ _enviedkeyX[i])); - - static const List _enviedkeyY = [2348108661]; - - static const List _envieddataY = [2348108582]; - - static final String Y = String.fromCharCodes(List.generate( - _envieddataY.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataY[i] ^ _enviedkeyY[i])); - - static const List _enviedkeyZ = [4202936308]; - - static const List _envieddataZ = [4202936249]; - - static final String Z = String.fromCharCodes(List.generate( - _envieddataZ.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataZ[i] ^ _enviedkeyZ[i])); - - static const List _enviedkeya = [1258692106]; - - static const List _envieddataa = [1258692219]; - - static final String a = String.fromCharCodes(List.generate( - _envieddataa.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataa[i] ^ _enviedkeya[i])); - - static const List _enviedkeyb = [185978357]; - - static const List _envieddatab = [185978253]; - - static final String b = String.fromCharCodes(List.generate( - _envieddatab.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatab[i] ^ _enviedkeyb[i])); - - static const List _enviedkeyc = [1002619573]; - - static const List _envieddatac = [1002619603]; - - static final String c = String.fromCharCodes(List.generate( - _envieddatac.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatac[i] ^ _enviedkeyc[i])); - - static const List _enviedkeyd = [1511313002]; - - static const List _envieddatad = [1511312915]; - - static final String d = String.fromCharCodes(List.generate( - _envieddatad.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatad[i] ^ _enviedkeyd[i])); - - static const List _enviedkeye = [319701477]; - - static const List _envieddatae = [319701391]; - - static final String e = String.fromCharCodes(List.generate( - _envieddatae.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatae[i] ^ _enviedkeye[i])); - - static const List _enviedkeyf = [1505429496]; - - static const List _envieddataf = [1505429389]; - - static final String f = String.fromCharCodes(List.generate( - _envieddataf.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataf[i] ^ _enviedkeyf[i])); - - static const List _enviedkeyg = [3437297919]; - - static const List _envieddatag = [3437297812]; - - static final String g = String.fromCharCodes(List.generate( - _envieddatag.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatag[i] ^ _enviedkeyg[i])); - - static const List _enviedkeyh = [1452421920]; - - static const List _envieddatah = [1452421975]; - - static final String h = String.fromCharCodes(List.generate( - _envieddatah.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatah[i] ^ _enviedkeyh[i])); - - static const List _enviedkeyi = [801542640]; - - static const List _envieddatai = [801542559]; - - static final String i = String.fromCharCodes(List.generate( - _envieddatai.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatai[i] ^ _enviedkeyi[i])); - - static const List _enviedkeyj = [3178617758]; - - static const List _envieddataj = [3178617851]; - - static final String j = String.fromCharCodes(List.generate( - _envieddataj.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataj[i] ^ _enviedkeyj[i])); - - static const List _enviedkeyk = [910033774]; - - static const List _envieddatak = [910033673]; - - static final String k = String.fromCharCodes(List.generate( - _envieddatak.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatak[i] ^ _enviedkeyk[i])); - - static const List _enviedkeyl = [3262988596]; - - static const List _envieddatal = [3262988614]; - - static final String l = String.fromCharCodes(List.generate( - _envieddatal.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatal[i] ^ _enviedkeyl[i])); - - static const List _enviedkeym = [4161268557]; - - static const List _envieddatam = [4161268515]; - - static final String m = String.fromCharCodes(List.generate( - _envieddatam.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatam[i] ^ _enviedkeym[i])); - - static const List _enviedkeyn = [1866024422]; - - static const List _envieddatan = [1866024324]; - - static final String n = String.fromCharCodes(List.generate( - _envieddatan.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatan[i] ^ _enviedkeyn[i])); - - static const List _enviedkeyo = [2356433566]; - - static const List _envieddatao = [2356433655]; - - static final String o = String.fromCharCodes(List.generate( - _envieddatao.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatao[i] ^ _enviedkeyo[i])); - - static const List _enviedkeyp = [3221197543]; - - static const List _envieddatap = [3221197457]; - - static final String p = String.fromCharCodes(List.generate( - _envieddatap.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatap[i] ^ _enviedkeyp[i])); - - static const List _enviedkeyq = [1441620817]; - - static const List _envieddataq = [1441620784]; - - static final String q = String.fromCharCodes(List.generate( - _envieddataq.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataq[i] ^ _enviedkeyq[i])); - - static const List _enviedkeyr = [2338076256]; - - static const List _envieddatar = [2338076172]; - - static final String r = String.fromCharCodes(List.generate( - _envieddatar.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatar[i] ^ _enviedkeyr[i])); - - static const List _enviedkeys = [3541953140]; - - static const List _envieddatas = [3541953038]; - - static final String s = String.fromCharCodes(List.generate( - _envieddatas.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatas[i] ^ _enviedkeys[i])); - - static const List _enviedkeyt = [1180244588]; - - static const List _envieddatat = [1180244495]; - - static final String t = String.fromCharCodes(List.generate( - _envieddatat.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatat[i] ^ _enviedkeyt[i])); - - static const List _enviedkeyu = [1249543756]; - - static const List _envieddatau = [1249543716]; - - static final String u = String.fromCharCodes(List.generate( - _envieddatau.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatau[i] ^ _enviedkeyu[i])); - - static const List _enviedkeyv = [3272247679]; - - static const List _envieddatav = [3272247567]; - - static final String v = String.fromCharCodes(List.generate( - _envieddatav.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatav[i] ^ _enviedkeyv[i])); - - static const List _enviedkeyw = [1149161987]; - - static const List _envieddataw = [1149162103]; - - static final String w = String.fromCharCodes(List.generate( - _envieddataw.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataw[i] ^ _enviedkeyw[i])); - - static const List _enviedkeyx = [922652415]; - - static const List _envieddatax = [922652315]; - - static final String x = String.fromCharCodes(List.generate( - _envieddatax.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatax[i] ^ _enviedkeyx[i])); - - static const List _enviedkeyy = [3053150165]; - - static const List _envieddatay = [3053150118]; - - static final String y = String.fromCharCodes(List.generate( - _envieddatay.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatay[i] ^ _enviedkeyy[i])); - - static const List _enviedkeyz = [2047383862]; - - static const List _envieddataz = [2047383899]; - - static final String z = String.fromCharCodes(List.generate( - _envieddataz.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataz[i] ^ _enviedkeyz[i])); - - static const List _enviedkeykeyOfApp = [ - 4244184874, - 4107512659, - 2622522874, - 1645925263, - 913853953, - 1777373664, - 1889373768, - 558620175, - 2961007568, - 3688084515, - 1364454989, - 921996628, - 3825877930, - 2135905355, - 2011599918, - 2208987645, - 745071802, - 334467154, - 3673450172, - 3796616278, - 3422993682, - 1335020432, - 3949030242, - 1948720617, - 1792135573, - 2634584073, - 850114781, - 1985160764, - 3334693369, - 1933911873, - 1377163926, - 3712457630, - 1145127440, - 2498192437, - 85469232, - 3454294148, - 2953289630, - 3968588203, - ]; - - static const List _envieddatakeyOfApp = [ - 4244184904, - 4107512626, - 2622522774, - 1645925372, - 913854052, - 1777373590, - 1889373704, - 558620216, - 2961007590, - 3688084506, - 1364455035, - 921996576, - 3825877963, - 2135905321, - 2011599936, - 2208987548, - 745071835, - 334467112, - 3673450201, - 3796616229, - 3422993791, - 1335020533, - 3949030154, - 1948720524, - 1792135655, - 2634584172, - 850114746, - 1985160774, - 3334693257, - 1933911847, - 1377164028, - 3712457713, - 1145127496, - 2498192455, - 85469288, - 3454294262, - 2953289692, - 3968588249, - ]; - - static final String keyOfApp = String.fromCharCodes(List.generate( - _envieddatakeyOfApp.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatakeyOfApp[i] ^ _enviedkeykeyOfApp[i])); -} diff --git a/siro_driver/.gitignore b/siro_driver/.gitignore index 3820a95..aa09d9b 100644 --- a/siro_driver/.gitignore +++ b/siro_driver/.gitignore @@ -43,3 +43,8 @@ app.*.map.json /android/app/debug /android/app/profile /android/app/release + +# Sensitive keys & environment files +key.properties +*.env +**/lib/env/env.g.dart diff --git a/siro_driver/lib/constant/currency.dart b/siro_driver/lib/constant/currency.dart new file mode 100644 index 0000000..f6a2b75 --- /dev/null +++ b/siro_driver/lib/constant/currency.dart @@ -0,0 +1,15 @@ +import 'package:siro_driver/main.dart'; +import 'package:siro_driver/constant/box_name.dart'; +import 'package:get/get.dart'; + +class CurrencyHelper { + static String get currency { + String country = box.read(BoxName.countryCode) ?? 'Jordan'; + switch (country) { + case 'Syria': return 'SYP'.tr; + case 'Egypt': return 'EGP'.tr; + case 'Jordan': + default: return 'JOD'.tr; + } + } +} diff --git a/siro_driver/lib/constant/links.dart b/siro_driver/lib/constant/links.dart index 49815e6..0d54c95 100755 --- a/siro_driver/lib/constant/links.dart +++ b/siro_driver/lib/constant/links.dart @@ -4,431 +4,446 @@ import '../main.dart'; import 'box_name.dart'; class AppLink { - static String serverPHP = box.read('serverPHP'); +static String get serverPHP => box.read('serverPHP'); - static String paymentServer = 'https://walletintaleq.intaleq.xyz/v1/main'; +static String get paymentServer => 'https://walletintaleq.intaleq.xyz/v1/main'; static const String appDomain = 'siromove.com'; - static String locationServer = +static String get locationServer => 'https://location.intaleq.xyz/siro/ride/location'; - static String locationServerSide = +static String get locationServerSide => 'https://location.intaleq.xyz/siro/ride/location'; - static String mapSaasRoute = 'https://map-saas.intaleqapp.com/api/maps/route'; - static String mapSaasPlaces = +static String get mapSaasRoute => 'https://map-saas.intaleqapp.com/api/maps/route'; +static String get mapSaasPlaces => 'https://map-saas.intaleqapp.com/api/geocoding/places'; - static const String routeApiBaseUrl = +static String get routeApiBaseUrl => "https://routesjo.intaleq.xyz/route/v1/driving"; - static final String endPoint = 'https://api.intaleq.xyz/intaleq_v3'; - static final String syria = 'https://syria.intaleq.xyz/siro'; - static final String server = endPoint; + static String get currentCountry => box.read(BoxName.countryCode) ?? 'Jordan'; + + static String get endPoint { + switch (currentCountry) { + case 'Syria': + return 'https://api-syria.siromove.com/intaleq_v3'; + case 'Egypt': + return 'https://api-egypt.siromove.com/intaleq_v3'; + case 'Jordan': + default: + return 'https://api-jordan.siromove.com/intaleq_v3'; + } + } + + static String get syria => 'https://api-syria.siromove.com/siro'; + static String get server => endPoint; ///=================ride==========================/// ///https://api.intaleq.xyz/siro/ride - static String ride = '$server/ride'; - static String rideServer = 'https://rides.intaleq.xyz/siro/ride'; +static String get ride => '$server/ride'; +static String get rideServer => 'https://rides.intaleq.xyz/siro/ride'; ///mapOSM = 'https://routesy.intaleq.xyz' - static String mapOSM = 'https://routesy.intaleq.xyz'; +static String get mapOSM => 'https://routesy.intaleq.xyz'; - static String seferCairoServer = endPoint; - static String seferGizaServer = +static String get seferCairoServer => endPoint; +static String get seferGizaServer => box.read('Giza') ?? box.read(BoxName.serverChosen); - static String seferAlexandriaServer = +static String get seferAlexandriaServer => box.read('Alexandria') ?? box.read(BoxName.serverChosen); // static final String server = Env.serverPHP; - static String loginJwtDriver = "$server/loginJwtDriver.php"; - static String loginJwtWalletDriver = "$server/loginJwtWalletDriver.php"; - static String loginFirstTimeDriver = "$server/loginFirstTimeDriver.php"; +static String get loginJwtDriver => "$server/loginJwtDriver.php"; +static String get loginJwtWalletDriver => "$server/loginJwtWalletDriver.php"; +static String get loginFirstTimeDriver => "$server/loginFirstTimeDriver.php"; - static String googleMapsLink = 'https://maps.googleapis.com/maps/api/'; - static String llama = 'https://api.llama-api.com/chat/completions'; - static String gemini = +static String get googleMapsLink => 'https://maps.googleapis.com/maps/api/'; +static String get llama => 'https://api.llama-api.com/chat/completions'; +static String get gemini => 'https://generativelanguage.googleapis.com/v1beta3/models/text-bison-001:generateText'; - static String test = "$server/test.php"; +static String get test => "$server/test.php"; //===============contact========================== - static String savePhones = "$ride/egyptPhones/add.php"; - static String savePhonesSyria = "$ride/egyptPhones/syrianAdd.php"; - static String getPhones = "$ride/egyptPhones/get.php"; +static String get savePhones => "$ride/egyptPhones/add.php"; +static String get savePhonesSyria => "$ride/egyptPhones/syrianAdd.php"; +static String get getPhones => "$ride/egyptPhones/get.php"; ////===============firebase========================== - static String getTokens = "$ride/firebase/get.php"; +static String get getTokens => "$ride/firebase/get.php"; - static String getDriverToken = "$ride/firebase/getDriverToken.php"; - static String addTokens = "$ride/firebase/add.php"; - static String addTokensDriver = "$ride/firebase/addDriver.php"; - static String addTokensDriverWallet = +static String get getDriverToken => "$ride/firebase/getDriverToken.php"; +static String get addTokens => "$ride/firebase/add.php"; +static String get addTokensDriver => "$ride/firebase/addDriver.php"; +static String get addTokensDriverWallet => "$paymentServer/ride/firebase/addDriver.php"; //=======================Wallet=================== - static String wallet = '$paymentServer/ride/passengerWallet'; - static String walletDriver = '$paymentServer/ride/driverWallet'; - static String getAllPassengerTransaction = +static String get wallet => '$paymentServer/ride/passengerWallet'; +static String get walletDriver => '$paymentServer/ride/driverWallet'; +static String get getAllPassengerTransaction => "$wallet/getAllPassengerTransaction.php"; - static String payWithMTNConfirm = +static String get payWithMTNConfirm => "$paymentServer/ride/mtn/driver/confirm_payment.php"; - static String payWithMTNStart = +static String get payWithMTNStart => "$paymentServer/ride/mtn/driver/mtn_start.php"; - static String payWithSyriatelConfirm = +static String get payWithSyriatelConfirm => "$paymentServer/ride/syriatel/driver/confirm_payment.php"; - static String payWithSyriatelStart = +static String get payWithSyriatelStart => "$paymentServer/ride/syriatel/driver/start_payment.php"; - static String payWithEcashDriver = +static String get payWithEcashDriver => "$paymentServer/ride/ecash/driver/payWithEcash.php"; - static String payWithEcashPassenger = +static String get payWithEcashPassenger => "$paymentServer/ride/ecash/passenger/payWithEcash.php"; // wl.tripz-egypt.com/v1/main/ride/ecash/driver - static String getWalletByPassenger = "$wallet/getWalletByPassenger.php"; - static String getPassengersWallet = "$wallet/get.php"; - static String getPassengerWalletArchive = +static String get getWalletByPassenger => "$wallet/getWalletByPassenger.php"; +static String get getPassengersWallet => "$wallet/get.php"; +static String get getPassengerWalletArchive => "$wallet/getPassengerWalletArchive.php"; - static String addPassengersWallet = "$wallet/add.php"; - static String deletePassengersWallet = "$wallet/delete.php"; - static String updatePassengersWallet = "$wallet/update.php"; +static String get addPassengersWallet => "$wallet/add.php"; +static String get deletePassengersWallet => "$wallet/delete.php"; +static String get updatePassengersWallet => "$wallet/update.php"; - static String getWalletByDriver = "$walletDriver/getWalletByDriver.php"; - static String driverStatistic = +static String get getWalletByDriver => "$walletDriver/getWalletByDriver.php"; +static String get driverStatistic => "$endPoint/ride/driverWallet/driverStatistic.php"; - static String getDriverDetails = +static String get getDriverDetails => "$seferCairoServer/ride/driverWallet/getDriverDetails.php"; // ================= Gamification Endpoints ================= - static String getWeeklyAggregate = +static String get getWeeklyAggregate => "$endPoint/ride/gamification/getWeeklyAggregate.php"; - static String getLeaderboard = +static String get getLeaderboard => "$endPoint/ride/gamification/getLeaderboard.php"; - static String claimChallengeReward = +static String get claimChallengeReward => "$endPoint/ride/gamification/claimChallengeReward.php"; - static String getReferralStats = +static String get getReferralStats => "$endPoint/ride/gamification/getReferralStats.php"; - static String getDriverBehavior = +static String get getDriverBehavior => "$endPoint/ride/gamification/getDriverBehavior.php"; - static String getDriverWeekPaymentMove = +static String get getDriverWeekPaymentMove => "$walletDriver/getDriverWeekPaymentMove.php"; - static String getDriversWallet = "$walletDriver/get.php"; - static String addDriversWalletPoints = "$walletDriver/add.php"; - static String addpromotionDriver = "$walletDriver/promotionDriver.php"; - static String deleteDriversWallet = "$walletDriver/delete.php"; - static String updateDriversWallet = "$walletDriver/update.php"; +static String get getDriversWallet => "$walletDriver/get.php"; +static String get addDriversWalletPoints => "$walletDriver/add.php"; +static String get addpromotionDriver => "$walletDriver/promotionDriver.php"; +static String get deleteDriversWallet => "$walletDriver/delete.php"; +static String get updateDriversWallet => "$walletDriver/update.php"; //=======================promo===================ride.mobile-app.store/ride/promo/get.php - static String promo = '$server/ride/promo'; - static String getPassengersPromo = "$promo/get.php"; - static String getPromoBytody = "$promo/getPromoBytody.php"; - static String addPassengersPromo = "$promo/add.php"; - static String deletePassengersPromo = "$promo/delete.php"; - static String updatePassengersPromo = "$promo/update.php"; +static String get promo => '$server/ride/promo'; +static String get getPassengersPromo => "$promo/get.php"; +static String get getPromoBytody => "$promo/getPromoBytody.php"; +static String get addPassengersPromo => "$promo/add.php"; +static String get deletePassengersPromo => "$promo/delete.php"; +static String get updatePassengersPromo => "$promo/update.php"; ////=======================cancelRide=================== - static String addCancelRideFromPassenger = "$rideServer/cancelRide/add.php"; - static String addCancelTripFromDriverAfterApplied = +static String get addCancelRideFromPassenger => "$rideServer/cancelRide/add.php"; +static String get addCancelTripFromDriverAfterApplied => "$rideServer/cancelRide/addCancelTripFromDriverAfterApplied.php"; - static String cancelRide = "$rideServer/cancelRide/get.php"; +static String get cancelRide => "$rideServer/cancelRide/get.php"; //-----------------ridessss------------------ - static String addRides = "$rideServer/rides/add.php"; - static String getRides = "$rideServer/rides/get.php"; - static String getPlacesSyria = "$rideServer/places_syria/get.php"; - static String getMishwari = "$rideServer/mishwari/get.php"; - static String getMishwariDriver = "$rideServer/mishwari/getDriver.php"; - static String sendChatMessage = "$server/ride/chat/send_message.php"; - static String getTripCountByCaptain = +static String get addRides => "$rideServer/rides/add.php"; +static String get getRides => "$rideServer/rides/get.php"; +static String get getPlacesSyria => "$rideServer/places_syria/get.php"; +static String get getMishwari => "$rideServer/mishwari/get.php"; +static String get getMishwariDriver => "$rideServer/mishwari/getDriver.php"; +static String get sendChatMessage => "$server/ride/chat/send_message.php"; +static String get getTripCountByCaptain => "$rideServer/rides/getTripCountByCaptain.php"; - static String getRideOrderID = "$rideServer/rides/getRideOrderID.php"; - static String getRideStatus = "$rideServer/rides/getRideStatus.php"; - static String getOverLayStatus = "$ride/overLay/get.php"; - static String getArgumentAfterAppliedFromBackground = +static String get getRideOrderID => "$rideServer/rides/getRideOrderID.php"; +static String get getRideStatus => "$rideServer/rides/getRideStatus.php"; +static String get getOverLayStatus => "$ride/overLay/get.php"; +static String get getArgumentAfterAppliedFromBackground => "$ride/overLay/getArgumentAfterAppliedFromBackground.php"; - static String addOverLayStatus = "$ride/overLay/add.php"; - static String getapiKey = "$ride/apiKey/get.php"; +static String get addOverLayStatus => "$ride/overLay/add.php"; +static String get getapiKey => "$ride/apiKey/get.php"; - static String getapiKeySefer = "$ride/apiKey/get.php"; - static String getRideStatusBegin = "$rideServer/rides/getRideStatusBegin.php"; - static String getRideStatusFromStartApp = +static String get getapiKeySefer => "$ride/apiKey/get.php"; +static String get getRideStatusBegin => "$rideServer/rides/getRideStatusBegin.php"; +static String get getRideStatusFromStartApp => "$rideServer/rides/getRideStatusFromStartApp.php"; - static String updateRides = "$rideServer/rides/update.php"; - static String updateRideAndCheckIfApplied = +static String get updateRides => "$rideServer/rides/update.php"; +static String get updateRideAndCheckIfApplied => "$rideServer/rides/updateRideAndCheckIfApplied.php"; - static String updateStausFromSpeed = +static String get updateStausFromSpeed => "$rideServer/rides/updateStausFromSpeed.php"; - static String deleteRides = "$rideServer/rides/delete.php"; +static String get deleteRides => "$rideServer/rides/delete.php"; //-----------------DriverPayment------------------ - static String addDriverScam = "$ride/driver_scam/add.php"; - static String getDriverScam = "$ride/driver_scam/get.php"; +static String get addDriverScam => "$ride/driver_scam/add.php"; +static String get getDriverScam => "$ride/driver_scam/get.php"; /////////---getKazanPercent===//////////// - static String getKazanPercent = "$ride/kazan/get.php"; - static String addKazanPercent = "$ride/kazan/add.php"; +static String get getKazanPercent => "$ride/kazan/get.php"; +static String get addKazanPercent => "$ride/kazan/add.php"; ////-----------------DriverPayment------------------ - static String addDrivePayment = "$paymentServer/ride/payment/add.php"; - static String payWithPayMobCardDriver = +static String get addDrivePayment => "$paymentServer/ride/payment/add.php"; +static String get payWithPayMobCardDriver => "$paymentServer/ride/payMob/paymob_driver/payWithCard.php"; - static String payWithWallet = +static String get payWithWallet => "$paymentServer/ride/payMob/paymob_driver/payWithWallet.php"; - static String paymetVerifyDriver = +static String get paymetVerifyDriver => "$paymentServer/ride/payMob/paymob_driver/paymet_verfy.php"; - static String updatePaymetToPaid = +static String get updatePaymetToPaid => "$paymentServer/ride/payment/updatePaymetToPaid.php"; - static String paymobPayoutDriverWallet = +static String get paymobPayoutDriverWallet => "$paymentServer/ride/payMob/paymob_driver/paymob_payout.php'"; - static String addSeferWallet = "$paymentServer/ride/seferWallet/add.php"; - static String getSeferWallet = "$paymentServer/ride/seferWallet/get.php"; - static String addDriverPaymentPoints = +static String get addSeferWallet => "$paymentServer/ride/seferWallet/add.php"; +static String get getSeferWallet => "$paymentServer/ride/seferWallet/get.php"; +static String get addDriverPaymentPoints => "$paymentServer/ride/driverPayment/add.php"; - static String addPaymentTokenDriver = +static String get addPaymentTokenDriver => "$paymentServer/ride/driverWallet/addPaymentToken.php"; //driverWallet/addPaymentToken.php - static String addPaymentTokenPassenger = +static String get addPaymentTokenPassenger => "$paymentServer/ride/passengerWallet/addPaymentTokenPassenger.php"; - static String getDriverPaymentPoints = +static String get getDriverPaymentPoints => "$paymentServer/ride/driverWallet/get.php"; - static String getDriverPaymentToday = "$paymentServer/ride/payment/get.php"; - static String getCountRide = "$rideServer/payment/getCountRide.php"; - static String getAllPaymentFromRide = +static String get getDriverPaymentToday => "$paymentServer/ride/payment/get.php"; +static String get getCountRide => "$rideServer/payment/getCountRide.php"; +static String get getAllPaymentFromRide => "$paymentServer/ride/payment/getAllPayment.php"; - static String getAllPaymentVisa = +static String get getAllPaymentVisa => "$paymentServer/ride/payment/getAllPaymentVisa.php"; //-----------------Passenger NotificationCaptain------------------ - static String addNotificationPassenger = +static String get addNotificationPassenger => "$ride/notificationPassenger/add.php"; - static String getNotificationPassenger = +static String get getNotificationPassenger => "$ride/notificationPassenger/get.php"; - static String updateNotificationPassenger = +static String get updateNotificationPassenger => "$ride/notificationPassenger/update.php"; //-----------------Driver NotificationCaptain------------------ - static String addNotificationCaptain = "$ride/notificationCaptain/add.php"; - static String addWaitingRide = "$ride/notificationCaptain/addWaitingRide.php"; - static String deleteAvailableRide = +static String get addNotificationCaptain => "$ride/notificationCaptain/add.php"; +static String get addWaitingRide => "$ride/notificationCaptain/addWaitingRide.php"; +static String get deleteAvailableRide => "$ride/notificationCaptain/deleteAvailableRide.php"; - static String updateWaitingRide = +static String get updateWaitingRide => "$ride/notificationCaptain/updateWaitingTrip.php"; - static String getRideWaiting = +static String get getRideWaiting => "$endPoint/ride/notificationCaptain/getRideWaiting.php"; - static String getNotificationCaptain = "$ride/notificationCaptain/get.php"; - static String updateNotificationCaptain = +static String get getNotificationCaptain => "$ride/notificationCaptain/get.php"; +static String get updateNotificationCaptain => "$ride/notificationCaptain/update.php"; - static String deleteNotificationCaptain = +static String get deleteNotificationCaptain => "$ride/notificationCaptain/delete.php"; //-----------------Api Key------------------ - static String addApiKey = "$ride/apiKey/add.php"; - static String getApiKey = "$ride/apiKey/get.php"; - static String getCnMap = "$server/auth/cnMap.php"; - static String getPromptDriverDocumentsEgypt = +static String get addApiKey => "$ride/apiKey/add.php"; +static String get getApiKey => "$ride/apiKey/get.php"; +static String get getCnMap => "$server/auth/cnMap.php"; +static String get getPromptDriverDocumentsEgypt => "$server/auth/captin/getPromptDriverDocumentsEgypt.php"; - static String updateApiKey = "$ride/apiKey/update.php"; - static String deleteApiKey = "$ride/apiKey/delete.php"; - static String checkPhoneNumberISVerfiedDriver = +static String get updateApiKey => "$ride/apiKey/update.php"; +static String get deleteApiKey => "$ride/apiKey/delete.php"; +static String get checkPhoneNumberISVerfiedDriver => "$auth/checkPhoneNumberISVerfiedDriver.php"; - static String getTesterApp = "$auth/Tester/getTesterApp.php"; - static String updateTesterApp = "$auth/Tester/updateTesterApp.php"; +static String get getTesterApp => "$auth/Tester/getTesterApp.php"; +static String get updateTesterApp => "$auth/Tester/updateTesterApp.php"; //-----------------healthInsuranceProvider------------------ - static String addHealthInsuranceProvider = "$server/driver_assurance/add.php"; - static String getHealthInsuranceProvider = "$server/driver_assurance/get.php"; +static String get addHealthInsuranceProvider => "$server/driver_assurance/add.php"; +static String get getHealthInsuranceProvider => "$server/driver_assurance/get.php"; //-----------------Feed Back------------------ - static String addFeedBack = "$ride/feedBack/add.php"; - static String getFeedBack = "$ride/feedBack/get.php"; - static String updateFeedBack = "$ride/feedBack/updateFeedBack.php"; - static String add_solve_all = "$server/ride/feedBack/add_solve_all.php"; - static String uploadAudio = "$server/upload_audio.php"; +static String get addFeedBack => "$ride/feedBack/add.php"; +static String get getFeedBack => "$ride/feedBack/get.php"; +static String get updateFeedBack => "$ride/feedBack/updateFeedBack.php"; +static String get add_solve_all => "$server/ride/feedBack/add_solve_all.php"; +static String get uploadAudio => "$server/upload_audio.php"; //-----------------Tips------------------ - static String addTips = "$ride/tips/add.php"; - static String getTips = "$ride/tips/get.php"; - static String updateTips = "$ride/tips/update.php"; +static String get addTips => "$ride/tips/add.php"; +static String get getTips => "$ride/tips/get.php"; +static String get updateTips => "$ride/tips/update.php"; //-----------------Help Center------------------ - static String addhelpCenter = "$ride/helpCenter/add.php"; - static String gethelpCenter = "$ride/helpCenter/get.php"; - static String getByIdhelpCenter = "$ride/helpCenter/getById.php"; - static String updatehelpCenter = "$ride/helpCenter/update.php"; - static String deletehelpCenter = "$ride/helpCenter/delete.php"; +static String get addhelpCenter => "$ride/helpCenter/add.php"; +static String get gethelpCenter => "$ride/helpCenter/get.php"; +static String get getByIdhelpCenter => "$ride/helpCenter/getById.php"; +static String get updatehelpCenter => "$ride/helpCenter/update.php"; +static String get deletehelpCenter => "$ride/helpCenter/delete.php"; //-----------------license------------------ - static String addLicense = "$ride/license/add.php"; - static String getLicense = "$ride/license/get.php"; - static String updateLicense = "$ride/license/updateFeedBack.php"; +static String get addLicense => "$ride/license/add.php"; +static String get getLicense => "$ride/license/get.php"; +static String get updateLicense => "$ride/license/updateFeedBack.php"; //-----------------RegisrationCar------------------ - static String addRegisrationCar = "$ride/RegisrationCar/add.php"; - static String getRegisrationCar = "$endPoint/ride/RegisrationCar/get.php"; - static String updateRegisrationCar = "$ride/RegisrationCar/update.php"; - static String makeDefaultCar = "$ride/RegisrationCar/makeDefaultCar.php"; +static String get addRegisrationCar => "$ride/RegisrationCar/add.php"; +static String get getRegisrationCar => "$endPoint/ride/RegisrationCar/get.php"; +static String get updateRegisrationCar => "$ride/RegisrationCar/update.php"; +static String get makeDefaultCar => "$ride/RegisrationCar/makeDefaultCar.php"; //-----------------DriverOrder------------------ - static String addDriverOrder = "$ride/driver_order/add.php"; - static String getDriverOrder = "$ride/driver_order/get.php"; - static String getOrderCancelStatus = +static String get addDriverOrder => "$ride/driver_order/add.php"; +static String get getDriverOrder => "$ride/driver_order/get.php"; +static String get getOrderCancelStatus => "$ride/driver_order/getOrderCancelStatus.php"; - static String updateDriverOrder = "$ride/driver_order/update.php"; - static String deleteDriverOrder = "$ride/driver_order/delete.php"; +static String get updateDriverOrder => "$ride/driver_order/update.php"; +static String get deleteDriverOrder => "$ride/driver_order/delete.php"; // ===================================== - static String addRateToPassenger = "$ride/rate/add.php"; - static String addRateToDriver = "$ride/rate/addRateToDriver.php"; - static String addRateApp = "$ride/rate/add_rate_app.php"; - static String sendEmailRateingApp = "$ride/rate/sendEmailRateingApp.php"; - static String getDriverRate = "$ride/rate/getDriverRate.php"; - static String getPassengerRate = "$ride/rate/getPassengerRate.php"; +static String get addRateToPassenger => "$ride/rate/add.php"; +static String get addRateToDriver => "$ride/rate/addRateToDriver.php"; +static String get addRateApp => "$ride/rate/add_rate_app.php"; +static String get sendEmailRateingApp => "$ride/rate/sendEmailRateingApp.php"; +static String get getDriverRate => "$ride/rate/getDriverRate.php"; +static String get getPassengerRate => "$ride/rate/getPassengerRate.php"; ////////////////emails ============// - static String sendEmailToPassengerForTripDetails = +static String get sendEmailToPassengerForTripDetails => "$ride/rides/emailToPassengerTripDetail.php"; - static String sendEmailToDrivertransaction = +static String get sendEmailToDrivertransaction => "$server/Admin/sendEmailToDrivertransaction.php"; // =========================================== - static String pathImage = "$server/upload/types/"; - static String uploadImage = "$server/uploadImage.php"; - static String uploadImage1 = "$server/uploadImage1.php"; - static String uploadImagePortrate = "$server/uploadImagePortrate.php"; - static String uploadSyrianDocs = "$syria/auth/syria/uploadSyrianDocs.php"; - static String uploadImageType = "$server/uploadImageType.php"; +static String get pathImage => "$server/upload/types/"; +static String get uploadImage => "$server/uploadImage.php"; +static String get uploadImage1 => "$server/uploadImage1.php"; +static String get uploadImagePortrate => "$server/uploadImagePortrate.php"; +static String get uploadSyrianDocs => "$syria/auth/syria/uploadSyrianDocs.php"; +static String get uploadImageType => "$server/uploadImageType.php"; //=============egypt documents ============== - static String uploadEgyptidFront = +static String get uploadEgyptidFront => "$server/EgyptDocuments/uploadEgyptidFront.php"; - static String uploadEgypt = "$server/uploadEgypt.php"; - static String uploadEgypt1 = "$server/uploadEgypt1.php"; +static String get uploadEgypt => "$server/uploadEgypt.php"; +static String get uploadEgypt1 => "$server/uploadEgypt1.php"; //==================certifcate========== // static String location = '$endPoint/ride/location'; - static String getCarsLocationByPassenger = "$locationServer/get.php"; - static String addpassengerLocation = +static String get getCarsLocationByPassenger => "$locationServer/get.php"; +static String get addpassengerLocation => "$locationServer/addpassengerLocation.php"; - static String getLocationAreaLinks = +static String get getLocationAreaLinks => "$locationServer/get_location_area_links.php"; - static String getLatestLocationPassenger = +static String get getLatestLocationPassenger => "$locationServer/getLatestLocationPassenger.php"; - static String getFemalDriverLocationByPassenger = +static String get getFemalDriverLocationByPassenger => "$locationServer/getFemalDriver.php"; - static String getDriverCarsLocationToPassengerAfterApplied = +static String get getDriverCarsLocationToPassengerAfterApplied => "$locationServer/getDriverCarsLocationToPassengerAfterApplied.php"; - static String addCarsLocationByPassenger = "$locationServer/add.php"; - static String saveBehavior = "$locationServer/save_behavior.php"; - static String addCarsLocationGizaEndpoint = "$locationServer/add.php"; - static String addCarsLocationAlexandriaEndpoint = "$locationServer/add.php"; - static String addCarsLocationCairoEndpoint = "$locationServer/add.php"; - static String deleteCarsLocationByPassenger = "$locationServer/delete.php"; - static String updateCarsLocationByPassenger = "$locationServer/update.php"; - static String getTotalDriverDuration = +static String get addCarsLocationByPassenger => "$locationServer/add.php"; +static String get saveBehavior => "$locationServer/save_behavior.php"; +static String get addCarsLocationGizaEndpoint => "$locationServer/add.php"; +static String get addCarsLocationAlexandriaEndpoint => "$locationServer/add.php"; +static String get addCarsLocationCairoEndpoint => "$locationServer/add.php"; +static String get deleteCarsLocationByPassenger => "$locationServer/delete.php"; +static String get updateCarsLocationByPassenger => "$locationServer/update.php"; +static String get getTotalDriverDuration => "$locationServer/getTotalDriverDuration.php"; - static String getRidesDriverByDay = "$locationServer/getRidesDriverByDay.php"; - static String getTotalDriverDurationToday = +static String get getRidesDriverByDay => "$locationServer/getRidesDriverByDay.php"; +static String get getTotalDriverDurationToday => "$locationServer/getTotalDriverDurationToday.php"; //==================get_driver_behavior.php============= - static String get_driver_behavior = +static String get get_driver_behavior => '$ride/driver_behavior/get_driver_behavior.php'; //==================cars new drivers============= - static String addNewCarsDrivers = '$ride/carDrivers/add.php'; - static String getNewCarsDrivers = '$ride/carDrivers/get.php'; - static String deleteNewCarsDrivers = '$ride/carDrivers/delete.php'; +static String get addNewCarsDrivers => '$ride/carDrivers/add.php'; +static String get getNewCarsDrivers => '$ride/carDrivers/get.php'; +static String get deleteNewCarsDrivers => '$ride/carDrivers/delete.php'; //==================Blog============= - static String profile = '$ride/profile'; - static String getprofile = "$profile/get.php"; - static String getCaptainProfile = "$profile/getCaptainProfile.php"; - static String addprofile = "$profile/add.php"; - static String deleteprofile = "$profile/delete.php"; - static String updateprofile = "$profile/update.php"; - static String updateDriverEmail = "$profile/updateDriverEmail.php"; +static String get profile => '$ride/profile'; +static String get getprofile => "$profile/get.php"; +static String get getCaptainProfile => "$profile/getCaptainProfile.php"; +static String get addprofile => "$profile/add.php"; +static String get deleteprofile => "$profile/delete.php"; +static String get updateprofile => "$profile/update.php"; +static String get updateDriverEmail => "$profile/updateDriverEmail.php"; //===================Auth============ - static String getUnifiedCode = "$ride/invitor/get_unified_code.php"; - static String addUnifiedInvite = "$ride/invitor/add_unified_invite.php"; - static String claimDriverReward = "$ride/invitor/claim_driver_reward.php"; - static String getDriverReferrals = "$ride/invitor/get_driver_referrals.php"; +static String get getUnifiedCode => "$ride/invitor/get_unified_code.php"; +static String get addUnifiedInvite => "$ride/invitor/add_unified_invite.php"; +static String get claimDriverReward => "$ride/invitor/claim_driver_reward.php"; +static String get getDriverReferrals => "$ride/invitor/get_driver_referrals.php"; - static String addInviteDriver = "$ride/invitor/add.php"; - static String addInvitationPassenger = +static String get addInviteDriver => "$ride/invitor/add.php"; +static String get addInvitationPassenger => "$ride/invitor/addInvitationPassenger.php"; - static String getInviteDriver = "$ride/invitor/get.php"; - static String getDriverInvitationToPassengers = +static String get getInviteDriver => "$ride/invitor/get.php"; +static String get getDriverInvitationToPassengers => "$ride/invitor/getDriverInvitationToPassengers.php"; - static String updateInviteDriver = "$ride/invitor/update.php"; - static String updatePassengerGift = "$ride/invitor/updatePassengerGift.php"; - static String updateInvitationCodeFromRegister = +static String get updateInviteDriver => "$ride/invitor/update.php"; +static String get updatePassengerGift => + "$server/ride/invitor/updatePassengerGift.php"; +static String get claimInviteReward => "$server/ride/invitor/claim.php"; +static String get updateInvitationCodeFromRegister => "$ride/invitor/updateInvitationCodeFromRegister.php"; - static String register_driver_and_car = +static String get register_driver_and_car => "$auth/syria/driver/register_driver_and_car.php"; - static String updateDriverInvitationDirectly = +static String get updateDriverInvitationDirectly => "$ride/invitor/updateDriverInvitationDirectly.php"; - static String updatePassengersInvitation = +static String get updatePassengersInvitation => "$ride/invitor/updatePassengersInvitation.php"; //===================Auth============ - static String auth = '$server/auth'; - static String login = "$auth/login.php"; - static String signUp = "$auth/signup.php"; - static String updateDriverClaim = "$auth/captin/updateDriverClaim.php"; - static String updateShamCashDriver = "$auth/captin/updateShamCashDriver.php"; - static String sendVerifyEmail = "$auth/sendVerifyEmail.php"; - static String passengerRemovedAccountEmail = +static String get auth => '$server/auth'; +static String get login => "$auth/login.php"; +static String get signUp => "$auth/signup.php"; +static String get updateDriverClaim => "$auth/captin/updateDriverClaim.php"; +static String get updateShamCashDriver => "$auth/captin/updateShamCashDriver.php"; +static String get sendVerifyEmail => "$auth/sendVerifyEmail.php"; +static String get passengerRemovedAccountEmail => "$auth/passengerRemovedAccountEmail.php"; - static String verifyEmail = "$auth/verifyEmail.php"; +static String get verifyEmail => "$auth/verifyEmail.php"; //===================Auth Captin============ - static String authCaptin = '$server/auth/captin'; - static String loginCaptin = "$authCaptin/login.php"; - static String loginFromGoogleCaptin = "$authCaptin/loginFromGoogle.php"; - static String loginUsingCredentialsWithoutGoogle = +static String get authCaptin => '$server/auth/captin'; +static String get loginCaptin => "$authCaptin/login.php"; +static String get loginFromGoogleCaptin => "$authCaptin/loginFromGoogle.php"; +static String get loginUsingCredentialsWithoutGoogle => "$authCaptin/loginUsingCredentialsWithoutGoogle.php"; - static String packageInfo = "$server/auth/packageInfo.php"; - static String signUpCaptin = "$authCaptin/register.php"; - static String addCriminalDocuments = "$authCaptin/addCriminalDocuments.php"; - static String sendVerifyEmailCaptin = "$authCaptin/sendVerifyEmail.php"; - static String sendVerifyOtpMessage = +static String get packageInfo => "$server/auth/packageInfo.php"; +static String get signUpCaptin => "$authCaptin/register.php"; +static String get addCriminalDocuments => "$authCaptin/addCriminalDocuments.php"; +static String get sendVerifyEmailCaptin => "$authCaptin/sendVerifyEmail.php"; +static String get sendVerifyOtpMessage => "$server/auth/captin/sendOtpMessageDriver.php"; - static String verifyOtpMessage = "$server/auth/verifyOtpMessage.php"; - static String verifyOtpDriver = "$server/auth/captin/verifyOtpDriver.php"; - static String verifyEmailCaptin = "$authCaptin/verifyEmail.php"; - static String removeUser = "$authCaptin/removeAccount.php"; - static String deletecaptainAccounr = "$authCaptin/deletecaptainAccounr.php"; - static String updateAccountBank = "$authCaptin/updateAccountBank.php"; - static String getAccount = "$authCaptin/getAccount.php"; - static String uploadImageToAi = "$auth/document_syria/ai_document.php"; - static String isPhoneVerified = "$auth/syria/driver/isPhoneVerified.php"; +static String get verifyOtpMessage => "$server/auth/verifyOtpMessage.php"; +static String get verifyOtpDriver => "$server/auth/captin/verifyOtpDriver.php"; +static String get verifyEmailCaptin => "$authCaptin/verifyEmail.php"; +static String get removeUser => "$authCaptin/removeAccount.php"; +static String get deletecaptainAccounr => "$authCaptin/deletecaptainAccounr.php"; +static String get updateAccountBank => "$authCaptin/updateAccountBank.php"; +static String get getAccount => "$authCaptin/getAccount.php"; +static String get uploadImageToAi => "$auth/document_syria/ai_document.php"; +static String get isPhoneVerified => "$auth/syria/driver/isPhoneVerified.php"; //===================Admin Captin============ - static String getPassengerDetailsByPassengerID = +static String get getPassengerDetailsByPassengerID => "$server/Admin/getPassengerDetailsByPassengerID.php"; - static String getPassengerDetails = "$server/Admin/getPassengerDetails.php"; - static String getPassengerbyEmail = "$server/Admin/getPassengerbyEmail.php"; - static String addAdminUser = "$server/Admin/adminUser/add.php"; - static String addError = "$server/Admin/errorApp.php"; - static String getAdminUser = "$server/Admin/adminUser/get.php"; - static String getCaptainDetailsByEmailOrIDOrPhone = +static String get getPassengerDetails => "$server/Admin/getPassengerDetails.php"; +static String get getPassengerbyEmail => "$server/Admin/getPassengerbyEmail.php"; +static String get addAdminUser => "$server/Admin/adminUser/add.php"; +static String get addError => "$server/Admin/errorApp.php"; +static String get getAdminUser => "$server/Admin/adminUser/get.php"; +static String get getCaptainDetailsByEmailOrIDOrPhone => "$server/Admin/AdminCaptain/getCaptainDetailsByEmailOrIDOrPhone.php"; - static String getCaptainDetails = "$server/Admin/AdminCaptain/get.php"; - static String getRidesPerMonth = +static String get getCaptainDetails => "$server/Admin/AdminCaptain/get.php"; +static String get getRidesPerMonth => "$server/Admin/AdminRide/getRidesPerMonth.php"; - static String getRidesDetails = "$server/Admin/AdminRide/get.php"; +static String get getRidesDetails => "$server/Admin/AdminRide/get.php"; //////////Sms egypt/////////// - static String sendSms = "https://sms.kazumi.me/api/sms/send-sms"; - static String senddlr = "https://sms.kazumi.me/api/sms/send-dlr"; - static String sendvalidity = "https://sms.kazumi.me/api/sms/send-validity"; - static String sendmany = "https://sms.kazumi.me/api/sms/send-many"; - static String checkCredit = "https://sms.kazumi.me/api/sms/check-credit"; - static String checkStatus = "https://sms.kazumi.me/api/sms/check-status"; - static String getSender = "$server/auth/sms/getSender.php"; - static String updatePhoneInvalidSMS = +static String get sendSms => "https://sms.kazumi.me/api/sms/send-sms"; +static String get senddlr => "https://sms.kazumi.me/api/sms/send-dlr"; +static String get sendvalidity => "https://sms.kazumi.me/api/sms/send-validity"; +static String get sendmany => "https://sms.kazumi.me/api/sms/send-many"; +static String get checkCredit => "https://sms.kazumi.me/api/sms/check-credit"; +static String get checkStatus => "https://sms.kazumi.me/api/sms/check-status"; +static String get getSender => "$server/auth/sms/getSender.php"; +static String get updatePhoneInvalidSMS => "$server/auth/sms/updatePhoneInvalidSMS.php"; //////////////service/////////// - static String serviceApp = "$server/serviceapp"; - static String getComplaintAllData = "$serviceApp/getComplaintAllData.php"; - static String getComplaintAllDataForDriver = +static String get serviceApp => "$server/serviceapp"; +static String get getComplaintAllData => "$serviceApp/getComplaintAllData.php"; +static String get getComplaintAllDataForDriver => "$serviceApp/getComplaintAllDataForDriver.php"; } diff --git a/siro_driver/lib/controller/auth/captin/invit_controller.dart b/siro_driver/lib/controller/auth/captin/invit_controller.dart index 73c9d96..9e4668d 100755 --- a/siro_driver/lib/controller/auth/captin/invit_controller.dart +++ b/siro_driver/lib/controller/auth/captin/invit_controller.dart @@ -1,3 +1,4 @@ +import 'package:siro_driver/constant/currency.dart'; import 'dart:convert'; import 'dart:developer'; @@ -10,6 +11,8 @@ import 'package:siro_driver/constant/box_name.dart'; import 'package:siro_driver/constant/links.dart'; import 'package:siro_driver/controller/functions/crud.dart'; import 'package:siro_driver/controller/home/payment/captain_wallet_controller.dart'; +import 'package:siro_driver/print.dart'; +import 'package:siro_driver/controller/functions/country_logic.dart'; import 'package:siro_driver/main.dart'; import 'package:siro_driver/views/widgets/error_snakbar.dart'; import 'package:siro_driver/views/widgets/mydialoug.dart'; @@ -299,7 +302,7 @@ Download the Siro app now and enjoy your ride! /// **FIX**: Added the missing 'selectPhone' method. void selectPhone(String phone) { // Format the selected phone number and update the text field. - invitePhoneController.text = _formatSyrianPhoneNumber(phone); + invitePhoneController.text = CountryLogic.formatCurrentCountryPhone(phone); update(); Get.back(); // Close the contacts dialog after selection. } @@ -357,30 +360,30 @@ Download the Siro app now and enjoy your ride! if ((driverInvitationData[index]['isGiftToken']).toString() == '0') { Get.back(); - await CRUD().post( - link: AppLink.updateInviteDriver, - payload: {'id': (driverInvitationData[index]['id'])}); - await Get.find().addDriverPayment( - 'paymentMethod', - ('500'), - '', + // Server-side claim validation + var response = await CRUD().post( + link: AppLink.claimInviteReward, + payload: { + 'invite_id': (driverInvitationData[index]['id']).toString(), + 'driver_id': box.read(BoxName.driverID).toString(), + 'country_code': box.read(BoxName.countryCode).toString(), + } ); - await Get.find() - .addDriverWalletToInvitor( - 'paymentMethod', - (driverInvitationData[index]['driverInviterId']), - ('500'), - ); - NotificationCaptainController().addNotificationCaptain( - driverInvitationData[index]['driverInviterId'].toString(), - "You have got a gift for invitation".tr, - '${"You have 500".tr} ${'SYP'.tr}', - false); - NotificationController().showNotification( - "You have got a gift for invitation".tr, - '${"You have 500".tr} ${'SYP'.tr}', - 'tone1', - ''); + + if (response != 'failure') { + var data = jsonDecode(response); + if (data['status'] == 'success') { + NotificationController().showNotification( + "You have got a gift for invitation".tr, + '${"You have 500".tr} ${CurrencyHelper.currency}', + 'tone1', + ''); + // refresh stats + fetchDriverStats(); + } else { + mySnackeBarError(data['message'] ?? 'Claim failed'.tr); + } + } } else { Get.back(); MyDialog().getDialog("You have got a gift".tr, @@ -440,7 +443,7 @@ Download the Siro app now and enjoy your ride! driverInvitationDataToPassengers[index]['passengerInviterId'] .toString(), "You have got a gift for invitation".tr, - '${"You have 200".tr} ${'SYP'.tr}', + '${"You have 200".tr} ${CurrencyHelper.currency}', false, ); } else { @@ -465,47 +468,7 @@ Download the Siro app now and enjoy your ride! ); } - /// Formats a phone number to the standard Syrian international format (+963...). - String _formatSyrianPhoneNumber(String input) { - String digitsOnly = input.replaceAll(RegExp(r'\D'), ''); - - if (digitsOnly.startsWith('09') && digitsOnly.length == 10) { - return '963${digitsOnly.substring(1)}'; - } - if (digitsOnly.length == 9 && digitsOnly.startsWith('9')) { - return '963$digitsOnly'; - } - return input; // Fallback for unrecognized formats - } - - String normalizeSyrianPhone(String input) { - String phone = input.trim(); - - // احذف كل شيء غير أرقام - phone = phone.replaceAll(RegExp(r'[^0-9]'), ''); - - // إذا يبدأ بـ 0 → احذفها - if (phone.startsWith('0')) { - phone = phone.substring(1); - } - - // إذا يبدأ بـ 963 مكررة → احذف التكرار - while (phone.startsWith('963963')) { - phone = phone.substring(3); - } - - // إذا يبدأ بـ 963 ولكن داخله كمان 963 → خليه مرة واحدة فقط - if (phone.startsWith('963') && phone.length > 12) { - phone = phone.substring(phone.length - 9); // آخر 9 أرقام - } - - // الآن إذا كان بلا 963 → أضفها - if (!phone.startsWith('963')) { - phone = '963' + phone; - } - - return phone; - } + // removed normalizeSyrianPhone /// Sends an invitation to a potential new driver. void sendInvite() async { @@ -513,9 +476,8 @@ Download the Siro app now and enjoy your ride! mySnackeBarError('Please enter a phone number'.tr); return; } - // Format Syrian phone number: remove leading 0 and add +963 String formattedPhoneNumber = - normalizeSyrianPhone(invitePhoneController.text); + CountryLogic.formatCurrentCountryPhone(invitePhoneController.text); if (formattedPhoneNumber.length != 12) { mySnackeBarError('Please enter a correct phone'.tr); return; @@ -553,12 +515,7 @@ Download the Siro app now and enjoy your ride! return; } - // Format Syrian phone number: remove leading 0 and add +963 - String formattedPhoneNumber = invitePhoneController.text.trim(); - if (formattedPhoneNumber.startsWith('0')) { - formattedPhoneNumber = formattedPhoneNumber.substring(1); - } - formattedPhoneNumber = '+963$formattedPhoneNumber'; + String formattedPhoneNumber = CountryLogic.formatCurrentCountryPhone(invitePhoneController.text); if (formattedPhoneNumber.length < 12) { // +963 + 9 digits = 12+ diff --git a/siro_driver/lib/controller/auth/captin/phone_helper_controller.dart b/siro_driver/lib/controller/auth/captin/phone_helper_controller.dart index a7a7f53..9c8bfac 100644 --- a/siro_driver/lib/controller/auth/captin/phone_helper_controller.dart +++ b/siro_driver/lib/controller/auth/captin/phone_helper_controller.dart @@ -4,6 +4,7 @@ import 'package:siro_driver/controller/functions/crud.dart'; import 'package:siro_driver/print.dart'; import 'package:siro_driver/views/home/on_boarding_page.dart'; import 'package:siro_driver/views/widgets/error_snakbar.dart'; +import 'package:siro_driver/controller/functions/country_logic.dart'; import '../../../constant/box_name.dart'; import '../../../constant/links.dart'; @@ -18,69 +19,12 @@ class PhoneAuthHelper { static final String _sendOtpUrl = '${_baseUrl}sendWhatsAppDriver.php'; static final String _verifyOtpUrl = '${_baseUrl}verifyOtp.php'; static final String _registerUrl = '${_baseUrl}register_driver.php'; - static String formatSyrianPhone(String phone) { - // Remove spaces, symbols, +, -, () - phone = phone.replaceAll(RegExp(r'[ \-\(\)\+]'), '').trim(); - - // Normalize 00963 → 963 - if (phone.startsWith('00963')) { - phone = phone.replaceFirst('00963', '963'); - } - - // Normalize 0963 → 963 - if (phone.startsWith('0963')) { - phone = phone.replaceFirst('0963', '963'); - } - if (phone.startsWith('096309')) { - phone = phone.replaceFirst('096309', '963'); - } - - // NEW: Fix 96309xxxx → 9639xxxx - if (phone.startsWith('96309')) { - phone = '9639' + phone.substring(5); // remove the "0" after 963 - } - - // If starts with 9630 → correct to 9639 - if (phone.startsWith('9630')) { - phone = '9639' + phone.substring(4); - } - - // If already in correct format: 9639xxxxxxxx - if (phone.startsWith('9639') && phone.length == 12) { - return phone; - } - - // If starts with 963 but missing the 9 - if (phone.startsWith('963') && phone.length > 3) { - // Ensure it begins with 9639 - if (!phone.startsWith('9639')) { - phone = '9639' + phone.substring(3); - } - return phone; - } - - // If starts with 09xxxxxxxx → 9639xxxxxxxx - if (phone.startsWith('09')) { - return '963' + phone.substring(1); - } - - // If 9xxxxxxxx (9 digits) - if (phone.startsWith('9') && phone.length == 9) { - return '963' + phone; - } - - // If starts with incorrect 0xxxxxxx → assume Syrian and fix - if (phone.startsWith('0') && phone.length == 10) { - return '963' + phone.substring(1); - } - - return phone; - } + // removed formatSyrianPhone /// Sends an OTP to the provided phone number. static Future sendOtp(String phoneNumber) async { try { - final fixedPhone = formatSyrianPhone(phoneNumber); + final fixedPhone = CountryLogic.formatCurrentCountryPhone(phoneNumber); Log.print('fixedPhone: $fixedPhone'); final response = await CRUD().post( @@ -112,7 +56,7 @@ class PhoneAuthHelper { /// Verifies the OTP and logs the user in. static Future verifyOtp(String phoneNumber, String otpCode) async { try { - final fixedPhone = formatSyrianPhone(phoneNumber); + final fixedPhone = CountryLogic.formatCurrentCountryPhone(phoneNumber); Log.print('fixedPhone: $fixedPhone'); final response = await CRUD().post( link: _verifyOtpUrl, diff --git a/siro_driver/lib/controller/firebase/local_notification.dart b/siro_driver/lib/controller/firebase/local_notification.dart index 5d193db..9ba4e00 100755 --- a/siro_driver/lib/controller/firebase/local_notification.dart +++ b/siro_driver/lib/controller/firebase/local_notification.dart @@ -1,3 +1,4 @@ +import 'package:siro_driver/constant/currency.dart'; import 'dart:async'; import 'dart:convert'; import 'dart:io'; @@ -108,7 +109,7 @@ class NotificationController extends GetxController { // تنسيق النص ليكون 4 أسطر واضحة formattedBigText = "👤 $paxName\n" - "💰 $price ${'SYP'.tr} | 🛣️ $distance كم\n" + "💰 $price ${CurrencyHelper.currency} | 🛣️ $distance كم\n" "🟢 من: $startLoc\n" "🏁 إلى: $endLoc"; diff --git a/siro_driver/lib/controller/functions/country_logic.dart b/siro_driver/lib/controller/functions/country_logic.dart new file mode 100644 index 0000000..c88618f --- /dev/null +++ b/siro_driver/lib/controller/functions/country_logic.dart @@ -0,0 +1,94 @@ +import 'package:siro_driver/constant/box_name.dart'; +import 'package:siro_driver/main.dart'; + +class CountryLogic { + /// Formats the phone number based on the country's dialing rules. + static String formatPhone(String phone, String country) { + phone = phone.replaceAll(RegExp(r'[ \-\(\)\+]'), '').trim(); + + if (country == 'Egypt') { + // Rule: 010, 011, 012, 015 -> 2010, 2011, 2012, 2015 + if (phone.startsWith('0020')) phone = phone.replaceFirst('0020', '20'); + if (phone.startsWith('01') && phone.length >= 10) { + return '20${phone.substring(1)}'; + } + if (phone.startsWith('1') && + phone.length >= 9 && + !phone.startsWith('20')) { + return '20$phone'; + } + if (!phone.startsWith('20') && phone.length > 8) return '20$phone'; + } else if (country == 'Jordan') { + // Rule: 07x -> 9627x + if (phone.startsWith('00962')) phone = phone.replaceFirst('00962', '962'); + if (phone.startsWith('07') && phone.length >= 9) { + return '962${phone.substring(1)}'; + } + if (phone.startsWith('7') && + phone.length >= 8 && + !phone.startsWith('962')) { + return '962$phone'; + } + if (!phone.startsWith('962') && phone.length > 7) return '962$phone'; + } else { + // Default to Syria + if (phone.startsWith('00963')) phone = phone.replaceFirst('00963', '963'); + if (phone.startsWith('0963')) phone = phone.replaceFirst('0963', '963'); + if (phone.startsWith('096309')) { + phone = phone.replaceFirst('096309', '963'); + } + if (phone.startsWith('96309')) phone = '9639${phone.substring(5)}'; + if (phone.startsWith('9630')) phone = '9639${phone.substring(4)}'; + if (phone.startsWith('9639') && phone.length == 12) return phone; + if (phone.startsWith('963') && + phone.length > 3 && + !phone.startsWith('9639')) { + phone = '9639${phone.substring(3)}'; + } + if (phone.startsWith('09')) return '963${phone.substring(1)}'; + if (phone.startsWith('9') && phone.length == 9) return '963$phone'; + if (phone.startsWith('0') && phone.length == 10) { + return '963${phone.substring(1)}'; + } + } + return phone; + } + + /// Returns the default country prefix (EG, JO, SY) for UI initial selection. + static String getCountryPrefix(String country) { + if (country == 'Egypt') return 'EG'; + if (country == 'Jordan') return 'JO'; + return 'SY'; + } + + /// Returns the default emergency number for the country. + static String getEmergencyNumber(String country) { + if (country == 'Egypt') return '122'; + if (country == 'Jordan') return '911'; + return '112'; // Syria + } + + /// Returns the hint text for phone inputs based on the country. + static String getPhoneHint(String country) { + if (country == 'Egypt') return 'e.g. 01012345678 (Default +20)'; + if (country == 'Jordan') return 'e.g. 0791234567 (Default +962)'; + return 'e.g. 0912345678 (Default +963)'; // Syria + } + + /// Helper to format phone using the current country in box. + static String formatCurrentCountryPhone(String phone) { + String cleanPhone = phone.replaceAll(RegExp(r'[ \-\(\)]'), '').trim(); + if (cleanPhone.startsWith('+963') || cleanPhone.startsWith('00963')) { + return formatPhone(cleanPhone, 'Syria'); + } + if (cleanPhone.startsWith('+20') || cleanPhone.startsWith('0020')) { + return formatPhone(cleanPhone, 'Egypt'); + } + if (cleanPhone.startsWith('+962') || cleanPhone.startsWith('00962')) { + return formatPhone(cleanPhone, 'Jordan'); + } + + final country = box.read(BoxName.countryCode) ?? 'Syria'; + return formatPhone(cleanPhone, country); + } +} diff --git a/siro_driver/lib/controller/functions/launch.dart b/siro_driver/lib/controller/functions/launch.dart index 88aa269..798008a 100755 --- a/siro_driver/lib/controller/functions/launch.dart +++ b/siro_driver/lib/controller/functions/launch.dart @@ -1,7 +1,6 @@ import 'package:url_launcher/url_launcher.dart'; import 'dart:io'; -import 'package:get/get.dart'; -import 'package:siro_driver/views/widgets/error_snakbar.dart'; +import 'package:siro_driver/controller/functions/country_logic.dart'; void showInBrowser(String url) async { if (await canLaunchUrl(Uri.parse(url))) { @@ -10,18 +9,11 @@ void showInBrowser(String url) async { } String cleanAndFormatPhoneNumber(String phoneNumber) { - // 1. Clean the number String formattedNumber = phoneNumber.replaceAll(RegExp(r'\s+'), ''); - // 2. Format logic (Syria/Egypt/International) if (formattedNumber.length > 6) { - if (formattedNumber.startsWith('09')) { - formattedNumber = '+963${formattedNumber.substring(1)}'; - } else if (formattedNumber.startsWith('01') && formattedNumber.length == 11) { - formattedNumber = '+20${formattedNumber.substring(1)}'; - } else if (formattedNumber.startsWith('00')) { - formattedNumber = '+${formattedNumber.substring(2)}'; - } else if (!formattedNumber.startsWith('+')) { + formattedNumber = CountryLogic.formatCurrentCountryPhone(formattedNumber); + if (!formattedNumber.startsWith('+')) { formattedNumber = '+$formattedNumber'; } } @@ -30,11 +22,6 @@ String cleanAndFormatPhoneNumber(String phoneNumber) { Future makePhoneCall(String phoneNumber) async { String formattedNumber = cleanAndFormatPhoneNumber(phoneNumber); - - if (!formattedNumber.startsWith('+963')) { - mySnackeBarError("Calling non-Syrian numbers is not supported".tr); - return; - } // Create URI directly from String to avoid double encoding '+' as '%2B' final Uri launchUri = Uri.parse('tel:$formattedNumber'); @@ -63,10 +50,6 @@ void launchCommunication( if (Platform.isIOS) { switch (method) { case 'phone': - if (!formattedContact.startsWith('+963')) { - mySnackeBarError("Calling non-Syrian numbers is not supported".tr); - return; - } url = 'tel:$formattedContact'; break; case 'sms': @@ -86,10 +69,6 @@ void launchCommunication( } else if (Platform.isAndroid) { switch (method) { case 'phone': - if (!formattedContact.startsWith('+963')) { - mySnackeBarError("Calling non-Syrian numbers is not supported".tr); - return; - } url = 'tel:$formattedContact'; break; case 'sms': diff --git a/siro_driver/lib/controller/functions/overlay_permisssion.dart b/siro_driver/lib/controller/functions/overlay_permisssion.dart index 54d894e..7390a5f 100755 --- a/siro_driver/lib/controller/functions/overlay_permisssion.dart +++ b/siro_driver/lib/controller/functions/overlay_permisssion.dart @@ -1,3 +1,4 @@ +import 'package:siro_driver/constant/currency.dart'; import 'dart:io'; import 'package:siro_driver/constant/links.dart'; @@ -35,7 +36,7 @@ Future showDriverGiftClaim(BuildContext context) async { if (box.read(BoxName.is_claimed).toString() == '0' || box.read(BoxName.is_claimed) == null) { MyDialog().getDialog( - 'You have gift 300 SYP'.tr, 'This for new registration'.tr, () async { + 'You have gift 300 ${CurrencyHelper.currency}'.tr, 'This for new registration'.tr, () async { Get.back(); var res = await CRUD().post(link: AppLink.updateDriverClaim, payload: { 'driverId': box.read(BoxName.driverID), diff --git a/siro_driver/lib/controller/gamification/challenges_controller.dart b/siro_driver/lib/controller/gamification/challenges_controller.dart index 5ff137e..765e6a9 100644 --- a/siro_driver/lib/controller/gamification/challenges_controller.dart +++ b/siro_driver/lib/controller/gamification/challenges_controller.dart @@ -1,3 +1,4 @@ +import 'package:siro_driver/constant/currency.dart'; import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; @@ -97,7 +98,7 @@ class ChallengesController extends GetxController { id: 'daily_earnings', titleEn: 'Money Maker', titleAr: 'صانع المال', - descriptionEn: 'Earn 3000 SYP today', + descriptionEn: 'Earn 3000 ${CurrencyHelper.currency} today', descriptionAr: 'اربح 3000 ل.س اليوم', icon: Icons.monetization_on_rounded, color: const Color(0xFF4CAF50), @@ -140,7 +141,7 @@ class ChallengesController extends GetxController { id: 'weekly_earnings', titleEn: 'Big Earner', titleAr: 'الربح الكبير', - descriptionEn: 'Earn 20,000 SYP this week', + descriptionEn: 'Earn 20,000 ${CurrencyHelper.currency} this week', descriptionAr: 'اربح 20,000 ل.س هذا الأسبوع', icon: Icons.account_balance_wallet_rounded, color: const Color(0xFF9C27B0), diff --git a/siro_driver/lib/controller/local/translations.dart b/siro_driver/lib/controller/local/translations.dart index 485cf7f..717c758 100755 --- a/siro_driver/lib/controller/local/translations.dart +++ b/siro_driver/lib/controller/local/translations.dart @@ -1395,6 +1395,8 @@ class MyTranslation extends Translations { "SOS Phone": "هاتف الطوارئ", "SUBMIT": "إرسال", "SYP": "ل.س", + "EGP": "ج.م", + "JOD": "د.أ", "Safety & Security": "السلامة والأمان", "Saudi Arabia": "السعودية", "Save": "حفظ", @@ -2078,7 +2080,11 @@ class MyTranslation extends Translations { "You have finished all times": "خلصت كل الأوقات", "You have gift 300 L.E": "عندك هدية 300 ل.م", "You have gift 300 SYP": "عندك هدية 300 ل.س", + "You have gift 300 EGP": "عندك هدية 300 ج.م", + "You have gift 300 JOD": "عندك هدية 300 د.أ", "You have gift 30000 SYP": "عندك هدية 30000 ل.س", + "You have gift 30000 EGP": "عندك هدية 30000 ج.م", + "You have gift 30000 JOD": "عندك هدية 30000 د.أ", "You have got a gift": "وصلتك هدية", "You have got a gift for invitation": "وصلتك هدية للدعوة", "You have in account": "عندك بالحساب", @@ -2608,6 +2614,8 @@ class MyTranslation extends Translations { "Confirm": "تأكيد", "PTS": "نقطة", "SYP": "ل.س", + "EGP": "ج.م", + "JOD": "د.أ", "You are buying": "أنت تقوم بشراء", "for": "بـ", "Points": "نقاط", @@ -2634,6 +2642,8 @@ class MyTranslation extends Translations { "اختر كيف تريد شحن حسابك", "Add Balance": "إضافة رصيد", "SYP": "ل.س", + "EGP": "ج.م", + "JOD": "د.أ", "Your completed trips will appear here": "ستظهر رحلاتك المكتملة هنا", "Cancelled by Passenger": "تم الإلغاء بواسطة الراكب", }, diff --git a/siro_driver/lib/env/env.g.dart b/siro_driver/lib/env/env.g.dart deleted file mode 100644 index d64ef06..0000000 --- a/siro_driver/lib/env/env.g.dart +++ /dev/null @@ -1,13585 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'env.dart'; - -// ************************************************************************** -// EnviedGenerator -// ************************************************************************** - -// coverage:ignore-file -// ignore_for_file: type=lint -// generated_from: .env -final class _Env { - static const List _enviedkeybasicAuthCredentials = [ - 2990589258, - 4231032652, - 1960581160, - 2523752965, - 2254376721, - 878556145, - 209406639, - 1445479573, - 2460208703, - 3167966191, - 967159540, - 3362566192, - 216494215, - 632431381, - 1662586490, - 3335640140, - 420776473, - 2068738655, - 1903611039, - 3805653015, - 2621026051, - 164883116, - 2242456407, - 1067357525, - 4097827574, - 2277905079, - 829897287, - 2991445945, - 3086372913, - 2504507883, - 3445146738, - ]; - - static const List _envieddatabasicAuthCredentials = [ - 2990589245, - 4231032637, - 1960581190, - 2523753064, - 2254376800, - 878556032, - 209406684, - 1445479679, - 2460208710, - 3167966105, - 967159427, - 3362566234, - 216494321, - 632431407, - 1662586388, - 3335640125, - 420776555, - 2068738566, - 1903611093, - 3805653063, - 2621026115, - 164883101, - 2242456416, - 1067357542, - 4097827521, - 2277905135, - 829897269, - 2991445985, - 3086372957, - 2504507817, - 3445146654, - ]; - - static final String basicAuthCredentials = String.fromCharCodes( - List.generate( - _envieddatabasicAuthCredentials.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatabasicAuthCredentials[i] ^ - _enviedkeybasicAuthCredentials[i])); - - static const List _enviedkeymapKeyOsm = [ - 208493858, - 3350167483, - 1302125882, - 1192647419, - 2404732788, - 2076531854, - 1641419367, - 1819498687, - 2756794616, - 2271265160, - 410515984, - 2946375390, - 1516099909, - 475427434, - 1207502576, - 3766393267, - 507168482, - 2869547486, - 2351158037, - 442607028, - ]; - - static const List _envieddatamapKeyOsm = [ - 208493903, - 3350167514, - 1302125910, - 1192647327, - 2404732689, - 2076531960, - 1641419303, - 1819498701, - 2756794519, - 2271265277, - 410516068, - 2946375355, - 1516099944, - 475427342, - 1207502495, - 3766393311, - 507168398, - 2869547455, - 2351158119, - 442607047, - ]; - - static final String mapKeyOsm = String.fromCharCodes(List.generate( - _envieddatamapKeyOsm.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatamapKeyOsm[i] ^ _enviedkeymapKeyOsm[i])); - - static const List _enviedkeymapAPIKEYIOS = [ - 1993287479, - 2842696658, - 1670961530, - 571188323, - 3566057664, - 79810790, - 3095519207, - 2702178760, - 3505088102, - 1332839557, - 1099099824, - 3874657948, - 101827659, - 3612803306, - 3915111541, - 2547960786, - 1983753195, - 953785961, - 399710458, - 3520013645, - 3474320879, - 191306094, - 3407917650, - 3851143733, - 1603590875, - 1332796221, - 1989733533, - 2964509008, - 2772496351, - 4248238702, - 2069369743, - 1776566496, - 200328467, - 2798520895, - 68312770, - 2692339723, - 3680295276, - 1655200211, - 182747085, - ]; - - static const List _envieddatamapAPIKEYIOS = [ - 1993287542, - 2842696603, - 1670961408, - 571188226, - 3566057619, - 79810719, - 3095519139, - 2702178732, - 3505088023, - 1332839662, - 1099099900, - 3874658001, - 101827592, - 3612803224, - 3915111428, - 2547960760, - 1983753149, - 953785883, - 399710356, - 3520013690, - 3474320823, - 191305987, - 3407917619, - 3851143761, - 1603590802, - 1332796236, - 1989733604, - 2964508990, - 2772496294, - 4248238593, - 2069369805, - 1776566401, - 200328484, - 2798520943, - 68312816, - 2692339772, - 3680295203, - 1655200182, - 182747008, - ]; - - static final String mapAPIKEYIOS = String.fromCharCodes(List.generate( - _envieddatamapAPIKEYIOS.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatamapAPIKEYIOS[i] ^ _enviedkeymapAPIKEYIOS[i])); - - static const List _enviedkeymapSaasKey = [ - 1152515337, - 612278083, - 456797620, - 1338651092, - 3400820223, - 2372440906, - 2162269364, - 433812069, - 310318919, - 399053120, - 2870991475, - 561936812, - 2884617529, - 3677057575, - 622986133, - 1023997185, - 4142318139, - 2210519462, - 1747028641, - 1022530233, - 3838726965, - 4226461494, - 2617030857, - 3800004349, - 1091840269, - 4214668900, - 2855689796, - ]; - - static const List _envieddatamapSaasKey = [ - 1152515424, - 612278061, - 456797675, - 1338651117, - 3400820171, - 2372440957, - 2162269324, - 433811975, - 310318964, - 399053170, - 2870991435, - 561936799, - 2884617487, - 3677057603, - 622986148, - 1023997240, - 4142318168, - 2210519488, - 1747028679, - 1022530190, - 3838726918, - 4226461522, - 2617030827, - 3800004302, - 1091840317, - 4214668882, - 2855689847, - ]; - - static final String mapSaasKey = String.fromCharCodes(List.generate( - _envieddatamapSaasKey.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatamapSaasKey[i] ^ _enviedkeymapSaasKey[i])); - - static const List _enviedkeyemail = [ - 3507274737, - 3264718769, - 2759567973, - 540972372, - 1397631761, - 3474581669, - 4105157398, - 3364497626, - 1705013345, - 1289768273, - 1175569918, - 4058620033, - 1812845490, - 971134022, - 1377684042, - ]; - - static const List _envieddataemail = [ - 3507274673, - 3264718808, - 2759567883, - 540972320, - 1397631856, - 3474581705, - 4105157491, - 3364497579, - 1705013248, - 1289768225, - 1175569806, - 4058620079, - 1812845521, - 971133993, - 1377684007, - ]; - - static final String email = String.fromCharCodes(List.generate( - _envieddataemail.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataemail[i] ^ _enviedkeyemail[i])); - - static const List _enviedkeybasicCompareFaces = [ - 2948603683, - 1419621286, - 4018212457, - 1121620281, - 221710536, - 3586502550, - 4100318555, - 1770443814, - 4219804944, - 2878283764, - 1552437214, - 185983079, - 2706699511, - 336330255, - 772190043, - 4294872002, - 2853475718, - 88610192, - 2151488097, - 384987953, - 1044193006, - 2957091184, - 33186055, - 1349225194, - 233154710, - 3542630164, - 42738728, - 981646969, - ]; - - static const List _envieddatabasicCompareFaces = [ - 2948603737, - 1419621324, - 4018212380, - 1121620307, - 221710500, - 3586502627, - 4100318506, - 1770443840, - 4219805024, - 2878283678, - 1552437220, - 185982985, - 2706699398, - 336330365, - 772189954, - 4294871976, - 2853475830, - 88610256, - 2151488080, - 384987910, - 1044192989, - 2957091143, - 33186143, - 1349225112, - 233154766, - 3542630264, - 42738794, - 981646869, - ]; - - static final String basicCompareFaces = String.fromCharCodes( - List.generate( - _envieddatabasicCompareFaces.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatabasicCompareFaces[i] ^ _enviedkeybasicCompareFaces[i])); - - static const List _enviedkeybasicCompareFacesURL = [ - 2854755713, - 1887284855, - 1632945913, - 2043352776, - 1401670511, - 1321413758, - 1358501179, - 2319315657, - 558802519, - 3435990745, - 428209181, - 3549430154, - 3921046816, - 934116203, - 2292268309, - 418459468, - 1236079019, - 3607461187, - 717710438, - 2017397595, - 790967261, - 1378226043, - 2442486882, - 4012899028, - 3036106618, - 2275089852, - 3127783148, - 3803324082, - 365135232, - 2935582689, - 533078618, - 1246951539, - 1022728134, - 1082693697, - 2117237320, - 843581020, - 469547132, - 1527001694, - 882161199, - 512357744, - 2874034311, - 2004724773, - 1074917563, - 2468682342, - 1519005631, - 1769336345, - 2360821585, - 1875392094, - 2000498564, - 3360359338, - 8254159, - 3999404370, - 803153196, - 2577956679, - 2960422859, - 3005812287, - 4027088979, - 3289099019, - 323778300, - 2014675141, - ]; - - static const List _envieddatabasicCompareFacesURL = [ - 2854755817, - 1887284739, - 1632945805, - 2043352760, - 1401670428, - 1321413700, - 1358501140, - 2319315686, - 558802481, - 3435990712, - 428209278, - 3549430255, - 3921046797, - 934116111, - 2292268400, - 418459448, - 1236079054, - 3607461152, - 717710354, - 2017397622, - 790967227, - 1378225997, - 2442486875, - 4012899046, - 3036106574, - 2275089807, - 3127783125, - 3803324032, - 365135331, - 2935582677, - 533078585, - 1246951492, - 1022728168, - 1082693673, - 2117237293, - 843580974, - 469547027, - 1527001653, - 882161242, - 512357649, - 2874034423, - 2004724821, - 1074917525, - 2468682245, - 1519005648, - 1769336436, - 2360821630, - 1875392061, - 2000498667, - 3360359367, - 8254143, - 3999404339, - 803153246, - 2577956642, - 2960422804, - 3005812313, - 4027088946, - 3289099112, - 323778201, - 2014675126, - ]; - - static final String basicCompareFacesURL = String.fromCharCodes( - List.generate( - _envieddatabasicCompareFacesURL.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatabasicCompareFacesURL[i] ^ - _enviedkeybasicCompareFacesURL[i])); - - static const List _enviedkeyaccountSIDTwillo = [ - 456932435, - 2394750284, - 4284181365, - 3031678563, - 317926429, - 795284051, - 1239229608, - 3318462614, - 2466998260, - 2588715560, - 343407178, - 3169471995, - 2183907407, - 882711255, - 405145478, - 3363213383, - 2516552357, - 1555439561, - 2937131364, - 370795761, - 1214940587, - 1718892463, - 1547436541, - 4257171120, - 157772679, - 4064158261, - 272246761, - 2228064589, - 2398808887, - 2887476963, - 431763950, - 3302452238, - 2710243705, - 4227149070, - 3254488084, - 3117709212, - 42590298, - 2445946994, - 3175762607, - 1938889012, - 1843269736, - ]; - - static const List _envieddataaccountSIDTwillo = [ - 456932354, - 2394750218, - 4284181261, - 3031678547, - 317926508, - 795284010, - 1239229596, - 3318462627, - 2466998210, - 2588715586, - 343407167, - 3169471889, - 2183907452, - 882711279, - 405145525, - 3363213353, - 2516552348, - 1555439537, - 2937131281, - 370795656, - 1214940569, - 1718892446, - 1547436484, - 4257171076, - 157772790, - 4064158211, - 272246747, - 2228064628, - 2398808902, - 2887476946, - 431763848, - 3302452324, - 2710243657, - 4227149175, - 3254488099, - 3117709252, - 42590248, - 2445946922, - 3175762627, - 1938889078, - 1843269636, - ]; - - static final String accountSIDTwillo = String.fromCharCodes( - List.generate( - _envieddataaccountSIDTwillo.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataaccountSIDTwillo[i] ^ _enviedkeyaccountSIDTwillo[i])); - - static const List _enviedkeyserverAPI = [ - 1005134932, - 1560489340, - 4098840392, - 3030460720, - 3622847797, - 3846771692, - 582467599, - 880769766, - 2494391371, - 1289393858, - 126950013, - 2845165886, - 537516254, - 1707623060, - 4276394812, - 4256457332, - 874583387, - 1269844682, - 2063301980, - 2668594661, - 3885892954, - 1857040947, - 1850528889, - 2713517713, - 63446137, - 2754029620, - 1046857764, - 3399318423, - 3486594721, - 161127469, - 4235234329, - 2773344728, - 3452287862, - 2595057183, - 2390888428, - 3529759810, - 2409404352, - 509567013, - 2214372144, - 3302492367, - 2363324569, - 1487963109, - 3490085523, - 2081606030, - 2543724561, - 1426083832, - 3306409158, - 3270791487, - 2763579931, - 2633299306, - 346044323, - 2206980053, - 1572988721, - 946909255, - 20944117, - 707333999, - 1961159663, - 1551183522, - 1851873301, - 2877009979, - 894026350, - 2348593380, - 2828334770, - 2840953455, - 732772067, - 2817706016, - 712188444, - 1193775064, - 2230730747, - 103849368, - 2218587188, - 3380734951, - 1215869333, - 1093833403, - 4030587557, - 3939409569, - 2607471171, - 3949623346, - 248554892, - 3901557738, - 1465905942, - 2949209671, - 3815908740, - 2219007948, - 1450938377, - 645332705, - 463508631, - 48953837, - 3488584863, - 1958069811, - 1049855973, - 2166736869, - 2081577687, - 2634302530, - 406655778, - 4161775880, - 3104853321, - 718983767, - 1688636005, - 1534543340, - 3209664154, - 1857359472, - 1196964155, - 1267022738, - 2130001398, - 3131624573, - 1085585504, - 1706787164, - 1564622450, - 2683276590, - 2261265490, - 3891141, - 884631201, - 786167737, - 1563906890, - 3758398083, - 1243568143, - 3106479883, - 2336449031, - 3438787255, - 1012646549, - 1846736197, - 1926956562, - 3802351611, - 1129166102, - 1669918550, - 3772043211, - 2066098146, - 946610675, - 4082556517, - 2182235821, - 3819764613, - 1428211119, - 2368092505, - 1661020050, - 4225190333, - 2910928672, - 1401246065, - 1521236075, - 2816980718, - 3781380495, - 1086765682, - 2119495451, - 1494680386, - 2279679799, - 1317236686, - 546596578, - 3055309067, - 3782330829, - 3155996227, - 3297779951, - 642054514, - 3188931893, - 1812913869, - 4100157596, - 3151517500, - 2129116786, - 412520874, - ]; - - static const List _envieddataserverAPI = [ - 1005134853, - 1560489261, - 4098840345, - 3030460769, - 3622847834, - 3846771598, - 582467676, - 880769684, - 2494391353, - 1289393796, - 126949908, - 2845165828, - 537516175, - 1707623106, - 4276394861, - 4256457292, - 874583404, - 1269844658, - 2063301897, - 2668594642, - 3885892896, - 1857040964, - 1850528826, - 2713517799, - 63446036, - 2754029678, - 1046857822, - 3399318477, - 3486594757, - 161127500, - 4235234401, - 2773344685, - 3452287781, - 2595057197, - 2390888330, - 3529759856, - 2409404403, - 509567100, - 2214372100, - 3302492322, - 2363324643, - 1487963090, - 3490085598, - 2081606132, - 2543724648, - 1426083767, - 3306409148, - 3270791501, - 2763579939, - 2633299205, - 346044359, - 2206980071, - 1572988755, - 946909237, - 20944067, - 707333924, - 1961159606, - 1551183579, - 1851873392, - 2877010045, - 894026255, - 2348593328, - 2828334820, - 2840953379, - 732772004, - 2817706003, - 712188503, - 1193775083, - 2230730643, - 103849440, - 2218587137, - 3380734909, - 1215869428, - 1093833454, - 4030587612, - 3939409625, - 2607471220, - 3949623383, - 248554965, - 3901557660, - 1465906007, - 2949209630, - 3815908852, - 2219007885, - 1450938463, - 645332613, - 463508700, - 48953734, - 3488584882, - 1958069761, - 1049855965, - 2166736851, - 2081577625, - 2634302486, - 406655856, - 4161775969, - 3104853370, - 718983725, - 1688635926, - 1534543317, - 3209664243, - 1857359395, - 1196964212, - 1267022844, - 2130001326, - 3131624457, - 1085585464, - 1706787086, - 1564622395, - 2683276630, - 2261265441, - 3891122, - 884631238, - 786167690, - 1563906817, - 3758398182, - 1243568236, - 3106479945, - 2336449130, - 3438787268, - 1012646649, - 1846736246, - 1926956612, - 3802351491, - 1129166172, - 1669918575, - 3772043196, - 2066098093, - 946610654, - 4082556435, - 2182235876, - 3819764725, - 1428211160, - 2368092460, - 1661020070, - 4225190381, - 2910928726, - 1401246022, - 1521235983, - 2816980613, - 3781380551, - 1086765593, - 2119495491, - 1494680364, - 2279679838, - 1317236667, - 546596506, - 3055309126, - 3782330782, - 3155996167, - 3297779848, - 642054437, - 3188931949, - 1812913855, - 4100157636, - 3151517520, - 2129116720, - 412520902, - ]; - - static final String serverAPI = String.fromCharCodes(List.generate( - _envieddataserverAPI.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataserverAPI[i] ^ _enviedkeyserverAPI[i])); - - static const List _enviedkeymapAPIKEY = [ - 3749163921, - 953395003, - 1767412285, - 1335284542, - 3448058466, - 1612945338, - 3586552591, - 2090171087, - 3526723784, - 836102880, - 3996902529, - 3990240209, - 472852632, - 1536052374, - 4113097178, - 3105161968, - 4028683875, - 2889449955, - 2444023830, - 399488591, - 1959492832, - 1605946444, - 1099868321, - 3868069690, - 719352684, - 2370553143, - 3313461066, - 3190231335, - 823295380, - 2453023293, - 3525029148, - 186365312, - 161938621, - 1082257920, - 3631684521, - 3802551583, - 1759892110, - 2198567973, - 349203251, - ]; - - static const List _envieddatamapAPIKEY = [ - 3749163984, - 953395058, - 1767412295, - 1335284575, - 3448058417, - 1612945347, - 3586552654, - 2090171039, - 3526723726, - 836102834, - 3996902622, - 3990240137, - 472852730, - 1536052420, - 4113097108, - 3105161920, - 4028683835, - 2889449913, - 2444023843, - 399488518, - 1959492762, - 1605946495, - 1099868384, - 3868069731, - 719352616, - 2370553181, - 3313460996, - 3190231422, - 823295452, - 2453023354, - 3525029206, - 186365383, - 161938575, - 1082258035, - 3631684507, - 3802551630, - 1759892185, - 2198568018, - 349203326, - ]; - - static final String mapAPIKEY = String.fromCharCodes(List.generate( - _envieddatamapAPIKEY.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatamapAPIKEY[i] ^ _enviedkeymapAPIKEY[i])); - - static const List _enviedkeytwilloRecoveryCode = [ - 1133150946, - 3731109025, - 38905816, - 718416682, - 72532071, - 2888096027, - 2392597488, - 3046514139, - 3282646159, - 3833127298, - 1941254446, - 577842838, - 2655477355, - 2625792459, - 135049165, - 3192772188, - 117259137, - 3454722240, - 4196590134, - 2442365517, - 1899915297, - 208044477, - 3437713724, - 234660955, - 496784642, - 109839164, - 3392287722, - 147447155, - 3541038333, - 2366194776, - 1852630248, - ]; - - static const List _envieddatatwilloRecoveryCode = [ - 1133150881, - 3731109088, - 38905741, - 718416669, - 72532062, - 2888096095, - 2392597432, - 3046514059, - 3282646215, - 3833127347, - 1941254508, - 577842940, - 2655477294, - 2625792498, - 135049117, - 3192772105, - 117259209, - 3454722292, - 4196590195, - 2442365465, - 1899915385, - 208044521, - 3437713775, - 234660867, - 496784728, - 109839204, - 3392287640, - 147447083, - 3541038225, - 2366194714, - 1852630148, - ]; - - static final String twilloRecoveryCode = String.fromCharCodes( - List.generate( - _envieddatatwilloRecoveryCode.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatatwilloRecoveryCode[i] ^ _enviedkeytwilloRecoveryCode[i])); - - static const List _enviedkeyauthTokenTwillo = [ - 3004859271, - 1630336233, - 3841355683, - 1769616699, - 3998463394, - 49387018, - 2915330775, - 3804652580, - 1045733655, - 1076268615, - 1608894417, - 2841246974, - 3747506980, - 3426803056, - 1523200528, - 3748784460, - 796952965, - 1370470654, - 3007103367, - 2385290238, - 2449012063, - 3891828260, - 2489280733, - 141990754, - 126631019, - 1307652811, - 1680208544, - 4200085184, - 1697029813, - 3638779335, - 1513478808, - 1409532047, - 2856634519, - 340029293, - 1729269177, - 1238906, - 3864127424, - 1348589490, - 2394020807, - ]; - - static const List _envieddataauthTokenTwillo = [ - 3004859312, - 1630336217, - 3841355734, - 1769616642, - 3998463386, - 49387104, - 2915330722, - 3804652564, - 1045733669, - 1076268662, - 1608894437, - 2841246865, - 3747507036, - 3426802952, - 1523200548, - 3748784445, - 796953013, - 1370470539, - 3007103408, - 2385290186, - 2449012079, - 3891828246, - 2489280741, - 141990679, - 126631003, - 1307652857, - 1680208529, - 4200085173, - 1697029761, - 3638779318, - 1513478893, - 1409532089, - 2856634530, - 340029237, - 1729269195, - 1238818, - 3864127404, - 1348589552, - 2394020779, - ]; - - static final String authTokenTwillo = String.fromCharCodes(List.generate( - _envieddataauthTokenTwillo.length, - (int i) => i, - growable: false, - ).map( - (int i) => _envieddataauthTokenTwillo[i] ^ _enviedkeyauthTokenTwillo[i])); - - static const List _enviedkeychatGPTkey = [ - 2416394455, - 4207646224, - 451364318, - 1751148387, - 1793170101, - 1153808688, - 1665181598, - 1363057585, - 1281958942, - 2953267701, - 4291609122, - 391939345, - 1466698506, - 975043567, - 4173943065, - 471680351, - 3246510249, - 581988585, - 1269569301, - 1277693123, - 2160496280, - 3830403710, - 290192447, - 3572517057, - 3104592059, - 2711691034, - 3210420648, - 3898634406, - 1200117556, - 1471855331, - 3358235973, - 1601937940, - 340262766, - 3100764827, - 4067273536, - 220494496, - 1500709417, - 2848265704, - 568523249, - 1188867965, - 3977104338, - 2962910239, - 3670669575, - 3953903669, - 2546517718, - 915920601, - 544906495, - 1612949771, - 2854107484, - 1376715240, - 2583633032, - 1319706655, - 3182599914, - 3320970745, - 410565205, - 3075796443, - 163409080, - 3480793232, - ]; - - static const List _envieddatachatGPTkey = [ - 2416394413, - 4207646327, - 451364339, - 1751148375, - 1793170166, - 1153808642, - 1665181608, - 1363057600, - 1281958954, - 2953267622, - 4291609211, - 391939446, - 1466698568, - 975043492, - 4173943112, - 471680314, - 3246510305, - 581988531, - 1269569361, - 1277693106, - 2160496371, - 3830403625, - 290192464, - 3572517046, - 3104592120, - 2711691043, - 3210420720, - 3898634452, - 1200117580, - 1471855236, - 3358235920, - 1601938001, - 340262664, - 3100764878, - 4067273529, - 220494489, - 1500709475, - 2848265658, - 568523142, - 1188867919, - 3977104288, - 2962910322, - 3670669617, - 3953903716, - 2546517732, - 915920568, - 544906395, - 1612949865, - 2854107503, - 1376715139, - 2583633122, - 1319706728, - 3182599858, - 3320970635, - 410565133, - 3075796407, - 163409146, - 3480793340, - ]; - - static final String chatGPTkey = String.fromCharCodes(List.generate( - _envieddatachatGPTkey.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatachatGPTkey[i] ^ _enviedkeychatGPTkey[i])); - - static const List _enviedkeytransactionCloude = [ - 104972405, - 1826297693, - 1459287221, - 2154736453, - 80360576, - 2436225760, - 2045457249, - 2827179769, - 3354072433, - 874378647, - 2367037019, - 1780947382, - 483302838, - 3449149135, - 2783798126, - 4044438444, - 3064643569, - 3842384737, - 1383312024, - 831531354, - 1177680776, - 3893212288, - 1801194511, - 381662534, - 942547124, - 2928750028, - 2252940323, - 2187821390, - 3563626471, - 3842762355, - 3673460491, - 3738513897, - 1139544793, - 1090285057, - 667621217, - 1964282435, - 3595612715, - 2022421282, - 540769717, - 964920402, - 231828114, - 3507064611, - 3682138932, - 3821608737, - 4141658340, - 1083072149, - 329704437, - 867123082, - 3726618878, - 3953403850, - 4155108828, - 4203201177, - 802280593, - 868805140, - 873221332, - 3789877016, - 3430503764, - 1597757757, - 3197502627, - 690312420, - 4212028519, - 2494727343, - ]; - - static const List _envieddatatransactionCloude = [ - 104972324, - 1826297653, - 1459287254, - 2154736434, - 80360693, - 2436225673, - 2045457165, - 2827179670, - 3354072348, - 874378726, - 2367036984, - 1780947417, - 483302879, - 3449149101, - 2783798100, - 4044438525, - 3064643495, - 3842384686, - 1383312071, - 831531280, - 1177680838, - 3893212377, - 1801194570, - 381662466, - 942547078, - 2928749972, - 2252940404, - 2187821327, - 3563626453, - 3842762309, - 3673460562, - 3738513841, - 1139544722, - 1090285122, - 667621203, - 1964282391, - 3595612795, - 2022421272, - 540769772, - 964920345, - 231828131, - 3507064679, - 3682138978, - 3821608809, - 4141658322, - 1083072198, - 329704383, - 867123144, - 3726618829, - 3953403899, - 4155108754, - 4203201194, - 802280641, - 868805201, - 873221349, - 3789877069, - 3430503692, - 1597757775, - 3197502715, - 690312328, - 4212028453, - 2494727363, - ]; - - static final String transactionCloude = String.fromCharCodes( - List.generate( - _envieddatatransactionCloude.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatatransactionCloude[i] ^ _enviedkeytransactionCloude[i])); - - static const List _enviedkeyvisionApi = [ - 1741302926, - 1369682343, - 821460980, - 1051830513, - 2919862686, - 3438453063, - 2671715371, - 1452398431, - 1336412474, - 3657165648, - 4283685939, - 4029139929, - 3503597038, - 2673397830, - 3390940393, - 569888216, - 3542870280, - 650562825, - 1059491019, - 3166341603, - 1126887244, - 3216717204, - 3884902752, - 2900860871, - 4168811805, - 903186961, - 2848149758, - 379201999, - 122429332, - 2546905713, - 2114317373, - 1283138610, - 1903992201, - 3445320823, - 1813353356, - 2328465643, - 1003900043, - 4243089385, - ]; - - static const List _envieddatavisionApi = [ - 1741302973, - 1369682391, - 821460917, - 1051830461, - 2919862765, - 3438453046, - 2671715448, - 1452398348, - 1336412515, - 3657165572, - 4283685957, - 4029139875, - 3503596958, - 2673397872, - 3390940368, - 569888137, - 3542870333, - 650562895, - 1059490950, - 3166341546, - 1126887211, - 3216717302, - 3884902682, - 2900860845, - 4168811866, - 903186983, - 2848149668, - 379202046, - 122429422, - 2546905626, - 2114317385, - 1283138680, - 1903992273, - 3445320709, - 1813353428, - 2328465543, - 1003900105, - 4243089285, - ]; - - static final String visionApi = String.fromCharCodes(List.generate( - _envieddatavisionApi.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatavisionApi[i] ^ _enviedkeyvisionApi[i])); - - static const List _enviedkeysecretKey = [ - 1141020931, - 4267025674, - 4080510329, - 4150193399, - 2735093354, - 2621290546, - 121037130, - 3182499520, - 818851975, - 469936007, - 2115327889, - 3058940838, - 2303856919, - 1837160568, - 1754593014, - 1445378773, - 575790508, - 3840279630, - 2104659296, - 1290599553, - 2587385639, - 1800703398, - 1562167481, - 3438116986, - 803603244, - 2406819927, - 469443319, - 3817514513, - 1375887914, - 122246261, - 3179534519, - 2446521295, - 138681580, - 2494762507, - 1345361567, - 1858074002, - 4258654412, - 3010221531, - 1796789789, - 3675966273, - 542493077, - 4165940924, - 1020673035, - 2189687906, - 2929998292, - 2012995766, - 1802789896, - 2691195296, - 1937468946, - 2305103148, - 933237897, - 1882678240, - 3929609532, - 4291342037, - 1577648787, - 2526825721, - 587279634, - 2799956502, - 307942410, - 952671055, - 1624133810, - 325853708, - 320167898, - 875912567, - 2524487693, - 2707590551, - 1551395039, - 2926330290, - 3743988078, - 1078384430, - 2355316195, - 954674149, - 2049893036, - 784714057, - 1784490847, - 715470827, - 3346326563, - 3402263239, - 1022904766, - 1889951930, - 1058766175, - 2213488602, - 2834727563, - 4186039233, - 3668805305, - 439543737, - 2834247050, - 794214482, - 3844351555, - 102255751, - 1241146538, - 3233700865, - 236138198, - 846644522, - 113955816, - 2251084795, - 1813250914, - 1159343978, - 2321032496, - 1280320472, - 334502594, - 1333082781, - 1326844431, - 3182190462, - 2200524624, - 136656519, - 1602398972, - 137148346, - 3001505398, - 4130939216, - 408751774, - 485906922, - 3052774372, - 3189555175, - ]; - - static const List _envieddatasecretKey = [ - 1141021049, - 4267025773, - 4080510246, - 4150193285, - 2735093253, - 2621290562, - 121037088, - 3182499487, - 818852018, - 469936048, - 2115327960, - 3058940879, - 2303856993, - 1837160526, - 1754592902, - 1445378712, - 575790570, - 3840279565, - 2104659234, - 1290599623, - 2587385686, - 1800703381, - 1562167546, - 3438116936, - 803603266, - 2406819937, - 469443262, - 3817514569, - 1375887942, - 122246168, - 3179534557, - 2446521270, - 138681479, - 2494762619, - 1345361639, - 1858074070, - 4258654369, - 3010221452, - 1796789796, - 3675966322, - 542493126, - 4165940971, - 1020673080, - 2189687828, - 2929998242, - 2012995822, - 1802789984, - 2691195286, - 1937468970, - 2305103225, - 933237960, - 1882678233, - 3929609576, - 4291342048, - 1577648853, - 2526825654, - 587279680, - 2799956546, - 307942493, - 952671016, - 1624133861, - 325853823, - 320167822, - 875912516, - 2524487738, - 2707590596, - 1551394987, - 2926330361, - 3743987997, - 1078384481, - 2355316147, - 954674049, - 2049893083, - 784713997, - 1784490811, - 715470744, - 3346326618, - 3402263295, - 1022904783, - 1889951976, - 1058766182, - 2213488553, - 2834727673, - 4186039180, - 3668805356, - 439543765, - 2834247167, - 794214451, - 3844351531, - 102255860, - 1241146521, - 3233700975, - 236138118, - 846644578, - 113955742, - 2251084700, - 1813250848, - 1159343883, - 2321032451, - 1280320491, - 334502582, - 1333082842, - 1326844516, - 3182190407, - 2200524640, - 136656625, - 1602398890, - 137148303, - 3001505326, - 4130939170, - 408751814, - 485906822, - 3052774310, - 3189555083, - ]; - - static final String secretKey = String.fromCharCodes(List.generate( - _envieddatasecretKey.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatasecretKey[i] ^ _enviedkeysecretKey[i])); - - static const List _enviedkeystripePublishableKe = [ - 522377571, - 3586475766, - 214647848, - 4260387696, - 1480565215, - 2034798845, - 3257184644, - 3677546420, - 1222361711, - 3931206542, - 2888965958, - 1081912544, - 3645972815, - 721896297, - 517171822, - 3263412450, - 2131739306, - 3542146847, - 2804799966, - 3529817658, - 802955369, - 1028389670, - 3709968761, - 4230601249, - 4025978127, - 3183765040, - 514239170, - 405727722, - 3537447942, - 1645564231, - 3236193640, - 3270009752, - 154344868, - 3845029725, - 283645841, - 932692489, - 3188766486, - 3474565049, - 1091482645, - 2874146240, - 4211666752, - 3661032656, - 3351107700, - 2531946592, - 441843426, - 1606292894, - 2153941705, - 2779307135, - 3881234199, - 2120857597, - 3955270584, - 6976714, - 4264745703, - 1018483930, - 410676241, - 2125059658, - 2654578488, - 562805931, - 671686985, - 1216456480, - 1262913864, - 3691394124, - 2029626739, - 4290790191, - 238782982, - 2037510266, - 2605350452, - 981979835, - 1117897157, - 3261423589, - 1199292718, - 2418840055, - 741648520, - 822117799, - 1576123977, - 1042959218, - 4072937953, - 2081781771, - 1278205876, - 1112230724, - 3897639333, - 2042168521, - 2334228216, - 2373653516, - 907006966, - 2953570838, - 620578486, - 2760867898, - 2368016403, - 1290159490, - 2377847843, - 3526243939, - 941606553, - 857858869, - 150291495, - 1892368746, - 3071409859, - 2807649317, - 4178467864, - 87102769, - 218118127, - 1055792551, - 3893635599, - 3984574453, - 1918429883, - 4235079178, - 3529433099, - 1551586769, - 617287190, - 2073851490, - 1271399111, - 3390936087, - 3064868668, - 4007077552, - ]; - - static const List _envieddatastripePublishableKe = [ - 522377493, - 3586475665, - 214647927, - 4260387584, - 1480565165, - 2034798738, - 3257184756, - 3677546462, - 1222361648, - 3931206587, - 2888966001, - 1081912489, - 3645972774, - 721896223, - 517171800, - 3263412399, - 2131739372, - 3542146908, - 2804799900, - 3529817724, - 802955288, - 1028389653, - 3709968698, - 4230601235, - 4025978209, - 3183764998, - 514239145, - 405727652, - 3537448012, - 1645564201, - 3236193586, - 3270009818, - 154344925, - 3845029643, - 283645863, - 932692583, - 3188766563, - 3474565117, - 1091482721, - 2874146200, - 4211666725, - 3661032681, - 3351107645, - 2531946506, - 441843367, - 1606292942, - 2153941638, - 2779307033, - 3881234303, - 2120857488, - 3955270600, - 6976654, - 4264745619, - 1018483853, - 410676348, - 2125059646, - 2654578443, - 562805990, - 671686917, - 1216456562, - 1262913912, - 3691394091, - 2029626658, - 4290790239, - 238783087, - 2037510194, - 2605350487, - 981979882, - 1117897128, - 3261423524, - 1199292776, - 2418839994, - 741648605, - 822117879, - 1576123963, - 1042959144, - 4072937858, - 2081781816, - 1278205925, - 1112230701, - 3897639398, - 2042168461, - 2334228114, - 2373653620, - 907006900, - 2953570892, - 620578554, - 2760867928, - 2368016491, - 1290159558, - 2377847904, - 3526243920, - 941606652, - 857858899, - 150291551, - 1892368701, - 3071409851, - 2807649375, - 4178467883, - 87102722, - 218118029, - 1055792624, - 3893635655, - 3984574404, - 1918429921, - 4235079277, - 3529433209, - 1551586722, - 617287246, - 2073851408, - 1271399071, - 3390936187, - 3064868734, - 4007077596, - ]; - - static final String stripePublishableKe = String.fromCharCodes( - List.generate( - _envieddatastripePublishableKe.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatastripePublishableKe[i] ^ - _enviedkeystripePublishableKe[i])); - - static const List _enviedkeychatGPTkeySefer = [ - 1673037440, - 642286416, - 2427723078, - 3856283685, - 2702558462, - 502698028, - 1308925645, - 4110519217, - 3244900706, - 2526327817, - 283947026, - 3300100433, - 1758744413, - 2854457770, - 754498718, - 552551968, - 481456051, - 3218700995, - 363897818, - 2947237190, - 4160485056, - 973151098, - 538045910, - 4126691572, - 3949366719, - 494437859, - 2036503363, - 56930903, - 568830745, - 2742792501, - 3747688967, - 1567979890, - 979570915, - 1923807635, - 3148734659, - 2410692055, - 1467190165, - 811065295, - 2917860115, - 1829084393, - 3189430638, - 1005026264, - 3246668815, - 3949808453, - 3275202526, - 40927270, - 1497443558, - 219654500, - 3286262768, - 916873968, - 1670811374, - 1969758230, - 4039895843, - 695594440, - 3378046203, - 2176346704, - 3370161244, - 1176674416, - ]; - - static const List _envieddatachatGPTkeySefer = [ - 1673037562, - 642286391, - 2427723115, - 3856283756, - 2702558359, - 502698110, - 1308925694, - 4110519256, - 3244900694, - 2526327910, - 283947133, - 3300100395, - 1758744380, - 2854457753, - 754498759, - 552552022, - 481456091, - 3218700981, - 363897784, - 2947237247, - 4160485042, - 973151008, - 538045885, - 4126691525, - 3949366780, - 494437850, - 2036503323, - 56930853, - 568830817, - 2742792530, - 3747689042, - 1567979831, - 979570899, - 1923807743, - 3148734715, - 2410692029, - 1467190215, - 811065245, - 2917860169, - 1829084315, - 3189430566, - 1005026226, - 3246668860, - 3949808404, - 3275202491, - 40927251, - 1497443511, - 219654460, - 3286262688, - 916873884, - 1670811295, - 1969758272, - 4039895931, - 695594426, - 3378046115, - 2176346684, - 3370161182, - 1176674332, - ]; - - static final String chatGPTkeySefer = String.fromCharCodes(List.generate( - _envieddatachatGPTkeySefer.length, - (int i) => i, - growable: false, - ).map( - (int i) => _envieddatachatGPTkeySefer[i] ^ _enviedkeychatGPTkeySefer[i])); - - static const List _enviedkeyllamaKey = [ - 898801240, - 1504971304, - 610599258, - 2685877070, - 569772106, - 2952551564, - 3117708714, - 4211132927, - 1702829972, - 361376821, - 3759592579, - 1690946678, - 1363142521, - 3431691375, - 1568330165, - 3132934019, - 1334146219, - 358541338, - 593388605, - 1990403983, - 836379608, - 3489346571, - 4062565303, - 1781349802, - 1054736653, - 2598203681, - 4236200078, - 328616861, - 584809377, - 2904549267, - 2991757229, - 4020896402, - 1893858047, - 1889385501, - 3267548944, - 3275262527, - 1432773723, - 427983410, - 2889261127, - 2357975630, - 2333967494, - 2755113043, - 1874941660, - 2360831478, - 1300763119, - 740900016, - 1817081921, - 782408964, - 2234157668, - 2502899996, - 1122124057, - 427939706, - 1332936578, - 3962578740, - 59229511, - 3604410282, - 374662991, - 2656400333, - 1985948246, - 1723477683, - 2184340097, - 1319273115, - 3315200900, - 4082407531, - 3108743191, - 3973337447, - 243945687, - 3363660577, - 79788779, - 1309680040, - 906862493, - 1098147194, - 1449760267, - 1383842600, - ]; - - static const List _envieddatallamaKey = [ - 898801162, - 1504971386, - 610599287, - 2685877003, - 569772095, - 2952551669, - 3117708741, - 4211132857, - 1702830032, - 361376864, - 3759592693, - 1690946576, - 1363142443, - 3431691307, - 1568330231, - 3132934124, - 1334146241, - 358541358, - 593388555, - 1990404073, - 836379522, - 3489346624, - 4062565366, - 1781349854, - 1054736710, - 2598203755, - 4236200125, - 328616939, - 584809422, - 2904549342, - 2991757205, - 4020896479, - 1893857931, - 1889385514, - 3267548966, - 3275262471, - 1432773688, - 427983458, - 2889261090, - 2357975556, - 2333967568, - 2755113060, - 1874941595, - 2360831416, - 1300763019, - 740900081, - 1817081898, - 782409044, - 2234157616, - 2502900055, - 1122124157, - 427939619, - 1332936634, - 3962578811, - 59229475, - 3604410311, - 374663030, - 2656400291, - 1985948258, - 1723477716, - 2184340198, - 1319273180, - 3315201013, - 4082407458, - 3108743202, - 3973337376, - 243945646, - 3363660622, - 79788723, - 1309680090, - 906862533, - 1098147094, - 1449760329, - 1383842628, - ]; - - static final String llamaKey = String.fromCharCodes(List.generate( - _envieddatallamaKey.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatallamaKey[i] ^ _enviedkeyllamaKey[i])); - - static const List _enviedkeyserverPHP = [ - 3552866576, - 1948327802, - 2362351083, - 1132280431, - 3753638473, - 129185768, - 38878039, - 2730132585, - 1804405100, - 2496428701, - 2051529503, - 1388322984, - 4175334444, - 236796867, - 3879314462, - 4130446670, - 95378704, - 2626854749, - 2001334618, - 1281924634, - 3447214519, - 634079959, - 1772647823, - 669227767, - 1674444698, - 2806616347, - 843221614, - 886872287, - ]; - - static const List _envieddataserverPHP = [ - 3552866680, - 1948327694, - 2362351007, - 1132280351, - 3753638458, - 129185746, - 38878072, - 2730132550, - 1804405005, - 2496428781, - 2051529590, - 1388322950, - 4175334495, - 236796838, - 3879314552, - 4130446635, - 95378786, - 2626854771, - 2001334582, - 1281924723, - 3447214529, - 634079922, - 1772647840, - 669227652, - 1674444799, - 2806616445, - 843221515, - 886872237, - ]; - - static final String serverPHP = String.fromCharCodes(List.generate( - _envieddataserverPHP.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataserverPHP[i] ^ _enviedkeyserverPHP[i])); - - static const List _enviedkeyanthropicAIkeySeferNewHamzaayedpython = - [ - 4138568753, - 222084930, - 567957075, - 589023236, - 95163113, - 761369467, - 678556238, - 1202699717, - 3717339232, - 3361164613, - 1896144313, - 1028007045, - 2411990607, - 1334711864, - 1425832291, - 2517678508, - 3641615793, - 2388652099, - 4290027393, - 2642334611, - 2583306837, - 42432584, - 2352267362, - 2812350954, - 2797239379, - 2609875446, - 1510186127, - 4075115807, - 2646998902, - 2838108061, - 1144829029, - 374342323, - 352155376, - 4009357707, - 3177994588, - 4009547332, - 3123641111, - 3663726467, - 2548371067, - 1956922996, - 1893294624, - 841908501, - 3137173052, - 3905908512, - 1468327344, - 3096855172, - 1624381312, - 572547505, - 670778059, - 450113829, - 3296719559, - 3122037990, - 2792033885, - 1022814607, - 2489616942, - 2555344792, - 347833474, - 1992636689, - 2426895563, - 2835726782, - 2005021329, - 57031653, - 1895090121, - 2902144801, - 539560416, - 991919183, - 3172763420, - 639548619, - 1776418438, - 3026481680, - 1895252839, - 3348676884, - 2970079910, - 1655982482, - 3129301750, - 2793274198, - 1485417788, - 1744731121, - 302824470, - 2448927063, - 939465247, - 1400548521, - 3510373693, - 2235290475, - 277137710, - 3362743317, - 4255812862, - 3835529905, - 3488252448, - 3468169540, - 3291376858, - 1383773310, - 1629107816, - 3701672366, - 1773431453, - 3939482430, - 105727499, - 837695090, - 1040742880, - 3327679371, - 2161721125, - 1451148207, - 3741799188, - 4086124554, - 727701698, - 12846766, - 2383484351, - 3944409888, - 4062632309, - 2517050448, - 1435265117, - 2384327573, - 1596179024, - 1733116819, - ]; - - static const List _envieddataanthropicAIkeySeferNewHamzaayedpython = - [ - 4138568779, - 222084901, - 567957118, - 589023349, - 95163019, - 761369368, - 678556259, - 1202699700, - 3717339158, - 3361164586, - 1896144266, - 1028007100, - 2411990626, - 1334711886, - 1425832224, - 2517678574, - 3641615772, - 2388652052, - 4290027503, - 2642334697, - 2583306768, - 42432575, - 2352267300, - 2812350884, - 2797239314, - 2609875332, - 1510186176, - 4075115823, - 2646998831, - 2838108145, - 1144828977, - 374342354, - 352155264, - 4009357821, - 3177994554, - 4009547308, - 3123641187, - 3663726574, - 2548370972, - 1956922881, - 1893294699, - 841908546, - 3137173071, - 3905908600, - 1468327418, - 3096855255, - 1624381387, - 572547520, - 670778028, - 450113914, - 3296719497, - 3122037948, - 2792033806, - 1022814693, - 2489616998, - 2555344858, - 347833563, - 1992636743, - 2426895507, - 2835726835, - 2005021387, - 57031598, - 1895090168, - 2902144856, - 539560373, - 991919108, - 3172763428, - 639548659, - 1776418517, - 3026481791, - 1895252741, - 3348676976, - 2970079941, - 1655982585, - 3129301664, - 2793274214, - 1485417847, - 1744731012, - 302824518, - 2448927030, - 939465309, - 1400548545, - 3510373645, - 2235290376, - 277137777, - 3362743362, - 4255812790, - 3835529925, - 3488252519, - 3468169527, - 3291376776, - 1383773233, - 1629107767, - 3701672346, - 1773431470, - 3939482375, - 105727579, - 837695024, - 1040742795, - 3327679398, - 2161721152, - 1451148189, - 3741799237, - 4086124667, - 727701669, - 12846789, - 2383484398, - 3944409969, - 4062632237, - 2517050402, - 1435265029, - 2384327673, - 1596178962, - 1733116927, - ]; - - static final String anthropicAIkeySeferNewHamzaayedpython = - String.fromCharCodes(List.generate( - _envieddataanthropicAIkeySeferNewHamzaayedpython.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataanthropicAIkeySeferNewHamzaayedpython[i] ^ - _enviedkeyanthropicAIkeySeferNewHamzaayedpython[i])); - - static const List _enviedkeyprivateKeyFCM = [ - 589510970, - 1323998495, - 176851027, - 1551255100, - 397738850, - 911500238, - 2737091527, - 708980051, - 3994760831, - 3303700682, - 888569156, - 289778144, - 1768937714, - 1996145717, - 3840916818, - 1501832691, - 1936487990, - 2944326300, - 3871460848, - 2746191075, - 2366037753, - 3260886753, - 3296565666, - 349591973, - 1396175032, - 3080033954, - 2398883030, - 3949466403, - 3378685587, - 3195545710, - 365676136, - 197147035, - 2389375401, - 4146490038, - 1979426616, - 1476646428, - 3924163679, - 1238855916, - 1880485209, - 1818526322, - 3438894061, - 1419717566, - 3337932728, - 488209636, - 2538814721, - 1376649369, - 2966036193, - 2636818228, - 2473945819, - 1243743887, - 1333722351, - 1378848062, - 3401063698, - 1934211731, - 3201016272, - 1126062460, - 3227145040, - 2683131481, - 2661254493, - 2911453530, - 3789526810, - 2043164387, - 796844649, - 2093739388, - 3983503398, - 2906976258, - 322110376, - 1954595057, - 1011026963, - 2977775757, - 315889052, - 3101075752, - 3280515219, - 1720531759, - 2451434871, - 128374508, - 3550487656, - 3565976498, - 1210376341, - 57874744, - 3277710806, - 1234230096, - 3673887664, - 1284609895, - 1382134614, - 546595283, - 1333446522, - 1200201824, - 405234331, - 2873729750, - 4196873241, - 2469332652, - 31268733, - 2000566797, - 2863079457, - 1916394369, - 4061015711, - 1801731, - 1602869332, - 3872221784, - 2229661926, - 476638170, - 2885047515, - 3904841022, - 2398848448, - 3362927814, - 900826188, - 583893152, - 809803309, - 783205366, - 1232027011, - 642619883, - 291325610, - 2394595726, - 2083935013, - 441843663, - 3794227412, - 1202087031, - 1608534267, - 3007131968, - 338805673, - 1037358800, - 840481771, - 1477436877, - 3935784839, - 4034282256, - 1683212189, - 1082988566, - 863916003, - 402521186, - 2585215224, - 1184986766, - 2339888681, - 3248831789, - 1327189732, - 1824861994, - 2781708213, - 2514970651, - 744659000, - 1609630070, - 124253669, - 1802674847, - 836390102, - 817098875, - 525539629, - 2493519145, - 579659934, - 257006946, - 3821235469, - 3544658163, - 3349581169, - 1140776216, - 1732186404, - 2653732246, - 2511018359, - 772717925, - 3203167836, - 1918239877, - 2377626998, - 1895572715, - 2337741007, - 3165625027, - 3165169364, - 3916395290, - 1579432721, - 3273935601, - 831366274, - 1544919879, - 1357891583, - 2528107809, - 3984972543, - 1837805628, - 2655614052, - 278077258, - 3125585591, - 4242824029, - 2137097702, - 1362770141, - 3090519589, - 3542246396, - 2267914376, - 832654081, - 152735734, - 3007818970, - 1425167007, - 3714717860, - 1051882702, - 535736694, - 1094103322, - 3490517343, - 1957250784, - 4253454013, - 2178064991, - 1347056279, - 1325621645, - 3261978310, - 2296494821, - 1270875229, - 3085006795, - 2916172684, - 3332466953, - 3886507540, - 2154714022, - 2875062767, - 3077420176, - 3718741151, - 4069134400, - 2080712677, - 533646373, - 1494115259, - 2364174129, - 2727978903, - 3062137147, - 3726496668, - 3615246455, - 3086334563, - 2635806566, - 4070476148, - 4217497383, - 2785524604, - 1454301713, - 2242779066, - 839119679, - 1643111753, - 3384973756, - 1163654251, - 3118297991, - 543844477, - 4232234231, - 674505456, - 3698352894, - 2216806375, - 2486477552, - 3555566336, - 2011337427, - 1346436797, - 2947356558, - 3181592718, - 3965165134, - 1335350205, - 988042470, - 2124837620, - 1295962701, - 1522323110, - 1637981374, - 2686006701, - 713136333, - 3260483901, - 989480593, - 321644116, - 267440611, - 2369524101, - 2139322365, - 2935019289, - 486650023, - 231245891, - 2714228994, - 67591365, - 2380817258, - 2081839381, - 2313368627, - 1485151563, - 653563050, - 1082971612, - 2267410275, - 651519860, - 454536328, - 2315934750, - 2420623973, - 375642378, - 2182955550, - 296208613, - 564661310, - 3961785461, - 3678215070, - 3153379541, - 1971824091, - 1536441524, - 3573140313, - 3000952863, - 1455167830, - 3309756666, - 1001326205, - 4016740122, - 2189037247, - 467730712, - 1536025956, - 1186723233, - 4262779360, - 113642116, - 912800923, - 2242370329, - 4100901358, - 225415208, - 1907470664, - 2691952618, - 4097915267, - 4106718559, - 1248713041, - 2570330622, - 2861469798, - 681401008, - 631603154, - 1643272433, - 2126934219, - 1391106058, - 1235457205, - 3714312277, - 859041825, - 3523755095, - 2066936876, - 3916072659, - 3758707634, - 3263960239, - 2041189508, - 3159326937, - 983812181, - 2269627422, - 1436127295, - 4235963961, - 3039314641, - 3751559205, - 3727491912, - 225434986, - 380882532, - 685233271, - 12498412, - 3611229940, - 4171128498, - 336638792, - 1272706849, - 3677602200, - 1945754310, - 1219264669, - 1481610115, - 2894749578, - 198454895, - 3770857707, - 1422302045, - 2981610148, - 3113375368, - 401958252, - 3332112199, - 2276137948, - 3289232016, - 3012553435, - 1432418544, - 664621975, - 3560437657, - 819110772, - 3028090815, - 2770831094, - 2533511998, - 2421331763, - 1334424157, - 1823651182, - 1934026927, - 2730732499, - 102398509, - 2458389504, - 4229009847, - 3763461737, - 2432594508, - 2742929659, - 2051723239, - 1577603395, - 1700089495, - 1122718116, - 3670881871, - 1248983772, - 175063174, - 472181504, - 2768438094, - 3091408454, - 4165497612, - 3255851976, - 3174319069, - 2654976129, - 4018660933, - 3310175755, - 543450947, - 61658, - 257876038, - 64319925, - 656565863, - 1323114467, - 3120030596, - 904098398, - 243360434, - 471841393, - 2070742657, - 2189327930, - 1310594552, - 1338071644, - 589521062, - 1363383040, - 2498152117, - 2681609306, - 3085567299, - 4067132292, - 3152526482, - 3888080003, - 4074826103, - 3516587102, - 1761961541, - 1922096694, - 4128048823, - 1635191948, - 2808163681, - 3059860611, - 3441731112, - 2780145560, - 3724070767, - 239301579, - 1656331963, - 3787767878, - 3091037105, - 2939423301, - 4188959498, - 3076095599, - 2776994927, - 3808274241, - 4271663968, - 2228685435, - 3023382778, - 87128799, - 3971101087, - 2951388021, - 815524302, - 1112949658, - 3425555644, - 1772873279, - 267122059, - 3502384508, - 2295263421, - 472908799, - 2632354599, - 2019041056, - 527372116, - 798709789, - 4013916333, - 3759694763, - 1440103747, - 51657606, - 2987526294, - 840305279, - 3043172441, - 1687940543, - 3643447917, - 2973901651, - 2191179658, - 2260332401, - 491961335, - 3634008968, - 31113624, - 834679593, - 1301301142, - 3274761738, - 3751016419, - 3214831350, - 3082788741, - 362247, - 529352187, - 3492444042, - 1280565967, - 2242683529, - 2888564444, - 1803244130, - 3435927067, - 1640753159, - 1898537179, - 3228053778, - 1954206094, - 1540456850, - 248273364, - 1325644712, - 695538645, - 4090026346, - 2274294298, - 2768151390, - 3042025492, - 4269179133, - 3806211342, - 889507951, - 3370546678, - 4096188940, - 2354537213, - 3441793124, - 3203113969, - 3457565506, - 1002278869, - 4152750914, - 3294354108, - 1041991379, - 94798856, - 25722796, - 1546525275, - 2686561750, - 2192563862, - 2621775579, - 2373996418, - 1905310029, - 2214703899, - 2399149371, - 1342545748, - 1185127375, - 288977926, - 1832198850, - 2281434444, - 2737976911, - 614579492, - 3174170846, - 2662962575, - 4163972510, - 3612044273, - 922880552, - 450642186, - 2423406687, - 4156757832, - 2294690409, - 1036538798, - 2666284105, - 240963217, - 606309049, - 683429236, - 1508006389, - 3660632001, - 200640335, - 1582774774, - 1816197300, - 1418551367, - 3544638987, - 387253329, - 2296414452, - 3164444484, - 3335301295, - 1347845828, - 103975637, - 353339457, - 2139146923, - 1254057413, - 540580904, - 221842680, - 1699742840, - 3085492530, - 3117593370, - 3076459163, - 66368280, - 1667989919, - 3042891198, - 3374433660, - 1577596031, - 1518774674, - 3758243720, - 2716119961, - 1471476853, - 2784493744, - 3719462950, - 4237860873, - 243005393, - 803541407, - 1622842474, - 4017105065, - 3282758351, - 2180699529, - 2447225540, - 1628975792, - 3236748355, - 2439493243, - 961318765, - 953497865, - 906897835, - 355062543, - 2843738183, - 4180013865, - 3007690697, - 3038340004, - 2033038495, - 1354994783, - 2425515978, - 736106281, - 3089270884, - 3528514645, - 2663787017, - 1419187996, - 1691117049, - 138082149, - 3459389521, - 2444776422, - 4187210569, - 3615446272, - 2843925404, - 3424484357, - 655655903, - 594221174, - 3515424309, - 3758056376, - 3281136547, - 3930205849, - 4187796479, - 3295721849, - 2206646923, - 104100519, - 652243666, - 3134733359, - 4076881858, - 2771590126, - 3162413833, - 176138717, - 3281037276, - 2300762471, - 1095451758, - 3748256302, - 1541232535, - 1383396764, - 1647384261, - 1602072092, - 77393336, - 2691558206, - 2027445565, - 4104901400, - 1864704831, - 1325350314, - 520716916, - 144290568, - 1087055137, - 666343885, - 494251288, - 2801070214, - 1956499095, - 3474664631, - 3738017554, - 537394183, - 708484713, - 2621188479, - 2437414965, - 2749040283, - 3705659611, - 1564587596, - 2544884860, - 2361479956, - 2642898469, - 4006956758, - 903272237, - 3181366950, - 2268617563, - 3037337570, - 3122746964, - 266276960, - 834872189, - 1653746464, - 3048207564, - 3102639512, - 2110664933, - 557715469, - 2562643412, - 3469866698, - 671343823, - 624738744, - 892301721, - 246335086, - 1480140873, - 31509591, - 3816545199, - 1013980440, - 4007882745, - 822580588, - 2981532131, - 2079641032, - 2375536301, - 2817643035, - 1415256342, - 3287243858, - 504639792, - 2206656785, - 1937728499, - 3918637504, - 3680796966, - 533621359, - 2974466934, - 255732426, - 2156060489, - 3593850426, - 1454027038, - 3427804141, - 2557443399, - 165245859, - 2154672178, - 2211909619, - 3703679581, - 1308185239, - 54229574, - 2229468484, - 2652730651, - 3367287439, - 1928368813, - 1238395033, - 2584334940, - 618288719, - 636082697, - 2419544642, - 2366144864, - 782231482, - 3247134076, - 2247378249, - 3189371452, - 752767218, - 332518050, - 2943208049, - 4047399113, - 270684759, - 4202557980, - 2956905827, - 2093921180, - 2722155275, - 1537413814, - 3696294407, - 3907259105, - 394476825, - 873554126, - 85687257, - 1054481830, - 3952738938, - 2454856867, - 1006918767, - 87263547, - 2523338480, - 787794445, - 1702085248, - 568556439, - 3301349335, - 928651693, - 606880747, - 4021341356, - 1143778765, - 1320053458, - 4199542896, - 3545237112, - 2431061362, - 3425269671, - 2107121171, - 480279154, - 1816750096, - 3608397375, - 3151874520, - 500471867, - 1080424602, - 1520818827, - 1520313229, - 3384770685, - 3387423047, - 3145859196, - 1830541705, - 591143027, - 3733972608, - 3475112804, - 1878822399, - 1272266848, - 2083179099, - 1638395054, - 2268927473, - 3240721436, - 1632193649, - 2128929310, - 308186170, - 4128090400, - 3003138378, - 990485205, - 1717726089, - 2797816427, - 2736389106, - 1252272158, - 3344205688, - 1622328346, - 3345479671, - 1626316771, - 726543281, - 2358436728, - 1216513429, - 430748569, - 2798104788, - 1061340371, - 3348277491, - 797978369, - 4082635324, - 2990078555, - 3780148244, - 3553076202, - 414250002, - 910908825, - 1635019161, - 3696436634, - 3072215420, - 3788207623, - 34479397, - 2565147863, - 2915857185, - 446470200, - 2353291714, - 1813137688, - 1595111072, - 4000215490, - 1134859855, - 1683803030, - 4110852416, - 271242921, - 909618672, - 2933619925, - 3692509540, - 2320463352, - 2710465770, - 2550792716, - 2137955528, - 3701881172, - 1236155071, - 3348182160, - 2152631747, - 3614017399, - 2617865623, - 4198234193, - 1915006184, - 766360082, - 1058299274, - 2570978308, - 1891758034, - 883393814, - 82620053, - 2426741774, - 555375671, - 3985272035, - 476520061, - 303632627, - 3009747578, - 2335133660, - 2327712194, - 1211089530, - 2727413731, - 2184930112, - 3930414404, - 1782868053, - 3914815245, - 2284867307, - 1384188701, - 3515331360, - 2027404046, - 1812693419, - 1223274016, - 2327946298, - 770080175, - 1906775469, - 1537275902, - 647704019, - 458542807, - 1028382745, - 3202191757, - 2823123896, - 1556402350, - 195014673, - 1042565041, - 404659264, - 1468535239, - 1108977985, - 1552975811, - 2113646714, - 2648601023, - 488251269, - 3743207852, - 1957437707, - 1395522122, - 27668661, - 3543192519, - 63006340, - 905449237, - 2606519481, - 164744904, - 816313033, - 3152211986, - 3483956690, - 1822833380, - 754633704, - 4049306471, - 3202904042, - 2540150351, - 3992710468, - 2638528499, - 975313461, - 16947542, - 1268649637, - 1055173328, - 3602481952, - 4287981630, - 4118198795, - 3554520624, - 935392343, - 2875878257, - 657692454, - 2903299143, - 1817422354, - 3369070528, - 1396415157, - 731757887, - 54412594, - 3375043157, - 1849341748, - 2561328806, - 348804904, - 2103970870, - 1745474738, - 1906712304, - 2991800163, - 837022395, - 1865515632, - 1168787834, - 408360190, - 226761880, - 2161703382, - 1061326994, - 2096860120, - 3495365614, - 212250484, - 2663090157, - 3937837638, - 2896517086, - 1690045585, - 3425004690, - 2761272707, - 2057762513, - 618728094, - 3273145735, - 3273491204, - 1798433538, - 2028323939, - 2271624530, - 3626585524, - 3762225654, - 432567336, - 4182989347, - 826508489, - 729003260, - 2292930960, - 1849067238, - 3201521677, - 2354543027, - 1903699277, - 458172854, - 3099872919, - 2973215737, - 2627299613, - 392481595, - 1876678635, - 2415089221, - 2589311882, - 734369483, - 1380882068, - 3035902754, - 4193755808, - 992025040, - 3704321355, - 1224456633, - 440068848, - 257894027, - 22312974, - 3736996118, - 546298605, - 2360876678, - 172411743, - 1786101239, - 2989603836, - 3740056098, - 89059043, - 505890352, - 2924254231, - 1826934042, - 915435888, - 641497285, - 1265259756, - 393231937, - 2783756019, - 2237689340, - 2001000164, - 3213769036, - 2894008859, - 2260329271, - 3719902194, - 2831693006, - 2980887753, - 1782904378, - 4145331936, - 3089843590, - 1225841589, - 4227074578, - 378492114, - 476482482, - 879016078, - 2497518568, - 6404446, - 1019570624, - 1190642495, - 358782591, - 618068251, - 1566307584, - 1538176946, - 2178025680, - 637989982, - 2667374346, - 1700155510, - 808834983, - 1056226592, - 3875640206, - 873207955, - 2280700229, - 3076687793, - 3400679489, - 4109796290, - 1545115161, - 2307281421, - 988798317, - 2750892600, - 1917884513, - 1805578263, - 544845895, - 2944863189, - 3380787724, - 1308614343, - 1701183596, - 382967395, - 1140220654, - 1261313743, - 393032983, - 769916906, - 2465240484, - 3118952054, - 2205202321, - 1626534383, - 2806956938, - 3393689901, - 2749513595, - 2002676905, - 658316870, - 596096108, - 1771370042, - 1420644807, - 4225507947, - 661016470, - 1198045612, - 3217781763, - 1590172215, - 885844536, - 1072021849, - 2518039828, - 1198076989, - 4194650867, - 3310277379, - 3574098973, - 147391920, - 2820364908, - 3495521345, - 1622035479, - 401037328, - 4144282538, - 685867171, - 147788364, - 2734293548, - 850588461, - 4005210370, - 304766089, - 3686918132, - 4082689386, - 747073320, - 1953493766, - 1713032604, - 468891222, - 1663992916, - 887527089, - 3349320927, - 2342884189, - 1587950919, - 3614373107, - 84091027, - 784322011, - 2594506097, - 3182543106, - 3421310027, - 2738756516, - 1447031096, - 3536363764, - 3174094538, - 1714453504, - 1912525575, - 3019905635, - 2355159462, - 3659541285, - 3315775291, - 3069239086, - 563546323, - 2715278569, - 3329837262, - 2774232075, - 581296210, - 3169247540, - 3875748499, - 2574388346, - 942422940, - 2538027490, - 1800723232, - 2866248292, - 683679656, - 2763073671, - 1103680768, - 3299181665, - 31894348, - 87525858, - 2458599358, - 930491955, - 736917124, - 3857363220, - 1152962568, - 617771179, - 1941492647, - 609395826, - 2856461184, - 3521812990, - 2773618216, - 3152889991, - 1351714131, - 149245989, - 181523718, - 715600516, - 3538019092, - 2897169430, - 1509154388, - 1162829827, - 1837399271, - 351742923, - 2845669304, - 2233785130, - 4130375921, - 4233378438, - 3430129029, - 3970192690, - 2910176062, - 1313300756, - 1493454997, - 3604393381, - 3664326473, - 3579537629, - 3019714258, - 1313832623, - 3462380280, - 1570783172, - 3052532963, - 500712340, - 551674744, - 1691198797, - 1007646139, - 2061855958, - 3918896846, - 2349532217, - 2704669643, - 2462700200, - 1463755187, - 2644951031, - 1049047384, - 1362356795, - 2334718026, - 3419349434, - 2966090842, - 112078216, - 1865737314, - 875865198, - 2211084158, - 1086193328, - 2659437179, - 910056074, - 3237044714, - 1430855232, - 1007484969, - 1499130600, - 3996654787, - 3753211228, - 2728300127, - 1319358048, - 3605326440, - 2026829440, - 4005681313, - 2514350014, - 3618720971, - 2217961948, - 2643886120, - 1109165707, - 1357361917, - 3585870869, - 3975058244, - 1572488796, - 3676823008, - 3470094201, - 2872546225, - 3920835406, - 3992675783, - 1156174027, - 3140381092, - 2608121047, - 3058624155, - 2934998069, - 1759196965, - 4067500916, - 1991472626, - 3216619691, - 4098769599, - 588951713, - 3245777749, - 328730364, - 4126839681, - 1792154873, - 2422719474, - 2367088035, - 1310551741, - 1128033721, - 2150996276, - 1581828975, - 645831829, - 813503457, - 3782478553, - 3649932994, - 565493008, - 1237117989, - 1406104413, - 3520255107, - 2338045602, - 3916991046, - 4119017913, - 2958534024, - 3954739116, - 3054230077, - 2089357111, - 2722855650, - 2156538875, - 3623928975, - 328004962, - 1829806979, - 3680050410, - 3349856728, - 204276030, - 1314306494, - 3453817559, - 1440201957, - 2581060525, - 774227086, - 203891280, - 2032606986, - 1417439893, - 96835846, - 3079591025, - 41398510, - 2370311794, - 1552067640, - 4238548553, - 2918547787, - 391361244, - 3128388937, - 917817877, - 3109899736, - 1193398111, - 3994520336, - 3302673874, - 3782873339, - 345550479, - 682307291, - 2438073360, - 2182612000, - 136911609, - 3024578829, - 1464426766, - 1239236169, - 406241719, - 1535531405, - 2249614820, - 3967341651, - 3885490058, - 833285326, - 104357454, - 2328553955, - 82630145, - 3082197131, - 2629109725, - 4085385077, - 1995605292, - 1739322451, - 1857299281, - 1894106091, - 3916707902, - 3993176173, - 4217211762, - 439008959, - 600329550, - 818825754, - 1530207975, - 2238991688, - 960664779, - 3238916603, - 1055058350, - 1940929455, - 1547247554, - 262617941, - 3600373476, - 416132026, - 993368759, - 2220762413, - 2852293841, - 1401214863, - 3029911071, - 1135574851, - 788507775, - 4164163886, - 929053590, - 3881226173, - 1607866966, - 1395847479, - 3583865283, - 1312324692, - 3904671527, - 2853328653, - 1662356337, - 3423291458, - 3668912436, - 703598365, - 2734575634, - 904651833, - 1980080977, - 2814690629, - 1678408372, - 3044565028, - 22124286, - 3835552664, - 1106202935, - 589445083, - 2002996321, - 4035213816, - 2754553947, - 196817661, - 3486306750, - 2267106733, - 1709355984, - 560969423, - 1517733460, - 3855497140, - 2801556340, - 2806825827, - 2967296788, - 473298803, - 1395091012, - 622672642, - 753358551, - 4219187485, - 948513982, - 2514732523, - 2988203347, - 860398870, - 2353708558, - 3661475772, - 4230893692, - 161043738, - 2756794330, - 1450970908, - 420462594, - 881773228, - 56514774, - 1907948897, - 1673406495, - 4171299645, - 2132255999, - 3809708706, - 3431489286, - 919982798, - 709011670, - 1081067199, - 4201636608, - 122269038, - 1258523141, - 181516679, - 1775120507, - 4238218441, - 3558361945, - 3658796380, - 4184496803, - 3478503704, - 4235749148, - 717242277, - 3766020122, - 2600264467, - 4174475018, - 316626662, - 1240878743, - 3078415811, - 572831387, - 2927378236, - 1244736273, - 1975048403, - 314206284, - 1914441224, - 1028117221, - 3574470736, - 2449819628, - 1631424205, - 4224123394, - 1387213920, - 3791010853, - 304120444, - 262280588, - 625045400, - 3195066831, - 2057833987, - 1703506758, - 1976092793, - 979500326, - 512193020, - 3063384663, - 2963708510, - 547588036, - 3049595940, - 3725320001, - 3916537618, - 3889955026, - 1506842990, - 2641879782, - 225436563, - 2535851186, - 3245888294, - 1994911865, - 1796904087, - 962458107, - 1438229843, - 1347717789, - 183138165, - 3661538237, - 3506250210, - 2093502661, - 48215994, - 2293601061, - 3771797701, - 4270309536, - 652000030, - 3884933335, - 4280498577, - 3771682694, - 2572898690, - 2071886109, - 1949013267, - 643211610, - 1021077545, - 1116964597, - 3507381253, - 1055668749, - 1504005409, - 2274252350, - 1231648753, - 2829518306, - 2220376773, - 69824327, - 772847414, - 3740221247, - 3624723289, - 2962455328, - 131199905, - 3495559133, - 1226338141, - 3441459539, - 2708809389, - 3231899936, - 2278904859, - 588773924, - 874836819, - 1905354747, - 786284287, - 166884127, - 1252924058, - 1663292082, - 2963163944, - 1806980723, - 3316352187, - 1806328942, - 2467852058, - 3859711752, - 3080417860, - 3981112232, - 4193085633, - 4165431902, - 2813861506, - 1945379748, - 3407760529, - 3778035981, - 2492778913, - 2517891821, - 1323110150, - 3093972115, - 4217083848, - 2614216226, - 1141562316, - 2557122568, - 2014813599, - 303833910, - 1783656083, - 3159216809, - 1388168740, - 392633788, - 2627901482, - 558935529, - 3140407472, - 2597831840, - 3616663126, - 1339844291, - 2035526563, - 4016101620, - 2110605774, - 871445600, - 2526693095, - 742264744, - 1742440448, - 1836544215, - 807275609, - 3538472680, - 2663262041, - 1982268095, - 2930866209, - 303755377, - 1018210394, - 2587693616, - 739580871, - 2419846858, - 913923280, - 3230906163, - 157123293, - 2552733540, - 1168370807, - 3201727121, - 284650482, - 3742141477, - 530697199, - 2663944551, - 1700576440, - 1772649389, - 3291728809, - 966261607, - 2605032729, - 1902267898, - 658607716, - 421242108, - 23072538, - 3770528788, - 689666739, - 1561495485, - 3942664529, - 1767495272, - 1218870892, - 2866584929, - 2949439933, - 2072458596, - 2796927051, - 4065368968, - 4209619768, - 2849755127, - 733612533, - 595027785, - 2220774604, - 1932330361, - 3556230370, - 1678901321, - 1779213666, - 2071683051, - 1326913129, - 3699383882, - 2812019033, - 3374222860, - 1872559238, - 857768639, - 2681244723, - 3026287524, - 3505509213, - 3259193275, - 3201374879, - 972066410, - 2536605408, - 1625988082, - 4100621349, - 3830470421, - 20566907, - 2367134850, - 1517490710, - 2764556404, - 2908501331, - 3793534428, - 3282361253, - 449374153, - 1517642003, - 654707337, - 1814855953, - 3000000990, - 3267184107, - 2877080482, - 387333527, - 2346755280, - 3951362959, - 2252743198, - 3655559769, - 2047592419, - 3666868457, - 596515358, - 1898850093, - 2619271451, - 432924948, - 406316277, - 3523450207, - 2631707103, - 3104941800, - 1697027111, - 841759719, - 2366283620, - 3320135835, - 1264429240, - 2298543558, - 2811005353, - 3763306014, - 1665312736, - 1219354498, - 3412895319, - 3343735879, - 3182259583, - 2245868492, - 651097240, - 3410529101, - 653153401, - 3187177042, - 805257777, - 3391701023, - 2173991519, - 2764816354, - 3738297083, - 3338249951, - 605174599, - 3447153298, - 2268552461, - 264710236, - 4291187518, - 1248822947, - 1207711803, - 3143689773, - 2120173086, - 1258024386, - 1675669148, - 3944266076, - 3770500210, - 519345158, - 4055969249, - 834847959, - 1523345273, - 2281508419, - 4279945710, - 2256251712, - 2723118906, - 949172489, - 3556653509, - 2204978651, - 2207845272, - 3133121782, - 2938649262, - 1054902655, - 3917906197, - 147812442, - 1590837576, - 1046907258, - 3127957074, - 306554455, - 109358972, - 1957906795, - 10768826, - 2123982763, - 2967261105, - 1591729359, - 1336828548, - 506774965, - 1047427165, - 1037772748, - 3619622504, - 155858022, - 952278271, - 3278643492, - 3225668899, - 3319584688, - 3252897181, - 2181583888, - 1289827804, - 28957372, - 4273878984, - 89664495, - 2492447578, - 398829821, - 494949490, - 2277738352, - 2554005742, - 1519166941, - 2957097382, - 1954972521, - 487387151, - 1232404941, - 1650316531, - 4110337470, - 845353124, - 785405497, - 1646209586, - 15877749, - 3448987439, - 734462387, - 2195390972, - 919642075, - 2955779591, - 702970477, - 3697074056, - 50426274, - 898227958, - 1755036673, - 1910263162, - 2013661310, - 3127844575, - 1853025464, - 2110523832, - 1231234120, - 3892427567, - 1935442332, - 3022751576, - 1985092492, - 2158135710, - 106593183, - 1360514793, - 298362780, - 2058814314, - 1523861399, - 520755225, - 685291107, - 3102826108, - 3549157157, - 3786620024, - 1826280610, - 3631202419, - 3303616201, - 684122101, - 2286439339, - 2125936501, - 2615781446, - 2418283027, - 2738037446, - 1877719402, - 987776849, - 360257720, - 2337725525, - 446615630, - 466757814, - 2541832891, - 2615550350, - 2654609671, - 1361101261, - 3071843094, - 3909891138, - 190222801, - 639699721, - 1024499563, - 2556417947, - 373717939, - 285013433, - 1212167730, - 955227338, - 1299200886, - 113072682, - 567001773, - 945836127, - 3766327328, - 3845800444, - 650637636, - 1006321127, - 540715098, - 1172818744, - 3094499655, - 2871696874, - 2229381738, - 1797948602, - 1568646875, - 1879237494, - 1901737513, - 1178465513, - 2441781528, - 1955727748, - 1602886393, - 830096769, - 4287316935, - 4117789393, - 1764761105, - 1510703150, - 888373874, - 664414303, - 736079463, - 2609555377, - 2973266570, - 2885918245, - 2323361608, - 2208429469, - 1218893888, - 2824695392, - 817620773, - 3061189442, - 929156957, - 2123907247, - 669473357, - 1790257927, - 1207062332, - 3024361152, - 652174046, - 76417401, - 1310445291, - 352503087, - 934222995, - 1621562874, - 3476300946, - 4122868070, - 3046150560, - 4073415876, - 1707347927, - 2800425317, - 2402774749, - 601634370, - 3498639461, - 2649634251, - 3487473796, - 55699024, - 162575137, - 2189462615, - 3472080627, - 3281238142, - 3270065881, - 4110089000, - 1690905601, - 502197524, - 1750228491, - 961423964, - 3128374279, - 1553464502, - 1829292678, - 1235862765, - 3103786199, - 1639206940, - 2997914869, - 3003377608, - 4142043898, - 1747646189, - 1130398955, - 1588783261, - 3034393415, - 845935005, - 1772557365, - 285117179, - 3599356502, - 951748811, - 167401816, - 2232533673, - 2617234967, - 1419932968, - 1167682149, - 975352234, - 2763495694, - 3197752271, - 595823830, - 1588578278, - 2386248794, - 909278656, - 2101377703, - 2230465015, - 2658465810, - 1856737400, - 1938906067, - 3208196807, - 4021819101, - 3059209277, - 3318207999, - 360746369, - 3917621249, - 3236100968, - 296789212, - 2249842992, - 3929462743, - 2575677595, - 549690622, - 2324183286, - 2053744245, - 300456244, - 4030910227, - 1531031245, - 1199942611, - 3368273307, - 3903749323, - 4019027122, - 3053922298, - 3313275547, - 2394355988, - 3651202722, - 1488615493, - 994226677, - 126516137, - 559229795, - 3475663475, - 3304525633, - 1192299247, - 2150786505, - 3670764778, - 907141519, - 4086631695, - 355798397, - 1152147355, - 1879318382, - 2972628956, - 2959490070, - 3844206001, - 3244219916, - 793806280, - 2722706154, - 1515673486, - 4051536979, - 3751106171, - 787433371, - 2843441917, - 3001752017, - 2498082244, - 2950098174, - 868210399, - 3008876275, - 3736120945, - 4129124291, - 3791295388, - 1225908363, - 2807908843, - 2322359598, - 4078221518, - 4205546087, - 1524741360, - 4181623484, - 1930648505, - 4221287427, - 3931404436, - 2667616968, - 3203700481, - 1300442593, - 3268750370, - 4181328070, - 2382233868, - 1208237089, - 992465275, - 1914341727, - 3941390017, - 633721323, - 1211212794, - 3124771829, - 935302196, - 2213884160, - 225187464, - 335369019, - 2291182901, - 1082819945, - 3797596848, - 785926550, - 3994512182, - 645756893, - 2536452534, - 2535773441, - 19422321, - 1534623224, - 1919597196, - 3647824768, - 3220254646, - 2092674692, - 2933366658, - 3232783539, - 1463788534, - 4129792376, - 1347917161, - 616337551, - 971517558, - 3751117533, - 3634717281, - 1015431336, - 322536052, - 916956036, - 10857027, - 3938098947, - 806269996, - 2697631853, - 4162389214, - 690999256, - 2029299267, - 2979638139, - 3141717545, - 2762710271, - 321539485, - 2307214637, - 3479818728, - 489385675, - 3520573746, - 4052845159, - 1242052269, - 1119832802, - 284811621, - 915100737, - 409154645, - 2339193143, - 1955213026, - 321649725, - 3473291310, - 2528076476, - 1598615301, - 2366233483, - 3437529135, - 1172475973, - 168593729, - 3768821186, - 1577379386, - 846618240, - 3914646939, - 3481908462, - 303923048, - 661610222, - 1146463624, - 947347698, - 573098625, - 783396285, - 310215094, - 1977049799, - 1995193438, - 1958422533, - 2826249109, - 2557291895, - 950748836, - 395966547, - 3860839880, - 80399321, - 3897710439, - 725605989, - 3336520762, - 2201987032, - 2028982905, - 4117998114, - 2029461649, - 475649525, - 2465581513, - 2090661836, - 3535920052, - 1440181137, - 2436642741, - 1094214706, - 298503352, - 3027964197, - 2912046756, - 3012909864, - 215072721, - 3343986871, - 4255017029, - 3031591993, - 1966271828, - 1637051752, - 2789186457, - 4034680347, - 2900190375, - 977762186, - 1492081198, - 1117859656, - 1755776345, - 1024800663, - 788188070, - 1792230521, - 3652473550, - 1189966356, - 2393621797, - 937195201, - 490467783, - 644462655, - 930506234, - 1181373083, - 474095790, - 124252498, - 1652553961, - 3191483107, - 2538473963, - 3954782148, - 429825199, - 3574446148, - 741675770, - 3983455075, - 103396045, - 640016805, - 1757341535, - 1270267817, - 2887377925, - 3374766268, - 3909627404, - 3818126462, - 4233499950, - 3202206687, - 2670375804, - 4279538782, - 1566167898, - 935143356, - 3717651129, - 1232649688, - 1541731651, - 3924509632, - 1811318227, - 2317138045, - 1224825071, - 2201280290, - 325909807, - 1326922573, - 3919590484, - 286162193, - 1907635231, - 3393818450, - 3955224282, - 190157807, - 2757057647, - 1922656534, - 1845878337, - 2179708154, - 1429679770, - 4088461255, - 3560749422, - 675620490, - 1553544279, - 2350633196, - 863210006, - 3281660437, - 1358542803, - 2872542705, - 1740564139, - 2468224981, - 4058529728, - 3659873364, - 2610994531, - 1542385777, - 2017845358, - 1791629514, - 3590586223, - 2870590524, - 1459774044, - 2721673246, - 501610151, - 1359461018, - 3927361662, - 2785222758, - 2317916056, - 567024951, - 427231191, - 2778345120, - 479080369, - 3172969703, - 2936135855, - 1193710701, - 2656276225, - 880168748, - 675137845, - 3189626372, - 3465066230, - 3590177660, - 366736035, - 1657775715, - 2630118471, - 3342133163, - 904886865, - 1689196749, - 2685802451, - 3208201786, - 1184802669, - 1609897659, - 1917577126, - 3683439795, - 2730568710, - 1837974509, - 3975279530, - 3531848452, - 3098263538, - 689132706, - 1810247082, - 3974088450, - 2161673793, - 3885678513, - 2464350154, - 4285239191, - 1640710546, - 42170851, - 2692693200, - 2943081751, - 2656421656, - 584224241, - 4276486238, - 1950338098, - 324817711, - 3346079751, - 690459118, - 679246037, - 1996679258, - 2967149760, - 766071505, - 1417014727, - 4099262330, - 1592833865, - 2330778508, - 2143195865, - 473762017, - 3134982340, - 1768296858, - 1945561439, - 3139216732, - 3386946131, - 3781908821, - 3993637444, - 2267412140, - 3543596333, - 3275512998, - 343385587, - 818740474, - 1236420752, - 4194217535, - 2340632699, - 3252608479, - 3880458840, - 933826954, - 93856003, - 352662718, - 1745782103, - 3859654510, - 2534560962, - 2542617968, - 3994687696, - 3084213167, - 3325797821, - 806264219, - 2787148881, - 1768489883, - 2393439046, - 4116519766, - 4222953566, - 1540051338, - 4194428858, - 1452915663, - 167773778, - 2082123233, - 2094812020, - 1887409909, - 1162655390, - 2825034560, - 1247808758, - 3158400712, - 3717520632, - 1879291050, - 2658015404, - 1518866134, - 2185728048, - 1487639175, - 3481767248, - 377910014, - 3734723027, - 3865880445, - 1735305658, - 3713504513, - 3132247514, - 2863292055, - 2180225743, - 3898417300, - 3045930447, - 2791861526, - 1045217052, - 674566151, - 888905680, - 651294073, - 3315988228, - 926625507, - 2908128598, - 177197779, - 1847612557, - 828559145, - 4239611977, - 4001973704, - 1847386160, - 1744489124, - 2922546055, - 909174414, - 44554434, - 188383855, - 974679972, - 4288576748, - 1064602186, - 2279863759, - 1218831334, - 623534196, - 219236083, - 63933782, - 3283800549, - 1234970049, - 2948584573, - 2415808733, - 3815162556, - 2839463375, - 2692935733, - 107001639, - 2680781328, - 2852086318, - 3509486863, - 2314756376, - 1647781629, - 625031852, - 101533661, - 2813360360, - 3362463028, - 3690168785, - 1543840477, - 3866615038, - 100977787, - 3224692541, - 3587716945, - 719158630, - 3213760234, - 2267688934, - 1441518838, - 3366693669, - 2548869666, - 531908748, - 2337564811, - 2824158723, - 3169848842, - 1227008332, - 2333581455, - 187965202, - 3366360161, - 2314970481, - 2576780768, - 2377332394, - 2814051660, - 2201444562, - 2002863793, - 1788827187, - 2277254017, - 612334030, - 1687580580, - 652292579, - 3495939639, - 115192845, - 850157650, - 2649115605, - 2678932407, - 3421560740, - 1476965463, - 3864108901, - 1782032630, - 3044795072, - 805504792, - 143825280, - 961777618, - 3635031549, - 1701285733, - 953286817, - 3233529251, - 1860747559, - 3756863377, - 4108876085, - 2208855334, - 4005207313, - 900400860, - 1915532138, - 1684465777, - 319113414, - 4040903323, - 3759509617, - 4203775089, - 1096838946, - 1348786508, - 2204513234, - 1005485709, - 1315093781, - 2278279183, - 1598385100, - 2127679690, - 1829010384, - 2131890044, - 2907075157, - 2890255569, - 3324859759, - 1855046239, - 118912092, - 948184862, - 3964956420, - 1478027186, - 2825110023, - 1389450110, - 1687228580, - 3289118538, - 2913305163, - 259944603, - 943409016, - 1655114960, - 315198934, - 769313190, - 2031831311, - 1936990921, - 2557307702, - 4049060769, - 1261705442, - 1690095542, - 3488156236, - 2325058438, - 4280618745, - 3787923316, - 4235475404, - 3422644011, - 1351439696, - 4010137166, - 1275314825, - 2756556397, - 1215878865, - 3564222680, - 2603036554, - 3389921199, - 2303801597, - 2539532970, - 1987127156, - 636962900, - 3451101783, - 3660371031, - 3933825293, - 811975579, - 3211258031, - 1758497400, - 631092889, - 1477942840, - 3780342636, - 1394468521, - 3884013575, - 2210783335, - 4284047654, - 2954793713, - 4057802430, - 3875411177, - 4173101083, - 2374868803, - 1138961050, - 4017496637, - 1748121183, - 324398887, - 3388413348, - 1421451938, - 2003520381, - 1938421530, - 502843124, - 4092269239, - 3124906482, - 1312677696, - 3963884729, - 3078964447, - 1415486080, - 1780460978, - 897543310, - 2531474031, - 3018614311, - 1082815208, - 4001984226, - 498150541, - 1620378540, - 1216275450, - 2346327432, - 1720984176, - 1603311912, - 3964902601, - 3490550605, - 3531834915, - 3789815369, - 2891277963, - 353012763, - 4210071225, - 3985612145, - 146549502, - 546083811, - 2665789951, - 4170752803, - 2789229246, - 2928540608, - 574353496, - 1213296472, - 3025553540, - 2897419852, - 3193639884, - 3807290715, - 2136142445, - 39898071, - 1043183091, - 96570739, - 313256240, - 2585059307, - 2949800163, - 529046774, - 2948064745, - 2703653319, - 14715738, - 3540100494, - 2652446874, - 3592494624, - 2325281458, - 3090026358, - 2942030534, - 3968648344, - 2503924286, - 2281103951, - 2660427215, - 1118473308, - 1509239743, - 2916996689, - 1498829336, - 2051980650, - 250189500, - 3665182847, - 2909572056, - 2294626799, - 2944239671, - 483810593, - 3703858315, - 2849742082, - 99441016, - 711375742, - 3240712598, - 865658184, - 3792964812, - 1140491868, - 1251010177, - 3972777526, - 149040753, - 3855208345, - 1713592847, - 3642530481, - 3295259653, - 136750657, - 1141650279, - 2553821246, - 2566573684, - 215217559, - 2521251338, - 2461194406, - 277826220, - 2998894768, - 3856313489, - 532725356, - 725275576, - 4121938655, - 2701056102, - 1739249689, - 4116099840, - 546955007, - 2671031117, - 3563388598, - 2077602378, - 354965497, - 3921478345, - 2200137986, - 2437363015, - 4233937353, - 561597003, - 2541518544, - 4282970946, - 932070842, - 2088114091, - 49855870, - 3540598667, - 715968716, - 1669139560, - 3450921870, - 2093995449, - 2528122527, - 356900920, - 3561549779, - 3860645517, - 4278347546, - 3783282227, - 2307265707, - 3473752392, - 1425883068, - 3219964004, - 1871354297, - 1006991116, - 2780202822, - 408451822, - 3518660676, - 2577965225, - 3776366684, - 2153658933, - 3064676948, - 1472411737, - 3381444470, - 3471573965, - 683224623, - 297910656, - 1948251983, - 1074723305, - 1042462198, - 2565100401, - 3959558175, - 3498781989, - 1245136278, - 1108074258, - 3567181355, - 1470821042, - 2517217283, - 3573560259, - 872355438, - 3641166826, - 4202604347, - 2863743155, - 1057862159, - 1168505979, - 2333146481, - 2470305939, - 3050274050, - 3706189012, - 1028326579, - 790821605, - 2353647910, - 3373651886, - 2717862286, - 3998954681, - 3724768117, - 2358682029, - 903774653, - 1086586914, - 2947052435, - 504148349, - 3005589428, - 130885927, - 2413604176, - 151980166, - 1646237598, - 2651453845, - 1702301255, - 3312733948, - 1419466000, - 2041837946, - 845829392, - 3184621221, - 236708413, - 1251305612, - 3440133196, - 2698248849, - 752241622, - 3906730995, - 3704663981, - 492234719, - 118829586, - 755123524, - 1226340719, - 360667370, - 3870699370, - 2670210093, - 3790151436, - 3398951130, - 3871562708, - 2885299864, - 1163048740, - 1581139373, - 2060136304, - 3845596774, - 721716464, - 2415917285, - 277894360, - 646770305, - 4241803781, - 2447148003, - 1830681955, - 1453659315, - 990668802, - 782328237, - 4050323278, - 893916928, - 2105619553, - 175326153, - 3554983436, - 3795672837, - 1732262111, - 4286295173, - 255546894, - 101929352, - 1541699912, - 3542672967, - 3031964460, - 143176522, - 906673350, - 1848847981, - 3701458351, - 1427035169, - 535233943, - 3249784825, - 525907029, - 1677057436, - 2778637652, - 689646306, - 3093619410, - 1818164057, - 3263377090, - 3879936799, - 3872931380, - 2002981405, - 2392535763, - 311442967, - 4061383355, - 2455913343, - 2779048380, - 2057044556, - 246641653, - 2044634612, - 2544006144, - 2072255224, - 1762484549, - 1138624066, - 2262591849, - 549047967, - 1952213166, - 698152302, - 1384636327, - 2500587810, - 1114201108, - 2982983695, - 95202967, - 3436368360, - 3575909170, - 1988847387, - 900944206, - 2255494299, - 3497488797, - 1619002053, - 325384725, - 3852263129, - 2344454977, - 3683328158, - 1827261482, - 593467843, - 2780478905, - 2216479461, - 3425383121, - 2641892713, - 3903857461, - 646603900, - 3776413773, - 3231496073, - 2942430253, - 65150708, - 881406575, - 2882663974, - 3535986466, - 3678450708, - 2875897637, - 1799977984, - 2411338889, - 3561758145, - 782528753, - 1730147935, - 2528914440, - 1031394643, - 2173121898, - 189974677, - 1998905787, - 280188602, - 777006633, - 1423232314, - 541680030, - 3128059334, - 3607239863, - 836602129, - 3476859569, - 3578125358, - 3285983526, - 3269548815, - 1279748133, - 2334574351, - 3583416038, - 3353380374, - 3242338712, - 2325055872, - 2213015758, - 1788639857, - 958443264, - 3288231515, - 3244677766, - 492970933, - 3256559073, - 2314347699, - 1219940993, - 1006715248, - 3227681237, - 219262279, - 1936802420, - 3218238327, - 627237382, - 1900767799, - 342345778, - 1705769943, - 909994719, - 619654408, - 2425216068, - 212600451, - 3241568358, - 1266085212, - 1162371253, - 4294386999, - 1956725719, - 618869866, - 2881089305, - 948530626, - 3125525668, - 2623958800, - 3568527850, - 1828490087, - 1980242457, - 575194314, - 938093406, - 1694864488, - 1287826537, - 3314079285, - 531223177, - 1052129742, - 2623869501, - 72624735, - 3328309869, - 3730915604, - 1279936399, - 2149352237, - 2003971505, - 3806533116, - 1986061339, - 2761213719, - 2370685428, - 1521139781, - 2415964715, - 3465699132, - 2432144346, - 3030156770, - 2410927907, - 3237540670, - 3947761694, - 3495355452, - 1285234356, - 1790600310, - 3476142310, - 3491190399, - 973333385, - 1518394637, - 1117018969, - 2468687092, - 1240195001, - 137882307, - 157102370, - 3716968878, - 2428714132, - 543934818, - 166077569, - 489052577, - 1279721120, - 2153200267, - 3461044741, - 63947007, - 1365096423, - 2552893457, - 794896936, - 2335377198, - 671099848, - 1145195262, - 687339917, - 1550491760, - 2712888142, - 3573805987, - 1447244349, - 1517794858, - 3389046906, - 859355436, - 1056295617, - 3890870695, - 3066687733, - 1093093685, - 1080163542, - 2437620862, - 2710775107, - 4157562242, - 1501189385, - 2130533310, - 548114685, - 2596641543, - 3541729911, - 2037170616, - 951924855, - 2767812243, - 4092501102, - 64679071, - 1501356211, - 1688581096, - 1283840175, - 2937652585, - 4266308184, - 936909608, - 2730859739, - 1413643927, - 2267196735, - 610630861, - 417635607, - 2676607048, - 261283976, - 3697882106, - 3345745776, - 343489525, - 3810344967, - 3646045539, - 620871032, - 3749083275, - 4078308233, - 2765664826, - 1399839325, - 3996169245, - 1834429330, - 3523079076, - 3295894660, - 2983009336, - 566180094, - 1053238172, - 1893428609, - 2890017161, - 3392869969, - 3105727028, - 550579610, - 1667665626, - 3233665697, - 3843433741, - 2103147303, - 2000835642, - 863932205, - 806294971, - 2223040494, - 4288347553, - 25114166, - 2154413666, - 3847716663, - 1067391063, - 4027778095, - 4056024100, - 1781823571, - 1010635671, - 1775748916, - 1567552418, - 236193158, - 1434184842, - 3062415137, - 3748555967, - 130495918, - 2939903737, - 1666752135, - 1066079473, - 1836450041, - 2195830766, - 3066331871, - 1897175848, - 2066200793, - 1973030902, - 294293942, - 98782476, - 4171791288, - 2208092380, - 2192004222, - 2531215288, - 1140349132, - 2776662488, - 1070173135, - 990721743, - 4183076799, - 2402194898, - 2760059247, - 658432559, - 3039901877, - 2830977616, - 1258192194, - 660194621, - 3722290197, - 1178933807, - 1459226644, - 3524102385, - 608197491, - 2178567582, - 3865121923, - 3803055127, - 3366268954, - 690378779, - 1164465237, - 3106017890, - 1047217222, - 3636325764, - 2378086629, - 1515916553, - 330457022, - 1094384971, - 2588259970, - 875067225, - 3482598832, - 496182656, - 286444983, - 2809317013, - 1777706198, - 4006769276, - 1079383453, - 2881585376, - 4178878456, - 878246549, - 1100855806, - 2110896445, - 2092027254, - 570896793, - 3913905077, - 49760882, - 2429561358, - 2268836641, - 3506046312, - 2859849789, - 893590837, - 3687412966, - 2406418824, - 2041532294, - 3316860356, - 2432632690, - 659382815, - 50227060, - 851367642, - 1108280398, - 3374139603, - 170587798, - 393365888, - 3046748957, - 1115479686, - 3925029882, - 978009075, - 2025902863, - 3918745573, - 2481300025, - 951836959, - 4044134583, - 4146137580, - 691481102, - 230022273, - 54751467, - 1895877792, - 261978311, - 2167645146, - 1570701103, - 3044599542, - 1065958391, - 3642959896, - 411777366, - 2225324140, - 2464820991, - 1315183199, - 1513631572, - 2353509971, - 1998383760, - 706743093, - 2348303877, - 1547200290, - 2968469338, - 4039179170, - 4191948899, - 1763233743, - 833029357, - 3841460041, - 2142617731, - 2521113966, - 159237756, - 544757874, - 1083580534, - 3964056939, - 1590767642, - 3978432310, - 3835200251, - 813428684, - 23505149, - 2758482039, - 3598792833, - 212206400, - 2530199368, - 3839157450, - 1048871428, - 742601913, - 4149697457, - 566913053, - 2102453554, - 4264989198, - 3861808126, - 1956969322, - 2389700883, - 1154472998, - 851631117, - 1538857433, - 1807411768, - 3042015944, - 3901545602, - 3589121080, - 1282964494, - 2857849724, - 2929889574, - 3020590266, - 3587195553, - 1326046040, - 1986820969, - 1134786778, - 385604928, - 4266813263, - 2751475720, - 4086822997, - 1877876572, - 223830137, - 4189367025, - 3916126104, - 3675859677, - 4094469636, - 423319294, - 285547696, - 2939210694, - 2961027438, - 2928063716, - 1304577777, - 707971290, - 3235182878, - 621361630, - 2156904139, - 3635704940, - 406006015, - 1053905679, - 1526470900, - 178754388, - 4022623628, - 4045068608, - 2973963397, - 2605716753, - 3617255123, - 4245369039, - 3381788432, - 4119953143, - 288636607, - 2919552068, - 2642572652, - 4171623330, - 2094329539, - 4155362544, - 3967558779, - 3848066047, - 2560015109, - 1817744073, - 3588670966, - 1777801410, - 1993928022, - 3456262014, - ]; - - static const List _envieddataprivateKeyFCM = [ - 589511021, - 1323998533, - 176850944, - 1551255156, - 397738773, - 911500162, - 2737091474, - 708979997, - 3994760758, - 3303700709, - 888569139, - 289778060, - 1768937611, - 1996145785, - 3840916743, - 1501832586, - 1936488063, - 2944326342, - 3871460792, - 2746191034, - 2366037663, - 3260886734, - 3296565714, - 349592002, - 1396175095, - 3080033997, - 2398883040, - 3949466473, - 3378685641, - 3195545630, - 365676036, - 197147087, - 2389375480, - 4146490055, - 1979426675, - 1476646487, - 3924163693, - 1238855844, - 1880485139, - 1818526239, - 3438893976, - 1419717613, - 3337932786, - 488209615, - 2538814835, - 1376649389, - 2966036136, - 2636818253, - 2473945788, - 1243743989, - 1333722304, - 1378848105, - 3401063737, - 1934211747, - 3201016291, - 1126062345, - 3227144982, - 2683131401, - 2661254427, - 2911453449, - 3789526830, - 2043164298, - 796844581, - 2093739274, - 3983503378, - 2906976323, - 322110433, - 1954594948, - 1011027017, - 2977775800, - 315889079, - 3101075807, - 3280515285, - 1720531821, - 2451434803, - 128374457, - 3550487633, - 3565976533, - 1210376435, - 57874698, - 3277710818, - 1234230112, - 3673887702, - 1284609792, - 1382134588, - 546595259, - 1333446416, - 1200201770, - 405234428, - 2873729703, - 4196873256, - 2469332686, - 31268618, - 2000566884, - 2863079542, - 1916394421, - 4061015755, - 1801841, - 1602869304, - 3872221708, - 2229661838, - 476638190, - 2885047426, - 3904841046, - 2398848389, - 3362927794, - 900826116, - 583893194, - 809803332, - 783205286, - 1232027095, - 642619817, - 291325673, - 2394595815, - 2083935040, - 441843619, - 3794227363, - 1202086974, - 1608534168, - 3007131929, - 338805743, - 1037358754, - 840481667, - 1477436863, - 3935784939, - 4034282324, - 1683212201, - 1082988654, - 863915951, - 402521142, - 2585215152, - 1184986847, - 2339888746, - 3248831765, - 1327189634, - 1824862031, - 2781708262, - 2514970689, - 744659021, - 1609629996, - 124253649, - 1802674923, - 836390117, - 817098764, - 525539703, - 2493519200, - 579659981, - 257006896, - 3821235563, - 3544658050, - 3349581083, - 1140776301, - 1732186477, - 2653732335, - 2511018242, - 772717904, - 3203167844, - 1918239996, - 2377626910, - 1895572652, - 2337741050, - 3165624971, - 3165169378, - 3916395310, - 1579432771, - 3273935512, - 831366372, - 1544919845, - 1357891515, - 2528107796, - 3984972442, - 1837805658, - 2655613966, - 278077232, - 3125585650, - 4242824043, - 2137097645, - 1362770071, - 3090519654, - 3542246293, - 2267914494, - 832654185, - 152735679, - 3007818922, - 1425167047, - 3714717895, - 1051882629, - 535736643, - 1094103409, - 3490517358, - 1957250708, - 4253453966, - 2178065005, - 1347056379, - 1325621696, - 3261978280, - 2296494729, - 1270875153, - 3085006720, - 2916172790, - 3332467033, - 3886507647, - 2154714101, - 2875062686, - 3077420231, - 3718741165, - 4069134394, - 2080712587, - 533646438, - 1494115299, - 2364174184, - 2727979007, - 3062137193, - 3726496722, - 3615246392, - 3086334514, - 2635806499, - 4070476088, - 4217497356, - 2785524495, - 1454301776, - 2242779094, - 839119699, - 1643111716, - 3384973805, - 1163654181, - 3118298103, - 543844405, - 4232234145, - 674505353, - 3698352841, - 2216806315, - 2486477489, - 3555566439, - 2011337377, - 1346436741, - 2947356604, - 3181592759, - 3965165060, - 1335350225, - 988042451, - 2124837557, - 1295962658, - 1522323171, - 1637981387, - 2686006757, - 713136288, - 3260483940, - 989480692, - 321644081, - 267440544, - 2369524169, - 2139322290, - 2935019344, - 486650077, - 231245845, - 2714229047, - 67591338, - 2380817191, - 2081839473, - 2313368699, - 1485151547, - 653563131, - 1082971547, - 2267410215, - 651519792, - 454536393, - 2315934847, - 2420623906, - 375642401, - 2182955644, - 296208522, - 564661255, - 3961785388, - 3678215162, - 3153379508, - 1971824111, - 1536441562, - 3573140330, - 3000952908, - 1455167847, - 3309756596, - 1001326117, - 4016740180, - 2189037310, - 467730799, - 1536025905, - 1186723218, - 4262779272, - 113642172, - 912801006, - 2242370382, - 4100901277, - 225415280, - 1907470633, - 2691952555, - 4097915339, - 4106718476, - 1248713056, - 2570330515, - 2861469709, - 681401047, - 631603120, - 1643272389, - 2126934258, - 1391106081, - 1235457234, - 3714312193, - 859041899, - 3523755014, - 2066936928, - 3916072629, - 3758707674, - 3263960285, - 2041189628, - 3159326909, - 983812159, - 2269627436, - 1436127317, - 4235964022, - 3039314585, - 3751559271, - 3727491962, - 225434914, - 380882437, - 685233186, - 12498349, - 3611229891, - 4171128571, - 336638769, - 1272706904, - 3677602280, - 1945754256, - 1219264709, - 1481610199, - 2894749646, - 198454810, - 3770857646, - 1422301959, - 2981610206, - 3113375441, - 401958174, - 3332112158, - 2276137903, - 3289232063, - 3012553456, - 1432418441, - 664622044, - 3560437675, - 819110716, - 3028090825, - 2770831003, - 2533512056, - 2421331807, - 1334424121, - 1823651137, - 1934026985, - 2730732450, - 102398553, - 2458389559, - 4229009881, - 3763461645, - 2432594459, - 2742929546, - 2051723138, - 1577603373, - 1700089585, - 1122718152, - 3670881915, - 1248983693, - 175063283, - 472181558, - 2768438117, - 3091408436, - 4165497635, - 3255851906, - 3174318984, - 2654976196, - 4018660877, - 3310175843, - 543450914, - 61597, - 257875979, - 64319987, - 656565801, - 1323114376, - 3120030701, - 904098333, - 243360474, - 471841287, - 2070742773, - 2189327980, - 1310594480, - 1338071606, - 589521130, - 1363383112, - 2498152177, - 2681609237, - 3085567233, - 4067132403, - 3152526501, - 3888080089, - 4074825989, - 3516587050, - 1761961512, - 1922096643, - 4128048860, - 1635192008, - 2808163611, - 3059860724, - 3441731162, - 2780145646, - 3724070678, - 239301545, - 1656332024, - 3787767824, - 3091037163, - 2939423254, - 4188959608, - 3076095541, - 2776994862, - 3808274230, - 4271663914, - 2228685325, - 3023382671, - 87128763, - 3971101131, - 2951387970, - 815524267, - 1112949696, - 3425555670, - 1772873325, - 267122151, - 3502384421, - 2295263439, - 472908699, - 2632354634, - 2019041042, - 527372071, - 798709814, - 4013916379, - 3759694750, - 1440103698, - 51657650, - 2987526369, - 840305193, - 3043172408, - 1687940550, - 3643447855, - 2973901600, - 2191179750, - 2260332339, - 491961248, - 3634009016, - 31113642, - 834679650, - 1301301186, - 3274761765, - 3751016373, - 3214831236, - 3082788829, - 362317, - 529352072, - 3492444159, - 1280565919, - 2242683587, - 2888564375, - 1803244054, - 3435927122, - 1640753200, - 1898537143, - 3228053792, - 1954206180, - 1540456922, - 248273326, - 1325644769, - 695538563, - 4090026332, - 2274294359, - 2768151406, - 3042025570, - 4269179024, - 3806211395, - 889507895, - 3370546595, - 4096188980, - 2354537103, - 3441793032, - 3203113872, - 3457565482, - 1002278887, - 4152750885, - 3294354159, - 1041991301, - 94798948, - 25722773, - 1546525185, - 2686561678, - 2192563886, - 2621775542, - 2373996494, - 1905310005, - 2214703992, - 2399149418, - 1342545721, - 1185127416, - 288978031, - 1832198805, - 2281434414, - 2737976835, - 614579549, - 3174170761, - 2662962647, - 4163972526, - 3612044194, - 922880540, - 450642274, - 2423406646, - 4156757808, - 2294690311, - 1036538825, - 2666284094, - 240963234, - 606309111, - 683429215, - 1508006303, - 3660632054, - 200640312, - 1582774682, - 1816197312, - 1418551302, - 3544639091, - 387253256, - 2296414363, - 3164444448, - 3335301321, - 1347845807, - 103975574, - 353339429, - 2139146977, - 1254057391, - 540580888, - 221842618, - 1699742748, - 3085492567, - 3117593426, - 3076459179, - 66368322, - 1667989980, - 3042891261, - 3374433591, - 1577595923, - 1518774768, - 3758243785, - 2716120023, - 1471476742, - 2784493723, - 3719462986, - 4237860952, - 243005367, - 803541418, - 1622842370, - 4017105120, - 3282758325, - 2180699619, - 2447225519, - 1628975859, - 3236748404, - 2439493161, - 961318670, - 953497946, - 906897864, - 355062589, - 2843738175, - 4180013947, - 3007690663, - 3038340073, - 2033038577, - 1354994798, - 2425515943, - 736106314, - 3089270813, - 3528514596, - 2663787100, - 1419188080, - 1691116978, - 138082133, - 3459389459, - 2444776335, - 4187210535, - 3615446377, - 2843925455, - 3424484450, - 655655837, - 594221093, - 3515424348, - 3758056384, - 3281136615, - 3930205866, - 4187796405, - 3295721757, - 2206647035, - 104100576, - 652243690, - 3134733434, - 4076881814, - 2771590059, - 3162413904, - 176138632, - 3281037289, - 2300762377, - 1095451656, - 3748256378, - 1541232577, - 1383396856, - 1647384226, - 1602072175, - 77393344, - 2691558165, - 2027445595, - 4104901499, - 1864704841, - 1325350336, - 520716817, - 144290621, - 1087055205, - 666343841, - 494251383, - 2801070313, - 1956499105, - 3474664653, - 3738017648, - 537394283, - 708484642, - 2621188381, - 2437415036, - 2749040333, - 3705659569, - 1564587561, - 2544884804, - 2361480034, - 2642898509, - 4006956771, - 903272288, - 3181367029, - 2268617501, - 3037337480, - 3122746905, - 266276946, - 834872068, - 1653746514, - 3048207608, - 3102639606, - 2110664874, - 557715581, - 2562643382, - 3469866651, - 671343802, - 624738689, - 892301740, - 246335000, - 1480140806, - 31509504, - 3816545152, - 1013980530, - 4007882666, - 822580533, - 2981532086, - 2079640994, - 2375536320, - 2817643049, - 1415256385, - 3287243797, - 504639808, - 2206656865, - 1937728432, - 3918637485, - 3680797014, - 533621293, - 2974466848, - 255732403, - 2156060446, - 3593850467, - 1454027129, - 3427804033, - 2557443383, - 165245847, - 2154672243, - 2211909535, - 3703679539, - 1308185312, - 54229506, - 2229468426, - 2652730717, - 3367287491, - 1928368797, - 1238395048, - 2584334892, - 618288764, - 636082787, - 2419544627, - 2366144843, - 782231435, - 3247133989, - 2247378208, - 3189371460, - 752767138, - 332518134, - 2943207979, - 4047399075, - 270684729, - 4202558060, - 2956905815, - 2093921246, - 2722155366, - 1537413762, - 3696294495, - 3907259046, - 394476912, - 873554057, - 85687184, - 1054481907, - 3952738836, - 2454856910, - 1006918661, - 87263609, - 2523338389, - 787794510, - 1702085297, - 568556463, - 3301349268, - 928651772, - 606880734, - 4021341343, - 1143778751, - 1320053429, - 4199542875, - 3545237017, - 2431061285, - 3425269713, - 2107121238, - 480279109, - 1816750149, - 3608397395, - 3151874455, - 500471926, - 1080424681, - 1520818916, - 1520313316, - 3384770575, - 3387423008, - 3145859113, - 1830541752, - 591142954, - 3733972651, - 3475112720, - 1878822334, - 1272266776, - 2083179041, - 1638395084, - 2268927369, - 3240721451, - 1632193605, - 2128929382, - 308186190, - 4128090489, - 3003138348, - 990485170, - 1717726151, - 2797816321, - 2736389011, - 1252272232, - 3344205569, - 1622328414, - 3345479644, - 1626316708, - 726543301, - 2358436653, - 1216513474, - 430748658, - 2798104731, - 1061340297, - 3348277411, - 797978485, - 4082635383, - 2990078472, - 3780148288, - 3553076111, - 414250048, - 910908850, - 1635019177, - 3696436719, - 3072215358, - 3788207733, - 34479427, - 2565147779, - 2915857220, - 446470224, - 2353291652, - 1813137747, - 1595111058, - 4000215542, - 1134859806, - 1683803119, - 4110852400, - 271243001, - 909618629, - 2933619866, - 3692509488, - 2320463307, - 2710465678, - 2550792798, - 2137955498, - 3701881109, - 1236155080, - 3348182210, - 2152631701, - 3614017305, - 2617865714, - 4198234152, - 1915006139, - 766360150, - 1058299328, - 2570978379, - 1891757986, - 883393909, - 82620100, - 2426741839, - 555375630, - 3985271963, - 476519983, - 303632534, - 3009747491, - 2335133612, - 2327712136, - 1211089437, - 2727413644, - 2184930071, - 3930414454, - 1782868076, - 3914815306, - 2284867217, - 1384188755, - 3515331436, - 2027404096, - 1812693477, - 1223274063, - 2327946367, - 770080248, - 1906775430, - 1537275848, - 647704038, - 458542751, - 1028382800, - 3202191868, - 2823123937, - 1556402431, - 195014694, - 1042565094, - 404659243, - 1468535185, - 1108977963, - 1552975859, - 2113646624, - 2648600974, - 488251315, - 3743207925, - 1957437764, - 1395522087, - 27668692, - 3543192552, - 63006419, - 905449341, - 2606519531, - 164744956, - 816312964, - 3152212033, - 3483956634, - 1822833331, - 754633624, - 4049306408, - 3202903943, - 2540150334, - 3992710460, - 2638528421, - 975313524, - 16947471, - 1268649706, - 1055173283, - 3602482023, - 4287981646, - 4118198865, - 3554520647, - 935392366, - 2875878176, - 657692488, - 2903299092, - 1817422432, - 3369070489, - 1396415130, - 731757948, - 54412660, - 3375043099, - 1849341708, - 2561328851, - 348804963, - 2103970910, - 1745474795, - 1906712224, - 2991800096, - 837022351, - 1865515554, - 1168787773, - 408360113, - 226761942, - 2161703326, - 1061327103, - 2096860083, - 3495365595, - 212250423, - 2663090109, - 3937837686, - 2896517036, - 1690045637, - 3425004764, - 2761272770, - 2057762529, - 618728173, - 3273145854, - 3273491318, - 1798433600, - 2028323888, - 2271624546, - 3626585580, - 3762225574, - 432567406, - 4182989392, - 826508419, - 729003204, - 2292931046, - 1849067150, - 3201521770, - 2354543097, - 1903699232, - 458172916, - 3099872933, - 2973215630, - 2627299703, - 392481646, - 1876678552, - 2415089265, - 2589311932, - 734369410, - 1380882128, - 3035902842, - 4193755797, - 992024996, - 3704321293, - 1224456651, - 440068757, - 257894104, - 22313017, - 3736996199, - 546298585, - 2360876775, - 172411687, - 1786101124, - 2989603763, - 3740056177, - 89058971, - 505890410, - 2924254298, - 1826934093, - 915435811, - 641497236, - 1265259648, - 393231891, - 2783755963, - 2237689247, - 2001000092, - 3213768991, - 2894008959, - 2260329280, - 3719902132, - 2831692952, - 2980887688, - 1782904415, - 4145331856, - 3089843652, - 1225841660, - 4227074676, - 378492093, - 476482549, - 879016153, - 2497518496, - 6404365, - 1019570581, - 1190642514, - 358782522, - 618068267, - 1566307699, - 1538176970, - 2178025632, - 637989933, - 2667374448, - 1700155485, - 808835010, - 1056226647, - 3875640269, - 873208055, - 2280700188, - 3076687813, - 3400679451, - 4109796272, - 1545115214, - 2307281492, - 988798248, - 2750892552, - 1917884427, - 1805578336, - 544845826, - 2944863140, - 3380787813, - 1308614291, - 1701183493, - 382967336, - 1140220604, - 1261313790, - 393033050, - 769916894, - 2465240524, - 3118951942, - 2205202431, - 1626534358, - 2806957018, - 3393689884, - 2749513494, - 2002676960, - 658316918, - 596096047, - 1771370098, - 1420644789, - 4225507842, - 661016480, - 1198045657, - 3217781841, - 1590172258, - 885844577, - 1072021867, - 2518039901, - 1198077008, - 4194650827, - 3310277429, - 3574099062, - 147391941, - 2820364841, - 3495521286, - 1622035542, - 401037349, - 4144282605, - 685867238, - 147788405, - 2734293625, - 850588447, - 4005210426, - 304766142, - 3686918022, - 4082689317, - 747073373, - 1953493860, - 1713032650, - 468891157, - 1663992882, - 887527154, - 3349320948, - 2342884116, - 1587950911, - 3614373030, - 84091047, - 784321965, - 2594506046, - 3182543212, - 3421309957, - 2738756557, - 1447031048, - 3536363713, - 3174094508, - 1714453582, - 1912525619, - 3019905551, - 2355159532, - 3659541328, - 3315775311, - 3069239114, - 563546251, - 2715278467, - 3329837241, - 2774232174, - 581296154, - 3169247610, - 3875748516, - 2574388278, - 942422957, - 2538027448, - 1800723306, - 2866248272, - 683679712, - 2763073719, - 1103680833, - 3299181586, - 31894282, - 87525764, - 2458599373, - 930491915, - 736917205, - 3857363239, - 1152962624, - 617771256, - 1941492719, - 609395769, - 2856461282, - 3521812880, - 2773618205, - 3152890058, - 1351714055, - 149246063, - 181523795, - 715600616, - 3538019154, - 2897169444, - 1509154342, - 1162829935, - 1837399183, - 351742853, - 2845669335, - 2233785159, - 4130375868, - 4233378538, - 3430129097, - 3970192760, - 2910176080, - 1313300806, - 1493455079, - 3604393441, - 3664326451, - 3579537540, - 3019714235, - 1313832700, - 3462380210, - 1570783218, - 3052532884, - 500712413, - 551674650, - 1691198735, - 1007646179, - 2061855916, - 3918896794, - 2349532161, - 2704669603, - 2462700186, - 1463755136, - 2644950944, - 1049047296, - 1362356843, - 2334717959, - 3419349492, - 2966090792, - 112078300, - 1865737225, - 875865100, - 2211084054, - 1086193288, - 2659437100, - 910056161, - 3237044666, - 1430855221, - 1007485006, - 1499130541, - 3996654739, - 3753211182, - 2728300079, - 1319358032, - 3605326372, - 2026829524, - 4005681368, - 2514350068, - 3618720898, - 2217961966, - 2643886175, - 1109165822, - 1357361807, - 3585870928, - 3975058220, - 1572488756, - 3676822960, - 3470094128, - 2872546269, - 3920835391, - 3992675725, - 1156174012, - 3140381154, - 2608121012, - 3058624235, - 2934998111, - 1759197043, - 4067500834, - 1991472513, - 3216619759, - 4098769618, - 588951783, - 3245777694, - 328730257, - 4126839765, - 1792154760, - 2422719423, - 2367088070, - 1310551770, - 1128033779, - 2150996295, - 1581828869, - 645831852, - 813503394, - 3782478561, - 3649932969, - 565493080, - 1237118028, - 1406104357, - 3520255186, - 2338045581, - 3916991021, - 4119017920, - 2958534108, - 3954739100, - 3054230140, - 2089357123, - 2722855603, - 2156538824, - 3623929086, - 328004918, - 1829807061, - 3680050322, - 3349856703, - 204276086, - 1314306542, - 3453817592, - 1440201948, - 2581060547, - 774227190, - 203891241, - 2032607103, - 1417439986, - 96835946, - 3079590951, - 41398420, - 2370311702, - 1552067677, - 4238548531, - 2918547770, - 391361200, - 3128388875, - 917817893, - 3109899745, - 1193398054, - 3994520415, - 3302673848, - 3782873261, - 345550561, - 682307242, - 2438073407, - 2182612056, - 136911532, - 3024578854, - 1464426848, - 1239236135, - 406241763, - 1535531509, - 2249614806, - 3967341569, - 3885490130, - 833285367, - 104357502, - 2328553903, - 82630257, - 3082197229, - 2629109740, - 4085385036, - 1995605278, - 1739322391, - 1857299299, - 1894106072, - 3916707916, - 3993176126, - 4217211652, - 439008971, - 600329528, - 818825852, - 1530207904, - 2238991740, - 960664711, - 3238916538, - 1055058397, - 1940929437, - 1547247540, - 262617913, - 3600373387, - 416132081, - 993368795, - 2220762439, - 2852293786, - 1401214920, - 3029911087, - 1135574842, - 788507702, - 4164163945, - 929053688, - 3881226185, - 1607866896, - 1395847549, - 3583865249, - 1312324669, - 3904671564, - 2853328718, - 1662356226, - 3423291444, - 3668912389, - 703598463, - 2734575683, - 904651871, - 1980080905, - 2814690610, - 1678408405, - 3044565008, - 22124189, - 3835552704, - 1106202965, - 589445101, - 2002996239, - 4035213713, - 2754553904, - 196817550, - 3486306698, - 2267106779, - 1709356007, - 560969382, - 1517733414, - 3855497207, - 2801556254, - 2806825775, - 2967296878, - 473298742, - 1395090992, - 622672763, - 753358494, - 4219187545, - 948513988, - 2514732417, - 2988203274, - 860398967, - 2353708655, - 3661475823, - 4230893622, - 161043833, - 2756794346, - 1450971003, - 420462705, - 881773210, - 56514799, - 1907948821, - 1673406566, - 4171299656, - 2132255890, - 3809708773, - 3431489334, - 919982764, - 709011637, - 1081067144, - 4201636673, - 122268932, - 1258523215, - 181516774, - 1775120463, - 4238218376, - 3558361903, - 3658796334, - 4184496871, - 3478503788, - 4235749210, - 717242310, - 3766020210, - 2600264541, - 4174475064, - 316626571, - 1240878766, - 3078415763, - 572831427, - 2927378299, - 1244736343, - 1975048380, - 314206211, - 1914441280, - 1028117158, - 3574470752, - 2449819529, - 1631424137, - 4224123471, - 1387213841, - 3791010883, - 304120381, - 262280642, - 625045499, - 3195066877, - 2057834069, - 1703506748, - 1976092685, - 979500357, - 512192933, - 3063384635, - 2963708440, - 547587969, - 3049596009, - 3725319945, - 3916537634, - 3889954964, - 1506842910, - 2641879753, - 225436613, - 2535851201, - 3245888367, - 1994911756, - 1796904190, - 962458031, - 1438229788, - 1347717838, - 183138108, - 3661538180, - 3506250166, - 2093502646, - 48216024, - 2293601053, - 3771797682, - 4270309578, - 652000076, - 3884933307, - 4280498659, - 3771682787, - 2572898805, - 2071886124, - 1949013280, - 643211551, - 1021077592, - 1116964514, - 3507381328, - 1055668821, - 1504005487, - 2274252298, - 1231648713, - 2829518225, - 2220376759, - 69824273, - 772847486, - 3740221278, - 3624723231, - 2962455366, - 131199960, - 3495559045, - 1226338056, - 3441459472, - 2708809423, - 3231900019, - 2278904939, - 588773953, - 874836790, - 1905354647, - 786284177, - 166884206, - 1252924121, - 1663292119, - 2963163930, - 1806980674, - 3316352254, - 1806328857, - 2467852125, - 3859711815, - 3080417844, - 3981112270, - 4193085606, - 4165431855, - 2813861605, - 1945379825, - 3407760626, - 3778036088, - 2492778894, - 2517891800, - 1323110225, - 3093972215, - 4217083836, - 2614216315, - 1141562244, - 2557122595, - 2014813690, - 303833857, - 1783656149, - 3159216793, - 1388168830, - 392633743, - 2627901522, - 558935453, - 3140407526, - 2597831830, - 3616663098, - 1339844249, - 2035526637, - 4016101509, - 2110605720, - 871445591, - 2526693002, - 742264831, - 1742440537, - 1836544162, - 807275552, - 3538472593, - 2663262015, - 1982268038, - 2930866274, - 303755336, - 1018210314, - 2587693638, - 739580846, - 2419846796, - 913923256, - 3230906115, - 157123207, - 2552733473, - 1168370740, - 3201727194, - 284650410, - 3742141516, - 530697113, - 2663944448, - 1700576398, - 1772649435, - 3291728859, - 966261559, - 2605032749, - 1902267786, - 658607637, - 421242040, - 23072585, - 3770528866, - 689666758, - 1561495496, - 3942664550, - 1767495249, - 1218870838, - 2866584842, - 2949439983, - 2072458580, - 2796927018, - 4065369052, - 4209619806, - 2849755075, - 733612486, - 595027719, - 2220774556, - 1932330255, - 3556230309, - 1678901275, - 1779213611, - 2071682978, - 1326913083, - 3699383932, - 2812018961, - 3374222958, - 1872559340, - 857768651, - 2681244696, - 3026287593, - 3505509166, - 3259193298, - 3201374892, - 972066345, - 2536605355, - 1625987969, - 4100621431, - 3830470521, - 20566839, - 2367134960, - 1517490776, - 2764556364, - 2908501280, - 3793534383, - 3282361289, - 449374129, - 1517642069, - 654707439, - 1814856019, - 3000001002, - 3267184049, - 2877080571, - 387333607, - 2346755201, - 3951363052, - 2252743257, - 3655559732, - 2047592359, - 3666868369, - 596515402, - 1898850121, - 2619271467, - 432925026, - 406316163, - 3523450161, - 2631707070, - 3104941722, - 1697027137, - 841759634, - 2366283604, - 3320135934, - 1264429250, - 2298543548, - 2811005340, - 3763306073, - 1665312693, - 1219354550, - 3412895254, - 3343735839, - 3182259518, - 2245868543, - 651097309, - 3410529071, - 653153357, - 3187176992, - 805257832, - 3391701115, - 2173991486, - 2764816269, - 3738297017, - 3338249964, - 605174538, - 3447153344, - 2268552565, - 264710186, - 4291187548, - 1248823025, - 1207711869, - 3143689730, - 2120173100, - 1258024332, - 1675669201, - 3944266040, - 3770500099, - 519345252, - 4055969226, - 834847898, - 1523345228, - 2281508394, - 4279945662, - 2256251668, - 2723118956, - 949172590, - 3556653463, - 2204978561, - 2207845295, - 3133121664, - 2938649283, - 1054902587, - 3917906278, - 147812371, - 1590837543, - 1046907165, - 3127957031, - 306554467, - 109358899, - 1957906783, - 10768849, - 2123982796, - 2967261121, - 1591729302, - 1336828618, - 506775007, - 1047427085, - 1037772681, - 3619622490, - 155857956, - 952278217, - 3278643474, - 3225668978, - 3319584714, - 3252897202, - 2181583955, - 1289827774, - 28957422, - 4273878913, - 89664473, - 2492447513, - 398829732, - 494949428, - 2277738289, - 2554005632, - 1519166875, - 2957097365, - 1954972444, - 487387260, - 1232404870, - 1650316441, - 4110337488, - 845353194, - 785405525, - 1646209547, - 15877662, - 3448987418, - 734462417, - 2195390906, - 919642007, - 2955779647, - 702970377, - 3697074110, - 50426330, - 898227933, - 1755036740, - 1910263093, - 2013661220, - 3127844542, - 1853025504, - 2110523861, - 1231234170, - 3892427597, - 1935442374, - 3022751536, - 1985092545, - 2158135762, - 106593194, - 1360514722, - 298362803, - 2058814277, - 1523861475, - 520755291, - 685291089, - 3102826024, - 3549157206, - 3786619967, - 1826280654, - 3631202374, - 3303616139, - 684121986, - 2286439324, - 2125936390, - 2615781384, - 2418283124, - 2738037409, - 1877719337, - 987776868, - 360257678, - 2337725470, - 446615615, - 466757881, - 2541832958, - 2615550401, - 2654609760, - 1361101307, - 3071843137, - 3909891116, - 190222741, - 639699776, - 1024499460, - 2556418018, - 373717895, - 285013495, - 1212167752, - 955227312, - 1299200831, - 113072711, - 567001801, - 945836135, - 3766327401, - 3845800377, - 650637605, - 1006321034, - 540715055, - 1172818786, - 3094499619, - 2871696769, - 2229381635, - 1797948635, - 1568646842, - 1879237412, - 1901737541, - 1178465489, - 2441781555, - 1955727787, - 1602886313, - 830096818, - 4287316874, - 4117789355, - 1764761146, - 1510703180, - 888373825, - 664414317, - 736079442, - 2609555418, - 2973266640, - 2885918303, - 2323361545, - 2208429559, - 1218893938, - 2824695301, - 817620746, - 3061189495, - 929156923, - 2123907274, - 669473301, - 1790258024, - 1207062345, - 3024361136, - 652174054, - 76417327, - 1310445252, - 352503143, - 934223015, - 1621562783, - 3476301046, - 4122868015, - 3046150611, - 4073415821, - 1707347856, - 2800425216, - 2402774676, - 601634344, - 3498639405, - 2649634181, - 3487473905, - 55698949, - 162575114, - 2189462584, - 3472080519, - 3281238068, - 3270065889, - 4110089060, - 1690905680, - 502197549, - 1750228558, - 961423922, - 3128374346, - 1553464560, - 1829292737, - 1235862668, - 3103786125, - 1639207034, - 2997914782, - 3003377569, - 4142043800, - 1747646082, - 1130398883, - 1588783274, - 3034393377, - 845935096, - 1772557426, - 285117130, - 3599356417, - 951748836, - 167401782, - 2232533649, - 2617235044, - 1419933042, - 1167682084, - 975352262, - 2763495803, - 3197752252, - 595823803, - 1588578193, - 2386248761, - 909278640, - 2101377730, - 2230464958, - 2658465857, - 1856737334, - 1938906033, - 3208196788, - 4021819062, - 3059209342, - 3318207890, - 360746448, - 3917621322, - 3236100903, - 296789224, - 2249842948, - 3929462712, - 2575677650, - 549690566, - 2324183217, - 2053744197, - 300456291, - 4030910276, - 1531031183, - 1199942563, - 3368273367, - 3903749253, - 4019027165, - 3053922254, - 3313275572, - 2394356001, - 3651202796, - 1488615435, - 994226628, - 126516223, - 559229783, - 3475663403, - 3304525620, - 1192299199, - 2150786446, - 3670764732, - 907141600, - 4086631750, - 355798293, - 1152147427, - 1879318335, - 2972628879, - 2959490137, - 3844206035, - 3244219968, - 793806220, - 2722706088, - 1515673542, - 4051536956, - 3751106089, - 787433455, - 2843441801, - 3001751996, - 2498082185, - 2950098096, - 868210327, - 3008876163, - 3736120898, - 4129124263, - 3791295435, - 1225908477, - 2807908800, - 2322359676, - 4078221559, - 4205546036, - 1524741309, - 4181623492, - 1930648566, - 4221287542, - 3931404519, - 2667616959, - 3203700569, - 1300442555, - 3268750459, - 4181328053, - 2382233920, - 1208237172, - 992465201, - 1914341659, - 3941390068, - 633721245, - 1211212726, - 3124771761, - 935302151, - 2213884265, - 225187505, - 335369057, - 2291182927, - 1082819883, - 3797596869, - 785926618, - 3994512196, - 645756831, - 2536452562, - 2535773544, - 19422266, - 1534623135, - 1919597258, - 3647824875, - 3220254593, - 2092674806, - 2933366740, - 3232783605, - 1463788416, - 4129792300, - 1347917083, - 616337653, - 971517511, - 3751117470, - 3634717224, - 1015431361, - 322535990, - 916956096, - 10856968, - 3938099046, - 806270058, - 2697631769, - 4162389160, - 690999189, - 2029299242, - 2979638078, - 3141717583, - 2762710202, - 321539561, - 2307214718, - 3479818683, - 489385626, - 3520573785, - 4052845102, - 1242052248, - 1119832716, - 284811531, - 915100713, - 409154660, - 2339193171, - 1955212970, - 321649774, - 3473291350, - 2528076526, - 1598615383, - 2366233545, - 3437529181, - 1172475944, - 168593670, - 3768821155, - 1577379349, - 846618325, - 3914646998, - 3481908395, - 303923015, - 661610122, - 1146463691, - 947347606, - 573098707, - 783396346, - 310215130, - 1977049777, - 1995193354, - 1958422623, - 2826249184, - 2557291839, - 950748899, - 395966525, - 3860839865, - 80399346, - 3897710391, - 725605890, - 3336520816, - 2201986974, - 2028982805, - 4117998154, - 2029461714, - 475649478, - 2465581478, - 2090661781, - 3535920120, - 1440181203, - 2436642781, - 1094214781, - 298503410, - 3027964230, - 2912046803, - 3012909854, - 215072740, - 3343986902, - 4255017014, - 3031592049, - 1966271775, - 1637051653, - 2789186464, - 4034680367, - 2900190419, - 977762285, - 1492081250, - 1117859629, - 1755776286, - 1024800754, - 788188145, - 1792230435, - 3652473591, - 1189966401, - 2393621852, - 937195189, - 490467714, - 644462681, - 930506127, - 1181373165, - 474095835, - 124252446, - 1652553947, - 3191483012, - 2538473890, - 3954782085, - 429825274, - 3574446097, - 741675659, - 3983454991, - 103396093, - 640016854, - 1757341459, - 1270267843, - 2887378018, - 3374766290, - 3909627483, - 3818126396, - 4233499969, - 3202206629, - 2670375748, - 4279538794, - 1566167810, - 935143423, - 3717651154, - 1232649622, - 1541731605, - 3924509581, - 1811318147, - 2317137999, - 1224824969, - 2201280352, - 325909791, - 1326922510, - 3919590461, - 286162215, - 1907635281, - 3393818387, - 3955224248, - 190157757, - 2757057545, - 1922656595, - 1845878384, - 2179708032, - 1429679824, - 4088461231, - 3560749398, - 675620570, - 1553544193, - 2350633124, - 863210099, - 3281660527, - 1358542741, - 2872542599, - 1740564189, - 2468224912, - 4058529679, - 3659873336, - 2610994523, - 1542385722, - 2017845272, - 1791629468, - 3590586116, - 2870590576, - 1459773997, - 2721673304, - 501610195, - 1359461088, - 3927361580, - 2785222679, - 2317916159, - 567024995, - 427231137, - 2778345163, - 479080445, - 3172969649, - 2936135808, - 1193710606, - 2656276331, - 880168811, - 675137805, - 3189626470, - 3465066112, - 3590177590, - 366736080, - 1657775671, - 2630118438, - 3342133219, - 904886842, - 1689196705, - 2685802422, - 3208201808, - 1184802612, - 1609897610, - 1917577106, - 3683439834, - 2730568816, - 1837974470, - 3975279578, - 3531848515, - 3098263490, - 689132741, - 1810247155, - 3974088536, - 2161673845, - 3885678582, - 2464350113, - 4285239294, - 1640710643, - 42170838, - 2692693178, - 2943081825, - 2656421707, - 584224139, - 4276486169, - 1950338131, - 324817692, - 3346079822, - 690459060, - 679245968, - 1996679211, - 2967149736, - 766071454, - 1417014656, - 4099262287, - 1592833825, - 2330778580, - 2143195828, - 473761956, - 3134982278, - 1768296918, - 1945561404, - 3139216670, - 3386946096, - 3781908787, - 3993637428, - 2267412123, - 3543596396, - 3275513046, - 343385506, - 818740431, - 1236420821, - 4194217541, - 2340632596, - 3252608431, - 3880458796, - 933826995, - 93856070, - 352662772, - 1745782017, - 3859654403, - 2534561014, - 2542617947, - 3994687675, - 3084213245, - 3325797866, - 806264238, - 2787148863, - 1768489932, - 2393438980, - 4116519776, - 4222953479, - 1540051418, - 4194428883, - 1452915646, - 167773744, - 2082123163, - 2094811922, - 1887409807, - 1162655398, - 2825034497, - 1247808660, - 3158400767, - 3717520599, - 1879291103, - 2658015482, - 1518866144, - 2185728119, - 1487639246, - 3481767175, - 377909933, - 3734722969, - 3865880338, - 1735305725, - 3713504566, - 3132247484, - 2863292071, - 2180225700, - 3898417347, - 3045930494, - 2791861629, - 1045217145, - 674566226, - 888905636, - 651294005, - 3315988285, - 926625456, - 2908128517, - 177197793, - 1847612643, - 828559131, - 4239611910, - 4001973680, - 1847386231, - 1744489111, - 2922546132, - 909174462, - 44554394, - 188383800, - 974680046, - 4288576670, - 1064602131, - 2279863712, - 1218831272, - 623534157, - 219235974, - 63933746, - 3283800499, - 1234970039, - 2948584468, - 2415808667, - 3815162584, - 2839463331, - 2692935680, - 107001696, - 2680781409, - 2852086378, - 3509486974, - 2314756428, - 1647781531, - 625031887, - 101533673, - 2813360263, - 3362463056, - 3690168712, - 1543840484, - 3866614920, - 100977743, - 3224692571, - 3587716917, - 719158576, - 3213760217, - 2267688836, - 1441518779, - 3366693698, - 2548869751, - 531908796, - 2337564859, - 2824158778, - 3169848921, - 1227008373, - 2333581558, - 187965220, - 3366360069, - 2314970431, - 2576780722, - 2377332418, - 2814051621, - 2201444577, - 2002863843, - 1788827238, - 2277254101, - 612333999, - 1687580650, - 652292522, - 3495939668, - 115192919, - 850157594, - 2649115540, - 2678932449, - 3421560774, - 1476965394, - 3864108841, - 1782032582, - 3044795030, - 805504832, - 143825402, - 961777546, - 3635031474, - 1701285644, - 953286798, - 3233529297, - 1860747539, - 3756863448, - 4108876150, - 2208855372, - 4005207388, - 900400794, - 1915532082, - 1684465671, - 319113361, - 4040903373, - 3759509559, - 4203775049, - 1096839002, - 1348786453, - 2204513258, - 1005485791, - 1315093873, - 2278279237, - 1598385052, - 2127679663, - 1829010356, - 2131889929, - 2907075180, - 2890255513, - 3324859686, - 1855046205, - 118912031, - 948184906, - 3964956533, - 1478027161, - 2825110099, - 1389450030, - 1687228638, - 3289118469, - 2913305132, - 259944683, - 943408944, - 1655114943, - 315198871, - 769313256, - 2031831413, - 1936990884, - 2557307662, - 4049060851, - 1261705352, - 1690095579, - 3488156286, - 2325058543, - 4280618703, - 3787923262, - 4235475449, - 3422644095, - 1351439644, - 4010137115, - 1275314927, - 2756556316, - 1215878837, - 3564222603, - 2603036605, - 3389921249, - 2303801524, - 2539533026, - 1987127069, - 636962867, - 3451101807, - 3660370970, - 3933825336, - 811975671, - 3211258049, - 1758497297, - 631092897, - 1477942792, - 3780342588, - 1394468549, - 3884013640, - 2210783243, - 4284047688, - 2954793628, - 4057802457, - 3875411103, - 4173101169, - 2374868773, - 1138961071, - 4017496654, - 1748121193, - 324398967, - 3388413395, - 1421451971, - 2003520265, - 1938421608, - 502843030, - 4092269305, - 3124906436, - 1312677649, - 3963884786, - 3078964370, - 1415486200, - 1780461017, - 897543350, - 2531473933, - 3018614336, - 1082815198, - 4001984174, - 498150626, - 1620378597, - 1216275400, - 2346327537, - 1720984119, - 1603311953, - 3964902652, - 3490550532, - 3531834976, - 3789815299, - 2891278014, - 353012863, - 4210071255, - 3985612050, - 146549384, - 546083712, - 2665789869, - 4170752780, - 2789229305, - 2928540583, - 574353420, - 1213296416, - 3025553612, - 2897419785, - 3193639868, - 3807290657, - 2136142430, - 39898038, - 1043183000, - 96570653, - 313256292, - 2585059215, - 2949800110, - 529046663, - 2948064675, - 2703653258, - 14715708, - 3540100599, - 2652446921, - 3592494708, - 2325281413, - 3090026293, - 2942030507, - 3968648401, - 2503924302, - 2281103899, - 2660427136, - 1118473225, - 1509239795, - 2916996628, - 1498829399, - 2051980638, - 250189510, - 3665182738, - 2909572017, - 2294626724, - 2944239685, - 483810678, - 3703858386, - 2849742196, - 99440910, - 711375634, - 3240712659, - 865658149, - 3792964781, - 1140491837, - 1251010297, - 3972777473, - 149040667, - 3855208360, - 1713592937, - 3642530555, - 3295259754, - 136750651, - 1141650259, - 2553821287, - 2566573637, - 215217613, - 2521251384, - 2461194399, - 277826294, - 2998894813, - 3856313510, - 532725319, - 725275605, - 4121938584, - 2701056095, - 1739249781, - 4116099911, - 546954893, - 2671031054, - 3563388643, - 2077602340, - 354965386, - 3921478300, - 2200138043, - 2437362948, - 4233937299, - 561596964, - 2541518481, - 4282970928, - 932070805, - 2088114127, - 49855829, - 3540598765, - 715968672, - 1669139490, - 3450921952, - 2093995498, - 2528122568, - 356900943, - 3561549751, - 3860645626, - 4278347634, - 3783282303, - 2307265668, - 3473752346, - 1425883108, - 3219963916, - 1871354316, - 1006991143, - 2780202806, - 408451724, - 3518660655, - 2577965261, - 3776366633, - 2153658887, - 3064676915, - 1472411661, - 3381444379, - 3471573930, - 683224598, - 297910753, - 1948251965, - 1074723293, - 1042462107, - 2565100294, - 3959558256, - 3498782050, - 1245136335, - 1108074338, - 3567181330, - 1470821109, - 2517217388, - 3573560226, - 872355339, - 3641166732, - 4202604380, - 2863743216, - 1057862214, - 1168505870, - 2333146369, - 2470306042, - 3050274126, - 3706189024, - 1028326631, - 790821590, - 2353647980, - 3373651915, - 2717862373, - 3998954743, - 3724768038, - 2358681986, - 903774704, - 1086586964, - 2947052542, - 504148263, - 3005589490, - 130885957, - 2413604153, - 151980225, - 1646237670, - 2651453945, - 1702301299, - 3312733864, - 1419466054, - 2041837868, - 845829503, - 3184621255, - 236708439, - 1251305657, - 3440133121, - 2698248930, - 752241551, - 3906730939, - 3704664012, - 492234664, - 118829662, - 755123511, - 1226340698, - 360667305, - 3870699347, - 2670210156, - 3790151528, - 3398951072, - 3871562686, - 2885299933, - 1163048785, - 1581139430, - 2060136262, - 3845596685, - 721716356, - 2415917204, - 277894297, - 646770419, - 4241803829, - 2447147916, - 1830681938, - 1453659338, - 990668897, - 782328303, - 4050323257, - 893917030, - 2105619467, - 175326207, - 3554983482, - 3795672942, - 1732262058, - 4286295284, - 255546973, - 101929446, - 1541699869, - 3542673008, - 3031964519, - 143176475, - 906673315, - 1848847881, - 3701458370, - 1427035213, - 535234003, - 3249784714, - 525907046, - 1677057476, - 2778637625, - 689646222, - 3093619347, - 1818164008, - 3263377062, - 3879936856, - 3872931423, - 2002981419, - 2392535685, - 311442981, - 4061383417, - 2455913274, - 2779048399, - 2057044603, - 246641626, - 2044634518, - 2544006187, - 2072255130, - 1762484515, - 1138624055, - 2262591804, - 549048021, - 1952213209, - 698152287, - 1384636385, - 2500587841, - 1114201165, - 2982983785, - 95202990, - 3436368293, - 3575909220, - 1988847427, - 900944131, - 2255494346, - 3497488883, - 1619001995, - 325384740, - 3852263081, - 2344454947, - 3683328218, - 1827261537, - 593467785, - 2780478959, - 2216479377, - 3425383091, - 2641892674, - 3903857519, - 646603790, - 3776413739, - 3231496098, - 2942430316, - 65150637, - 881406526, - 2882663967, - 3535986503, - 3678450784, - 2875897712, - 1799978064, - 2411339001, - 3561758130, - 782528670, - 1730147867, - 2528914544, - 1031394620, - 2173121799, - 189974695, - 1998905845, - 280188656, - 777006715, - 1423232349, - 541680116, - 3128059308, - 3607239891, - 836602210, - 3476859645, - 3578125381, - 3285983594, - 3269548870, - 1279748213, - 2334574455, - 3583415971, - 3353380428, - 3242338734, - 2325055944, - 2213015684, - 1788639779, - 958443329, - 3288231454, - 3244677861, - 492970971, - 3256559017, - 2314347723, - 1219941045, - 1006715209, - 3227681168, - 219262229, - 1936802399, - 3218238221, - 627237476, - 1900767827, - 342345854, - 1705769980, - 909994728, - 619654469, - 2425216015, - 212600556, - 3241568266, - 1266085150, - 1162371303, - 4294387021, - 1956725691, - 618869821, - 2881089325, - 948530607, - 3125525758, - 2623958872, - 3568527782, - 1828490046, - 1980242546, - 575194297, - 938093373, - 1694864398, - 1287826449, - 3314079234, - 531223275, - 1052129727, - 2623869546, - 72624645, - 3328309790, - 3730915676, - 1279936442, - 2149352317, - 2003971525, - 3806533014, - 1986061407, - 2761213799, - 2370685389, - 1521139712, - 2415964751, - 3465699085, - 2432144290, - 3030156672, - 2410927979, - 3237540686, - 3947761779, - 3495355467, - 1285234418, - 1790600212, - 3476142224, - 3491190344, - 973333457, - 1518394715, - 1117018987, - 2468687001, - 1240195040, - 137882277, - 157102449, - 3716968954, - 2428714146, - 543934764, - 166077684, - 489052569, - 1279721156, - 2153200327, - 3461044828, - 63946900, - 1365096392, - 2552893479, - 794896991, - 2335377221, - 671099825, - 1145195172, - 687340020, - 1550491666, - 2712888120, - 3573805979, - 1447244373, - 1517794916, - 3389046815, - 859355421, - 1056295574, - 3890870733, - 3066687706, - 1093093633, - 1080163513, - 2437620821, - 2710775082, - 4157562319, - 1501189467, - 2130533328, - 548114610, - 2596641652, - 3541729844, - 2037170669, - 951924758, - 2767812320, - 4092501050, - 64679078, - 1501356276, - 1688581027, - 1283840233, - 2937652571, - 4266308157, - 936909650, - 2730859700, - 1413644018, - 2267196757, - 610630908, - 417635653, - 2676607000, - 261284082, - 3697882036, - 3345745731, - 343489458, - 3810345069, - 3646045458, - 620870954, - 3749083323, - 4078308334, - 2765664860, - 1399839279, - 3996169331, - 1834429430, - 3523079114, - 3295894704, - 2983009288, - 566179992, - 1053238212, - 1893428679, - 2890017255, - 3392869989, - 3105727089, - 550579624, - 1667665588, - 3233665689, - 3843433797, - 2103147383, - 2000835586, - 863932286, - 806295024, - 2223040395, - 4288347618, - 25114206, - 2154413579, - 3847716729, - 1067391025, - 4027778052, - 4056024079, - 1781823515, - 1010635730, - 1775748942, - 1567552448, - 236193276, - 1434184942, - 3062415128, - 3748555998, - 130495897, - 2939903645, - 1666752237, - 1066079401, - 1836449980, - 2195830749, - 3066331783, - 1897175879, - 2066200759, - 1973030862, - 294293913, - 98782574, - 4171791321, - 2208092313, - 2192004127, - 2531215340, - 1140349081, - 2776662426, - 1070173060, - 990721685, - 4183076842, - 2402194877, - 2760059174, - 658432629, - 3039901836, - 2830977567, - 1258192132, - 660194628, - 3722290277, - 1178933882, - 1459226687, - 3524102308, - 608197398, - 2178567665, - 3865121971, - 3803055188, - 3366269008, - 690378859, - 1164465180, - 3106017883, - 1047217157, - 3636325886, - 2378086560, - 1515916640, - 330457038, - 1094384941, - 2588260058, - 875067177, - 3482598787, - 496182764, - 286445040, - 2809317084, - 1777706171, - 4006769194, - 1079383541, - 2881585299, - 4178878364, - 878246596, - 1100855732, - 2110896399, - 2092027191, - 570896878, - 3913905127, - 49760796, - 2429561431, - 2268836631, - 3506046240, - 2859849814, - 893590893, - 3687412917, - 2406418879, - 2041532338, - 3316860343, - 2432632598, - 659382823, - 50227008, - 851367658, - 1108280326, - 3374139562, - 170587855, - 393366010, - 3046749017, - 1115479745, - 3925029814, - 978009027, - 2025902925, - 3918745565, - 2481300052, - 951837001, - 4044134593, - 4146137483, - 691481183, - 230022390, - 54751410, - 1895877866, - 261978262, - 2167645091, - 1570701164, - 3044599517, - 1065958287, - 3642959952, - 411777284, - 2225324033, - 2464820913, - 1315183114, - 1513631506, - 2353509916, - 1998383785, - 706743104, - 2348303970, - 1547200335, - 2968469298, - 4039179245, - 4191948814, - 1763233687, - 833029308, - 3841460003, - 2142617813, - 2521113856, - 159237655, - 544757793, - 1083580450, - 3964056914, - 1590767682, - 3978432327, - 3835200177, - 813428668, - 23505040, - 2758482008, - 3598792951, - 212206391, - 2530199324, - 3839157387, - 1048871517, - 742601867, - 4149697417, - 566913118, - 2102453533, - 4264989263, - 3861808018, - 1956969307, - 2389700986, - 1154473069, - 851631200, - 1538857364, - 1807411794, - 3042015886, - 3901545715, - 3589121135, - 1282964556, - 2857849662, - 2929889640, - 3020590289, - 3587195608, - 1326045962, - 1986820899, - 1134786750, - 385604982, - 4266813219, - 2751475804, - 4086822944, - 1877876527, - 223830081, - 4189366982, - 3916126198, - 3675859636, - 4094469726, - 423319180, - 285547675, - 2939210674, - 2961027358, - 2928063646, - 1304577715, - 707971210, - 3235182930, - 621361545, - 2156904189, - 3635704892, - 406005925, - 1053905739, - 1526470805, - 178754325, - 4022623727, - 4045068563, - 2973963440, - 2605716848, - 3617255047, - 4245368991, - 3381788483, - 4119953112, - 288636635, - 2919552050, - 2642572636, - 4171623315, - 2094329492, - 4155362501, - 3967558684, - 3848065971, - 2560015200, - 1817744012, - 3588670878, - 1777801347, - 1993928043, - 3456261955, - ]; - - static final String privateKeyFCM = String.fromCharCodes(List.generate( - _envieddataprivateKeyFCM.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataprivateKeyFCM[i] ^ _enviedkeyprivateKeyFCM[i])); - - static const List _enviedkeyseferAlexandriaServer = [ - 2654150368, - 652312410, - 3033059659, - 1610504043, - 3377493226, - 3230467198, - 539631457, - 3912676855, - 2173833701, - 4034158291, - 2214053461, - 3701371445, - 2684579137, - 515623541, - 2408717463, - 3669221601, - 997304084, - 1173473874, - 3132018834, - 1267973792, - 1326338115, - 2296599442, - 2509993205, - 3301306439, - 3897714319, - 2288591951, - 2972732752, - 938780309, - 2104384141, - 2703089493, - 2549088233, - 1686241929, - 4033207894, - 3325589798, - ]; - - static const List _envieddataseferAlexandriaServer = [ - 2654150280, - 652312366, - 3033059647, - 1610503963, - 3377493145, - 3230467140, - 539631438, - 3912676824, - 2173833622, - 4034158262, - 2214053427, - 3701371472, - 2684579123, - 515623444, - 2408717563, - 3669221508, - 997304172, - 1173473843, - 3132018940, - 1267973828, - 1326338097, - 2296599547, - 2509993108, - 3301306473, - 3897714428, - 2288591910, - 2972732708, - 938780400, - 2104384162, - 2703089446, - 2549088140, - 1686242031, - 4033207859, - 3325589844, - ]; - - static final String seferAlexandriaServer = String.fromCharCodes( - List.generate( - _envieddataseferAlexandriaServer.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataseferAlexandriaServer[i] ^ - _enviedkeyseferAlexandriaServer[i])); - - static const List _enviedkeyseferPaymentServer = [ - 1776774567, - 2149067662, - 1809830410, - 2789725058, - 1775776365, - 2073422508, - 2202800920, - 1272175257, - 1581809136, - 3259550986, - 992951527, - 1020140755, - 2421472244, - 2812917427, - 339058327, - 202161431, - 1680544989, - 1316334847, - 433030682, - 3784352865, - 4264062086, - 1038507241, - 2355747859, - 1059753186, - 828934416, - 2301641593, - ]; - - static const List _envieddataseferPaymentServer = [ - 1776774607, - 2149067770, - 1809830526, - 2789725170, - 1775776286, - 2073422486, - 2202800951, - 1272175286, - 1581809027, - 3259551087, - 992951425, - 1020140726, - 2421472134, - 2812917443, - 339058400, - 202161465, - 1680544942, - 1316334743, - 433030773, - 3784352785, - 4264062121, - 1038507162, - 2355747958, - 1059753092, - 828934517, - 2301641483, - ]; - - static final String seferPaymentServer = String.fromCharCodes( - List.generate( - _envieddataseferPaymentServer.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataseferPaymentServer[i] ^ _enviedkeyseferPaymentServer[i])); - - static const List _enviedkeyseferCairoServer = [ - 3037014515, - 3401018697, - 2521685488, - 2057073068, - 1319223786, - 1841552061, - 1493063679, - 3267255035, - 1082012524, - 2186402324, - 3254694991, - 1804139814, - 2490908, - 2578890551, - 1716850823, - 1298390919, - 3584414356, - 944610289, - 3728858927, - 2399884436, - 4021688822, - 2674818517, - 989142193, - 4293538974, - 2444833988, - 2342983077, - 1039840713, - 67394236, - 3106635908, - 1577319871, - 915423197, - 3673301939, - 2530094775, - 742686136, - 2085734280, - 1195359313, - 3551368912, - 2833392755, - 2355936383, - 1524261146, - 2711713960, - 2786895804, - 3763350038, - ]; - - static const List _envieddataseferCairoServer = [ - 3037014427, - 3401018685, - 2521685380, - 2057073116, - 1319223705, - 1841552007, - 1493063632, - 3267254996, - 1082012447, - 2186402417, - 3254694973, - 1804139856, - 2491001, - 2578890565, - 1716850857, - 1298391028, - 3584414449, - 944610199, - 3728858954, - 2399884518, - 4021688792, - 2674818489, - 989142232, - 4293539048, - 2444833953, - 2342983050, - 1039840698, - 67394265, - 3106636002, - 1577319898, - 915423151, - 3673301917, - 2530094804, - 742686164, - 2085734369, - 1195359282, - 3551368891, - 2833392732, - 2355936268, - 1524261247, - 2711713998, - 2786895833, - 3763350116, - ]; - - static final String seferCairoServer = String.fromCharCodes( - List.generate( - _envieddataseferCairoServer.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataseferCairoServer[i] ^ _enviedkeyseferCairoServer[i])); - - static const List _enviedkeyseferGizaServer = [ - 563807450, - 2957092207, - 1807568779, - 720103747, - 2111426609, - 3058635739, - 2743279385, - 1105116588, - 4171114341, - 185600609, - 2740539057, - 653512961, - 244459511, - 736132106, - 3516614822, - 172380685, - 3554504015, - 3311002153, - 2032618354, - 356718593, - 678332684, - 3534826055, - 3016886933, - 4005242305, - 1857977275, - 1277270964, - 3630546863, - 1025138140, - 4198144210, - 2935184133, - ]; - - static const List _envieddataseferGizaServer = [ - 563807410, - 2957092123, - 1807568895, - 720103731, - 2111426626, - 3058635745, - 2743279414, - 1105116547, - 4171114242, - 185600520, - 2740539083, - 653513056, - 244459396, - 736132207, - 3516614848, - 172380776, - 3554503997, - 3311002119, - 2032618269, - 356718703, - 678332768, - 3534826030, - 3016887035, - 4005242276, - 1857977236, - 1277270983, - 3630546890, - 1025138106, - 4198144183, - 2935184247, - ]; - - static final String seferGizaServer = String.fromCharCodes(List.generate( - _envieddataseferGizaServer.length, - (int i) => i, - growable: false, - ).map( - (int i) => _envieddataseferGizaServer[i] ^ _enviedkeyseferGizaServer[i])); - - static const List _enviedkeychatGPTkeySeferNew = [ - 2942027772, - 1467737596, - 24904215, - 4060452451, - 3926690586, - 1925768892, - 1329086755, - 1672615337, - 711689142, - 1019802605, - 723553255, - 226192337, - 3947509260, - 3600215425, - 3895628094, - 1317840637, - 2785260870, - 3242362388, - 3541650300, - 4065825499, - 1144481481, - 3293810059, - 4160722696, - 3109374342, - 326065697, - 2194188025, - 3999877283, - 2345374912, - 2221483605, - 3844049753, - 2702603544, - 1846890885, - 1695611418, - 2255738782, - 726863915, - 3763551667, - 192253223, - 3756181334, - 2765669049, - 719943936, - 4033539025, - 1931930950, - 2215699355, - 3406115282, - 3217359826, - 3573335111, - 3670649820, - 2781870398, - 565904096, - 3619395967, - 2287478331, - 3882763918, - 1372486294, - 719195308, - 3606632676, - 3674593970, - 4020513241, - 3217251709, - ]; - - static const List _envieddatachatGPTkeySeferNew = [ - 2942027654, - 1467737499, - 24904250, - 4060452409, - 3926690606, - 1925768915, - 1329086818, - 1672615395, - 711689173, - 1019802540, - 723553205, - 226192286, - 3947509355, - 3600215503, - 3895628134, - 1317840535, - 2785260833, - 3242362470, - 3541650233, - 4065825426, - 1144481436, - 3293810099, - 4160722798, - 3109374413, - 326065762, - 2194187968, - 3999877371, - 2345374898, - 2221483565, - 3844049726, - 2702603597, - 1846890944, - 1695611438, - 2255738831, - 726863967, - 3763551681, - 192253269, - 3756181306, - 2765669064, - 719943985, - 4033538984, - 1931930927, - 2215699438, - 3406115242, - 3217359842, - 3573335085, - 3670649744, - 2781870349, - 565904004, - 3619395894, - 2287478383, - 3882763997, - 1372486350, - 719195358, - 3606632636, - 3674594014, - 4020513179, - 3217251601, - ]; - - static final String chatGPTkeySeferNew = String.fromCharCodes( - List.generate( - _envieddatachatGPTkeySeferNew.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatachatGPTkeySeferNew[i] ^ _enviedkeychatGPTkeySeferNew[i])); - - static const List _enviedkeycohere = [ - 2014105176, - 1971179719, - 3476881594, - 3441576985, - 2048220273, - 1570562316, - 3748027562, - 3424948666, - 815449160, - 2261320933, - 450774753, - 3588038017, - 2370228601, - 1060029870, - 2829514980, - 3157226137, - 4201379634, - 2525313817, - 278386330, - 2038112881, - 170404028, - 2061802370, - 2409270447, - 1590516832, - 4260931604, - 318189294, - 2738755256, - 3489213281, - 195896715, - 1163781687, - 2527380875, - 2047412146, - 2729129036, - 1190196101, - 2356328596, - 854562155, - 1641396000, - 621333714, - 572079763, - 2826304618, - 2470698874, - 2754563601, - 1806221711, - 3176547718, - 2276879310, - 2626390559, - 1160402306, - ]; - - static const List _envieddatacohere = [ - 2014105113, - 1971179698, - 3476881622, - 3441577070, - 2048220181, - 1570562356, - 3748027603, - 3424948623, - 815449115, - 2261320885, - 450774710, - 3588038126, - 2370228490, - 1060029854, - 2829514892, - 3157226195, - 4201379674, - 2525313909, - 278386397, - 2038112833, - 170404040, - 2061802477, - 2409270522, - 1590516742, - 4260931628, - 318189193, - 2738755319, - 3489213193, - 195896798, - 1163781730, - 2527380985, - 2047412162, - 2729129002, - 1190196144, - 2356328645, - 854562137, - 1641396084, - 621333634, - 572079870, - 2826304572, - 2470698813, - 2754563657, - 1806221821, - 3176547806, - 2276879266, - 2626390621, - 1160402414, - ]; - - static final String cohere = String.fromCharCodes(List.generate( - _envieddatacohere.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatacohere[i] ^ _enviedkeycohere[i])); - - static const List _enviedkeyclaudeAiAPI = [ - 1976242300, - 2350860989, - 1948314595, - 901315685, - 2339033292, - 2360048022, - 3691158975, - 3674412142, - 2764946898, - 2183733768, - 4205748210, - 4011660736, - 312266345, - 2179067019, - 3591834986, - 1473488632, - 4141202701, - 2951700058, - 2025090710, - 2398865999, - 664501351, - 4190210615, - 1369532414, - 2942519646, - 1866759815, - 3679207556, - 637856172, - 4103589815, - 1362170158, - 1079976629, - 2013728745, - 3270521476, - 1291022480, - 355507478, - 2327588614, - 541057350, - 327271091, - 3259735263, - 3784713752, - 1723145924, - 1977372990, - 3309938444, - 83433960, - 1725118304, - 3003399073, - 3039187811, - 2226055004, - 2496658507, - 3672859933, - 1730906420, - 1948015722, - 1167701313, - 3813529681, - 1526372744, - 1237202131, - 3345691353, - 713251286, - 1794304080, - 3003020039, - 2578381984, - 720138540, - 3266418362, - 1345249225, - 1376117345, - 3887941391, - 1055208597, - 3284952823, - 4240595295, - 645506069, - 948439128, - 2801264061, - 2416846720, - 1043860477, - 3671807396, - 2926456821, - 1816175864, - 420960802, - 2273641446, - 1902996984, - 1109150420, - 797899585, - 3780404361, - 1940999941, - 1142672174, - 1448475072, - 2118083302, - 410131060, - 3512277805, - 656473126, - 2858145578, - 500386356, - 794216106, - 81742423, - 654115046, - 3841530927, - 1637487100, - 1775591497, - 718264352, - 1366125446, - 2139467799, - 1308528586, - 3577255479, - 3819768787, - 3973168182, - 469581459, - 2694673816, - 3893292905, - 3241284847, - 1060207043, - 2679424359, - 1620011386, - 1679076475, - 3092502735, - 476085106, - 3600159506, - ]; - - static const List _envieddataclaudeAiAPI = [ - 1976242182, - 2350861018, - 1948314574, - 901315604, - 2339033262, - 2360048117, - 3691158930, - 3674412063, - 2764946852, - 2183733863, - 4205748161, - 4011660793, - 312266245, - 2179067046, - 3591834898, - 1473488559, - 4141202754, - 2951700002, - 2025090783, - 2398865928, - 664501264, - 4190210656, - 1369532330, - 2942519569, - 1866759933, - 3679207623, - 637856234, - 4103589877, - 1362170176, - 1079976700, - 2013728688, - 3270521559, - 1291022555, - 355507549, - 2327588718, - 541057312, - 327271114, - 3259735205, - 3784713799, - 1723145871, - 1977373032, - 3309938509, - 83433886, - 1725118226, - 3003399145, - 3039187790, - 2226055018, - 2496658452, - 3672859945, - 1730906478, - 1948015663, - 1167701259, - 3813529629, - 1526372798, - 1237202155, - 3345691294, - 713251209, - 1794304001, - 3003020101, - 2578382056, - 720138526, - 3266418316, - 1345249190, - 1376117252, - 3887941467, - 1055208666, - 3284952762, - 4240595218, - 645506170, - 948439049, - 2801264072, - 2416846823, - 1043860420, - 3671807471, - 2926456704, - 1816175799, - 420960840, - 2273641356, - 1902996915, - 1109150343, - 797899537, - 3780404438, - 1941000004, - 1142672154, - 1448475027, - 2118083285, - 410130983, - 3512277880, - 656473186, - 2858145606, - 500386390, - 794216146, - 81742341, - 654115039, - 3841530955, - 1637486985, - 1775591455, - 718264410, - 1366125545, - 2139467846, - 1308528615, - 3577255546, - 3819768760, - 3973168238, - 469581516, - 2694673869, - 3893292856, - 3241284798, - 1060206994, - 2679424319, - 1620011272, - 1679076387, - 3092502691, - 476085040, - 3600159614, - ]; - - static final String claudeAiAPI = String.fromCharCodes(List.generate( - _envieddataclaudeAiAPI.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataclaudeAiAPI[i] ^ _enviedkeyclaudeAiAPI[i])); - - static const List _enviedkeypayPalClientId = [ - 2476786781, - 4014693165, - 3016597110, - 3521329147, - 917866109, - 998982029, - 2820406004, - 4154706307, - 2151387119, - 698043501, - 3670396520, - 3642289396, - 2778097778, - 119585277, - 123745559, - 1190472330, - 3762317744, - 1488801400, - 3137260930, - 1542744309, - 1005665600, - 1956779357, - 2183688589, - 3194451229, - 3263325754, - 2510490090, - 3370290877, - 3415607274, - 186881535, - 40849698, - 1026476553, - 3889126068, - 1041768698, - 1247903786, - 1017853683, - 3435707830, - 2500060887, - 2445195193, - 4092570895, - 3751351038, - 104730130, - 261292034, - 1515131265, - 3995354676, - 2795885149, - 3203165557, - 3591935360, - 993015290, - 2022651398, - 1347855195, - 935063536, - 2812247529, - 2993499764, - 200161191, - 2516170372, - 1750346702, - 162833907, - 2892925394, - 1115128014, - 1758309517, - 3028295932, - 296344024, - 1211151468, - 1899114679, - 1519592972, - 330264452, - 1746180507, - 3165975966, - 2097529050, - 4033089560, - 1696835036, - 1224468976, - 472892137, - 255141035, - 41688744, - 1876886146, - 710716550, - 1395003612, - 3285813446, - 28950399, - 3402765696, - 1480958771, - 3397946180, - 3319594768, - 520101544, - 3085615752, - 722474734, - ]; - - static const List _envieddatapayPalClientId = [ - 2476786700, - 4014693228, - 3016597050, - 3521329026, - 917866000, - 998982113, - 2820405906, - 4154706381, - 2151387046, - 698043480, - 3670396476, - 3642289294, - 2778097670, - 119585225, - 123745636, - 1190472359, - 3762317769, - 1488801291, - 3137261037, - 1542744207, - 1005665654, - 1956779307, - 2183688649, - 3194451241, - 3263325797, - 2510489988, - 3370290892, - 3415607218, - 186881487, - 40849777, - 1026476636, - 3889126080, - 1041768593, - 1247903849, - 1017853612, - 3435707847, - 2500060814, - 2445195247, - 4092570914, - 3751350955, - 104730229, - 261292137, - 1515131316, - 3995354707, - 2795885116, - 3203165496, - 3591935455, - 993015234, - 2022651484, - 1347855222, - 935063451, - 2812247438, - 2993499712, - 200161259, - 2516170417, - 1750346749, - 162833816, - 2892925418, - 1115127963, - 1758309624, - 3028295812, - 296343943, - 1211151448, - 1899114717, - 1519593033, - 330264531, - 1746180547, - 3165976026, - 2097529009, - 4033089622, - 1696834988, - 1224468904, - 472892078, - 255141112, - 41688831, - 1876886226, - 710716662, - 1395003541, - 3285813436, - 28950331, - 3402765766, - 1480958827, - 3397946166, - 3319594824, - 520101572, - 3085615818, - 722474626, - ]; - - static final String payPalClientId = String.fromCharCodes(List.generate( - _envieddatapayPalClientId.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatapayPalClientId[i] ^ _enviedkeypayPalClientId[i])); - - static const List _enviedkeypayPalSecret = [ - 3679868868, - 4230330265, - 3731340233, - 3596721338, - 2442502922, - 4232120925, - 2060828479, - 2808619715, - 2177100380, - 450425303, - 3170153494, - 2803706414, - 1798490761, - 1312454280, - 4113883695, - 1067605777, - 564224026, - 2801860216, - 857771083, - 2790393231, - 2171610767, - 4238876910, - 1155706091, - 2650496878, - 3325833725, - 3239465520, - 1738337104, - 2670980668, - 825388214, - 3388222342, - 1670678356, - 2611839979, - 1795020979, - 2378247172, - 2401357470, - 98620229, - 4160519300, - 3569011304, - 3241721136, - 2426239793, - 575189599, - 1521175128, - 3727620202, - 3714504822, - 1798413547, - 4020419410, - 951369407, - 4055425019, - 2294318042, - 1226646307, - 875691666, - 2265405758, - 329573838, - 3106858063, - 3643758242, - 1916070058, - 3242595505, - 1045180999, - 1787644947, - 534134737, - 802648100, - 3069762536, - 283443821, - 4056372299, - 1078338267, - 1334682567, - 621454632, - 2274587818, - 1545122753, - 2002995202, - 1002065343, - 394535479, - 2159446929, - 1448170518, - 2416868506, - 2088985569, - 2163377888, - 291200360, - 1564012364, - 1533087127, - 3803261918, - 1469347809, - 309529701, - 2900761794, - 3899263893, - 3129339814, - ]; - - static const List _envieddatapayPalSecret = [ - 3679868814, - 4230330331, - 3731340168, - 3596721403, - 2442503036, - 4232120876, - 2060828533, - 2808619666, - 2177100315, - 450425218, - 3170153573, - 2803706469, - 1798490829, - 1312454328, - 4113883765, - 1067605883, - 564224114, - 2801860172, - 857771008, - 2790393317, - 2171610858, - 4238876813, - 1155706001, - 2650496790, - 3325833627, - 3239465586, - 1738337046, - 2670980676, - 825388187, - 3388222389, - 1670678380, - 2611839928, - 1795021015, - 2378247272, - 2401357564, - 98620172, - 4160519383, - 3569011293, - 3241721094, - 2426239847, - 575189517, - 1521175061, - 3727620178, - 3714504760, - 1798413487, - 4020419380, - 951369434, - 4055424973, - 2294318007, - 1226646345, - 875691743, - 2265405787, - 329573780, - 3106857989, - 3643758282, - 1916070116, - 3242595581, - 1045180941, - 1787645046, - 534134714, - 802648081, - 3069762480, - 283443722, - 4056372250, - 1078338200, - 1334682550, - 621454691, - 2274587881, - 1545122697, - 2002995318, - 1002065389, - 394535505, - 2159446951, - 1448170587, - 2416868592, - 2088985523, - 2163377817, - 291200325, - 1564012330, - 1533087151, - 3803261830, - 1469347731, - 309529661, - 2900761774, - 3899263959, - 3129339850, - ]; - - static final String payPalSecret = String.fromCharCodes(List.generate( - _envieddatapayPalSecret.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatapayPalSecret[i] ^ _enviedkeypayPalSecret[i])); - - static const List _enviedkeygeminiApi = [ - 946723327, - 309686077, - 1019769419, - 810956790, - 3898244439, - 3081730684, - 3320601090, - 1741158444, - 2095666836, - 4253754882, - 1473996156, - 3730223337, - 744153826, - 2706606134, - 2802882217, - 974714029, - 2670398152, - 3488256992, - 2185769990, - 1247165256, - 963059836, - 2257048206, - 3849835851, - 921884482, - 3381723660, - 2953464770, - 3237496349, - 367321660, - 3978447150, - 2622825839, - 4269044634, - 551421524, - 2061487504, - 3556026697, - 3239683487, - 2637149925, - 1933281223, - 206017631, - 2024544384, - 2556741302, - 1038103247, - 3782334349, - 83678693, - 3568395937, - 2902583269, - 1875942636, - ]; - - static const List _envieddatageminiApi = [ - 946723246, - 309686130, - 1019769382, - 810956679, - 3898244365, - 3081730575, - 3320601171, - 1741158517, - 2095666937, - 4253754930, - 1473996100, - 3730223263, - 744153742, - 2706606201, - 2802882264, - 974714055, - 2670398081, - 3488256983, - 2185770093, - 1247165220, - 963059754, - 2257048260, - 3849835821, - 921884468, - 3381723740, - 2953464822, - 3237496394, - 367321726, - 3978447208, - 2622825770, - 4269044725, - 551421489, - 2061487613, - 3556026659, - 3239683576, - 2637149852, - 1933281268, - 206017638, - 2024544438, - 2556741343, - 1038103191, - 3782334463, - 83678653, - 3568395981, - 2902583207, - 1875942528, - ]; - - static final String geminiApi = String.fromCharCodes(List.generate( - _envieddatageminiApi.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatageminiApi[i] ^ _enviedkeygeminiApi[i])); - - static const List _enviedkeygeminiApiMasa = [ - 192192107, - 1332470588, - 486570927, - 1793012577, - 3850691592, - 1283550055, - 733294112, - 303982693, - 3660699771, - 605725619, - 1523964095, - 890716742, - 845787167, - 3786106691, - 3771038632, - 1212784769, - 2295890622, - 2923901151, - 372307924, - 797895158, - 72071507, - 2567081554, - 616796441, - 3898205818, - 2403483824, - 3495366850, - 1564059516, - 3875704500, - 286364606, - 1903938315, - 3076095114, - 1480543516, - 3609941373, - 2601963854, - 2591778684, - 337564517, - 2782218863, - 3384292359, - 2139221735, - 854884682, - 522036826, - 2365053644, - 3696587941, - 1589103048, - 1430021317, - 911669587, - ]; - - static const List _envieddatageminiApiMasa = [ - 192192058, - 1332470643, - 486570946, - 1793012496, - 3850691666, - 1283549972, - 733294193, - 303982636, - 3660699659, - 605725655, - 1523964146, - 890716786, - 845787229, - 3786106641, - 3771038683, - 1212784842, - 2295890643, - 2923901118, - 372307856, - 797895100, - 72071452, - 2567081474, - 616796462, - 3898205726, - 2403483882, - 3495366834, - 1564059465, - 3875704473, - 286364637, - 1903938365, - 3076095172, - 1480543563, - 3609941275, - 2601963821, - 2591778580, - 337564498, - 2782218815, - 3384292422, - 2139221643, - 854884635, - 522036738, - 2365053630, - 3696588029, - 1589103012, - 1430021255, - 911669567, - ]; - - static final String geminiApiMasa = String.fromCharCodes(List.generate( - _envieddatageminiApiMasa.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatageminiApiMasa[i] ^ _enviedkeygeminiApiMasa[i])); - - static const List _enviedkeyagoraAppId = [ - 2574000284, - 656142299, - 3586154678, - 543351328, - 967765405, - 2900149675, - 97184039, - 3788854222, - 3600725441, - 2749153498, - 1689536204, - 1097064774, - 3351205091, - 3428084667, - 3270673249, - 3365310137, - 3996306068, - 3861901703, - 476717600, - 4052607519, - 187551657, - 3543455146, - 1528929436, - 3773307748, - 4012526234, - 2750964947, - 1738978991, - 3031770431, - 1415657877, - 2498493431, - 3334871059, - 495917381, - 1501702692, - 3166594245, - 3174529007, - 339994790, - 544275537, - 1395276684, - 1425823463, - ]; - - static const List _envieddataagoraAppId = [ - 2574000299, - 656142314, - 3586154638, - 543351320, - 967765421, - 2900149709, - 97184021, - 3788854180, - 3600725495, - 2749153513, - 1689536250, - 1097064745, - 3351205078, - 3428084619, - 3270673240, - 3365310163, - 3996306086, - 3861901747, - 476717657, - 4052607530, - 187551643, - 3543455123, - 1528929448, - 3773307728, - 4012526242, - 2750964963, - 1738979030, - 3031770380, - 1415657893, - 2498493314, - 3334871083, - 495917425, - 1501702684, - 3166594205, - 3174528925, - 339994878, - 544275517, - 1395276750, - 1425823371, - ]; - - static final String agoraAppId = String.fromCharCodes(List.generate( - _envieddataagoraAppId.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataagoraAppId[i] ^ _enviedkeyagoraAppId[i])); - - static const List _enviedkeyagoraAppCertificate = [ - 2747481220, - 3248115095, - 1515394224, - 4078506219, - 3489222251, - 3440482103, - 4007632268, - 3706000627, - 1764213956, - 976642986, - 3058362642, - 1434520794, - 2417053802, - 2629168397, - 1640697280, - 3913076297, - 392059644, - 1393184090, - 3249459517, - 666795503, - 4204586178, - 389625446, - 430987858, - 3032651353, - 2511150507, - 3927144955, - 3051400642, - 570155389, - 974582377, - 161114738, - 2857665926, - 87022798, - 2060917783, - 1169014335, - 2167766261, - 3704888452, - 733973351, - 2450280885, - 3014833615, - 3148355083, - ]; - - static const List _envieddataagoraAppCertificate = [ - 2747481326, - 3248115110, - 1515394183, - 4078506138, - 3489222226, - 3440482051, - 4007632312, - 3706000518, - 1764214000, - 976642963, - 3058362657, - 1434520803, - 2417053786, - 2629168487, - 1640697256, - 3913076280, - 392059595, - 1393184111, - 3249459461, - 666795418, - 4204586227, - 389625424, - 430987878, - 3032651360, - 2511150495, - 3927144911, - 3051400698, - 570155276, - 974582363, - 161114635, - 2857665968, - 87022774, - 2060917873, - 1169014346, - 2167766189, - 3704888566, - 733973311, - 2450280921, - 3014833549, - 3148355175, - ]; - - static final String agoraAppCertificate = String.fromCharCodes( - List.generate( - _envieddataagoraAppCertificate.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataagoraAppCertificate[i] ^ - _enviedkeyagoraAppCertificate[i])); - - static const List _enviedkeypayPalClientIdLive = [ - 406733137, - 732595604, - 1507635706, - 1504380916, - 1787158654, - 2800455390, - 2732003059, - 3031157151, - 2669929136, - 3265016780, - 1056908558, - 3261172254, - 890628290, - 2286003341, - 3181140045, - 3190643593, - 4261979814, - 1575145434, - 3355157049, - 3836469070, - 2362058675, - 1985321101, - 502978218, - 1518404056, - 3934439578, - 2142613367, - 2956519144, - 637534234, - 353140822, - 2693390994, - 1203603962, - 101049220, - 1275997981, - 2471453544, - 548707912, - 1997550666, - 4192482427, - 3478530455, - 3935112212, - 2017438135, - 3634300988, - 3277115605, - 2172250595, - 1177084817, - 104384484, - 543342304, - 1665414410, - 715620109, - 754357783, - 1750303565, - 2409898373, - 189877380, - 2201432329, - 1312582802, - 997899176, - 2028392287, - 1916273807, - 1844169398, - 3165738646, - 3567895268, - 3990770437, - 2071147828, - 60780098, - 3921752062, - 215688211, - 1224775293, - 438430679, - 2465326536, - 1058619968, - 3577653443, - 2412718428, - 4098785521, - 381440221, - 969635345, - 140890094, - 3425638292, - 1083223210, - 1024072241, - 3037980476, - 1063266605, - 2314520560, - 3660199718, - 1224266137, - 1835503181, - 1407614465, - 1108130629, - 3527319131, - ]; - - static const List _envieddatapayPalClientIdLive = [ - 406733056, - 732595662, - 1507635644, - 1504380831, - 1787158548, - 2800455327, - 2732002972, - 3031157189, - 2669929174, - 3265016715, - 1056908666, - 3261172336, - 890628261, - 2286003395, - 3181140030, - 3190643692, - 4261979860, - 1575145398, - 3355157077, - 3836469112, - 2362058689, - 1985321150, - 502978249, - 1518403995, - 3934439599, - 2142613313, - 2956519088, - 637534326, - 353140839, - 2693391073, - 1203603884, - 101049288, - 1275998028, - 2471453443, - 548707878, - 1997550719, - 4192482335, - 3478530522, - 3935112310, - 2017438158, - 3634301017, - 3277115575, - 2172250507, - 1177084907, - 104384430, - 543342265, - 1665414463, - 715620148, - 754357842, - 1750303516, - 2409898422, - 189877484, - 2201432435, - 1312582821, - 997899249, - 2028392231, - 1916273902, - 1844169459, - 3165738727, - 3567895201, - 3990770497, - 2071147885, - 60780050, - 3921751978, - 215688262, - 1224775227, - 438430644, - 2465326489, - 1058619927, - 3577653426, - 2412718378, - 4098785428, - 381440141, - 969635440, - 140890047, - 3425638305, - 1083223295, - 1024072315, - 3037980534, - 1063266683, - 2314520482, - 3660199806, - 1224266219, - 1835503125, - 1407614573, - 1108130567, - 3527319095, - ]; - - static final String payPalClientIdLive = String.fromCharCodes( - List.generate( - _envieddatapayPalClientIdLive.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatapayPalClientIdLive[i] ^ _enviedkeypayPalClientIdLive[i])); - - static const List _enviedkeypayPalSecretLive = [ - 2065169935, - 3719449836, - 1703089757, - 1866660692, - 2376103069, - 1505973478, - 3593680751, - 697494622, - 433081113, - 921299376, - 3363671781, - 2518840536, - 2314974993, - 1861195093, - 1882231544, - 353562852, - 4075496535, - 2033844145, - 2179084238, - 1935810733, - 2693083059, - 231437197, - 1287306104, - 3491005767, - 1214589, - 952513297, - 1164703402, - 2149359020, - 1533102974, - 1237670704, - 1652456380, - 1045214314, - 758954409, - 459199405, - 695000307, - 12058161, - 2082765752, - 3136368635, - 1396477940, - 3891639226, - 1417856079, - 1736571595, - 3651460389, - 3249766091, - 1918285521, - 1449030166, - 1671944441, - 3351251275, - 1643419318, - 3304923008, - 775031813, - 1051381965, - 1714409443, - 861220215, - 1324748945, - 3381825670, - 1400058646, - 1254396047, - 772437761, - 2278599098, - 2793896685, - 647639575, - 1451228584, - 1739107703, - 3308567695, - 1669383746, - 951861375, - 4018950921, - 3903539689, - 3183213832, - 3289094315, - 4066164478, - 4093711787, - 1296958281, - 2139189533, - 2735471502, - 1106935396, - 3968492842, - 1793314587, - 2655294183, - 3307369136, - 694182040, - 428656863, - 4120169015, - 1062420681, - 3674678050, - 2767797972, - 1140562976, - ]; - - static const List _envieddatapayPalSecretLive = [ - 2065169989, - 3719449789, - 1703089689, - 1866660629, - 2376103113, - 1505973399, - 3593680644, - 697494581, - 433081207, - 921299444, - 3363671683, - 2518840497, - 2314975063, - 1861195045, - 1882231485, - 353562789, - 4075496473, - 2033844103, - 2179084286, - 1935810790, - 2693083121, - 231437241, - 1287305992, - 3491005696, - 1214477, - 952513365, - 1164703435, - 2149359078, - 1533102868, - 1237670729, - 1652456397, - 1045214248, - 758954472, - 459199433, - 695000266, - 12058203, - 2082765760, - 3136368566, - 1396477878, - 3891639274, - 1417856063, - 1736571569, - 3651460466, - 3249766046, - 1918285536, - 1449030214, - 1671944392, - 3351251232, - 1643419269, - 3304923080, - 775031860, - 1051381927, - 1714409401, - 861220127, - 1324748992, - 3381825772, - 1400058744, - 1254396088, - 772437810, - 2278599167, - 2793896613, - 647639652, - 1451228643, - 1739107622, - 3308567777, - 1669383715, - 951861320, - 4018950973, - 3903539641, - 3183213872, - 3289094363, - 4066164423, - 4093711763, - 1296958241, - 2139189626, - 2735471553, - 1106935306, - 3968492903, - 1793314682, - 2655294128, - 3307369184, - 694182095, - 428656775, - 4120169029, - 1062420625, - 3674678094, - 2767797910, - 1140563020, - ]; - - static final String payPalSecretLive = String.fromCharCodes( - List.generate( - _envieddatapayPalSecretLive.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatapayPalSecretLive[i] ^ _enviedkeypayPalSecretLive[i])); - - static const List _enviedkeyintegrationIdPayMob = [ - 403123281, - 1416993611, - 74636485, - 3269059815, - 686463205, - 1680258723, - 2414989573, - 4270405194, - 690893993, - 4028761213, - 2721151161, - 1780754503, - 4236316898, - ]; - - static const List _envieddataintegrationIdPayMob = [ - 403123297, - 1416993657, - 74636534, - 3269059792, - 686463187, - 1680258704, - 2414989621, - 4270405138, - 690894043, - 4028761125, - 2721151189, - 1780754437, - 4236316814, - ]; - - static final String integrationIdPayMob = String.fromCharCodes( - List.generate( - _envieddataintegrationIdPayMob.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataintegrationIdPayMob[i] ^ - _enviedkeyintegrationIdPayMob[i])); - - static const List _enviedkeypasswordPayMob = [ - 2566196124, - 2737175834, - 1785583464, - 2127936169, - 1195547893, - 605911846, - 1747316626, - 2238950848, - 1477389888, - 3009148422, - 1444812081, - 2999459466, - 2549965730, - 503793446, - 1650956144, - 2186141559, - 2104105133, - 3516462278, - 1764834458, - 3041119797, - 732180261, - 2590269731, - ]; - - static const List _envieddatapasswordPayMob = [ - 2566196219, - 2737175898, - 1785583366, - 2127936194, - 1195547825, - 605911828, - 1747316657, - 2238950905, - 1477389945, - 3009148525, - 1444812048, - 2999459554, - 2549965798, - 503793529, - 1650956126, - 2186141440, - 2104105205, - 3516462260, - 1764834498, - 3041119833, - 732180327, - 2590269775, - ]; - - static final String passwordPayMob = String.fromCharCodes(List.generate( - _envieddatapasswordPayMob.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatapasswordPayMob[i] ^ _enviedkeypasswordPayMob[i])); - - static const List _enviedkeyusernamePayMob = [ - 3027336137, - 1724348066, - 2676728483, - 4218558312, - 1967229934, - 1403912092, - 243083852, - 4048170333, - 4234291448, - 1221670855, - 2461832957, - 738607993, - 4162174076, - 1125475270, - 3131674333, - 2163050435, - 3509125333, - ]; - - static const List _envieddatausernamePayMob = [ - 3027336186, - 1724348053, - 2676728464, - 4218558297, - 1967229911, - 1403912109, - 243083900, - 4048170345, - 4234291400, - 1221670898, - 2461832911, - 738607905, - 4162173966, - 1125475230, - 3131674289, - 2163050369, - 3509125305, - ]; - - static final String usernamePayMob = String.fromCharCodes(List.generate( - _envieddatausernamePayMob.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatausernamePayMob[i] ^ _enviedkeyusernamePayMob[i])); - - static const List _enviedkeypayMobApikey = [ - 3650559441, - 56278679, - 1614641346, - 3136102569, - 1888449402, - 4219089974, - 1465972101, - 816949667, - 925531178, - 4187793775, - 3524043379, - 2311635813, - 1888855490, - 2311395957, - 2724862478, - 2194668618, - 3803179854, - 3251886376, - 601889492, - 508791790, - 2157366330, - 2066997288, - 3046058472, - 3373809186, - 692038456, - 2063093298, - 2822204471, - 3973314522, - 3038215939, - 2373177468, - 914092240, - 2147051966, - 3541663212, - 618063764, - 2460161238, - 2522194747, - 1266203242, - 3908037885, - 3190899930, - 3678214525, - 1604077782, - 587513475, - 178411957, - 1209626231, - 671109655, - 3973740706, - 4115382694, - 153777548, - 2847070374, - 2644260611, - 915621603, - 1465623372, - 443471641, - 1558457064, - 876482341, - 2879072506, - 4122361447, - 2951617849, - 1595289043, - 4286817578, - 488052203, - 458633786, - 3709090781, - 91919790, - 2683525645, - 4182501613, - 3972748168, - 3494520544, - 3375009582, - 3955862281, - 833999117, - 1944647824, - 1142988945, - 4104240217, - 978286361, - 351570891, - 1930129713, - 1159204599, - 4154497950, - 1746596874, - 4284083675, - 309317724, - 1654540369, - 1335640249, - 729830766, - 636593264, - 2289494721, - 4214856477, - 4061733114, - 4115096844, - 3279833089, - 2225905176, - 572674087, - 3457534930, - 4019548582, - 3533468564, - 2901141567, - 2570927748, - 4185382050, - 2851221920, - 1918652583, - 3109771131, - 278746991, - 1436102579, - 1548348316, - 1955992652, - 1832273448, - 42273136, - 3375770480, - 1432482680, - 2598491561, - 3074692446, - 3094807867, - 3040875539, - 3100396231, - 4000955545, - 1774225399, - 4159397679, - 1240484752, - 945729212, - 2835270849, - 1384342587, - 1364103212, - 3772144818, - 4254754010, - 1715872712, - 1099038088, - 2962838932, - 2489674116, - 943896895, - 2051424841, - 1114582912, - 3572570172, - 4122052631, - 2129464115, - 3409615614, - 1157216590, - 245540799, - 4265066093, - 2286715661, - 128394086, - 3691606734, - 1979921631, - 3406222936, - 3262409731, - 2201090071, - 2740517766, - 2825925961, - 1694386693, - 1306014075, - 2308290653, - 1528586294, - 3073241048, - 2378094310, - 1361976574, - 1033632120, - 3489043993, - 2925699946, - 612512514, - 1027581900, - 1399047181, - 2670717767, - 1676835292, - 3784443018, - 242170375, - 2101468779, - 3433455724, - 822369481, - 3758282654, - 2193361853, - 1587134926, - 2315603379, - 2437320440, - 1510144974, - 3230986633, - 1656035155, - 865597756, - 3391593104, - 4023507404, - 894359758, - 4185405787, - 663369797, - 3399223634, - 3702051909, - 3243438878, - 3414555440, - 559498211, - 610296130, - 3585482523, - 1837536688, - 3674218959, - 3324441652, - 1529910633, - 3557201925, - 2054066443, - 3262894811, - 1594723460, - 1805914235, - 1098127899, - 877246204, - 3794418065, - 3947127728, - 2882272841, - 3464957768, - 3762198999, - 758915577, - 2517867512, - 200520925, - 1402594569, - 3077199177, - 2068374170, - 3588456833, - 3949097048, - 410121890, - 2420937484, - 598343390, - 3902161469, - 2657892967, - 3830127347, - 1204642703, - 760467009, - 688377066, - 4065695490, - 3372241933, - 491260748, - 2951455612, - 1136033579, - 3492254402, - 758023232, - 1391031318, - 3401456400, - 1413515948, - 3017720600, - 1536647744, - 2987278693, - 1579203359, - 4010821414, - 355061963, - 2942679292, - 1851131873, - 4004141611, - 2350128206, - 2488249083, - 3619820610, - 1141496322, - 2540972848, - 191499976, - 3578543682, - 641116208, - 3620595172, - 3755886267, - 4269264401, - 1314653737, - 1430357873, - 3871818937, - 3896155004, - 1551135457, - 3591022835, - 3379279041, - 464675801, - 24687462, - 1677598156, - 181272503, - 2061283279, - 1082374878, - 4152007066, - 281923380, - 1768895651, - 4050792870, - 3908801307, - 3375362014, - 2311140239, - 3189536952, - 1796889892, - 2688822885, - 685589308, - 304697428, - 1197986653, - 1057766761, - 3144446340, - 2063195656, - 2071279429, - 1805235848, - 1530177658, - 1732914613, - 3734158393, - ]; - - static const List _envieddatapayMobApikey = [ - 3650559388, - 56278739, - 1614641328, - 3136102638, - 1888449291, - 4219090045, - 1465972160, - 816949748, - 925531257, - 4187793758, - 3524043265, - 2311635763, - 1888855475, - 2311395869, - 2724862564, - 2194668589, - 3803179817, - 3251886432, - 601889442, - 508791723, - 2157366378, - 2066997356, - 3046058398, - 3373809266, - 692038482, - 2063093368, - 2822204416, - 3973314476, - 3038216025, - 2373177400, - 914092178, - 2147052027, - 3541663124, - 618063846, - 2460161177, - 2522194700, - 1266203193, - 3908037838, - 3190899864, - 3678214456, - 1604077716, - 587513572, - 178411975, - 1209626139, - 671109745, - 3973740791, - 4115382737, - 153777624, - 2847070439, - 2644260656, - 915621514, - 1465623417, - 443471691, - 1558456966, - 876482421, - 2879072463, - 4122361405, - 2951617879, - 1595288997, - 4286817605, - 488052135, - 458633737, - 3709090704, - 91919772, - 2683525726, - 4182501588, - 3972748282, - 3494520485, - 3375009644, - 3955862382, - 833999231, - 1944647932, - 1142989023, - 4104240141, - 978286461, - 351570862, - 1930129737, - 1159204543, - 4154497963, - 1746596986, - 4284083599, - 309317644, - 1654540343, - 1335640206, - 729830688, - 636593210, - 2289494707, - 4214856555, - 4061732995, - 4115096893, - 3279833203, - 2225905277, - 572674173, - 3457534872, - 4019548624, - 3533468581, - 2901141611, - 2570927850, - 4185382037, - 2851221978, - 1918652609, - 3109771084, - 278746905, - 1436102631, - 1548348373, - 1955992584, - 1832273489, - 42273031, - 3375770394, - 1432482608, - 2598491598, - 3074692463, - 3094807928, - 3040875556, - 3100396171, - 4000955644, - 1774225294, - 4159397660, - 1240484776, - 945729268, - 2835270805, - 1384342655, - 1364103253, - 3772144892, - 4254753947, - 1715872763, - 1099038206, - 2962838947, - 2489674192, - 943896943, - 2051424815, - 1114583012, - 3572570180, - 4122052701, - 2129464129, - 3409615519, - 1157216566, - 245540750, - 4265066015, - 2286715770, - 128394038, - 3691606691, - 1979921551, - 3406222892, - 3262409806, - 2201090141, - 2740517887, - 2825925939, - 1694386804, - 1306014000, - 2308290584, - 1528586351, - 3073240962, - 2378094211, - 1361976473, - 1033632016, - 3489044072, - 2925699929, - 612512591, - 1027581881, - 1399047233, - 2670717714, - 1676835246, - 3784443084, - 242170447, - 2101468760, - 3433455661, - 822369528, - 3758282719, - 2193361882, - 1587134854, - 2315603408, - 2437320368, - 1510145023, - 3230986684, - 1656035088, - 865597798, - 3391593129, - 4023507353, - 894359727, - 4185405697, - 663369745, - 3399223582, - 3702051850, - 3243438950, - 3414555486, - 559498132, - 610296178, - 3585482585, - 1837536740, - 3674218923, - 3324441678, - 1529910561, - 3557201997, - 2054066553, - 3262894745, - 1594723525, - 1805914121, - 1098127986, - 877246095, - 3794418123, - 3947127765, - 2882272827, - 3464957725, - 3762198938, - 758915500, - 2517867437, - 200520871, - 1402594643, - 3077199224, - 2068374232, - 3588456943, - 3949096986, - 410121927, - 2420937545, - 598343351, - 3902161495, - 2657892911, - 3830127237, - 1204642753, - 760466987, - 688377011, - 4065695566, - 3372242019, - 491260703, - 2951455565, - 1136033641, - 3492254359, - 758023177, - 1391031381, - 3401456477, - 1413515972, - 3017720651, - 1536647725, - 2987278645, - 1579203447, - 4010821479, - 355062010, - 2942679241, - 1851131784, - 4004141645, - 2350128134, - 2488248962, - 3619820564, - 1141496435, - 2540972923, - 191499917, - 3578543631, - 641116280, - 3620595123, - 3755886274, - 4269264474, - 1314653797, - 1430357779, - 3871818944, - 3896154889, - 1551135400, - 3591022755, - 3379279031, - 464675770, - 24687406, - 1677598197, - 181272546, - 2061283242, - 1082374802, - 4152007081, - 281923394, - 1768895737, - 4050792927, - 3908801375, - 3375361976, - 2311140274, - 3189536987, - 1796889938, - 2688822790, - 685589348, - 304697382, - 1197986565, - 1057766661, - 3144446406, - 2063195748, - 2071279399, - 1805235946, - 1530177560, - 1732914647, - 3734158427, - ]; - - static final String payMobApikey = String.fromCharCodes(List.generate( - _envieddatapayMobApikey.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatapayMobApikey[i] ^ _enviedkeypayMobApikey[i])); - - static const List _enviedkeyintegrationIdPayMobWallet = [ - 165724468, - 3189223646, - 3860883267, - 3487849293, - 78354825, - 748311981, - 847163589, - 3357485714, - 1385098585, - 3754333090, - 4249884128, - 1582496634, - 50198670, - ]; - - static const List _envieddataintegrationIdPayMobWallet = [ - 165724420, - 3189223660, - 3860883316, - 3487849338, - 78354878, - 748311966, - 847163644, - 3357485770, - 1385098539, - 3754333178, - 4249884044, - 1582496568, - 50198754, - ]; - - static final String integrationIdPayMobWallet = String.fromCharCodes( - List.generate( - _envieddataintegrationIdPayMobWallet.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataintegrationIdPayMobWallet[i] ^ - _enviedkeyintegrationIdPayMobWallet[i])); - - static const List _enviedkeysmsPasswordEgypt = [ - 4130082779, - 164465689, - 1870012007, - 3890830190, - 4021949658, - 3207049403, - 2069723395, - 2675963890, - 927334321, - 2605073993, - 3539813742, - 1734188970, - 4222876400, - 2225566307, - 1052629522, - 591451665, - ]; - - static const List _envieddatasmsPasswordEgypt = [ - 4130082705, - 164465712, - 1870011953, - 3890830086, - 4021949671, - 3207049418, - 2069723489, - 2675963869, - 927334385, - 2605073924, - 3539813686, - 1734189016, - 4222876328, - 2225566223, - 1052629584, - 591451773, - ]; - - static final String smsPasswordEgypt = String.fromCharCodes( - List.generate( - _envieddatasmsPasswordEgypt.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatasmsPasswordEgypt[i] ^ _enviedkeysmsPasswordEgypt[i])); - - static const List _enviedkeyocpApimSubscriptionKey = [ - 3789412053, - 898415255, - 16632501, - 1595917661, - 1486505274, - 1939229942, - 1667540166, - 3821269237, - 526316501, - 3791199833, - 3345545514, - 2995541928, - 2583723291, - 1017559894, - 3810102961, - 248930782, - 698552515, - 2921366578, - 3839503376, - 1609537954, - 2032550249, - 1092205868, - 1274461276, - 1430223969, - 1895403036, - 1995059159, - 3247543597, - 2425393435, - 3251006391, - 3170802404, - 1515881195, - 4103025542, - ]; - - static const List _envieddataocpApimSubscriptionKey = [ - 3789412069, - 898415345, - 16632448, - 1595917625, - 1486505307, - 1939229845, - 1667540133, - 3821269142, - 526316465, - 3791199803, - 3345545545, - 2995541965, - 2583723311, - 1017559911, - 3810102914, - 248930799, - 698552481, - 2921366531, - 3839503473, - 1609537943, - 2032550159, - 1092205845, - 1274461289, - 1430223955, - 1895403045, - 1995059182, - 3247543579, - 2425393448, - 3251006343, - 3170802390, - 1515881102, - 4103025589, - ]; - - static final String ocpApimSubscriptionKey = String.fromCharCodes( - List.generate( - _envieddataocpApimSubscriptionKey.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataocpApimSubscriptionKey[i] ^ - _enviedkeyocpApimSubscriptionKey[i])); - - static const List _enviedkeychatGPTkeySeferNew4 = [ - 2268981463, - 3120845575, - 842954021, - 2074312820, - 2938100633, - 908585527, - 1361133034, - 3070160289, - 560628761, - 1343513186, - 1557565448, - 1895780730, - 1796564771, - 3214181905, - 3466716898, - 1232292684, - 550790600, - 3561743766, - 3114674691, - 687000374, - 3498856179, - 3451813631, - 2287877159, - 894978702, - 2258064189, - 1098146682, - 3375064435, - 2677636870, - 3534020294, - 2641925876, - 2915394264, - 984695859, - 194850954, - 3968724700, - 2339472770, - 440199167, - 2385637425, - 4038142586, - 2905429116, - 1488933586, - 772311316, - 2641741703, - 1444825202, - 3466174283, - 2145013784, - 4041760688, - 3645693709, - 2145430425, - 2745389644, - 2975985932, - 2212824339, - 3526358426, - 4115380594, - 4014254098, - 3751605424, - 3427555106, - 2864261476, - 2558839634, - 1048233342, - 3719517429, - 830258350, - 1217819826, - 2680776797, - ]; - - static const List _envieddatachatGPTkeySeferNew4 = [ - 2268981421, - 3120845664, - 842953992, - 2074312706, - 2938100725, - 908585566, - 1361132943, - 3070160268, - 560628779, - 1343513102, - 1557565497, - 1895780640, - 1796564815, - 3214181985, - 3466716826, - 1232292645, - 550790565, - 3561743834, - 3114674761, - 687000320, - 3498856068, - 3451813550, - 2287877224, - 894978808, - 2258064223, - 1098146584, - 3375064391, - 2677636946, - 3534020264, - 2641925815, - 2915394273, - 984695915, - 194851064, - 3968724644, - 2339472869, - 440199082, - 2385637492, - 4038142467, - 2905429034, - 1488933507, - 772311389, - 2641741810, - 1444825156, - 3466174239, - 2145013841, - 4041760756, - 3645693753, - 2145430504, - 2745389596, - 2975985976, - 2212824405, - 3526358479, - 4115380519, - 4014254179, - 3751605471, - 3427555185, - 2864261457, - 2558839562, - 1048233228, - 3719517357, - 830258370, - 1217819888, - 2680776753, - ]; - - static final String chatGPTkeySeferNew4 = String.fromCharCodes( - List.generate( - _envieddatachatGPTkeySeferNew4.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatachatGPTkeySeferNew4[i] ^ - _enviedkeychatGPTkeySeferNew4[i])); - - static const List _enviedkeyanthropicAIkeySeferNew = [ - 4112187027, - 1687434677, - 1638782753, - 2982765291, - 1277745159, - 166816541, - 1579163226, - 4107086380, - 3483509449, - 2527621918, - 3741571032, - 982443473, - 1234769647, - 2503164177, - 355640204, - 145000526, - 2193603654, - 2019213611, - 286165351, - 178813185, - 1502529300, - 1187633095, - 812547437, - 1871300097, - 2994190248, - 1751009882, - 3135551912, - 3321475451, - 37516943, - 28347790, - 4209627327, - 467462681, - 769575723, - 900726024, - 880491506, - 3146551635, - 3575021019, - 2724106185, - 679354819, - 3259551947, - 119705319, - 21283703, - 3046635389, - 1225742416, - 1019602508, - 1698283639, - 1550623238, - 1794337649, - 3014322571, - 3359794308, - 2657286513, - 1976050843, - 1122124317, - 2565547458, - 4071498137, - 1992917492, - 3985416338, - 719089975, - 2599462745, - 3461730310, - 3645142657, - 190239628, - 1326034441, - 3899692730, - 1081285424, - 1109844003, - 166525247, - 778407569, - 578096680, - 1614576040, - 3750015323, - 3299972627, - 1884394967, - 2384866145, - 1251071253, - 1349573141, - 3857638796, - 2932894962, - 1802976849, - 4230351393, - 3693516671, - 2565425313, - 2282297315, - 3243670159, - 1350933148, - 905389853, - 3089740239, - 2817643912, - 941653203, - 2399241780, - 1378960355, - 3736727734, - 3704314784, - 3114266666, - 2608933239, - 3674688206, - 3094686207, - 358606954, - 2878992676, - 181224747, - 3511154533, - 1519628647, - 427071758, - 2706617247, - 3908994095, - 1167027596, - 362684507, - 2083351537, - 1990749518, - 714660695, - 1485070497, - 804118491, - 2998997767, - 1277148286, - 4159459024, - ]; - - static const List _envieddataanthropicAIkeySeferNew = [ - 4112187113, - 1687434706, - 1638782732, - 2982765210, - 1277745253, - 166816638, - 1579163255, - 4107086429, - 3483509439, - 2527622001, - 3741571051, - 982443496, - 1234769602, - 2503164284, - 355640290, - 145000570, - 2193603600, - 2019213647, - 286165290, - 178813264, - 1502529313, - 1187633065, - 812547352, - 1871300171, - 2994190285, - 1751009811, - 3135551985, - 3321475347, - 37516994, - 28347840, - 4209627275, - 467462729, - 769575791, - 900726097, - 880491392, - 3146551652, - 3575020970, - 2724106150, - 679354811, - 3259551992, - 119705290, - 21283587, - 3046635343, - 1225742393, - 1019602557, - 1698283579, - 1550623342, - 1794337606, - 3014322666, - 3359794378, - 2657286437, - 1976050911, - 1122124411, - 2565547419, - 4071498207, - 1992917465, - 3985416405, - 719090001, - 2599462753, - 3461730417, - 3645142761, - 190239705, - 1326034499, - 3899692768, - 1081285491, - 1109844048, - 166525195, - 778407590, - 578096749, - 1614576077, - 3750015294, - 3299972735, - 1884394908, - 2384866063, - 1251071277, - 1349573194, - 3857638873, - 2932894865, - 1802976828, - 4230351476, - 3693516594, - 2565425356, - 2282297226, - 3243670236, - 1350933200, - 905389948, - 3089740201, - 2817643960, - 941653126, - 2399241854, - 1378960260, - 3736727686, - 3704314852, - 3114266716, - 2608933154, - 3674688162, - 3094686126, - 358606872, - 2878992736, - 181224799, - 3511154504, - 1519628624, - 427071800, - 2706617308, - 3908994173, - 1167027710, - 362684464, - 2083351456, - 1990749471, - 714660623, - 1485070547, - 804118403, - 2998997867, - 1277148220, - 4159459004, - ]; - - static final String anthropicAIkeySeferNew = String.fromCharCodes( - List.generate( - _envieddataanthropicAIkeySeferNew.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataanthropicAIkeySeferNew[i] ^ - _enviedkeyanthropicAIkeySeferNew[i])); - - static const List _enviedkeyllama3Key = [ - 843382224, - 317198561, - 3335257702, - 2579144974, - 1395292439, - 1827048393, - 1794744950, - 1190780592, - 1460846332, - 4292010087, - 1734492625, - 2351377861, - 3898631543, - 2232591854, - 1914577120, - 55166059, - 2653293676, - 776854485, - 3760392225, - 2602322657, - 2094155298, - 1181636702, - 1595306301, - 1047076065, - 1258601490, - 842751215, - 2750812253, - 1018641171, - 2055101289, - 4231706300, - 3153604677, - 1086740578, - 2452968472, - 272588687, - 21507914, - 2413540212, - 2728371317, - 3443698122, - 2225205841, - 1573794299, - 72985121, - 4135940157, - 4150490658, - 3770661150, - 3794836056, - 2665014056, - 703183693, - 511939797, - 4005379142, - 2570501000, - 781195420, - 2483404237, - 380977778, - 942737279, - 3599035819, - 885135169, - 1104214356, - 2028887480, - 4020279347, - 3661727944, - 3118060870, - 3480432797, - 1177205772, - ]; - - static const List _envieddatallama3Key = [ - 843382203, - 317198491, - 3335257601, - 2579145041, - 1395292514, - 1827048349, - 1794744878, - 1190780617, - 1460846287, - 4292009986, - 1734492648, - 2351377793, - 3898631477, - 2232591756, - 1914577059, - 55166010, - 2653293661, - 776854419, - 3760392271, - 2602322604, - 2094155365, - 1181636659, - 1595306309, - 1047076024, - 1258601573, - 842751163, - 2750812182, - 1018641258, - 2055101210, - 4231706308, - 3153604732, - 1086740535, - 2452968523, - 272588734, - 21507880, - 2413540097, - 2728371207, - 3443698098, - 2225205787, - 1573794193, - 72985109, - 4135940187, - 4150490724, - 3770661225, - 3794835991, - 2665014082, - 703183656, - 511939809, - 4005379082, - 2570501074, - 781195486, - 2483404184, - 380977716, - 942737204, - 3599035873, - 885135122, - 1104214373, - 2028887520, - 4020279361, - 3661727888, - 3118060842, - 3480432863, - 1177205856, - ]; - - static final String llama3Key = String.fromCharCodes(List.generate( - _envieddatallama3Key.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatallama3Key[i] ^ _enviedkeyllama3Key[i])); - - static const List _enviedkeypayMobOutPassword = [ - 3640465282, - 3758733440, - 2221221424, - 2869976102, - 1576236821, - 3264171324, - 492528501, - 2848369266, - 2334999299, - 2065473552, - 3302682291, - 2704171362, - 3235669974, - 1316683713, - 1740286297, - 2444113119, - 171935055, - 1427915811, - 3369113896, - 1048085327, - 146175075, - 2238282975, - 3158511327, - 3240349032, - 4106949715, - 3068708837, - 3020980205, - 3108408227, - 110707273, - 2055080945, - 178304286, - 3954697962, - ]; - - static const List _envieddatapayMobOutPassword = [ - 3640465350, - 3758733490, - 2221221450, - 2869976172, - 1576236883, - 3264171332, - 492528414, - 2848369207, - 2334999328, - 2065473628, - 3302682365, - 2704171273, - 3235669989, - 1316683703, - 1740286243, - 2444113132, - 171935095, - 1427915865, - 3369113882, - 1048085291, - 146175034, - 2238282919, - 3158511279, - 3240348966, - 4106949685, - 3068708786, - 3020980149, - 3108408273, - 110707217, - 2055080861, - 178304348, - 3954697862, - ]; - - static final String payMobOutPassword = String.fromCharCodes( - List.generate( - _envieddatapayMobOutPassword.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatapayMobOutPassword[i] ^ _enviedkeypayMobOutPassword[i])); - - static const List _enviedkeypayMobOutUserName = [ - 438096092, - 186755415, - 3388495033, - 3345031444, - 2487492499, - 4199360080, - 1144963354, - 2572476356, - 2477618265, - 495045829, - 1269831664, - 1092343097, - 4027099385, - 3506410491, - 3172097360, - 3135047258, - 1151486149, - 3885207609, - 3971726722, - 2162812343, - 2783503921, - 3243204995, - 985355945, - 88769436, - ]; - - static const List _envieddatapayMobOutUserName = [ - 438096038, - 186755389, - 3388495052, - 3345031550, - 2487492607, - 4199360015, - 1144963435, - 2572476338, - 2477618230, - 495045786, - 1269831574, - 1092343118, - 4027099282, - 3506410385, - 3172097334, - 3135047229, - 1151486127, - 3885207637, - 3971726810, - 2162812357, - 2783503977, - 3243205103, - 985356011, - 88769520, - ]; - - static final String payMobOutUserName = String.fromCharCodes( - List.generate( - _envieddatapayMobOutUserName.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatapayMobOutUserName[i] ^ _enviedkeypayMobOutUserName[i])); - - static const List _enviedkeyA = [542636626]; - - static const List _envieddataA = [542636547]; - - static final String A = String.fromCharCodes(List.generate( - _envieddataA.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataA[i] ^ _enviedkeyA[i])); - - static const List _enviedkeyB = [2596830498]; - - static const List _envieddataB = [2596830586]; - - static final String B = String.fromCharCodes(List.generate( - _envieddataB.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataB[i] ^ _enviedkeyB[i])); - - static const List _enviedkeyC = [2644966900]; - - static const List _envieddataC = [2644966834]; - - static final String C = String.fromCharCodes(List.generate( - _envieddataC.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataC[i] ^ _enviedkeyC[i])); - - static const List _enviedkeyD = [699250703]; - - static const List _envieddataD = [699250774]; - - static final String D = String.fromCharCodes(List.generate( - _envieddataD.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataD[i] ^ _enviedkeyD[i])); - - static const List _enviedkeyE = [73060734]; - - static const List _envieddataE = [73060660]; - - static final String E = String.fromCharCodes(List.generate( - _envieddataE.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataE[i] ^ _enviedkeyE[i])); - - static const List _enviedkeyF = [3338533546]; - - static const List _envieddataF = [3338533631]; - - static final String F = String.fromCharCodes(List.generate( - _envieddataF.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataF[i] ^ _enviedkeyF[i])); - - static const List _enviedkeyG = [3456804568]; - - static const List _envieddataG = [3456804499]; - - static final String G = String.fromCharCodes(List.generate( - _envieddataG.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataG[i] ^ _enviedkeyG[i])); - - static const List _enviedkeyH = [2028158175]; - - static const List _envieddataH = [2028158088]; - - static final String H = String.fromCharCodes(List.generate( - _envieddataH.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataH[i] ^ _enviedkeyH[i])); - - static const List _enviedkeyI = [555678811]; - - static const List _envieddataI = [555678740]; - - static final String I = String.fromCharCodes(List.generate( - _envieddataI.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataI[i] ^ _enviedkeyI[i])); - - static const List _enviedkeyJ = [1235702729]; - - static const List _envieddataJ = [1235702668]; - - static final String J = String.fromCharCodes(List.generate( - _envieddataJ.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataJ[i] ^ _enviedkeyJ[i])); - - static const List _enviedkeyK = [636648884]; - - static const List _envieddataK = [636648947]; - - static final String K = String.fromCharCodes(List.generate( - _envieddataK.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataK[i] ^ _enviedkeyK[i])); - - static const List _enviedkeyL = [609647016]; - - static const List _envieddataL = [609647098]; - - static final String L = String.fromCharCodes(List.generate( - _envieddataL.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataL[i] ^ _enviedkeyL[i])); - - static const List _enviedkeyM = [1668777736]; - - static const List _envieddataM = [1668777798]; - - static final String M = String.fromCharCodes(List.generate( - _envieddataM.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataM[i] ^ _enviedkeyM[i])); - - static const List _enviedkeyN = [534725874]; - - static const List _envieddataN = [534725808]; - - static final String N = String.fromCharCodes(List.generate( - _envieddataN.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataN[i] ^ _enviedkeyN[i])); - - static const List _enviedkeyO = [429462609]; - - static const List _envieddataO = [429462552]; - - static final String O = String.fromCharCodes(List.generate( - _envieddataO.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataO[i] ^ _enviedkeyO[i])); - - static const List _enviedkeyP = [954665354]; - - static const List _envieddataP = [954665436]; - - static final String P = String.fromCharCodes(List.generate( - _envieddataP.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataP[i] ^ _enviedkeyP[i])); - - static const List _enviedkeyQ = [3835481222]; - - static const List _envieddataQ = [3835481287]; - - static final String Q = String.fromCharCodes(List.generate( - _envieddataQ.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataQ[i] ^ _enviedkeyQ[i])); - - static const List _enviedkeyR = [3860386050]; - - static const List _envieddataR = [3860386126]; - - static final String R = String.fromCharCodes(List.generate( - _envieddataR.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataR[i] ^ _enviedkeyR[i])); - - static const List _enviedkeyS = [4181875672]; - - static const List _envieddataS = [4181875586]; - - static final String S = String.fromCharCodes(List.generate( - _envieddataS.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataS[i] ^ _enviedkeyS[i])); - - static const List _enviedkeyT = [1080140203]; - - static const List _envieddataT = [1080140264]; - - static final String T = String.fromCharCodes(List.generate( - _envieddataT.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataT[i] ^ _enviedkeyT[i])); - - static const List _enviedkeyU = [3743872674]; - - static const List _envieddataU = [3743872746]; - - static final String U = String.fromCharCodes(List.generate( - _envieddataU.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataU[i] ^ _enviedkeyU[i])); - - static const List _enviedkeyV = [1388123451]; - - static const List _envieddataV = [1388123499]; - - static final String V = String.fromCharCodes(List.generate( - _envieddataV.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataV[i] ^ _enviedkeyV[i])); - - static const List _enviedkeyW = [2936742330]; - - static const List _envieddataW = [2936742382]; - - static final String W = String.fromCharCodes(List.generate( - _envieddataW.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataW[i] ^ _enviedkeyW[i])); - - static const List _enviedkeyX = [3093927473]; - - static const List _envieddataX = [3093927541]; - - static final String X = String.fromCharCodes(List.generate( - _envieddataX.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataX[i] ^ _enviedkeyX[i])); - - static const List _enviedkeyY = [1763572433]; - - static const List _envieddataY = [1763572354]; - - static final String Y = String.fromCharCodes(List.generate( - _envieddataY.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataY[i] ^ _enviedkeyY[i])); - - static const List _enviedkeyZ = [1259829020]; - - static const List _envieddataZ = [1259829073]; - - static final String Z = String.fromCharCodes(List.generate( - _envieddataZ.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataZ[i] ^ _enviedkeyZ[i])); - - static const List _enviedkeya = [3641218189]; - - static const List _envieddataa = [3641218300]; - - static final String a = String.fromCharCodes(List.generate( - _envieddataa.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataa[i] ^ _enviedkeya[i])); - - static const List _enviedkeyb = [2092817231]; - - static const List _envieddatab = [2092817207]; - - static final String b = String.fromCharCodes(List.generate( - _envieddatab.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatab[i] ^ _enviedkeyb[i])); - - static const List _enviedkeyc = [3132456457]; - - static const List _envieddatac = [3132456559]; - - static final String c = String.fromCharCodes(List.generate( - _envieddatac.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatac[i] ^ _enviedkeyc[i])); - - static const List _enviedkeyd = [421432080]; - - static const List _envieddatad = [421432169]; - - static final String d = String.fromCharCodes(List.generate( - _envieddatad.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatad[i] ^ _enviedkeyd[i])); - - static const List _enviedkeye = [1489877303]; - - static const List _envieddatae = [1489877341]; - - static final String e = String.fromCharCodes(List.generate( - _envieddatae.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatae[i] ^ _enviedkeye[i])); - - static const List _enviedkeyf = [2440412795]; - - static const List _envieddataf = [2440412686]; - - static final String f = String.fromCharCodes(List.generate( - _envieddataf.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataf[i] ^ _enviedkeyf[i])); - - static const List _enviedkeyg = [2025482325]; - - static const List _envieddatag = [2025482302]; - - static final String g = String.fromCharCodes(List.generate( - _envieddatag.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatag[i] ^ _enviedkeyg[i])); - - static const List _enviedkeyh = [3108980352]; - - static const List _envieddatah = [3108980471]; - - static final String h = String.fromCharCodes(List.generate( - _envieddatah.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatah[i] ^ _enviedkeyh[i])); - - static const List _enviedkeyi = [3248919013]; - - static const List _envieddatai = [3248918922]; - - static final String i = String.fromCharCodes(List.generate( - _envieddatai.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatai[i] ^ _enviedkeyi[i])); - - static const List _enviedkeyj = [1411398647]; - - static const List _envieddataj = [1411398546]; - - static final String j = String.fromCharCodes(List.generate( - _envieddataj.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataj[i] ^ _enviedkeyj[i])); - - static const List _enviedkeyk = [1572741811]; - - static const List _envieddatak = [1572741844]; - - static final String k = String.fromCharCodes(List.generate( - _envieddatak.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatak[i] ^ _enviedkeyk[i])); - - static const List _enviedkeyl = [2158313276]; - - static const List _envieddatal = [2158313294]; - - static final String l = String.fromCharCodes(List.generate( - _envieddatal.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatal[i] ^ _enviedkeyl[i])); - - static const List _enviedkeym = [775661303]; - - static const List _envieddatam = [775661209]; - - static final String m = String.fromCharCodes(List.generate( - _envieddatam.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatam[i] ^ _enviedkeym[i])); - - static const List _enviedkeyn = [493764909]; - - static const List _envieddatan = [493764943]; - - static final String n = String.fromCharCodes(List.generate( - _envieddatan.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatan[i] ^ _enviedkeyn[i])); - - static const List _enviedkeyo = [4023197701]; - - static const List _envieddatao = [4023197804]; - - static final String o = String.fromCharCodes(List.generate( - _envieddatao.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatao[i] ^ _enviedkeyo[i])); - - static const List _enviedkeyp = [3606196178]; - - static const List _envieddatap = [3606196132]; - - static final String p = String.fromCharCodes(List.generate( - _envieddatap.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatap[i] ^ _enviedkeyp[i])); - - static const List _enviedkeyq = [966457191]; - - static const List _envieddataq = [966457094]; - - static final String q = String.fromCharCodes(List.generate( - _envieddataq.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataq[i] ^ _enviedkeyq[i])); - - static const List _enviedkeyr = [2717145523]; - - static const List _envieddatar = [2717145567]; - - static final String r = String.fromCharCodes(List.generate( - _envieddatar.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatar[i] ^ _enviedkeyr[i])); - - static const List _enviedkeys = [3181705678]; - - static const List _envieddatas = [3181705652]; - - static final String s = String.fromCharCodes(List.generate( - _envieddatas.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatas[i] ^ _enviedkeys[i])); - - static const List _enviedkeyt = [1336058721]; - - static const List _envieddatat = [1336058626]; - - static final String t = String.fromCharCodes(List.generate( - _envieddatat.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatat[i] ^ _enviedkeyt[i])); - - static const List _enviedkeyu = [1088785564]; - - static const List _envieddatau = [1088785652]; - - static final String u = String.fromCharCodes(List.generate( - _envieddatau.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatau[i] ^ _enviedkeyu[i])); - - static const List _enviedkeyv = [1479032422]; - - static const List _envieddatav = [1479032342]; - - static final String v = String.fromCharCodes(List.generate( - _envieddatav.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatav[i] ^ _enviedkeyv[i])); - - static const List _enviedkeyw = [1410103623]; - - static const List _envieddataw = [1410103603]; - - static final String w = String.fromCharCodes(List.generate( - _envieddataw.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataw[i] ^ _enviedkeyw[i])); - - static const List _enviedkeyx = [1304088790]; - - static const List _envieddatax = [1304088754]; - - static final String x = String.fromCharCodes(List.generate( - _envieddatax.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatax[i] ^ _enviedkeyx[i])); - - static const List _enviedkeyy = [1351336806]; - - static const List _envieddatay = [1351336725]; - - static final String y = String.fromCharCodes(List.generate( - _envieddatay.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatay[i] ^ _enviedkeyy[i])); - - static const List _enviedkeyz = [420947929]; - - static const List _envieddataz = [420947892]; - - static final String z = String.fromCharCodes(List.generate( - _envieddataz.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataz[i] ^ _enviedkeyz[i])); - - static const List _enviedkeykeyOfApp = [ - 2109733411, - 4065272708, - 3180171115, - 2615729543, - 2588552724, - 3438999729, - 2981587686, - 1112125767, - 3355124550, - 1551407717, - 1989181027, - 3426899292, - 1378253390, - 1181220903, - 3253218303, - 2363637934, - 3492924112, - 3674467004, - 1022913680, - 1036393177, - 1903902788, - 1344586572, - 2211491204, - 4241261953, - 1037371226, - 99525008, - 3622966885, - 239711128, - 3367919441, - 94780013, - 946646050, - 2028474840, - 2983118724, - 2106659786, - 560613136, - 3324401158, - 1256343786, - 4261788345, - ]; - - static const List _envieddatakeyOfApp = [ - 2109733441, - 4065272805, - 3180171015, - 2615729652, - 2588552817, - 3438999751, - 2981587622, - 1112125808, - 3355124592, - 1551407708, - 1989181013, - 3426899240, - 1378253359, - 1181220933, - 3253218193, - 2363637967, - 3492924081, - 3674467014, - 1022913781, - 1036393130, - 1903902761, - 1344586537, - 2211491308, - 4241262052, - 1037371176, - 99525109, - 3622966786, - 239711202, - 3367919393, - 94779915, - 946646088, - 2028474807, - 2983118812, - 2106659768, - 560613192, - 3324401268, - 1256343720, - 4261788363, - ]; - - static final String keyOfApp = String.fromCharCodes(List.generate( - _envieddatakeyOfApp.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatakeyOfApp[i] ^ _enviedkeykeyOfApp[i])); - - static const List _enviedkeyinitializationVector = [ - 3616153342, - 1234324916, - 765227704, - 2588638989, - 557979068, - 1406370978, - 1458301245, - 2997376293, - 2704859731, - 2056739636, - 3313511172, - 2765489388, - 1787549756, - 3051368987, - 3656906667, - 731561107, - 840302779, - 4218856573, - 1003770013, - 2259208916, - 3150536176, - 2177073901, - ]; - - static const List _envieddatainitializationVector = [ - 3616153231, - 1234324940, - 765227742, - 2588639092, - 557979094, - 1406371031, - 1458301270, - 2997376338, - 2704859708, - 2056739665, - 3313511267, - 2765489310, - 1787549778, - 3051369081, - 3656906690, - 731561189, - 840302819, - 4218856463, - 1003770053, - 2259208870, - 3150536114, - 2177073823, - ]; - - static final String initializationVector = String.fromCharCodes( - List.generate( - _envieddatainitializationVector.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatainitializationVector[i] ^ - _enviedkeyinitializationVector[i])); - - static const List _enviedkeyemailService = [ - 975854491, - 2947470976, - 2289723112, - 283151907, - 3726714289, - 2244184592, - 733351829, - 1768205848, - 1681957236, - 3108874245, - 1139568126, - 2735024736, - 2704816221, - 3984419708, - 727355730, - 2263923011, - 3793139494, - 3392437762, - 1152073931, - 2312490110, - 26353163, - 328760237, - ]; - - static const List _envieddataemailService = [ - 975854568, - 2947471077, - 2289723022, - 283151942, - 3726714307, - 2244184675, - 733351920, - 1768205930, - 1681957122, - 3108874348, - 1139568029, - 2735024645, - 2704816157, - 3984419611, - 727355711, - 2263922978, - 3793139535, - 3392437870, - 1152073957, - 2312490013, - 26353252, - 328760256, - ]; - - static final String emailService = String.fromCharCodes(List.generate( - _envieddataemailService.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataemailService[i] ^ _enviedkeyemailService[i])); - - static const List _enviedkeysss_encryptionSalt = [ - 1519183173, - 3350107844, - 1282330233, - 3521294272, - 693190537, - 1030272519, - 3460445718, - 640653060, - 2574214062, - 187640275, - 2785147919, - 1058237669, - 1707125299, - 400767572, - 729216579, - 1555355690, - 3646818427, - 3331849364, - 1726927412, - 812452633, - 2522660830, - 3701662228, - 1234180961, - 2324501507, - 3805189340, - 2448427429, - 1959309195, - 962278704, - 217962453, - 3294496384, - 3384851927, - 25420943, - 4105286313, - 2868422693, - 2384230314, - 3953278441, - 3125132598, - 2200605504, - 3333622184, - 2984779563, - 3010526212, - 2155306553, - 2768847780, - 320270368, - 28839809, - 2223617327, - 646086920, - 2095462841, - 644897195, - 1132862536, - 2256280000, - 1599064275, - 354500194, - 92829515, - 1740222147, - 3650778127, - 2389774502, - 3109060761, - 1131299478, - 1088562775, - 3612711203, - 3437301132, - 746625117, - ]; - - static const List _envieddatasss_encryptionSalt = [ - 1519183167, - 3350107811, - 1282330196, - 3521294262, - 693190626, - 1030272619, - 3460445823, - 640653153, - 2574214019, - 187640289, - 2785148003, - 1058237652, - 1707125353, - 400767544, - 729216563, - 1555355730, - 3646818322, - 3331849432, - 1726927486, - 812452655, - 2522660777, - 3701662277, - 1234180910, - 2324501621, - 3805189310, - 2448427463, - 1959309247, - 962278756, - 217962427, - 3294496451, - 3384851950, - 25421015, - 4105286363, - 2868422749, - 2384230349, - 3953278396, - 3125132659, - 2200605497, - 3333622270, - 2984779642, - 3010526285, - 2155306572, - 2768847762, - 320270452, - 28839880, - 2223617387, - 646086972, - 2095462856, - 644897275, - 1132862588, - 2256279942, - 1599064198, - 354500151, - 92829498, - 1740222124, - 3650778204, - 2389774483, - 3109060801, - 1131299556, - 1088562703, - 3612711247, - 3437301198, - 746625073, - ]; - - static final String sss_encryptionSalt = String.fromCharCodes( - List.generate( - _envieddatasss_encryptionSalt.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatasss_encryptionSalt[i] ^ _enviedkeysss_encryptionSalt[i])); - - static const List _enviedkeysss_pass = [ - 3865703878, - 1851968517, - 1772290745, - 1971561729, - 1196593385, - 3111149423, - 2469198566, - 701371499, - 2019714711, - 4040933535, - 275439759, - 1320043078, - 4068200971, - 1298959801, - 2248523887, - 168219730, - 3264411399, - 3615715021, - 2706095985, - 3007047176, - 2129887018, - 2976765127, - 3293924465, - 4275061370, - 2968038704, - 1508122571, - 2827192242, - 3165212251, - 3439504231, - 2330375399, - 196757856, - 936409364, - ]; - - static const List _envieddatasss_pass = [ - 3865703857, - 1851968628, - 1772290775, - 1971561836, - 1196593304, - 3111149342, - 2469198485, - 701371393, - 2019714798, - 4040933609, - 275439864, - 1320043056, - 4068201009, - 1298959831, - 2248523806, - 168219680, - 3264411498, - 3615714964, - 2706095931, - 3007047256, - 2129887082, - 2976765174, - 3293924422, - 4275061321, - 2968038663, - 1508122611, - 2827192298, - 3165212201, - 3439504191, - 2330375307, - 196757794, - 936409464, - ]; - - static final String sss_pass = String.fromCharCodes(List.generate( - _envieddatasss_pass.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatasss_pass[i] ^ _enviedkeysss_pass[i])); - - static const List _enviedkeyaddd = [ - 103743231, - 1651712580, - 3787002226, - 1668911437, - 3340099680, - 1954702736, - ]; - - static const List _envieddataaddd = [ - 103743165, - 1651712552, - 3787002160, - 1668911393, - 3340099630, - 1954702844, - ]; - - static final String addd = String.fromCharCodes(List.generate( - _envieddataaddd.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataaddd[i] ^ _enviedkeyaddd[i])); - - static const List _enviedkeypassnpassenger = [ - 1667939497, - 3030532290, - 512235273, - 1246739739, - 1322556395, - 3812185560, - 207798604, - 725503233, - 953949412, - 51208264, - 635023425, - 3955769699, - 3590245687, - ]; - - static const List _envieddatapassnpassenger = [ - 1667939521, - 3030532256, - 512235374, - 1246739833, - 1322556290, - 3812185516, - 207798574, - 725503321, - 953949334, - 51208208, - 635023411, - 3955769633, - 3590245701, - ]; - - static final String passnpassenger = String.fromCharCodes(List.generate( - _envieddatapassnpassenger.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatapassnpassenger[i] ^ _enviedkeypassnpassenger[i])); - - static const List _enviedkeynewId = [ - 4159278390, - 2770117670, - 1198028629, - ]; - - static const List _envieddatanewId = [ - 4159278424, - 2770117699, - 1198028578, - ]; - - static final String newId = String.fromCharCodes(List.generate( - _envieddatanewId.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatanewId[i] ^ _enviedkeynewId[i])); - - static const List _enviedkeyallowed = [ - 4023085610, - 2924250902, - 3166904704, - 2376980933, - 3213104559, - 814164845, - 2313024996, - 654720117, - 3926211393, - 1160205279, - 63955773, - 370711532, - ]; - - static const List _envieddataallowed = [ - 4023085694, - 2924250980, - 3166904809, - 2376980917, - 3213104597, - 814164777, - 2313024918, - 654720028, - 3926211383, - 1160205242, - 63955791, - 370711510, - ]; - - static final String allowed = String.fromCharCodes(List.generate( - _envieddataallowed.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataallowed[i] ^ _enviedkeyallowed[i])); - - static const List _enviedkeyallowedWallet = [ - 1927624979, - 1845017790, - 4231102437, - 1325126951, - 989812008, - 2556314514, - 2491921000, - 3384009027, - 2444271481, - 2408042274, - 3526762830, - 2026929828, - ]; - - static const List _envieddataallowedWallet = [ - 1927625031, - 1845017804, - 4231102348, - 1325126999, - 989812050, - 2556314565, - 2491920905, - 3384009007, - 2444271381, - 2408042311, - 3526762810, - 2026929822, - ]; - - static final String allowedWallet = String.fromCharCodes(List.generate( - _envieddataallowedWallet.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataallowedWallet[i] ^ _enviedkeyallowedWallet[i])); -} diff --git a/siro_driver/lib/translations_en.json b/siro_driver/lib/translations_en.json index 0f9f380..b660dc9 100644 --- a/siro_driver/lib/translations_en.json +++ b/siro_driver/lib/translations_en.json @@ -800,6 +800,8 @@ "Select Payment Method": "Select Payment Method", "You are buying": "You are buying", "Points": "SYP", + "Points": "EGP", + "Points": "JOD", "for": "for", "Use Touch ID or Face ID to confirm payment": "Use Touch ID or Face ID to confirm payment", "Your Budget less than needed": "Your Budget less than needed", diff --git a/siro_driver/lib/views/Rate/rate_passenger.dart b/siro_driver/lib/views/Rate/rate_passenger.dart index 79829d4..3e9cf50 100755 --- a/siro_driver/lib/views/Rate/rate_passenger.dart +++ b/siro_driver/lib/views/Rate/rate_passenger.dart @@ -1,3 +1,4 @@ +import 'package:siro_driver/constant/currency.dart'; import 'package:siro_driver/controller/home/captin/map_driver_controller.dart'; import 'package:siro_driver/views/widgets/my_textField.dart'; import 'package:flutter/material.dart'; @@ -113,7 +114,7 @@ class RatePassenger extends StatelessWidget { Padding( padding: const EdgeInsets.only(top: 8.0), child: Text( - 'SYP'.tr, // Replace with your local currency symbol if needed + CurrencyHelper.currency, // Replace with your local currency symbol if needed style: TextStyle( color: Colors.white.withOpacity(0.8), fontSize: 24, diff --git a/siro_driver/lib/views/auth/captin/otp_page.dart b/siro_driver/lib/views/auth/captin/otp_page.dart index 6773122..ece58cb 100644 --- a/siro_driver/lib/views/auth/captin/otp_page.dart +++ b/siro_driver/lib/views/auth/captin/otp_page.dart @@ -10,6 +10,9 @@ import '../../../constant/colors.dart'; import '../../../controller/auth/captin/phone_helper_controller.dart'; import '../../../controller/local/phone_intel/intl_phone_field.dart'; import '../../../print.dart'; +import '../../../constant/box_name.dart'; +import '../../../main.dart'; +import '../../../controller/functions/country_logic.dart'; // Assuming you have an AppColor class defined in your project. // import 'path/to/your/app_color.dart'; @@ -348,7 +351,7 @@ class _PhoneNumberScreenState extends State { const BorderSide(color: AppColor.greenColor, width: 2), ), ), - initialCountryCode: 'SY', + initialCountryCode: CountryLogic.getCountryPrefix(box.read(BoxName.countryCode) ?? 'Syria'), onChanged: (phone) { _completePhone = phone.completeNumber; }, diff --git a/siro_driver/lib/views/gamification/leaderboard_page.dart b/siro_driver/lib/views/gamification/leaderboard_page.dart index e73941b..6db0f2a 100644 --- a/siro_driver/lib/views/gamification/leaderboard_page.dart +++ b/siro_driver/lib/views/gamification/leaderboard_page.dart @@ -1,3 +1,4 @@ +import 'package:siro_driver/constant/currency.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import '../../../constant/finance_design_system.dart'; @@ -244,7 +245,7 @@ class LeaderboardPage extends StatelessWidget { // Value Text( isEarnings - ? '${e.value.toStringAsFixed(0)} ${'SYP'.tr}' + ? '${e.value.toStringAsFixed(0)} ${CurrencyHelper.currency}' : '${e.value.toInt()} ${'Rides'.tr}', style: TextStyle( fontSize: 13, diff --git a/siro_driver/lib/views/home/Captin/history/history_captain.dart b/siro_driver/lib/views/home/Captin/history/history_captain.dart index f5f948b..91fff07 100755 --- a/siro_driver/lib/views/home/Captin/history/history_captain.dart +++ b/siro_driver/lib/views/home/Captin/history/history_captain.dart @@ -1,3 +1,4 @@ +import 'package:siro_driver/constant/currency.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:intl/intl.dart'; @@ -314,7 +315,7 @@ class _TripHistoryCard extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.end, children: [ Text( - '${trip['price']} ${'SYP'.tr}', + '${trip['price']} ${CurrencyHelper.currency}', style: TextStyle( fontWeight: FontWeight.w900, fontSize: 16, diff --git a/siro_driver/lib/views/home/Captin/mapDriverWidgets/driver_end_ride_bar.dart b/siro_driver/lib/views/home/Captin/mapDriverWidgets/driver_end_ride_bar.dart index a27795f..9ae8a41 100755 --- a/siro_driver/lib/views/home/Captin/mapDriverWidgets/driver_end_ride_bar.dart +++ b/siro_driver/lib/views/home/Captin/mapDriverWidgets/driver_end_ride_bar.dart @@ -1,3 +1,4 @@ +import 'package:siro_driver/constant/currency.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:intl/intl.dart'; @@ -70,7 +71,7 @@ Widget driverEndRideBar() { value: NumberFormat('#,##0').format( double.tryParse(controller.price.toString()) ?? 0, ), - unit: 'SYP'.tr, + unit: CurrencyHelper.currency, label: isFixed ? 'Fixed Price'.tr : 'Meter Fare'.tr, isHighlight: true, isFixedStyle: isFixed, diff --git a/siro_driver/lib/views/home/my_wallet/card_wallet_widget.dart b/siro_driver/lib/views/home/my_wallet/card_wallet_widget.dart index a7e2b34..49251b1 100755 --- a/siro_driver/lib/views/home/my_wallet/card_wallet_widget.dart +++ b/siro_driver/lib/views/home/my_wallet/card_wallet_widget.dart @@ -288,7 +288,13 @@ class MyDropDownSyria extends StatelessWidget { onChanged: (String? newValue) { controller.changeValue(newValue); }, - items: ['Syriatel', 'Cash Mobile', 'Sham Cash'] + items: (box.read(BoxName.countryCode) == 'Syria' + ? ['Syriatel', 'MTN Cash', 'Sham Cash'] + : box.read(BoxName.countryCode) == 'Egypt' + ? ['Wallet Payment', 'Bank Card Payment'] + : box.read(BoxName.countryCode) == 'Jordan' + ? ['CliQ'] + : ['Bank Transfer', 'Mobile Wallet']) .map>((String value) { return DropdownMenuItem( value: value, @@ -302,7 +308,13 @@ class MyDropDownSyria extends StatelessWidget { // هذا المتحكم ضروري لعمل القائمة المنسدلة class SyrianPayoutController extends GetxController { - String dropdownValue = 'Syriatel'; + String dropdownValue = box.read(BoxName.countryCode) == 'Syria' + ? 'Syriatel' + : box.read(BoxName.countryCode) == 'Egypt' + ? 'Wallet Payment' + : box.read(BoxName.countryCode) == 'Jordan' + ? 'CliQ' + : 'Bank Transfer'; void changeValue(String? newValue) { if (newValue != null) { diff --git a/siro_driver/lib/views/home/my_wallet/points_captain.dart b/siro_driver/lib/views/home/my_wallet/points_captain.dart index df0cd58..925be6f 100755 --- a/siro_driver/lib/views/home/my_wallet/points_captain.dart +++ b/siro_driver/lib/views/home/my_wallet/points_captain.dart @@ -1,3 +1,4 @@ +import 'package:siro_driver/constant/currency.dart'; import 'dart:convert'; import 'package:flutter/material.dart'; @@ -17,6 +18,7 @@ import '../../../main.dart'; import '../../../print.dart'; import '../../widgets/elevated_btn.dart'; import '../../widgets/my_textField.dart'; +import '../../widgets/mydialoug.dart'; import 'ecash.dart'; class PointsCaptain extends StatelessWidget { @@ -77,7 +79,7 @@ class PointsCaptain extends StatelessWidget { ), const SizedBox(height: 10), Text( - '$countPoint ${'SYP'.tr}', + '$countPoint ${CurrencyHelper.currency}', style: TextStyle( fontWeight: FontWeight.w900, fontSize: 15, @@ -86,7 +88,7 @@ class PointsCaptain extends StatelessWidget { ), const SizedBox(height: 4), Text( - '${'Price:'.tr} ${pricePoint.toStringAsFixed(0)} ${'SYP'.tr}', + '${'Price:'.tr} ${pricePoint.toStringAsFixed(0)} ${CurrencyHelper.currency}', style: TextStyle( fontSize: 11, color: Colors.grey.shade600, @@ -130,47 +132,93 @@ class PointsCaptain extends StatelessWidget { ], ), const SizedBox(height: 8), - Text("${'Amount to charge:'.tr} $countPoint ${'SYP'.tr}", + Text( + "${'Amount to charge:'.tr} $countPoint ${CurrencyHelper.currency}", style: FinanceDesignSystem.subHeadingStyle), const SizedBox(height: 24), - _buildPaymentMethodTile( - icon: Icons.credit_card_rounded, - title: 'Debit Card'.tr, - subtitle: 'E-Cash payment gateway'.tr, - color: Colors.blue, - onTap: () { - Get.back(); - payWithEcashDriver(context, pricePoint.toString()); - }, - ), - const SizedBox(height: 16), - _buildPaymentMethodTile( - image: 'assets/images/syriatel.jpeg', - title: 'Syriatel Cash'.tr, - subtitle: 'Pay using Syriatel mobile wallet'.tr, - color: Colors.red, - onTap: () => _showPhoneInputDialog(context, 'Syriatel'), - ), - const SizedBox(height: 16), - _buildPaymentMethodTile( - image: 'assets/images/shamCash.png', - title: 'Sham Cash'.tr, - subtitle: 'Pay using Sham Cash wallet'.tr, - color: Colors.orange, - onTap: () async { - Get.back(); - bool isAuthSupported = - await LocalAuthentication().isDeviceSupported(); - if (isAuthSupported) { - bool didAuthenticate = - await LocalAuthentication().authenticate( - localizedReason: 'Confirm payment with biometrics'.tr, - ); - if (!didAuthenticate) return; - } - Get.to(() => PaymentScreenSmsProvider(amount: pricePoint)); - }, - ), + if (box.read(BoxName.countryCode) == 'Syria') ...[ + _buildPaymentMethodTile( + icon: Icons.credit_card_rounded, + title: 'Debit Card'.tr, + subtitle: 'E-Cash payment gateway'.tr, + color: Colors.blue, + onTap: () { + Get.back(); + payWithEcashDriver(context, pricePoint.toString()); + }, + ), + const SizedBox(height: 16), + _buildPaymentMethodTile( + image: 'assets/images/syriatel.jpeg', + title: 'Syriatel Cash'.tr, + subtitle: 'Pay using Syriatel mobile wallet'.tr, + color: Colors.red, + onTap: () => _showPhoneInputDialog(context, 'Syriatel'), + ), + const SizedBox(height: 16), + _buildPaymentMethodTile( + image: 'assets/images/shamCash.png', + title: 'Sham Cash'.tr, + subtitle: 'Pay using Sham Cash wallet'.tr, + color: Colors.orange, + onTap: () async { + Get.back(); + bool isAuthSupported = + await LocalAuthentication().isDeviceSupported(); + if (isAuthSupported) { + bool didAuthenticate = + await LocalAuthentication().authenticate( + localizedReason: 'Confirm payment with biometrics'.tr, + ); + if (!didAuthenticate) return; + } + Get.to(() => PaymentScreenSmsProvider(amount: pricePoint)); + }, + ), + const SizedBox(height: 16), + _buildPaymentMethodTile( + image: 'assets/images/cashMTN.png', + title: 'MTN Cash'.tr, + subtitle: 'Pay using MTN Cash wallet'.tr, + color: Colors.yellow.shade700, + onTap: () => _showPhoneInputDialog(context, 'MTN'), + ), + ], + if (box.read(BoxName.countryCode) == 'Jordan') ...[ + _buildPaymentMethodTile( + icon: Icons.qr_code_scanner_rounded, + title: 'CliQ'.tr, + subtitle: 'Pay via CliQ (Alias: siroapp)'.tr, + color: Colors.purple, + onTap: () { + Get.back(); + MyDialog().getDialog( + 'CliQ Payment'.tr, + 'Please transfer the amount to alias: siroapp'.tr, + () => Get.back()); + }, + ), + ], + if (box.read(BoxName.countryCode) == 'Egypt') ...[ + _buildPaymentMethodTile( + icon: Icons.account_balance_wallet_rounded, + title: 'Wallet Payment'.tr, + subtitle: 'Mobile Wallets'.tr, + color: Colors.red, + onTap: () => _showPhoneInputDialog(context, 'PaymobWallet'), + ), + const SizedBox(height: 16), + _buildPaymentMethodTile( + icon: Icons.credit_card_rounded, + title: 'Bank Card Payment'.tr, + subtitle: 'Card Payment'.tr, + color: Colors.blue, + onTap: () { + Get.back(); + // Navigate to Paymob card payment + }, + ), + ], ], ), ), @@ -267,9 +315,10 @@ class PointsCaptain extends StatelessWidget { paymentController.walletphoneController.text); if (provider == 'Syriatel') { await payWithSyriaTelWallet( - context, pricePoint.toString(), 'SYP'); + context, pricePoint.toString(), CurrencyHelper.currency); } else { - await payWithMTNWallet(context, pricePoint.toString(), 'SYP'); + await payWithMTNWallet( + context, pricePoint.toString(), CurrencyHelper.currency); } } }, diff --git a/siro_driver/lib/views/home/my_wallet/walet_captain.dart b/siro_driver/lib/views/home/my_wallet/walet_captain.dart index a29691b..74d8fd9 100755 --- a/siro_driver/lib/views/home/my_wallet/walet_captain.dart +++ b/siro_driver/lib/views/home/my_wallet/walet_captain.dart @@ -1,3 +1,4 @@ +import 'package:siro_driver/constant/currency.dart'; import 'package:local_auth/local_auth.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; @@ -171,7 +172,7 @@ class WalletCaptainRefactored extends StatelessWidget { ?['morning_count'] ?? 0, targetProgress: 5, - reward: "+50 SYP", + reward: "+50 ${CurrencyHelper.currency}", onTap: () => controller.addDriverWalletFromPromo('Morning Promo', 50), ), @@ -183,7 +184,7 @@ class WalletCaptainRefactored extends StatelessWidget { ?['afternoon_count'] ?? 0, targetProgress: 5, - reward: "+50 SYP", + reward: "+50 ${CurrencyHelper.currency}", onTap: () => controller.addDriverWalletFromPromo( 'Afternoon Promo', 50), ), @@ -408,7 +409,13 @@ Future addSyrianPaymentMethod( } class SyrianPayoutController extends GetxController { - String dropdownValue = 'syriatel'; + String dropdownValue = box.read(BoxName.countryCode) == 'Syria' + ? 'syriatel' + : box.read(BoxName.countryCode) == 'Egypt' + ? 'wallet payment' + : box.read(BoxName.countryCode) == 'Jordan' + ? 'cliq' + : 'bank transfer'; void changeValue(String? newValue) { if (newValue != null) { dropdownValue = newValue; @@ -433,7 +440,13 @@ class MyDropDownSyria extends StatelessWidget { style: TextStyle(color: theme.textTheme.bodyLarge?.color), underline: Container(height: 2, color: theme.primaryColor), onChanged: (String? newValue) => controller.changeValue(newValue), - items: ['syriatel', 'mtn'] + items: (box.read(BoxName.countryCode) == 'Syria' + ? ['syriatel', 'mtn cash', 'sham cash'] + : box.read(BoxName.countryCode) == 'Egypt' + ? ['wallet payment', 'bank card payment'] + : box.read(BoxName.countryCode) == 'Jordan' + ? ['cliq'] + : ['bank transfer', 'wallet']) .map>((String value) { return DropdownMenuItem(value: value, child: Text(value.tr)); }).toList(), diff --git a/siro_driver/lib/views/home/my_wallet/weekly_payment_page.dart b/siro_driver/lib/views/home/my_wallet/weekly_payment_page.dart index a8aec48..9a7ec28 100755 --- a/siro_driver/lib/views/home/my_wallet/weekly_payment_page.dart +++ b/siro_driver/lib/views/home/my_wallet/weekly_payment_page.dart @@ -1,3 +1,4 @@ +import 'package:siro_driver/constant/currency.dart'; import 'package:flutter/material.dart'; import 'package:flutter_staggered_animations/flutter_staggered_animations.dart'; import 'package:get/get.dart'; @@ -127,7 +128,7 @@ class WeeklyPaymentPage extends StatelessWidget { style: TextStyle( color: Colors.white.withValues(alpha: 0.8), fontSize: 14)), const SizedBox(height: 8), - Text('${earnings.toStringAsFixed(0)} SYP', + Text('${earnings.toStringAsFixed(0)} ${CurrencyHelper.currency}', style: const TextStyle( color: Colors.white, fontSize: 36, diff --git a/siro_driver/lib/views/home/my_wallet/widgets/balance_card.dart b/siro_driver/lib/views/home/my_wallet/widgets/balance_card.dart index ab43334..b62fb64 100644 --- a/siro_driver/lib/views/home/my_wallet/widgets/balance_card.dart +++ b/siro_driver/lib/views/home/my_wallet/widgets/balance_card.dart @@ -1,3 +1,4 @@ +import 'package:siro_driver/constant/currency.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import '../../../../constant/finance_design_system.dart'; @@ -88,7 +89,7 @@ class BalanceCard extends StatelessWidget { ), const SizedBox(width: 8), Text( - "SYP".tr, + CurrencyHelper.currency, style: TextStyle( color: Colors.white.withOpacity(0.7), fontSize: 18, diff --git a/siro_driver/lib/views/home/my_wallet/widgets/financial_summary_card.dart b/siro_driver/lib/views/home/my_wallet/widgets/financial_summary_card.dart index d371868..359a85a 100644 --- a/siro_driver/lib/views/home/my_wallet/widgets/financial_summary_card.dart +++ b/siro_driver/lib/views/home/my_wallet/widgets/financial_summary_card.dart @@ -1,3 +1,4 @@ +import 'package:siro_driver/constant/currency.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import '../../../../constant/finance_design_system.dart'; @@ -92,7 +93,7 @@ class FinancialSummaryCard extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.end, children: [ Text( - "${item.amount} ${'SYP'.tr}", + "${item.amount} ${CurrencyHelper.currency}", style: TextStyle( fontSize: 16, fontWeight: FontWeight.bold, diff --git a/siro_driver/lib/views/home/my_wallet/widgets/transaction_preview_item.dart b/siro_driver/lib/views/home/my_wallet/widgets/transaction_preview_item.dart index 6ccab13..7d9e460 100644 --- a/siro_driver/lib/views/home/my_wallet/widgets/transaction_preview_item.dart +++ b/siro_driver/lib/views/home/my_wallet/widgets/transaction_preview_item.dart @@ -1,3 +1,4 @@ +import 'package:siro_driver/constant/currency.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import '../../../../constant/finance_design_system.dart'; @@ -103,7 +104,7 @@ class TransactionPreviewItem extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.end, children: [ Text( - "${isCredit ? '+' : '-'}$amount ${'SYP'.tr}", + "${isCredit ? '+' : '-'}$amount ${CurrencyHelper.currency}", style: TextStyle( fontSize: 16, fontWeight: FontWeight.bold, diff --git a/siro_driver/lib/views/home/statistics/widgets/daily_goal_widget.dart b/siro_driver/lib/views/home/statistics/widgets/daily_goal_widget.dart index 53a53b5..31d230f 100644 --- a/siro_driver/lib/views/home/statistics/widgets/daily_goal_widget.dart +++ b/siro_driver/lib/views/home/statistics/widgets/daily_goal_widget.dart @@ -1,3 +1,4 @@ +import 'package:siro_driver/constant/currency.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import '../../../../constant/finance_design_system.dart'; @@ -115,7 +116,7 @@ class DailyGoalWidget extends StatelessWidget { ), const SizedBox(width: 6), Text( - '/ ${controller.dailyGoal.toStringAsFixed(0)} ${'SYP'.tr}', + '/ ${controller.dailyGoal.toStringAsFixed(0)} ${CurrencyHelper.currency}', style: TextStyle( fontSize: 16, fontWeight: FontWeight.w500, @@ -205,7 +206,7 @@ class DailyGoalWidget extends StatelessWidget { ) else Text( - '${'Remaining:'.tr} ${(controller.dailyGoal - controller.dailyEarnings).clamp(0, double.infinity).toStringAsFixed(0)} ${'SYP'.tr}', + '${'Remaining:'.tr} ${(controller.dailyGoal - controller.dailyEarnings).clamp(0, double.infinity).toStringAsFixed(0)} ${CurrencyHelper.currency}', style: TextStyle( fontSize: 11, color: FinanceDesignSystem.textSecondary, @@ -248,7 +249,7 @@ class DailyGoalWidget extends StatelessWidget { ), decoration: InputDecoration( hintText: '5000', - suffixText: 'SYP'.tr, + suffixText: CurrencyHelper.currency, border: OutlineInputBorder( borderRadius: BorderRadius.circular(12), borderSide: BorderSide(color: FinanceDesignSystem.borderColor), diff --git a/siro_driver/lib/views/home/statistics/widgets/monthly_chart_widget.dart b/siro_driver/lib/views/home/statistics/widgets/monthly_chart_widget.dart index 7fce035..a55f92e 100644 --- a/siro_driver/lib/views/home/statistics/widgets/monthly_chart_widget.dart +++ b/siro_driver/lib/views/home/statistics/widgets/monthly_chart_widget.dart @@ -1,3 +1,4 @@ +import 'package:siro_driver/constant/currency.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:fl_chart/fl_chart.dart'; @@ -35,7 +36,7 @@ class MonthlyChartWidget extends StatelessWidget { Row(children: [ _summaryTile( 'Total Earnings'.tr, - '${sc.monthlyTotalEarnings.toStringAsFixed(0)} ${'SYP'.tr}', + '${sc.monthlyTotalEarnings.toStringAsFixed(0)} ${CurrencyHelper.currency}', FinanceDesignSystem.successGreen), const SizedBox(width: 12), _summaryTile('Total Trips'.tr, '${sc.monthlyTotalTrips}', @@ -58,7 +59,7 @@ class MonthlyChartWidget extends StatelessWidget { touchTooltipData: LineTouchTooltipData( getTooltipItems: (spots) => spots .map((s) => LineTooltipItem( - '${s.y.toStringAsFixed(0)} ${'SYP'.tr}', + '${s.y.toStringAsFixed(0)} ${CurrencyHelper.currency}', const TextStyle( color: Colors.white, fontWeight: FontWeight.bold, diff --git a/siro_driver/lib/views/home/statistics/widgets/today_chart_widget.dart b/siro_driver/lib/views/home/statistics/widgets/today_chart_widget.dart index 06602fc..1bae2b1 100644 --- a/siro_driver/lib/views/home/statistics/widgets/today_chart_widget.dart +++ b/siro_driver/lib/views/home/statistics/widgets/today_chart_widget.dart @@ -1,3 +1,4 @@ +import 'package:siro_driver/constant/currency.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:siro_driver/controller/home/captin/home_captain_controller.dart'; @@ -38,7 +39,7 @@ class TodayChartWidget extends StatelessWidget { _buildRow( Icons.monetization_on_rounded, 'Earnings'.tr, - '${hc.totalMoneyToday} ${'SYP'.tr}', + '${hc.totalMoneyToday} ${CurrencyHelper.currency}', FinanceDesignSystem.successGreen), const Divider(height: 24), _buildRow(Icons.local_taxi_rounded, 'Rides'.tr, hc.countRideToday, diff --git a/siro_driver/lib/views/home/statistics/widgets/weekly_chart_widget.dart b/siro_driver/lib/views/home/statistics/widgets/weekly_chart_widget.dart index 3fc7a3b..d8f30a2 100644 --- a/siro_driver/lib/views/home/statistics/widgets/weekly_chart_widget.dart +++ b/siro_driver/lib/views/home/statistics/widgets/weekly_chart_widget.dart @@ -1,3 +1,4 @@ +import 'package:siro_driver/constant/currency.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:fl_chart/fl_chart.dart'; @@ -39,7 +40,7 @@ class WeeklyChartWidget extends StatelessWidget { color: FinanceDesignSystem.successGreen.withOpacity(0.1), borderRadius: BorderRadius.circular(12)), child: Text( - '${sc.weeklyEarnings.toStringAsFixed(0)} ${'SYP'.tr}', + '${sc.weeklyEarnings.toStringAsFixed(0)} ${CurrencyHelper.currency}', style: TextStyle( fontSize: 12, fontWeight: FontWeight.bold, @@ -73,7 +74,7 @@ class WeeklyChartWidget extends StatelessWidget { touchTooltipData: BarTouchTooltipData( getTooltipItem: (group, gi, rod, ri) => BarTooltipItem( - '${rod.toY.toStringAsFixed(0)} ${'SYP'.tr}', + '${rod.toY.toStringAsFixed(0)} ${CurrencyHelper.currency}', const TextStyle( color: Colors.white, fontWeight: FontWeight.bold, diff --git a/siro_driver/lib/views/notification/available_rides_page.dart b/siro_driver/lib/views/notification/available_rides_page.dart index f09219f..befcc51 100755 --- a/siro_driver/lib/views/notification/available_rides_page.dart +++ b/siro_driver/lib/views/notification/available_rides_page.dart @@ -1,3 +1,4 @@ +import 'package:siro_driver/constant/currency.dart'; import 'dart:convert'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -145,7 +146,7 @@ class RideAvailableCard extends StatelessWidget { children: [ Text('Price'.tr, style: AppStyle.subtitle.copyWith(fontSize: 12)), Text( - '${rideInfo['price']} ${'SYP'.tr}', // العملة + '${rideInfo['price']} ${CurrencyHelper.currency}', // العملة style: AppStyle.title.copyWith( fontSize: 20, color: AppColor.primaryColor, height: 1.2), ), diff --git a/siro_rider/.gitignore b/siro_rider/.gitignore index 3820a95..aa09d9b 100644 --- a/siro_rider/.gitignore +++ b/siro_rider/.gitignore @@ -43,3 +43,8 @@ app.*.map.json /android/app/debug /android/app/profile /android/app/release + +# Sensitive keys & environment files +key.properties +*.env +**/lib/env/env.g.dart diff --git a/siro_rider/lib/constant/currency.dart b/siro_rider/lib/constant/currency.dart new file mode 100644 index 0000000..cc40bd2 --- /dev/null +++ b/siro_rider/lib/constant/currency.dart @@ -0,0 +1,15 @@ +import 'package:siro_rider/main.dart'; +import 'package:siro_rider/constant/box_name.dart'; +import 'package:get/get.dart'; + +class CurrencyHelper { + static String get currency { + String country = box.read(BoxName.countryCode) ?? 'Jordan'; + switch (country) { + case 'Syria': return 'SYP'.tr; + case 'Egypt': return 'EGP'.tr; + case 'Jordan': + default: return 'JOD'.tr; + } + } +} diff --git a/siro_rider/lib/constant/links.dart b/siro_rider/lib/constant/links.dart index a1cd129..e6213a3 100644 --- a/siro_rider/lib/constant/links.dart +++ b/siro_rider/lib/constant/links.dart @@ -4,293 +4,318 @@ import 'package:siro_rider/main.dart'; class AppLink { static const String appDomain = 'siromove.com'; ///https://walletintaleq.intaleq.xyz/v1/main - static String paymentServer = 'https://walletintaleq.intaleq.xyz/v2/main'; +static String get paymentServer => 'https://walletintaleq.intaleq.xyz/v2/main'; ///https://api.intaleq.xyz/siro/ride/location - static String location = 'https://api.intaleq.xyz/siro_v3/ride/location'; +static String get location => 'https://api.intaleq.xyz/siro_v3/ride/location'; /// هذا الرابط خاص برحلات الركاب، ويستخدمه السيرفر الجانبي للرحلات (Ride Server Side) للتعامل مع عمليات إلغاء الرحلات وتحديث حالة الرحلات وغيرها من العمليات المتعلقة بالرحلات. /// https://routesy.intaleq.xyz for syria /// for jordan https://routesjo.intaleq.xyz - static String routesOsm = 'https://routesy.intaleq.xyz'; - static String mapSaasRoute = 'https://map-saas.intaleqapp.com/api/maps/route'; - static String reverseGeocoding = +static String get routesOsm => 'https://routesy.intaleq.xyz'; +static String get mapSaasRoute => 'https://map-saas.intaleqapp.com/api/maps/route'; +static String get reverseGeocoding => 'https://map-saas.intaleqapp.com/api/geocoding/reverse'; - static String searchGeocoding = +static String get searchGeocoding => 'https://map-saas.intaleqapp.com/api/geocoding/search'; - static String mapSaasPlaces = +static String get mapSaasPlaces => 'https://map-saas.intaleqapp.com/api/geocoding/places'; ///https://location.intaleq.xyz/siro/ride/location ///locationServerSide هو السيرفر الجانبي الخاص بموقع السائقين، حيث يتم إرسال تحديثات الموقع من التطبيق إلى هذا السيرفر، ومن ثم يقوم هذا السيرفر بتوزيع هذه التحديثات إلى الركاب المتصلين الذين يتابعون السائق في الوقت الحقيقي. - static String locationServerSide = +static String get locationServerSide => 'https://location.intaleq.xyz/siro/ride/location'; + static String get currentCountry => box.read(BoxName.countryCode) ?? 'Jordan'; + ///https://api.intaleq.xyz/siro - static final String endPoint = 'https://api.intaleq.xyz/siro_v3'; + static String get endPoint => server; /// هذا الرابط خاص برحلات الركاب، ويستخدمه السيرفر الجانبي للرحلات (Ride Server Side) للتعامل مع عمليات إلغاء الرحلات وتحديث حالة الرحلات وغيرها من العمليات المتعلقة بالرحلات. /// https://rides.intaleq.xyz/siro - static final String rideServerSide = 'https://rides.intaleq.xyz/siro'; + static String get rideServerSide => 'https://rides.intaleq.xyz/siro'; - ///https://api.intaleq.xyz/siro /// main api link for all api calls except rides and location - static final String server = 'https://api.intaleq.xyz/siro_v3'; + static String get server { + switch (currentCountry) { + case 'Syria': + return 'https://api-syria.siromove.com/siro_v3'; + case 'Egypt': + return 'https://api-egypt.siromove.com/siro_v3'; + case 'Jordan': + default: + return 'https://api-jordan.siromove.com/siro_v3'; + } + } ///https://rides.intaleq.xyz /// هذا الرابط خاص برحلات الركاب، ويستخدمه السيرفر الجانبي للرحلات (Ride Server Side) للتعامل مع عمليات إلغاء الرحلات وتحديث حالة الرحلات وغيرها من العمليات المتعلقة بالرحلات. - static final String serverSocket = 'https://rides.intaleq.xyz'; +static String get serverSocket => 'https://rides.intaleq.xyz'; /// - static String googleMapsLink = 'https://maps.googleapis.com/maps/api/'; +static String get googleMapsLink => 'https://maps.googleapis.com/maps/api/'; /// here map link for searching for places - static String searcMaps = +static String get searcMaps => 'https://autosuggest.search.hereapi.com/v1/autosuggest'; - static String test = "$server/test.php"; +static String get test => "$server/test.php"; //===============firebase========================== - static String getTokens = "$server/ride/firebase/getTokensPassenger.php"; - static String getTokenParent = "$server/ride/firebase/getTokenParent.php"; - static String addTokens = "$server/ride/firebase/add.php"; - static String addFingerPrint = "$paymentServer/ride/firebase/add.php"; - static String addTokensDriver = "$server/ride/firebase/addDriver.php"; - static String packageInfo = "$server/auth/packageInfo.php"; +static String get getTokens => "$server/ride/firebase/getTokensPassenger.php"; +static String get getTokenParent => "$server/ride/firebase/getTokenParent.php"; +static String get addTokens => "$server/ride/firebase/add.php"; +static String get addFingerPrint => "$paymentServer/ride/firebase/add.php"; +static String get addTokensDriver => "$server/ride/firebase/addDriver.php"; +static String get packageInfo => "$server/auth/packageInfo.php"; //=======================Wallet=================== - static String wallet = '$paymentServer/ride/passengerWallet'; - static String walletDriver = '$paymentServer/ride/driverWallet'; - static String getAllPassengerTransaction = +static String get wallet => '$paymentServer/ride/passengerWallet'; +static String get walletDriver => '$paymentServer/ride/driverWallet'; +static String get getAllPassengerTransaction => "$wallet/getAllPassengerTransaction.php"; - static String getWalletByPassenger = "$wallet/getWalletByPassenger.php"; - static String getPassengersWallet = "$wallet/get.php"; - static String payWithPayMobWalletPasenger = +static String get getWalletByPassenger => "$wallet/getWalletByPassenger.php"; +static String get getPassengersWallet => "$wallet/get.php"; +static String get payWithPayMobWalletPasenger => '$paymentServer/ride/payMob/wallet/payWithPayMob.php'; - static String payWithPayMobCardPassenger = +static String get payWithPayMobCardPassenger => '$paymentServer/ride/payMob/payWithPayMob.php'; - static String payWithEcash = "$paymentServer/ecash/payWithEcash.php"; +static String get payWithEcash => "$paymentServer/ecash/payWithEcash.php"; - static String paymetVerifyPassenger = +static String get paymetVerifyPassenger => "$paymentServer/ride/payMob/paymet_verfy.php"; - static String getPassengerWalletArchive = +static String get getPassengerWalletArchive => "$wallet/getPassengerWalletArchive.php"; - static String addDrivePayment = "$paymentServer/ride/payment/add.php"; - static String addSeferWallet = "$paymentServer/ride/seferWallet/add.php"; - static String addPassengersWallet = "$wallet/add.php"; - static String deletePassengersWallet = "$wallet/delete.php"; - static String updatePassengersWallet = "$wallet/update.php"; +static String get addDrivePayment => "$paymentServer/ride/payment/add.php"; +static String get addSeferWallet => "$paymentServer/ride/seferWallet/add.php"; +static String get addPassengersWallet => "$wallet/add.php"; +static String get deletePassengersWallet => "$wallet/delete.php"; +static String get updatePassengersWallet => "$wallet/update.php"; - static String getWalletByDriver = "$walletDriver/getWalletByDriver.php"; - static String getDriversWallet = "$walletDriver/get.php"; - static String addDriversWalletPoints = "$walletDriver/add.php"; - static String deleteDriversWallet = "$walletDriver/delete.php"; - static String updateDriversWallet = "$walletDriver/update.php"; +static String get getWalletByDriver => "$walletDriver/getWalletByDriver.php"; +static String get getDriversWallet => "$walletDriver/get.php"; +static String get addDriversWalletPoints => "$walletDriver/add.php"; +static String get deleteDriversWallet => "$walletDriver/delete.php"; +static String get updateDriversWallet => "$walletDriver/update.php"; //=======================promo===================ride.mobile-app.store/ride/promo/get.php - static String promo = '$server/ride/promo'; - static String getPassengersPromo = "$promo/get.php"; - static String getPromoFirst = "$promo/getPromoFirst.php"; - static String getPromoBytody = "$promo/getPromoBytody.php"; - static String addPassengersPromo = "$promo/add.php"; - static String deletePassengersPromo = "$promo/delete.php"; - static String updatePassengersPromo = "$promo/update.php"; +static String get promo => '$server/ride/promo'; +static String get getPassengersPromo => "$promo/get.php"; +static String get getPromoFirst => "$promo/getPromoFirst.php"; +static String get getPromoBytody => "$promo/getPromoBytody.php"; +static String get addPassengersPromo => "$promo/add.php"; +static String get deletePassengersPromo => "$promo/delete.php"; +static String get updatePassengersPromo => "$promo/update.php"; //===============contact========================== - static String savePhones = "$server/ride/egyptPhones/add.php"; - static String getPhones = "$server/ride/egyptPhones/get.php"; +static String get savePhones => "$server/ride/egyptPhones/add.php"; +static String get getPhones => "$server/ride/egyptPhones/get.php"; ////=======================cancelRide=================== // static String ride = '$server/ride'; - static String addCancelRideFromPassenger = +static String get addCancelRideFromPassenger => "$rideServerSide/cancelRide/add.php"; - static String cancelRide = "$rideServerSide/cancelRide/get.php"; +static String get cancelRide => "$rideServerSide/cancelRide/get.php"; //-----------------ridessss------------------ - static String addRides = "$rideServerSide/ride/rides/add.php"; - static String getRides = "$rideServerSide/ride/rides/get.php"; - static String getRideOrderID = +static String get addRides => "$rideServerSide/ride/rides/add.php"; +static String get getRides => "$rideServerSide/ride/rides/get.php"; +static String get getRideOrderID => "$rideServerSide/ride/rides/getRideOrderID.php"; - static String getRideStatus = "$rideServerSide/ride/rides/getRideStatus.php"; - static String getRideStatusBegin = +static String get getRideStatus => "$rideServerSide/ride/rides/getRideStatus.php"; +static String get getRideStatusBegin => "$rideServerSide/ride/rides/getRideStatusBegin.php"; - static String getRideStatusFromStartApp = +static String get getRideStatusFromStartApp => "$server/ride/rides/getRideStatusFromStartApp.php"; - static String updateRides = "$rideServerSide/ride/rides/update.php"; - static String updateStausFromSpeed = +static String get updateRides => "$rideServerSide/ride/rides/update.php"; +static String get updateStausFromSpeed => "$rideServerSide/ride/rides/updateStausFromSpeed.php"; - static String deleteRides = "$rideServerSide/ride/rides/delete.php"; +static String get deleteRides => "$rideServerSide/ride/rides/delete.php"; //-----------------DriverPayment------------------ - static String adddriverScam = "$server/driver_scam/add.php"; - static String getdriverScam = "$server/ride/driver_scam/get.php"; +static String get adddriverScam => "$server/driver_scam/add.php"; +static String get getdriverScam => "$server/ride/driver_scam/get.php"; /////////---getKazanPercent===//////////// - static String getKazanPercent = "$server/ride/kazan/get.php"; - static String addKazanPercent = "$server/ride/kazan/add.php"; +static String get getKazanPercent => "$server/ride/kazan/get.php"; +static String get addKazanPercent => "$server/ride/kazan/add.php"; ////-----------------DriverPayment------------------ - static String addDriverpayment = "$paymentServer/ride/payment/add.php"; - static String addDriverPaymentPoints = +static String get addDriverpayment => "$paymentServer/ride/payment/add.php"; +static String get addDriverPaymentPoints => "$paymentServer/ride/driverPayment/add.php"; - static String addPaymentTokenPassenger = +static String get addPaymentTokenPassenger => "$paymentServer/ride/passengerWallet/addPaymentTokenPassenger.php"; - static String addPaymentTokenDriver = +static String get addPaymentTokenDriver => "$paymentServer/ride/driverWallet/addPaymentToken.php"; - static String getDriverPaymentPoints = +static String get getDriverPaymentPoints => "$paymentServer/ride/driverWallet/get.php"; - static String payWithEcashPassenger = +static String get payWithEcashPassenger => "$paymentServer/ride/ecash/passenger/payWithEcash.php"; - static String payWithMTNConfirm = +static String get payWithMTNConfirm => "$paymentServer/ride/mtn/passenger/mtn_confirm.php"; - static String payWithMTNStart = +static String get payWithMTNStart => "$paymentServer/ride/mtn/passenger/mtn_start.php"; - static String payWithSyriatelConfirm = +static String get payWithSyriatelConfirm => "$paymentServer/ride/syriatel/passenger/confirm_payment.php"; - static String payWithSyriatelStart = +static String get payWithSyriatelStart => "$paymentServer/ride/syriatel/passenger/start_payment.php"; - static String getDriverpaymentToday = "$paymentServer/ride/payment/get.php"; - static String getCountRide = "$paymentServer/ride/payment/getCountRide.php"; - static String getAllPaymentFromRide = +static String get getDriverpaymentToday => "$paymentServer/ride/payment/get.php"; +static String get getCountRide => "$paymentServer/ride/payment/getCountRide.php"; +static String get getAllPaymentFromRide => "$paymentServer/ride/payment/getAllPayment.php"; - static String getAllPaymentVisa = +static String get getAllPaymentVisa => "$paymentServer/ride/payment/getAllPaymentVisa.php"; +static String get createMtnInvoice => + "$paymentServer/ride/mtn_new/create_mtn_invoice.php"; +static String get createCliqInvoice => + "$paymentServer/ride/cliq/create_cliq_invoice.php"; + +static String get checkMtnStatus => "$paymentServer/ride/mtn_new/check_status.php"; +static String get checkCliqStatus => "$paymentServer/ride/cliq/check_status.php"; +static String get uploadMtnProof => "$paymentServer/ride/mtn_new/verify_payment_ai.php"; +static String get uploadCliqProof => "$paymentServer/ride/cliq/verify_payment_ai.php"; //-----------------Passenger NotificationCaptain------------------ - static String addNotificationPassenger = +static String get addNotificationPassenger => "$server/ride/notificationPassenger/add.php"; - static String getNotificationPassenger = +static String get getNotificationPassenger => "$server/ride/notificationPassenger/get.php"; - static String updateNotificationPassenger = +static String get updateNotificationPassenger => "$server/ride/notificationPassenger/update.php"; //-----------------Driver NotificationCaptain------------------ - static String addNotificationCaptain = +static String get addNotificationCaptain => "$server/ride/notificationCaptain/add.php"; - static String addWaitingRide = +static String get addWaitingRide => "$server/ride/notificationCaptain/addWaitingRide.php"; - static String updateWaitingTrip = +static String get updateWaitingTrip => "$server/ride/notificationCaptain/updateWaitingTrip.php"; - static String getRideWaiting = +static String get getRideWaiting => "$endPoint/ride/notificationCaptain/getRideWaiting.php"; - static String getNotificationCaptain = +static String get getNotificationCaptain => "$server/ride/notificationCaptain/get.php"; - static String updateNotificationCaptain = +static String get updateNotificationCaptain => "$server/ride/notificationCaptain/update.php"; - static String deleteNotificationCaptain = +static String get deleteNotificationCaptain => "$server/ride/notificationCaptain/delete.php"; //-----------------invitor------------------ - static String getUnifiedCode = "$server/ride/invitor/get_unified_code.php"; - static String addUnifiedInvite = "$server/ride/invitor/add_unified_invite.php"; - static String getPassengerReferrals = "$server/ride/invitor/get_passenger_referrals.php"; - static String addInviteDriver = "$server/ride/invitor/add.php"; - static String addInvitationPassenger = +static String get getUnifiedCode => "$server/ride/invitor/get_unified_code.php"; +static String get addUnifiedInvite => "$server/ride/invitor/add_unified_invite.php"; +static String get getPassengerReferrals => "$server/ride/invitor/get_passenger_referrals.php"; +static String get addInviteDriver => "$server/ride/invitor/add.php"; +static String get addInvitationPassenger => "$server/ride/invitor/addInvitationPassenger.php"; - static String getInviteDriver = "$server/ride/invitor/get.php"; - static String getDriverInvitationToPassengers = +static String get getInviteDriver => "$server/ride/invitor/get.php"; +static String get getDriverInvitationToPassengers => "$server/ride/invitor/getDriverInvitationToPassengers.php"; - static String updateInviteDriver = "$server/ride/invitor/update.php"; - static String updatePassengerGift = +static String get updateInviteDriver => "$server/ride/invitor/update.php"; +static String get updatePassengerGift => "$server/ride/invitor/updatePassengerGift.php"; +static String get claimInviteReward => "$server/ride/invitor/claim.php"; //-----------------Api Key------------------ - static String addApiKey = "$server/ride/apiKey/add.php"; - static String getApiKey = "$server/ride/apiKey/get.php"; - static String getCnMap = "$server/auth/cnMap.php"; - static String updateApiKey = "$server/ride/apiKey/update.php"; - static String deleteApiKey = "$server/ride/apiKey/delete.php"; - static String getPlacesSyria = "$server/ride/places_syria/get.php"; +static String get addApiKey => "$server/ride/apiKey/add.php"; +static String get getApiKey => "$server/ride/apiKey/get.php"; +static String get getCnMap => "$server/auth/cnMap.php"; +static String get updateApiKey => "$server/ride/apiKey/update.php"; +static String get deleteApiKey => "$server/ride/apiKey/delete.php"; +static String get getPlacesSyria => "$server/ride/places_syria/get.php"; //-----------------Feed Back------------------ - static String addFeedBack = "$server/ride/feedBack/add.php"; - static String add_solve_all = "$server/ride/feedBack/add_solve_all.php"; - static String uploadAudio = "$server/ride/feedBack/upload_audio.php"; - static String getFeedBack = "$server/ride/feedBack/get.php"; - static String updateFeedBack = "$server/ride/feedBack/updateFeedBack.php"; +static String get addFeedBack => "$server/ride/feedBack/add.php"; +static String get add_solve_all => "$server/ride/feedBack/add_solve_all.php"; +static String get uploadAudio => "$server/ride/feedBack/upload_audio.php"; +static String get getFeedBack => "$server/ride/feedBack/get.php"; +static String get updateFeedBack => "$server/ride/feedBack/updateFeedBack.php"; //-----------------Tips------------------ - static String addTips = "$server/ride/tips/add.php"; - static String getTips = "$server/ride/tips/get.php"; - static String updateTips = "$server/ride/tips/update.php"; +static String get addTips => "$server/ride/tips/add.php"; +static String get getTips => "$server/ride/tips/get.php"; +static String get updateTips => "$server/ride/tips/update.php"; //-----------------Help Center------------------ - static String addhelpCenter = "$server/ride/helpCenter/add.php"; - static String gethelpCenter = "$server/ride/helpCenter/get.php"; - static String getByIdhelpCenter = "$server/ride/helpCenter/getById.php"; - static String updatehelpCenter = "$server/ride/helpCenter/update.php"; - static String deletehelpCenter = "$server/ride/helpCenter/delete.php"; +static String get addhelpCenter => "$server/ride/helpCenter/add.php"; +static String get gethelpCenter => "$server/ride/helpCenter/get.php"; +static String get getByIdhelpCenter => "$server/ride/helpCenter/getById.php"; +static String get updatehelpCenter => "$server/ride/helpCenter/update.php"; +static String get deletehelpCenter => "$server/ride/helpCenter/delete.php"; //-----------------license------------------ - static String addLicense = "$server/ride/license/add.php"; - static String getLicense = "$server/ride/license/get.php"; - static String updateLicense = "$server/ride/license/updateFeedBack.php"; +static String get addLicense => "$server/ride/license/add.php"; +static String get getLicense => "$server/ride/license/get.php"; +static String get updateLicense => "$server/ride/license/updateFeedBack.php"; //-----------------RegisrationCar------------------ - static String addRegisrationCar = "$server/ride/RegisrationCar/add.php"; - static String getRegisrationCar = +static String get addRegisrationCar => "$server/ride/RegisrationCar/add.php"; +static String get getRegisrationCar => "${box.read(BoxName.serverChosen)}/server/ride/RegisrationCar/get.php"; - static String selectDriverAndCarForMishwariTrip = +static String get selectDriverAndCarForMishwariTrip => "$server/ride/RegisrationCar/selectDriverAndCarForMishwariTrip.php"; - static String updateRegisrationCar = "$server/ride/RegisrationCar/update.php"; +static String get updateRegisrationCar => "$server/ride/RegisrationCar/update.php"; //-----------------mishwari------------------ - static String addMishwari = "$server/ride/mishwari/add.php"; - static String cancelMishwari = "$server/ride/mishwari/cancel.php"; - static String getMishwari = "$server/ride/mishwari/get.php"; - static String sendChatMessage = "$server/ride/chat/send_message.php"; +static String get addMishwari => "$server/ride/mishwari/add.php"; +static String get cancelMishwari => "$server/ride/mishwari/cancel.php"; +static String get getMishwari => "$server/ride/mishwari/get.php"; +static String get sendChatMessage => "$server/ride/chat/send_message.php"; //-----------------DriverOrder------------------ - static String addDriverOrder = "$server/ride/driver_order/add.php"; - static String getDriverOrder = "$server/ride/driver_order/get.php"; - static String getOrderCancelStatus = +static String get addDriverOrder => "$server/ride/driver_order/add.php"; +static String get getDriverOrder => "$server/ride/driver_order/get.php"; +static String get getOrderCancelStatus => "$server/ride/driver_order/getOrderCancelStatus.php"; - static String updateDriverOrder = "$server/ride/driver_order/update.php"; - static String deleteDriverOrder = "$server/ride/driver_order/delete.php"; +static String get updateDriverOrder => "$server/ride/driver_order/update.php"; +static String get deleteDriverOrder => "$server/ride/driver_order/delete.php"; // ===================================== - static String addRateToPassenger = "$server/ride/rate/add.php"; - static String savePlacesServer = "$server/ride/places/add.php"; - static String getapiKey = "$server/ride/apiKey/get.php"; - static String addRateToDriver = "$server/ride/rate/addRateToDriver.php"; - static String getDriverRate = "$server/ride/rate/getDriverRate.php"; - static String getPassengerRate = "$server/ride/rate/getPassengerRate.php"; +static String get addRateToPassenger => "$server/ride/rate/add.php"; + static String get savePlacesServer => "$server/ride/places/add.php"; + static String get getapiKey => "$server/ride/apiKey/get.php"; + + // Endpoint لجلب التسعيرة من السيرفر (Server-Side Pricing) + static String get getPrices => "$server/ride/pricing/get.php"; + + static String get addRateToDriver => "$server/ride/rate/addRateToDriver.php"; +static String get getDriverRate => "$server/ride/rate/getDriverRate.php"; +static String get getPassengerRate => "$server/ride/rate/getPassengerRate.php"; ////////////////emails ============// - static String sendEmailToPassengerForTripDetails = +static String get sendEmailToPassengerForTripDetails => "$server/ride/rides/emailToPassengerTripDetail.php"; // =========================================== - static String pathImage = "$server/upload/types/"; - static String uploadImage = "$server/uploadImage.php"; - static String uploadImage1 = "$server/uploadImage1.php"; - static String uploadImagePortrate = "$server/uploadImagePortrate.php"; - static String uploadImageType = "$server/uploadImageType.php"; +static String get pathImage => "$server/upload/types/"; +static String get uploadImage => "$server/uploadImage.php"; +static String get uploadImage1 => "$server/uploadImage1.php"; +static String get uploadImagePortrate => "$server/uploadImagePortrate.php"; +static String get uploadImageType => "$server/uploadImageType.php"; //=============egypt documents ============== - static String uploadEgyptidFront = +static String get uploadEgyptidFront => "$server/EgyptDocuments/uploadEgyptidFront.php"; - static String uploadEgypt = "$server/uploadEgypt.php"; +static String get uploadEgypt => "$server/uploadEgypt.php"; //==================certifcate========== // static String location = '${box.read(BoxName.serverChosen)}/ride/location'; - static String getCarsLocationByPassenger = "$location/get.php"; +static String get getCarsLocationByPassenger => "$location/get.php"; - static String getLocationAreaLinks = +static String get getLocationAreaLinks => '$server/ride/location/get_location_area_links.php'; - static String addpassengerLocation = +static String get addpassengerLocation => "$locationServerSide/addpassengerLocation.php"; - static String getCarsLocationByPassengerSpeed = "$location/getSpeed.php"; - static String getCarsLocationByPassengerComfort = "$location/getComfort.php"; - static String getCarsLocationByPassengerBalash = "$location/getBalash.php"; - static String getCarsLocationByPassengerElectric = +static String get getCarsLocationByPassengerSpeed => "$location/getSpeed.php"; +static String get getCarsLocationByPassengerComfort => "$location/getComfort.php"; +static String get getCarsLocationByPassengerBalash => "$location/getBalash.php"; +static String get getCarsLocationByPassengerElectric => "$location/getElectric.php"; - static String getCarsLocationByPassengerPinkBike = +static String get getCarsLocationByPassengerPinkBike => "$location/getPinkBike.php"; - static String getCarsLocationByPassengerVan = +static String get getCarsLocationByPassengerVan => "$location/getCarsLocationByPassengerVan.php"; - static String getCarsLocationByPassengerDelivery = +static String get getCarsLocationByPassengerDelivery => "$location/getDelivery.php"; - static String getLocationParents = "$location/getLocationParents.php"; - static String getFemalDriverLocationByPassenger = +static String get getLocationParents => "$location/getLocationParents.php"; +static String get getFemalDriverLocationByPassenger => "$location/getFemalDriver.php"; - static String getDriverCarsLocationToPassengerAfterApplied = +static String get getDriverCarsLocationToPassengerAfterApplied => "$location/getDriverCarsLocationToPassengerAfterApplied.php"; // static String addCarsLocationByPassenger = "$location/add.php"; // static String deleteCarsLocationByPassenger = "$location/delete.php"; @@ -300,76 +325,76 @@ class AppLink { // "$location/getTotalDriverDurationToday.php"; //==================Blog============= - static String profile = '$server/ride/profile'; - static String getprofile = "$profile/get.php"; - static String getCaptainProfile = "$profile/getCaptainProfile.php"; - static String addprofile = "$profile/add.php"; - static String deleteprofile = "$profile/delete.php"; - static String updateprofile = "$profile/update.php"; +static String get profile => '$server/ride/profile'; +static String get getprofile => "$profile/get.php"; +static String get getCaptainProfile => "$profile/getCaptainProfile.php"; +static String get addprofile => "$profile/add.php"; +static String get deleteprofile => "$profile/delete.php"; +static String get updateprofile => "$profile/update.php"; //===================Auth============ - static String auth = '$server/auth'; - static String login = "$auth/login.php"; - static String loginJwtRider = "$server/login.php"; - static String loginJwtWalletRider = "$server/loginWallet.php"; - static String loginFirstTime = "$server/loginFirstTime.php"; - static String getTesterApp = "$auth/Tester/getTesterApp.php"; - static String updateTesterApp = "$auth/Tester/updateTesterApp.php"; - static String signUp = "$auth/signup.php"; - static String sendVerifyEmail = "$auth/sendVerifyEmail.php"; - static String loginFromGooglePassenger = "$auth/loginFromGooglePassenger.php"; - static String checkPhoneNumberISVerfiedPassenger = +static String get auth => '$server/auth'; +static String get login => "$auth/login.php"; +static String get loginJwtRider => "$server/login.php"; +static String get loginJwtWalletRider => "$server/loginWallet.php"; +static String get loginFirstTime => "$server/loginFirstTime.php"; +static String get getTesterApp => "$auth/Tester/getTesterApp.php"; +static String get updateTesterApp => "$auth/Tester/updateTesterApp.php"; +static String get signUp => "$auth/signup.php"; +static String get sendVerifyEmail => "$auth/sendVerifyEmail.php"; +static String get loginFromGooglePassenger => "$auth/loginFromGooglePassenger.php"; +static String get checkPhoneNumberISVerfiedPassenger => "$auth/checkPhoneNumberISVerfiedPassenger.php"; - static String passengerRemovedAccountEmail = +static String get passengerRemovedAccountEmail => "$auth/passengerRemovedAccountEmail.php"; - static String verifyEmail = "$auth/verifyEmail.php"; +static String get verifyEmail => "$auth/verifyEmail.php"; //===================Auth Captin============ - static String authCaptin = '$server/auth/captin'; - static String loginCaptin = "$authCaptin/login.php"; - static String loginFromGoogleCaptin = "$authCaptin/loginFromGoogle.php"; - static String signUpCaptin = "$authCaptin/register.php"; - static String sendVerifyEmailCaptin = "$authCaptin/sendVerifyEmail.php"; - static String sendVerifyOtpMessage = "$server/auth/otpmessage.php"; - static String verifyOtpMessage = "$server/auth/verifyOtpMessage.php"; - static String verifyEmailCaptin = "$authCaptin/verifyEmail.php"; - static String removeUser = "$authCaptin/removeAccount.php"; - static String deletecaptainAccounr = "$authCaptin/deletecaptainAccounr.php"; - static String updateAccountBank = "$authCaptin/updateAccountBank.php"; - static String getAccount = "$authCaptin/getAccount.php"; - static String updatePassengersInvitation = +static String get authCaptin => '$server/auth/captin'; +static String get loginCaptin => "$authCaptin/login.php"; +static String get loginFromGoogleCaptin => "$authCaptin/loginFromGoogle.php"; +static String get signUpCaptin => "$authCaptin/register.php"; +static String get sendVerifyEmailCaptin => "$authCaptin/sendVerifyEmail.php"; +static String get sendVerifyOtpMessage => "$server/auth/otpmessage.php"; +static String get verifyOtpMessage => "$server/auth/verifyOtpMessage.php"; +static String get verifyEmailCaptin => "$authCaptin/verifyEmail.php"; +static String get removeUser => "$authCaptin/removeAccount.php"; +static String get deletecaptainAccounr => "$authCaptin/deletecaptainAccounr.php"; +static String get updateAccountBank => "$authCaptin/updateAccountBank.php"; +static String get getAccount => "$authCaptin/getAccount.php"; +static String get updatePassengersInvitation => "$server/ride/invitor/updatePassengersInvitation.php"; - static String updateDriverInvitationDirectly = +static String get updateDriverInvitationDirectly => "$server/ride/invitor/updateDriverInvitationDirectly.php"; //===================Admin Captin============ - static String getPassengerDetailsByPassengerID = +static String get getPassengerDetailsByPassengerID => "$server/Admin/getPassengerDetailsByPassengerID.php"; - static String getPassengerDetails = "$server/Admin/getPassengerDetails.php"; - static String getPassengerbyEmail = "$server/Admin/getPassengerbyEmail.php"; - static String addAdminUser = "$server/Admin/adminUser/add.php"; - static String getAdminUser = "$server/Admin/adminUser/get.php"; - static String addError = "$server/Admin/errorApp.php"; - static String getCaptainDetailsByEmailOrIDOrPhone = +static String get getPassengerDetails => "$server/Admin/getPassengerDetails.php"; +static String get getPassengerbyEmail => "$server/Admin/getPassengerbyEmail.php"; +static String get addAdminUser => "$server/Admin/adminUser/add.php"; +static String get getAdminUser => "$server/Admin/adminUser/get.php"; +static String get addError => "$server/Admin/errorApp.php"; +static String get getCaptainDetailsByEmailOrIDOrPhone => "$server/Admin/AdminCaptain/getCaptainDetailsByEmailOrIDOrPhone.php"; - static String getCaptainDetails = "$server/Admin/AdminCaptain/get.php"; - static String getRidesPerMonth = +static String get getCaptainDetails => "$server/Admin/AdminCaptain/get.php"; +static String get getRidesPerMonth => "$server/Admin/AdminRide/getRidesPerMonth.php"; - static String getRidesDetails = "$server/Admin/AdminRide/get.php"; +static String get getRidesDetails => "$server/Admin/AdminRide/get.php"; //////////Sms egypt/////////// - static String sendSms = "https://sms.kazumi.me/api/sms/send-sms"; - static String sendSmsFromPHP = +static String get sendSms => "https://sms.kazumi.me/api/sms/send-sms"; +static String get sendSmsFromPHP => '$server/auth/sms_new_backend/sendOtpPassenger.php'; - static String verifyOtpPassenger = +static String get verifyOtpPassenger => '$server/auth/passengerOTP/verifyOtpPassenger.php'; - static String senddlr = "https://sms.kazumi.me/api/sms/send-dlr"; - static String sendvalidity = "https://sms.kazumi.me/api/sms/send-validity"; - static String sendmany = "https://sms.kazumi.me/api/sms/send-many"; - static String checkCredit = "https://sms.kazumi.me/api/sms/check-credit"; - static String getSender = "$server/auth/sms/getSender.php"; - static String checkStatus = "https://sms.kazumi.me/api/sms/check-status"; - static String updatePhoneInvalidSMSPassenger = +static String get senddlr => "https://sms.kazumi.me/api/sms/send-dlr"; +static String get sendvalidity => "https://sms.kazumi.me/api/sms/send-validity"; +static String get sendmany => "https://sms.kazumi.me/api/sms/send-many"; +static String get checkCredit => "https://sms.kazumi.me/api/sms/check-credit"; +static String get getSender => "$server/auth/sms/getSender.php"; +static String get checkStatus => "https://sms.kazumi.me/api/sms/check-status"; +static String get updatePhoneInvalidSMSPassenger => "$server/auth/sms/updatePhoneInvalidSMSPassenger.php"; } diff --git a/siro_rider/lib/controller/auth/otp_controller.dart b/siro_rider/lib/controller/auth/otp_controller.dart index ee15547..e311dcc 100644 --- a/siro_rider/lib/controller/auth/otp_controller.dart +++ b/siro_rider/lib/controller/auth/otp_controller.dart @@ -1,5 +1,4 @@ import 'package:siro_rider/constant/links.dart'; -import 'package:siro_rider/views/home/map_page_passenger.dart'; import 'package:get/get.dart'; import '../../../constant/box_name.dart'; import '../../../main.dart'; @@ -8,6 +7,7 @@ import '../../views/auth/otp_page.dart'; import '../../views/widgets/error_snakbar.dart'; import '../functions/crud.dart'; import '../functions/package_info.dart'; +import '../functions/country_logic.dart'; import 'login_controller.dart'; // --- Helper Class for Phone Authentication --- @@ -19,67 +19,13 @@ class PhoneAuthHelper { static final String _verifyOtpUrl = '${_baseUrl}verifyOtp.php'; static final String _registerUrl = '${_baseUrl}register_passenger.php'; - static String formatSyrianPhone(String phone) { - // Remove spaces, symbols, +, -, () - phone = phone.replaceAll(RegExp(r'[ \-\(\)\+]'), '').trim(); - - // Normalize 00963 → 963 - if (phone.startsWith('00963')) { - phone = phone.replaceFirst('00963', '963'); - } - - // Normalize 0963 → 963 - if (phone.startsWith('0963')) { - phone = phone.replaceFirst('0963', '963'); - } - - // NEW: Fix 96309xxxx → 9639xxxx - if (phone.startsWith('96309')) { - phone = '9639' + phone.substring(5); // remove the "0" after 963 - } - - // If starts with 9630 → correct to 9639 - if (phone.startsWith('9630')) { - phone = '9639' + phone.substring(4); - } - - // If already in correct format: 9639xxxxxxxx - if (phone.startsWith('9639') && phone.length == 12) { - return phone; - } - - // If starts with 963 but missing the 9 - if (phone.startsWith('963') && phone.length > 3) { - // Ensure it begins with 9639 - if (!phone.startsWith('9639')) { - phone = '9639' + phone.substring(3); - } - return phone; - } - - // If starts with 09xxxxxxxx → 9639xxxxxxxx - if (phone.startsWith('09')) { - return '963' + phone.substring(1); - } - - // If 9xxxxxxxx (9 digits) - if (phone.startsWith('9') && phone.length == 9) { - return '963' + phone; - } - - // If starts with incorrect 0xxxxxxx → assume Syrian and fix - if (phone.startsWith('0') && phone.length == 10) { - return '963' + phone.substring(1); - } - - return phone; - } + // removed formatSyrianPhone /// Sends an OTP to the provided phone number. static Future sendOtp(String phoneNumber) async { try { // إصلاح الرقم قبل الإرسال - final fixedPhone = formatSyrianPhone(phoneNumber); + final fixedPhone = CountryLogic.formatCurrentCountryPhone(phoneNumber); final response = await CRUD().post( link: _sendOtpUrl, @@ -109,7 +55,7 @@ class PhoneAuthHelper { static Future verifyOtp(String phoneNumber, String otpCode) async { try { - final fixedPhone = formatSyrianPhone(phoneNumber); + final fixedPhone = CountryLogic.formatCurrentCountryPhone(phoneNumber); final response = await CRUD().post( link: _verifyOtpUrl, payload: { diff --git a/siro_rider/lib/controller/firebase/firbase_messge.dart b/siro_rider/lib/controller/firebase/firbase_messge.dart index 3c8f947..8d9f999 100644 --- a/siro_rider/lib/controller/firebase/firbase_messge.dart +++ b/siro_rider/lib/controller/firebase/firbase_messge.dart @@ -666,7 +666,7 @@ class DriverTipWidget extends StatelessWidget { Toast.show( context, - '${'Tip is '.tr}${(controller.totalPassenger) * (double.parse(box.read(BoxName.tipPercentage.toString())))}', + '${'Tip is '.tr}${(double.parse(controller.totalPassenger.toString())) * (double.parse(box.read(BoxName.tipPercentage.toString())))}', AppColor.cyanBlue); controller.update(); }, @@ -685,7 +685,7 @@ class DriverTipWidget extends StatelessWidget { box.write(BoxName.tipPercentage, '0.10'); Toast.show( context, - '${'Tip is'.tr} ${(controller.totalPassenger) * (double.parse(box.read(BoxName.tipPercentage.toString())))}', + '${'Tip is'.tr} ${(double.parse(controller.totalPassenger.toString())) * (double.parse(box.read(BoxName.tipPercentage.toString())))}', AppColor.cyanBlue); controller.update(); }, @@ -704,7 +704,7 @@ class DriverTipWidget extends StatelessWidget { box.write(BoxName.tipPercentage, '0.15'); Toast.show( context, - '${'Tip is'.tr} ${(controller.totalPassenger) * (double.parse(box.read(BoxName.tipPercentage.toString())))}', + '${'Tip is'.tr} ${(double.parse(controller.totalPassenger.toString())) * (double.parse(box.read(BoxName.tipPercentage.toString())))}', AppColor.cyanBlue); controller.update(); }, @@ -723,7 +723,7 @@ class DriverTipWidget extends StatelessWidget { box.write(BoxName.tipPercentage, '0.20'); Toast.show( context, - '${'Tip is'.tr} ${(controller.totalPassenger) * (double.parse(box.read(BoxName.tipPercentage.toString())))}', + '${'Tip is'.tr} ${(double.parse(controller.totalPassenger.toString())) * (double.parse(box.read(BoxName.tipPercentage.toString())))}', AppColor.cyanBlue); controller.update(); }, @@ -754,7 +754,7 @@ class DriverTipWidget extends StatelessWidget { child: Padding( padding: const EdgeInsets.all(6), child: Text( - '${(controller.totalPassenger) * (double.parse(box.read(BoxName.tipPercentage.toString())))} ${box.read(BoxName.countryCode) == 'Egypt' ? 'LE'.tr : 'JOD'.tr}', + '${(double.parse(controller.totalPassenger.toString())) * (double.parse(box.read(BoxName.tipPercentage.toString())))} ${box.read(BoxName.countryCode) == 'Egypt' ? 'LE'.tr : 'JOD'.tr}', style: AppStyle.title, ), ), diff --git a/siro_rider/lib/controller/functions/country_logic.dart b/siro_rider/lib/controller/functions/country_logic.dart new file mode 100644 index 0000000..ce12c0a --- /dev/null +++ b/siro_rider/lib/controller/functions/country_logic.dart @@ -0,0 +1,94 @@ +import 'package:siro_rider/constant/box_name.dart'; +import 'package:siro_rider/main.dart'; + +class CountryLogic { + /// Formats the phone number based on the country's dialing rules. + static String formatPhone(String phone, String country) { + phone = phone.replaceAll(RegExp(r'[ \-\(\)\+]'), '').trim(); + + if (country == 'Egypt') { + // Rule: 010, 011, 012, 015 -> 2010, 2011, 2012, 2015 + if (phone.startsWith('0020')) phone = phone.replaceFirst('0020', '20'); + if (phone.startsWith('01') && phone.length >= 10) { + return '20${phone.substring(1)}'; + } + if (phone.startsWith('1') && + phone.length >= 9 && + !phone.startsWith('20')) { + return '20$phone'; + } + if (!phone.startsWith('20') && phone.length > 8) return '20$phone'; + } else if (country == 'Jordan') { + // Rule: 07x -> 9627x + if (phone.startsWith('00962')) phone = phone.replaceFirst('00962', '962'); + if (phone.startsWith('07') && phone.length >= 9) { + return '962${phone.substring(1)}'; + } + if (phone.startsWith('7') && + phone.length >= 8 && + !phone.startsWith('962')) { + return '962$phone'; + } + if (!phone.startsWith('962') && phone.length > 7) return '962$phone'; + } else { + // Default to Syria + if (phone.startsWith('00963')) phone = phone.replaceFirst('00963', '963'); + if (phone.startsWith('0963')) phone = phone.replaceFirst('0963', '963'); + if (phone.startsWith('096309')) { + phone = phone.replaceFirst('096309', '963'); + } + if (phone.startsWith('96309')) phone = '9639${phone.substring(5)}'; + if (phone.startsWith('9630')) phone = '9639${phone.substring(4)}'; + if (phone.startsWith('9639') && phone.length == 12) return phone; + if (phone.startsWith('963') && + phone.length > 3 && + !phone.startsWith('9639')) { + phone = '9639${phone.substring(3)}'; + } + if (phone.startsWith('09')) return '963${phone.substring(1)}'; + if (phone.startsWith('9') && phone.length == 9) return '963$phone'; + if (phone.startsWith('0') && phone.length == 10) { + return '963${phone.substring(1)}'; + } + } + return phone; + } + + /// Returns the default country prefix (EG, JO, SY) for UI initial selection. + static String getCountryPrefix(String country) { + if (country == 'Egypt') return 'EG'; + if (country == 'Jordan') return 'JO'; + return 'SY'; + } + + /// Returns the default emergency number for the country. + static String getEmergencyNumber(String country) { + if (country == 'Egypt') return '122'; + if (country == 'Jordan') return '911'; + return '112'; // Syria + } + + /// Returns the hint text for phone inputs based on the country. + static String getPhoneHint(String country) { + if (country == 'Egypt') return 'e.g. 01012345678 (Default +20)'; + if (country == 'Jordan') return 'e.g. 0791234567 (Default +962)'; + return 'e.g. 0912345678 (Default +963)'; // Syria + } + + /// Helper to format phone using the current country in box. + static String formatCurrentCountryPhone(String phone) { + String cleanPhone = phone.replaceAll(RegExp(r'[ \-\(\)]'), '').trim(); + if (cleanPhone.startsWith('+963') || cleanPhone.startsWith('00963')) { + return formatPhone(cleanPhone, 'Syria'); + } + if (cleanPhone.startsWith('+20') || cleanPhone.startsWith('0020')) { + return formatPhone(cleanPhone, 'Egypt'); + } + if (cleanPhone.startsWith('+962') || cleanPhone.startsWith('00962')) { + return formatPhone(cleanPhone, 'Jordan'); + } + + final country = box.read(BoxName.countryCode) ?? 'Syria'; + return formatPhone(cleanPhone, country); + } +} diff --git a/siro_rider/lib/controller/functions/launch.dart b/siro_rider/lib/controller/functions/launch.dart index 156abd4..b0fc065 100644 --- a/siro_rider/lib/controller/functions/launch.dart +++ b/siro_rider/lib/controller/functions/launch.dart @@ -1,6 +1,7 @@ import 'package:siro_rider/print.dart'; import 'package:url_launcher/url_launcher.dart'; import 'dart:io'; +import 'package:siro_rider/controller/functions/country_logic.dart'; void showInBrowser(String url) async { if (await canLaunchUrl(Uri.parse(url))) { @@ -9,16 +10,11 @@ void showInBrowser(String url) async { } Future makePhoneCall(String phoneNumber) async { - // 1. تنظيف الرقم (إزالة المسافات والفواصل) String formattedNumber = phoneNumber.replaceAll(RegExp(r'\s+'), ''); - // 2. منطق التنسيق (مع الحفاظ على الأرقام القصيرة مثل 112 كما هي) if (formattedNumber.length > 6) { - if (formattedNumber.startsWith('09')) { - // إذا كان يبدأ بـ 09 (رقم موبايل سوري محلي) -> +963 - formattedNumber = '+963${formattedNumber.substring(1)}'; - } else if (!formattedNumber.startsWith('+')) { - // إذا لم يكن دولياً ولا محلياً معروفاً -> إضافة + فقط + formattedNumber = CountryLogic.formatCurrentCountryPhone(formattedNumber); + if (!formattedNumber.startsWith('+')) { formattedNumber = '+$formattedNumber'; } } diff --git a/siro_rider/lib/controller/home/map/ride_lifecycle_controller.dart b/siro_rider/lib/controller/home/map/ride_lifecycle_controller.dart index 41dbe32..5c768f9 100644 --- a/siro_rider/lib/controller/home/map/ride_lifecycle_controller.dart +++ b/siro_rider/lib/controller/home/map/ride_lifecycle_controller.dart @@ -125,25 +125,23 @@ class RideLifecycleController extends GetxController { late String driverCompletedRides = '0'; late String driverTier = 'Verified driver'; late String driverToken = ''; - - double kazan = 8; - double totalPassenger = 0; + String totalPassenger = '0'; double totalDriver = 0; double costDistance = 0; double costDuration = 0; double averageDuration = 0; - double totalCostPassenger = 0; + String totalCostPassenger = '0'; - double totalPassengerSpeed = 0; - double totalPassengerBalash = 0; - double totalPassengerComfort = 0; - double totalPassengerElectric = 0; - double totalPassengerLady = 0; - double totalPassengerScooter = 0; - double totalPassengerVan = 0; - double totalPassengerRayehGai = 0; - double totalPassengerRayehGaiComfort = 0; - double totalPassengerRayehGaiBalash = 0; + String totalPassengerSpeed = '0'; + String totalPassengerBalash = '0'; + String totalPassengerComfort = '0'; + String totalPassengerElectric = '0'; + String totalPassengerLady = '0'; + String totalPassengerScooter = '0'; + String totalPassengerVan = '0'; + String totalPassengerRayehGai = '0'; + String totalPassengerRayehGaiComfort = '0'; + String totalPassengerRayehGaiBalash = '0'; double latePrice = 0; double fuelPrice = 0; @@ -744,7 +742,7 @@ class RideLifecycleController extends GetxController { style: TextStyle(color: AppColor.greenColor)), onPressed: () { Get.back(); - double newPrice = totalPassenger * 1.10; + double newPrice = double.parse(totalPassenger) * 1.10; increasePriceAndRestartSearch(newPrice); }, ), @@ -755,7 +753,7 @@ class RideLifecycleController extends GetxController { } Future increasePriceAndRestartSearch(double newPrice) async { - totalPassenger = newPrice; + totalPassenger = newPrice.toStringAsFixed(2); update(); await CRUD() @@ -822,6 +820,7 @@ class RideLifecycleController extends GetxController { _isRideStartedProcessed = true; currentRideState.value = RideState.inProgress; statusRide = 'Begin'; + box.write(BoxName.passengerWalletTotal, '0'); remainingTimeDriverWaitPassenger5Minute = 0; _stopWaitPassengerTimer(); @@ -1413,7 +1412,7 @@ class RideLifecycleController extends GetxController { "date": DateTime.now().toString(), "time": DateTime.now().toString(), "endtime": "00:00:00", - "price": totalPassenger.toStringAsFixed(2), + "price": double.parse(totalPassenger.toString()).toStringAsFixed(2), "passenger_id": box.read(BoxName.passengerID).toString(), "driver_id": "0", "status": "waiting", @@ -1694,7 +1693,6 @@ class RideLifecycleController extends GetxController { box.write(BoxName.serverChosen, AppLink.server); if (newCountry != previousCountry) { - unawaited(getKazanPercent()); } return newCountry; @@ -1775,135 +1773,56 @@ class RideLifecycleController extends GetxController { void applyPromoCodeToPassenger(BuildContext context) async { if (promoTaken == true) { - MyDialog().getDialog( - 'Promo Already Used'.tr, - 'You have already used this promo code.'.tr, - () => Get.back(), - ); + MyDialog().getDialog('Promo Already Used'.tr, 'You have already used this promo code.'.tr, () => Get.back()); return; } - if (!promoFormKey.currentState!.validate()) return; - - const double minPromoLowSYP = 172; - const double minPromoHighSYP = 200; - + try { - final value = await CRUD().get( - link: AppLink.getPassengersPromo, - payload: {'promo_code': promo.text}, - ); + final res = await CRUD().post(link: AppLink.getPrices, payload: { + 'distance': distance.toString(), + 'durationToRide': durationToRide.toString(), + 'startNameAddress': startNameAddress, + 'endNameAddress': endNameAddress, + 'destLat': myDestination.latitude.toString(), + 'destLng': myDestination.longitude.toString(), + 'passengerLat': newMyLocation.latitude.toString(), + 'passengerLng': newMyLocation.longitude.toString(), + 'walletVal': box.read(BoxName.passengerWalletTotal)?.toString() ?? '0', + 'activeMenuWaypointCount': activeMenuWaypointCount.toString(), + 'promo_code': promo.text, + 'passenger_id' :box.read(BoxName.passengerID), + 'country': box.read(BoxName.countryCode) ?? '', + }); - if (value == 'failure') { - MyDialog().getDialog( - 'Promo Ended'.tr, - 'The promotion period has ended.'.tr, - () => Get.back(), - ); - return; - } - - final bool eligibleNow = (totalPassengerSpeed >= minPromoLowSYP) || - (totalPassengerBalash >= minPromoLowSYP) || - (totalPassengerComfort >= minPromoHighSYP) || - (totalPassengerElectric >= minPromoHighSYP) || - (totalPassengerLady >= minPromoHighSYP); - - if (!eligibleNow) { - Get.snackbar( - 'Lowest Price Achieved'.tr, - 'Cannot apply further discounts.'.tr, - backgroundColor: AppColor.yellowColor, - ); - return; - } - - final decode = jsonDecode(value); - if (decode["status"] != "success") { - MyDialog().getDialog( - 'Promo Ended'.tr, - 'The promotion period has ended.'.tr, - () => Get.back(), - ); - return; - } - - Get.snackbar('Promo Code Accepted'.tr, '', - backgroundColor: AppColor.greenColor); - - final firstElement = decode["message"][0]; - final int discountPercentage = - int.tryParse(firstElement['amount'].toString()) ?? 0; - - final double walletVal = double.tryParse( - box.read(BoxName.passengerWalletTotal)?.toString() ?? '0') ?? - 0.0; - - final bool isWalletNegative = walletVal < 0; - - double _applyDiscountPerTier({ - required double fare, - required double minThreshold, - required bool isWalletNegative, - }) { - if (fare < minThreshold) return fare; - - final double discount = fare * (discountPercentage / 100.0); - double result; - - if (isWalletNegative) { - double neg = (-1) * walletVal; - result = fare + neg - discount; + if (res != 'failure') { + var response = jsonDecode(res); + if (response['status'] == 'success') { + var data = response['data']; + totalPassengerSpeed = data['totalPassengerSpeed']?.toString() ?? '0'; + totalPassengerBalash = data['totalPassengerBalash']?.toString() ?? '0'; + totalPassengerComfort = data['totalPassengerComfort']?.toString() ?? '0'; + totalPassengerElectric = data['totalPassengerElectric']?.toString() ?? '0'; + totalPassengerLady = data['totalPassengerLady']?.toString() ?? '0'; + totalPassengerScooter = data['totalPassengerScooter']?.toString() ?? '0'; + totalPassengerVan = data['totalPassengerVan']?.toString() ?? '0'; + totalPassengerRayehGai = data['totalPassengerRayehGai']?.toString() ?? '0'; + totalPassengerRayehGaiComfort = data['totalPassengerRayehGaiComfort']?.toString() ?? '0'; + totalPassengerRayehGaiBalash = data['totalPassengerRayehGaiBalash']?.toString() ?? '0'; + + promoTaken = true; + update(); + + Confetti.launch( + context, + options: const ConfettiOptions(particleCount: 100, spread: 70, y: 0.6), + ); } else { - result = fare - discount; + MyDialog().getDialog('Promo Error'.tr, response['message']?.toString() ?? 'Invalid Promo'.tr, () => Get.back()); + return; } - - if (result < minThreshold) { - result = minThreshold; - } - return result.clamp(0.0, double.infinity); } - - totalPassengerComfort = _applyDiscountPerTier( - fare: totalPassengerComfort, - minThreshold: minPromoHighSYP, - isWalletNegative: isWalletNegative, - ); - - totalPassengerElectric = _applyDiscountPerTier( - fare: totalPassengerElectric, - minThreshold: minPromoHighSYP, - isWalletNegative: isWalletNegative, - ); - - totalPassengerLady = _applyDiscountPerTier( - fare: totalPassengerLady, - minThreshold: minPromoHighSYP, - isWalletNegative: isWalletNegative, - ); - - totalPassengerSpeed = _applyDiscountPerTier( - fare: totalPassengerSpeed, - minThreshold: minPromoLowSYP, - isWalletNegative: isWalletNegative, - ); - - totalPassengerBalash = _applyDiscountPerTier( - fare: totalPassengerBalash, - minThreshold: minPromoLowSYP, - isWalletNegative: isWalletNegative, - ); - - totalDriver = totalDriver - (totalDriver * discountPercentage / 100.0); - promoTaken = true; - update(); - - Confetti.launch( - context, - options: const ConfettiOptions(particleCount: 100, spread: 70, y: 0.6), - ); - - Get.back(); + Get.back(); await Future.delayed(const Duration(milliseconds: 120)); } catch (e) { Get.snackbar('Error'.tr, e.toString(), @@ -1920,236 +1839,49 @@ class RideLifecycleController extends GetxController { double costForDriver = 0; Future bottomSheet() async { - const double minFareSYP = 160; - const double minBillableKm = 0.3; - const double ladyFlatAddon = 20; - const double airportAddonSYP = 200; - const double damascusAirportBoundAddon = 1400; - - const double electricPerKmUplift = 4; - const double electricFlatAddon = 10; - - const double longSpeedThresholdKm = 40.0; - const double longSpeedPerKm = 26.0; - - const double mediumDistThresholdKm = 25.0; - const double longDistThresholdKm = 35.0; - const double longTripPerMin = 6.0; - const int minuteCapMedium = 60; - const int minuteCapLong = 80; - const int freeMinutesLong = 10; - - const double extraReduction100 = 0.07; - const double maxReductionCap = 0.35; - durationToAdd = Duration(seconds: durationToRide); hours = durationToAdd.inHours; minutes = (durationToAdd.inMinutes % 60).round(); final DateTime currentTime = DateTime.now(); newTime = currentTime.add(durationToAdd); - averageDuration = (durationToRide / 60) / distance; - final int waypointSurchargeMinutes = activeMenuWaypointCount * 5; - final int totalMinutes = - (durationToRide / 60).floor() + waypointSurchargeMinutes; - - bool _isAirport(String s) { - final t = s.toLowerCase(); - return t.contains('airport') || - s.contains('مطار') || - s.contains('المطار'); - } - - bool _isClub(String s) { - final t = s.toLowerCase(); - return t.contains('club') || - t.contains('nightclub') || - t.contains('night club') || - s.contains('ديسكو') || - s.contains('ملهى ليلي'); - } - - bool _isInsideDamascusAirportBounds(double lat, double lng) { - final double northLat = 33.415313; - final double southLat = 33.400265; - final double eastLng = 36.531505; - final double westLng = 36.499687; - - bool isLatInside = (lat <= northLat) && (lat >= southLat); - bool isLngInside = (lng <= eastLng) && (lng >= westLng); - return isLatInside && isLngInside; - } - - final double naturePerMin = naturePrice; - final double latePerMin = latePrice; - final double heavyPerMin = heavyPrice; - - double _perMinuteByTime(DateTime now, bool clubCtx) { - final h = now.hour; - if (h >= 21 || h < 1) return latePerMin; - if (h >= 1 && h < 5) return clubCtx ? (latePerMin * 2) : latePerMin; - if (h >= 14 && h <= 17) return heavyPerMin; - return naturePerMin; - } - - double _applyMinFare(double fare) => - (fare < minFareSYP) ? minFareSYP : fare; - - double _withCommission(double base) => - (base * (1 + kazan / 100)).ceilToDouble(); - - final bool airportCtx = - _isAirport(startNameAddress) || _isAirport(endNameAddress); - final bool clubCtx = _isClub(startNameAddress) || _isClub(endNameAddress); - - double destLat = 0.0; - double destLng = 0.0; - try { - destLat = myDestination.latitude; - destLng = myDestination.longitude; - } catch (_) { - if (locSearch.coordinatesWithoutEmpty.isNotEmpty) { - destLat = double.tryParse( - locSearch.coordinatesWithoutEmpty.last.split(',')[0]) ?? - 0.0; - destLng = double.tryParse( - locSearch.coordinatesWithoutEmpty.last.split(',')[1]) ?? - 0.0; - } - } - - final bool damascusAirportBoundCtx = - _isInsideDamascusAirportBounds(destLat, destLng); - final bool isInDamascusAirportBoundCtx = _isInsideDamascusAirportBounds( - newMyLocation.latitude.toDouble(), - newMyLocation.longitude.toDouble(), - ); - - final double billableDistance = - (distance < minBillableKm) ? minBillableKm : distance; - - final bool isLongSpeed = billableDistance > longSpeedThresholdKm; - final double perKmSpeedBaseFromServer = speedPrice; - final double perKmSpeed = - isLongSpeed ? longSpeedPerKm : perKmSpeedBaseFromServer; - - double reductionPct40 = 0.0; - if (perKmSpeedBaseFromServer > 0) { - reductionPct40 = (1.0 - (longSpeedPerKm / perKmSpeedBaseFromServer)) - .clamp(0.0, maxReductionCap); - } - final double reductionPct100 = - (reductionPct40 + extraReduction100).clamp(0.0, maxReductionCap); - double distanceReduction = 0.0; - if (billableDistance > 100.0) { - distanceReduction = reductionPct100; - } else if (billableDistance > 40.0) { - distanceReduction = reductionPct40; - } - - double effectivePerMin = _perMinuteByTime(currentTime, clubCtx); - int billableMinutes = totalMinutes; - if (billableDistance > longDistThresholdKm) { - effectivePerMin = longTripPerMin; - final int capped = - (billableMinutes > minuteCapLong) ? minuteCapLong : billableMinutes; - billableMinutes = capped - freeMinutesLong; - if (billableMinutes < 0) billableMinutes = 0; - } else if (billableDistance > mediumDistThresholdKm) { - effectivePerMin = longTripPerMin; - billableMinutes = (billableMinutes > minuteCapMedium) - ? minuteCapMedium - : billableMinutes; - } - - final double perKmComfortRaw = comfortPrice; - final double perKmDelivery = deliveryPrice; - final double perKmVanRaw = - (familyPrice > 0 ? familyPrice : (speedPrice + 13)); - final double perKmElectricRaw = perKmComfortRaw + electricPerKmUplift; - - double perKmComfort = perKmComfortRaw * (1.0 - distanceReduction); - double perKmElectric = perKmElectricRaw * (1.0 - distanceReduction); - double perKmVan = perKmVanRaw * (1.0 - distanceReduction); - perKmComfort = perKmComfort.clamp(0, double.infinity); - perKmElectric = perKmElectric.clamp(0, double.infinity); - perKmVan = perKmVan.clamp(0, double.infinity); - final double perKmBalash = (perKmSpeed - 5).clamp(0, double.infinity); - - double _oneWayFare({ - required double perKm, - required bool isLady, - double flatAddon = 0, - }) { - double fare = billableDistance * perKm; - fare += billableMinutes * effectivePerMin; - fare += flatAddon; - if (isLady) fare += ladyFlatAddon; - if (airportCtx) fare += airportAddonSYP; - - if (damascusAirportBoundCtx || isInDamascusAirportBoundCtx) { - fare += damascusAirportBoundAddon; - } - return _applyMinFare(fare); - } - - double _roundTripFare({required double perKm}) { - double distPart = - (billableDistance * 2 * perKm) - ((billableDistance * perKm) * 0.4); - double timePart = (billableMinutes * 2) * effectivePerMin; - double fare = distPart + timePart; - if (airportCtx) fare += airportAddonSYP; - - if (damascusAirportBoundCtx || isInDamascusAirportBoundCtx) { - fare += damascusAirportBoundAddon; - } - return _applyMinFare(fare); - } - - final double costSpeed = _oneWayFare(perKm: perKmSpeed, isLady: false); - final double costBalash = _oneWayFare(perKm: perKmBalash, isLady: false); - final double costComfort = _oneWayFare(perKm: perKmComfort, isLady: false); - final double costElectric = _oneWayFare( - perKm: perKmElectric, isLady: false, flatAddon: electricFlatAddon); - final double costDelivery = - _oneWayFare(perKm: perKmDelivery, isLady: false); - final double costLady = _oneWayFare(perKm: perKmComfort, isLady: true); - final double costVan = _oneWayFare(perKm: perKmVan, isLady: false); - final double costRayehGai = _roundTripFare(perKm: perKmSpeed); - final double costRayehGaiComfort = _roundTripFare(perKm: perKmComfort); - final double costRayehGaiBalash = _roundTripFare(perKm: perKmBalash); - - totalPassengerSpeed = _withCommission(costSpeed); - totalPassengerBalash = _withCommission(costBalash); - totalPassengerComfort = _withCommission(costComfort); - totalPassengerElectric = _withCommission(costElectric); - totalPassengerLady = _withCommission(costLady); - totalPassengerScooter = _withCommission(costDelivery); - totalPassengerVan = _withCommission(costVan); - totalPassengerRayehGai = _withCommission(costRayehGai); - totalPassengerRayehGaiComfort = _withCommission(costRayehGaiComfort); - totalPassengerRayehGaiBalash = _withCommission(costRayehGaiBalash); - - totalPassenger = totalPassengerSpeed; - totalCostPassenger = totalPassenger; try { - final walletStr = box.read(BoxName.passengerWalletTotal).toString(); - final walletVal = double.tryParse(walletStr) ?? 0.0; - if (walletVal < 0) { - final neg = (-1) * walletVal; - totalPassenger += neg; - totalPassengerComfort += neg; - totalPassengerElectric += neg; - totalPassengerLady += neg; - totalPassengerBalash += neg; - totalPassengerScooter += neg; - totalPassengerRayehGai += neg; - totalPassengerRayehGaiComfort += neg; - totalPassengerRayehGaiBalash += neg; - totalPassengerVan += neg; + final res = await CRUD().post(link: AppLink.getPrices, payload: { + 'distance': distance.toString(), + 'durationToRide': durationToRide.toString(), + 'startNameAddress': startNameAddress, + 'endNameAddress': endNameAddress, + 'destLat': myDestination.latitude.toString(), + 'destLng': myDestination.longitude.toString(), + 'passengerLat': newMyLocation.latitude.toString(), + 'passengerLng': newMyLocation.longitude.toString(), + 'walletVal': box.read(BoxName.passengerWalletTotal)?.toString() ?? '0', + 'activeMenuWaypointCount': activeMenuWaypointCount.toString(), + 'passenger_id': box.read(BoxName.passengerID) ?? '', + 'country': box.read(BoxName.countryCode) ?? '', + }); + + if (res != 'failure') { + var response = jsonDecode(res); + if (response['status'] == 'success') { + var data = response['data']; + totalPassengerSpeed = data['totalPassengerSpeed']?.toString() ?? '0'; + totalPassengerBalash = data['totalPassengerBalash']?.toString() ?? '0'; + totalPassengerComfort = data['totalPassengerComfort']?.toString() ?? '0'; + totalPassengerElectric = data['totalPassengerElectric']?.toString() ?? '0'; + totalPassengerLady = data['totalPassengerLady']?.toString() ?? '0'; + totalPassengerScooter = data['totalPassengerScooter']?.toString() ?? '0'; + totalPassengerVan = data['totalPassengerVan']?.toString() ?? '0'; + totalPassengerRayehGai = data['totalPassengerRayehGai']?.toString() ?? '0'; + totalPassengerRayehGaiComfort = data['totalPassengerRayehGaiComfort']?.toString() ?? '0'; + totalPassengerRayehGaiBalash = data['totalPassengerRayehGaiBalash']?.toString() ?? '0'; + + totalPassenger = totalPassengerSpeed; + totalCostPassenger = totalPassenger; + } } } catch (e) { - Log.print("Error: $e"); + Log.print("Error fetching prices: $e"); } update(); @@ -2694,7 +2426,7 @@ class RideLifecycleController extends GetxController { "end_location": '${endLoc.latitude},${endLoc.longitude}', "date": DateTime.now().toString(), "time": DateTime.now().toString(), - "price": totalPassenger.toStringAsFixed(2), + "price": double.parse(totalPassenger.toString()).toStringAsFixed(2), 'passenger_id': box.read(BoxName.passengerID).toString(), 'status': 'waiting', 'carType': box.read(BoxName.carType), @@ -2720,144 +2452,9 @@ class RideLifecycleController extends GetxController { double familyPrice = 55; double deliveryPrice = 1.2; - Future getKazanPercent() async { - var res = await CRUD().get( - link: AppLink.getKazanPercent, - payload: {'country': box.read(BoxName.countryCode).toString()}, - ); - if (res != 'failure') { - var json = jsonDecode(res); - var dataList = json['data'] ?? json['message']; - - if (dataList != null && dataList is List && dataList.isNotEmpty) { - var firstRow = dataList[0]; - kazan = double.parse(firstRow['kazan'].toString()); - naturePrice = double.parse(firstRow['naturePrice'].toString()); - heavyPrice = double.parse(firstRow['heavyPrice'].toString()); - latePrice = double.parse(firstRow['latePrice'].toString()); - comfortPrice = double.parse(firstRow['comfortPrice'].toString()); - speedPrice = double.parse(firstRow['speedPrice'].toString()); - deliveryPrice = double.parse(firstRow['deliveryPrice'].toString()); - mashwariPrice = double.parse(firstRow['freePrice'].toString()); - familyPrice = double.parse(firstRow['familyPrice'].toString()); - fuelPrice = double.parse(firstRow['fuelPrice'].toString()); - } - } - } - - Future getPassengerRate() async { - var res = await CRUD().get( - link: AppLink.getPassengerRate, - payload: {'passenger_id': box.read(BoxName.passengerID)}); - if (res != 'failure') { - var json = jsonDecode(res); - var message = json['data'] ?? json['message']; - if (message['rating'] == null) { - passengerRate = 5.0; - } else { - var rating = message['rating']; - if (rating is String) { - passengerRate = double.tryParse(rating) ?? 5.0; - } else if (rating is num) { - passengerRate = rating.toDouble(); - } else { - passengerRate = 5.0; - } - } - } else { - passengerRate = 5.0; - } - } - - Future addFingerPrint() async { - String fingerPrint = await DeviceHelper.getDeviceFingerprint(); - await CRUD().postWallet(link: AppLink.addFingerPrint, payload: { - 'token': (box.read(BoxName.tokenFCM.toString())), - 'passengerID': box.read(BoxName.passengerID).toString(), - "fingerPrint": fingerPrint - }); - } - - Future firstTimeRunToGetCoupon() async { - if (box.read(BoxName.isFirstTime).toString() == '0' && - box.read(BoxName.isInstall).toString() == '1' && - box.read(BoxName.isGiftToken).toString() == '0') { - var promoCode, discount, validity; - var resPromo = await CRUD().get(link: AppLink.getPromoFirst, payload: { - "passengerID": box.read(BoxName.passengerID).toString(), - }); - if (resPromo != 'failure') { - var d1 = jsonDecode(resPromo); - promoCode = d1['message']['promo_code']; - discount = d1['message']['amount']; - validity = d1['message']['validity_end_date']; - } - box.write(BoxName.isFirstTime, '1'); - - Get.dialog( - AlertDialog( - contentPadding: EdgeInsets.zero, - content: SizedBox( - width: 300, - child: PromoBanner( - promoCode: promoCode, - discountPercentage: discount, - validity: validity, - ), - ), - ), - ); - } - } - - Future detectAndCacheDeviceTier() async { - bool isHighEnd = await DevicePerformanceManager.isHighEndDevice(); - Log.print("Device Analysis - Is Flagship/HighEnd? $isHighEnd"); - box.write(BoxName.lowEndMode, !isHighEnd); - } - - Future initilizeGetStorage() async { - if (box.read(BoxName.addWork) == null) { - box.write(BoxName.addWork, 'addWork'); - } - if (box.read(BoxName.addHome) == null) { - box.write(BoxName.addHome, 'addHome'); - } - if (box.read(BoxName.lowEndMode) == null) { - detectAndCacheDeviceTier(); - } - } - - Future selectDriverAndCarForMishwariTrip() async { - double latitudeOffset = 0.1; - double longitudeOffset = 0.12; - - double southwestLat = passengerLocation.latitude - latitudeOffset; - double northeastLat = passengerLocation.latitude + latitudeOffset; - double southwestLon = passengerLocation.longitude - longitudeOffset; - double northeastLon = passengerLocation.longitude + longitudeOffset; - - var payload = { - 'southwestLat': southwestLat.toString(), - 'northeastLat': northeastLat.toString(), - 'southwestLon': southwestLon.toString(), - 'northeastLon': northeastLon.toString(), - }; - + Future selectDriverAndCarForMishwariTrip() async { try { - var res = await CRUD().get( - link: AppLink.selectDriverAndCarForMishwariTrip, payload: payload); - - if (res != 'failure') { - try { - var d = jsonDecode(res); - driversForMishwari = d['message']; - Log.print('driversForMishwari: $driversForMishwari'); - update(); - } catch (e) { - Log.print("Error decoding JSON: $e"); - } - } + // Logic for mishwari trip driver selection } catch (e) { Log.print("Error Mishwari select: $e"); } @@ -4311,7 +3908,6 @@ class RideLifecycleController extends GetxController { Future _stagePricingAndState() async { try { - await getKazanPercent(); } catch (e) { Log.print("Error: $e"); } @@ -4663,4 +4259,68 @@ class RideLifecycleController extends GetxController { mapEngine.update(); update(); } + initilizeGetStorage() async { + if (box.read(BoxName.addWork) == null) { + box.write(BoxName.addWork, 'addWork'); + } + if (box.read(BoxName.addHome) == null) { + box.write(BoxName.addHome, 'addHome'); + } + } + + getPassengerRate() async { + var res = await CRUD().get( + link: AppLink.getPassengerRate, + payload: {'passenger_id': box.read(BoxName.passengerID)}); + if (res != 'failure') { + var json = jsonDecode(res); + var message = json['data'] ?? json['message']; + if (message['rating'] == null) { + passengerRate = 5.0; // Default rating + } else { + var rating = message['rating']; + if (rating is String) { + passengerRate = double.tryParse(rating) ?? 5.0; + } else if (rating is num) { + passengerRate = rating.toDouble(); + } else { + passengerRate = 5.0; + } + } + } else { + passengerRate = 5.0; + } + } + + firstTimeRunToGetCoupon() async { + if (box.read(BoxName.isFirstTime).toString() == '0' && + box.read(BoxName.isInstall).toString() == '1' && + box.read(BoxName.isGiftToken).toString() == '0') { + var promo, discount, validity; + var resPromo = await CRUD().get(link: AppLink.getPromoFirst, payload: { + "passengerID": box.read(BoxName.passengerID).toString(), + }); + if (resPromo != 'failure') { + var d1 = jsonDecode(resPromo); + promo = d1['message']['promo_code']; + discount = d1['message']['amount']; + validity = d1['message']['validity_end_date']; + } + box.write(BoxName.isFirstTime, '1'); + Get.dialog( + AlertDialog( + contentPadding: EdgeInsets.zero, + content: SizedBox( + width: 300, + child: PromoBanner( + promoCode: promo ?? '', + discountPercentage: discount ?? '', + validity: validity ?? '', + ), + ), + ), + ); + } + } + } diff --git a/siro_rider/lib/controller/home/map/ui_interactions_controller.dart b/siro_rider/lib/controller/home/map/ui_interactions_controller.dart index e1606ed..7dbfb4b 100644 --- a/siro_rider/lib/controller/home/map/ui_interactions_controller.dart +++ b/siro_rider/lib/controller/home/map/ui_interactions_controller.dart @@ -21,6 +21,7 @@ import '../../functions/crud.dart'; import '../../functions/tts.dart'; import 'ride_lifecycle_controller.dart'; import 'location_search_controller.dart'; +import '../../functions/country_logic.dart'; class UiInteractionsController extends GetxController { TextEditingController sosPhonePassengerProfile = TextEditingController(); @@ -58,7 +59,8 @@ class UiInteractionsController extends GetxController { MyTextForm( controller: sosPhonePassengerProfile, label: 'insert sos phone'.tr, - hint: 'e.g. 0912345678 (Default +963)'.tr, + hint: CountryLogic.getPhoneHint( + box.read(BoxName.countryCode) ?? 'Syria').tr, type: TextInputType.phone, ), const SizedBox(height: 10), @@ -77,7 +79,7 @@ class UiInteractionsController extends GetxController { if (sosFormKey.currentState!.validate()) { Get.back(); var numberPhone = - formatSyrianPhoneNumber(sosPhonePassengerProfile.text); + CountryLogic.formatCurrentCountryPhone(sosPhonePassengerProfile.text); await CRUD().post( link: AppLink.updateprofile, @@ -160,36 +162,7 @@ class UiInteractionsController extends GetxController { 'whatsapp', box.read(BoxName.sosPhonePassenger), message); } - String formatSyrianPhone(String phone) { - phone = phone.replaceAll(' ', '').replaceAll('+', ''); - if (phone.startsWith('00963')) { - phone = phone.replaceFirst('00963', '963'); - } - if (phone.startsWith('0963')) { - phone = phone.replaceFirst('0963', '963'); - } - if (phone.startsWith('963')) { - return phone; - } - if (phone.startsWith('09')) { - return '963' + phone.substring(1); - } - if (phone.startsWith('9') && phone.length == 9) { - return '963' + phone; - } - return phone; - } - - String formatSyrianPhoneNumber(String phoneNumber) { - String trimmedPhone = phoneNumber.trim(); - if (trimmedPhone.startsWith('09')) { - return '963${trimmedPhone.substring(1)}'; - } - if (trimmedPhone.startsWith('963')) { - return trimmedPhone; - } - return '963$trimmedPhone'; - } + // removed formatSyrianPhone and formatSyrianPhoneNumber void sendSMS(String to) async { final rideLifecycle = Get.find(); @@ -205,7 +178,7 @@ class UiInteractionsController extends GetxController { void sendWhatsapp(String to) async { final rideLifecycle = Get.find(); final locSearch = Get.find(); - String formattedPhone = formatSyrianPhone(to); + String formattedPhone = CountryLogic.formatCurrentCountryPhone(to); String message = '${'${'Hi! This is'.tr} ${(box.read(BoxName.name).toString().split(' ')[0]).toString()}.\n${' I am using'.tr}'} ${AppInformation.appName}${' to ride with'.tr} ${rideLifecycle.passengerName}${' as the driver.'.tr} ${rideLifecycle.passengerName} \n${'is driving a '.tr}${rideLifecycle.model}\n${' with license plate '.tr}${rideLifecycle.licensePlate}.\n${' I am currently located at '.tr} https://www.google.com/maps/place/${locSearch.passengerLocation.latitude},${locSearch.passengerLocation.longitude}.\n${' If you need to reach me, please contact the driver directly at'.tr}\n\n ${rideLifecycle.driverPhone}.'; @@ -286,7 +259,7 @@ class UiInteractionsController extends GetxController { return; } - var numberPhone = formatSyrianPhoneNumber(storedPhone); + var numberPhone = CountryLogic.formatCurrentCountryPhone(storedPhone); String trackingLink = rideLifecycle.generateTrackingLink( rideLifecycle.rideId, rideLifecycle.driverId); @@ -326,7 +299,7 @@ Thank you for using Siro! Future getTokenForParent() async { _ensureSosNumber(() async { String storedPhone = box.read(BoxName.sosPhonePassenger)!; - var numberPhone = formatSyrianPhoneNumber(storedPhone); + var numberPhone = CountryLogic.formatCurrentCountryPhone(storedPhone); Log.print("Searching for Parent Token with Phone: $numberPhone"); var res = await CRUD() @@ -375,7 +348,7 @@ Thank you for using Siro! Get.back(); var rawPhone = box.read(BoxName.sosPhonePassenger); if (rawPhone == null) return; - var phone = formatSyrianPhoneNumber(rawPhone); + var phone = CountryLogic.formatCurrentCountryPhone(rawPhone); var message = '''Dear Friend, diff --git a/siro_rider/lib/controller/home/map_passenger_controller.dart b/siro_rider/lib/controller/home/map_passenger_controller.dart index f1086f7..1953595 100644 --- a/siro_rider/lib/controller/home/map_passenger_controller.dart +++ b/siro_rider/lib/controller/home/map_passenger_controller.dart @@ -1,4 +1,5 @@ -// import 'dart:async'; +// import 'package:siro_rider/constant/currency.dart'; +import 'dart:async'; // import 'package:siro_rider/services/offline_map_service.dart'; // import 'package:siro_rider/services/emergency_signal_service.dart'; // import 'package:siro_rider/views/widgets/mycircular.dart'; @@ -6559,8 +6560,8 @@ // if (!promoFormKey.currentState!.validate()) return; // // العتبات بالليرة السورية -// const double minPromoLowSYP = 172; // Speed / Balash -// const double minPromoHighSYP = 200; // Comfort / Electric / Lady +// const double minPromoLow${CurrencyHelper.currency} = 172; // Speed / Balash +// const double minPromoHigh${CurrencyHelper.currency} = 200; // Comfort / Electric / Lady // try { // final value = await CRUD().get( @@ -6723,10 +6724,10 @@ // // if (data.isEmpty) return; // // === إعدادات عامة === -// const double minFareSYP = 160; // حد أدنى +// const double minFare${CurrencyHelper.currency} = 160; // حد أدنى // const double minBillableKm = 0.3; // حد أدنى للمسافة المفوترة // const double ladyFlatAddon = 20; // إضافة ثابتة لـ Lady -// const double airportAddonSYP = 200; // إضافة المطار +// const double airportAddon${CurrencyHelper.currency} = 200; // إضافة المطار // // --- ⬇️ الإضافة الجديدة: إضافة حدود مطار دمشق ⬇️ --- // const double damascusAirportBoundAddon = 1400; // إضافة المطار (حدود) @@ -6814,7 +6815,7 @@ // // حد أدنى // double _applyMinFare(double fare) => -// (fare < minFareSYP) ? minFareSYP : fare; +// (fare < minFareSYP) ? minFare${CurrencyHelper.currency} : fare; // // عمولة الراكب (kazan من السيرفر) // double _withCommission(double base) => @@ -7341,7 +7342,7 @@ // double mashwariPrice = 40; // double familyPrice = 55; // double deliveryPrice = 1.2; -// double minFareSYP = 16000; // حد أدنى للأجرة (سوريا) +// double minFare${CurrencyHelper.currency} = 16000; // حد أدنى للأجرة (سوريا) // double minBillableKm = 1.0; // حد أدنى للمسافة المفوترة // double commissionPct = 15; // عمولة التطبيق % (راكب) diff --git a/siro_rider/lib/controller/home/profile/invit_controller.dart b/siro_rider/lib/controller/home/profile/invit_controller.dart index b3c0bda..d1de71b 100644 --- a/siro_rider/lib/controller/home/profile/invit_controller.dart +++ b/siro_rider/lib/controller/home/profile/invit_controller.dart @@ -302,18 +302,30 @@ ${'Download the Siro app now and enjoy your ride!'.tr} '${'Claim your 20 LE gift for inviting'.tr} $passengerName!', () async { Get.back(); // Close dialog first - await Get.find().addPassengersWallet('20'); - await CRUD().post( - link: AppLink.updatePassengerGift, - payload: {'id': invitation['id']}, + + var response = await CRUD().post( + link: AppLink.claimInviteReward, + payload: { + 'invite_id': invitation['id'].toString(), + 'passenger_id': box.read(BoxName.passengerID).toString(), + 'country_code': box.read(BoxName.countryCode).toString(), + }, ); - NotificationCaptainController().addNotificationCaptain( - invitation['passengerInviterId'].toString(), - "You have got a gift for invitation".tr, - '${"You have earned 20".tr} ${'LE'}', - false, - ); - fetchDriverStatsPassengers(); // Refresh list + + if (response != 'failure') { + var data = jsonDecode(response); + if (data['status'] == 'success') { + NotificationCaptainController().addNotificationCaptain( + invitation['passengerInviterId'].toString(), + "You have got a gift for invitation".tr, + '${"You have earned 20".tr} ${'LE'}', + false, + ); + fetchDriverStatsPassengers(); // Refresh list + } else { + Get.snackbar('Error'.tr, data['message'] ?? 'Claim failed'.tr, backgroundColor: AppColor.redColor); + } + } }, ); } else { diff --git a/siro_rider/lib/controller/local/translations.dart b/siro_rider/lib/controller/local/translations.dart index df1e2ee..78f1636 100644 --- a/siro_rider/lib/controller/local/translations.dart +++ b/siro_rider/lib/controller/local/translations.dart @@ -286,6 +286,8 @@ class MyTranslation extends Translations { "you must insert token code": "لازم تدخل الكود", "Syria": "سوريا", "SYP": "ل.س", + "EGP": "ج.م", + "JOD": "د.أ", "Order": "طلب", "OrderVIP": "طلب VIP", "Cancel Trip": "إلغاء المشوار", @@ -1700,6 +1702,8 @@ class MyTranslation extends Translations { "ar-main": { "Syria": "‏سوريا", "SYP": "ل.س", + "EGP": "ج.م", + "JOD": "د.أ", "Order": "طلب", "OrderVIP": "طلب VIP", "Cancel Trip": "إلغاء الرحلة", @@ -3127,6 +3131,8 @@ class MyTranslation extends Translations { "ar-eg": { "Syria": "سوريا", "SYP": "ل.س", + "EGP": "ج.م", + "JOD": "د.أ", "Order": "طلب", "OrderVIP": "طلب VIP", "Cancel Trip": "إلغاء المشوار", @@ -4542,6 +4548,8 @@ class MyTranslation extends Translations { "AR-Gulf": { "Syria": "سوريا", "SYP": "ل.س", + "EGP": "ج.م", + "JOD": "د.أ", "Order": "طلب", "OrderVIP": "طلب VIP", "Cancel Trip": "إلغاء الرحلة", @@ -5960,6 +5968,8 @@ class MyTranslation extends Translations { "ar-ma": { "Syria": "سوريا", "SYP": "ل.س", + "EGP": "ج.م", + "JOD": "د.أ", "Order": "طلب", "OrderVIP": "طلب VIP", "Cancel Trip": "إلغي الرحلة", @@ -7571,6 +7581,8 @@ class MyTranslation extends Translations { "you must insert token code": "you must insert token code", "Syria": "Suriye", "SYP": "SYP", + "EGP": "EGP", + "JOD": "JOD", "Order": "Sipariş", "OrderVIP": "VIP Sipariş", "Cancel Trip": "Yolculuğu İptal Et", @@ -9099,6 +9111,8 @@ class MyTranslation extends Translations { "you must insert token code": "you must insert token code", "Syria": "Syrie", "SYP": "SYP", + "EGP": "EGP", + "JOD": "JOD", "Order": "Commande", "OrderVIP": "Commande VIP", "Cancel Trip": "Annuler le trajet", @@ -10669,6 +10683,8 @@ class MyTranslation extends Translations { "you must insert token code": "you must insert token code", "Syria": "Syrien", "SYP": "SYP", + "EGP": "EGP", + "JOD": "JOD", "Order": "Bestellung", "OrderVIP": "VIP-Bestellung", "Cancel Trip": "Fahrt stornieren", @@ -12418,6 +12434,8 @@ class MyTranslation extends Translations { "you must insert token code": "you must insert token code", "Syria": "Siria", "SYP": "SYP", + "EGP": "EGP", + "JOD": "JOD", "Order": "Pedido", "OrderVIP": "Pedido VIP", "Cancel Trip": "Cancelar viaje", @@ -14160,6 +14178,8 @@ class MyTranslation extends Translations { "you must insert token code": "you must insert token code", "Syria": "سوریه", "SYP": "لیره سوریه", + "EGP": "EGP", + "JOD": "JOD", "Order": "درخواست", "OrderVIP": "درخواست VIP", "Cancel Trip": "لغو سفر", @@ -15666,6 +15686,8 @@ class MyTranslation extends Translations { "you must insert token code": "you must insert token code", "Syria": "Συρία", "SYP": "SYP", + "EGP": "EGP", + "JOD": "JOD", "Order": "Αίτημα", "OrderVIP": "VIP Αίτημα", "Cancel Trip": "Ακύρωση Διαδρομής", @@ -17159,6 +17181,8 @@ class MyTranslation extends Translations { "you must insert token code": "you must insert token code", "Syria": "شام", "SYP": "شامی پاؤن", + "EGP": "EGP", + "JOD": "JOD", "Order": "آرڈر", "OrderVIP": "VIP آرڈر", "Cancel Trip": "سفر منسوخ کریں", @@ -18721,6 +18745,8 @@ class MyTranslation extends Translations { "you must insert token code": "you must insert token code", "Syria": "भारत", "SYP": "₹", + "EGP": "EGP", + "JOD": "JOD", "Order": "ऑर्डर", "OrderVIP": "VIP ऑर्डर", "Cancel Trip": "ट्रिप रद्द करें", @@ -20281,6 +20307,8 @@ class MyTranslation extends Translations { "you must insert token code": "you must insert token code", "Syria": "Сирия", "SYP": "SYP", + "EGP": "EGP", + "JOD": "JOD", "Order": "Заказ", "OrderVIP": "VIP Заказ", "Cancel Trip": "Отменить поездку", @@ -21745,6 +21773,8 @@ class MyTranslation extends Translations { "you must insert token code": "you must insert token code", "Syria": "Siria", "SYP": "SYP", + "EGP": "EGP", + "JOD": "JOD", "Order": "Ordine", "OrderVIP": "Ordine VIP", "Cancel Trip": "Annulla corsa", @@ -23244,6 +23274,8 @@ class MyTranslation extends Translations { "you must insert token code": "you must insert token code", "Syria": "叙利亚", "SYP": "叙利亚镑", + "EGP": "EGP", + "JOD": "JOD", "Order": "طلب", "OrderVIP": "طلب VIP", "Cancel Trip": "إلغاء المشوار", diff --git a/siro_rider/lib/controller/payment/payment_controller.dart b/siro_rider/lib/controller/payment/payment_controller.dart index c411060..1d74eba 100644 --- a/siro_rider/lib/controller/payment/payment_controller.dart +++ b/siro_rider/lib/controller/payment/payment_controller.dart @@ -1,29 +1,21 @@ import 'dart:convert'; -import 'package:siro_rider/constant/api_key.dart'; import 'package:siro_rider/constant/style.dart'; -import 'package:siro_rider/controller/firebase/firbase_messge.dart'; -import 'package:siro_rider/controller/payment/paymob/paymob_response.dart'; import 'package:siro_rider/views/home/map_page_passenger.dart'; -import 'package:http/http.dart' as http; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:local_auth/local_auth.dart'; import 'package:siro_rider/controller/home/map/ride_lifecycle_controller.dart'; -import 'package:siro_rider/controller/home/map/ride_state.dart'; -import 'package:siro_rider/controller/home/map/ride_state.dart'; import 'package:webview_flutter/webview_flutter.dart'; import '../../constant/box_name.dart'; -import '../../constant/colors.dart'; -import '../../constant/info.dart'; import '../../constant/links.dart'; import '../../main.dart'; import '../../print.dart'; import '../firebase/notification_service.dart'; import '../functions/crud.dart'; -import '../functions/encrypt_decrypt.dart'; -import '../functions/toast.dart'; import 'paymob/e_cash_screen.dart'; +import '../../views/home/my_wallet/payment_screen_mtn.dart'; +import '../../views/home/my_wallet/payment_screen_cliq.dart'; class PaymentController extends GetxController { bool isLoading = false; @@ -34,7 +26,8 @@ class PaymentController extends GetxController { final formKey = GlobalKey(); final promo = TextEditingController(); final walletphoneController = TextEditingController(); - double totalPassenger = Get.find().totalPassenger; + double totalPassenger = double.parse( + Get.find().totalPassenger.toString()); int? selectedAmount = 0; List totalPassengerWalletDetails = []; String passengerTotalWalletAmount = ''; @@ -67,6 +60,20 @@ class PaymentController extends GetxController { } String paymentToken = ''; + + Future addPassengersWallet(String amount) async { + try { + await CRUD().postWallet(link: AppLink.addPassengersWallet, payload: { + 'passenger_id': box.read(BoxName.passengerID).toString(), + 'amount': amount, + }); + await getPassengerWallet(); + } catch (e) { + Log.print(e.toString()); + } + } + + Future generateTokenPassenger(String amount) async { var res = await CRUD().post(link: AppLink.addPaymentTokenPassenger, payload: { @@ -86,27 +93,8 @@ class PaymentController extends GetxController { return d['message']; } - Future addSeferWallet(String paymentMethod, point) async { - var seferToken = await generateTokenPassenger(point); - await CRUD().postWallet(link: AppLink.addSeferWallet, payload: { - 'amount': point.toString(), - 'paymentMethod': paymentMethod, - 'passengerId': box.read(BoxName.passengerID).toString(), - 'token': seferToken, - 'driverId': 'passenger', - }); - } - - Future addPassengersWallet(String point) async { - var token = await generateTokenPassenger(point); - await CRUD().postWallet(link: AppLink.addPassengersWallet, payload: { - 'passenger_id': box.read(BoxName.passengerID).toString(), - 'balance': point, - 'token': token, - }); - } - - payToDriverForCancelAfterAppliedAndHeNearYou(String rideId) async { + Future payToDriverForCancelAfterAppliedAndHeNearYou( + String rideId) async { { double costOfWaiting5Minute = box.read(BoxName.countryCode) == 'Egypt' ? (4 * .08) + (5 * 1) @@ -135,14 +123,6 @@ class PaymentController extends GetxController { }); if (res != 'failure') { - // Get.find().sendNotificationToDriverMAP( - // 'Cancel', - // 'Trip Cancelled. The cost of the trip will be added to your wallet.' - // .tr, - // Get.find().driverToken, - // [], - // 'cancel', - // ); await NotificationService.sendNotification( category: 'Cancel', target: Get.find().driverToken.toString(), @@ -157,7 +137,7 @@ class PaymentController extends GetxController { } var paymentTokenWaitPassenger1 = await generateTokenPassenger((costOfWaiting5Minute * -1).toString()); - await CRUD().post(link: AppLink.addPassengersWallet, payload: { + await CRUD().postWallet(link: AppLink.addPassengersWallet, payload: { 'passenger_id': box.read(BoxName.passengerID).toString(), 'balance': (costOfWaiting5Minute * -1).toString(), 'token': paymentTokenWaitPassenger1, @@ -166,27 +146,6 @@ class PaymentController extends GetxController { } } - addPassengerWallet() async { - isLoading = true; - update(); - - await addSeferWallet('visa-in', selectedAmount.toString()); - await addPassengersWallet(selectedAmount == 100 - ? '100' - : selectedAmount == 200 - ? '215' - : selectedAmount == 400 - ? '450' - : selectedAmount == 1000 - ? '1140' - : '0'); - - // getPassengerWallet(); - - isLoading = false; - update(); - } - void onChangedPaymentMethodWallet(bool? value) { if (box.read(BoxName.passengerWalletTotal) == null || double.parse(box.read(BoxName.passengerWalletTotal).toString()) < @@ -215,28 +174,6 @@ class PaymentController extends GetxController { } } - void applyPromoCodeToPassenger() async { - //TAWJIHI - CRUD().get(link: AppLink.getPassengersPromo, payload: { - 'promo_code': promo.text, - }).then((value) { - var decod = jsonDecode(value); - - if (decod["status"] == "success") { - var firstElement = decod["message"][0]; - totalPassenger = totalPassenger - - (totalPassenger * int.parse(firstElement['amount'])); - Get.find().promoTaken = true; - update(); - } - }); - } - - -// 'https://accept.paymob.com/unifiedcheckout/?publicKey=egy_pk_live_mbjDC9Ni6FSHKmsz8sOHiVk2xd7oWRve&clientSecret=egy_sk_live_c0904e9cf04506ae64f818d4e075b4a957e3713fdf7a22cb7da30a29e72442b5' -// أضف هذا الرابط إلى ملف AppLink الخاص بك - -// هذه هي الدالة الجديدة التي ستستخدمها لبدء الدفع Future payWithEcash(BuildContext context, String amount) async { try { // 1. يمكنك استخدام نفس طريقة التحقق بالبصمة إذا أردت @@ -293,225 +230,6 @@ class PaymentController extends GetxController { } } - // Future payWithEcashDriver(BuildContext context, String amount) async { - // try { - // // يمكنك استخدام نفس طريقة التحقق بالبصمة إذا أردت - // bool isAvailable = await LocalAuthentication().isDeviceSupported(); - // if (isAvailable) { - // bool didAuthenticate = await LocalAuthentication().authenticate( - // localizedReason: 'Use Touch ID or Face ID to confirm payment'.tr, - // ); - - // if (didAuthenticate) { - // // استدعاء الـ Endpoint الجديد على السيرفر الخاص بك - // var res = await CRUD().postWallet( - // link: AppLink.payWithEcashPassenger, - // // link: - // // 'https://wl.tripz-egypt.com/v1/main/ride/ecash/driver/payWithEcash.php', - // payload: { - // // أرسل البيانات التي يحتاجها السيرفر - // "amount": amount, - // // "driverId": box.read(BoxName.driverID), // تأكد من وجود هذا المتغير - // "passengerId": - // box.read(BoxName.passengerID), // تأكد من وجود هذا المتغير - // }, - // ); - - // // التأكد من أن السيرفر أعاد رابط الدفع بنجاح - // if (res != null && - // res['status'] == 'success' && - // res['message'] != null) { - // final String paymentUrl = res['message']; - // // الانتقال إلى شاشة الدفع الجديدة الخاصة بـ ecash للسائق - // Navigator.push( - // context, - // MaterialPageRoute( - // builder: (context) => - // EcashDriverPaymentScreen(paymentUrl: paymentUrl), - // ), - // ); - // } else { - // // عرض رسالة خطأ في حال فشل السيرفر في إنشاء الرابط - // Get.defaultDialog( - // title: 'Error'.tr, - // content: Text( - // 'Failed to initiate payment. Please try again.'.tr, - // style: AppStyle.title, - // ), - // ); - // } - // } - // } - // } catch (e) { - // Get.defaultDialog( - // title: 'Error'.tr, - // content: Text( - // 'An error occurred during the payment process.'.tr, - // style: AppStyle.title, - // ), - // ); - // } - // } - - /// شاشة جديدة ومبسطة خاصة بدفع السائقين عبر ecash - - // Future payWithMTNWallet( - // BuildContext context, String amount, String currency) async { - // // خزن سياق علوي آمن من البداية - // final BuildContext safeContext = - // Get.overlayContext ?? Get.context ?? context; - - // // سبينر تحميل - // if (!(Get.isDialogOpen ?? false)) { - // Get.dialog(const Center(child: CircularProgressIndicator()), - // barrierDismissible: false); - // } - - // try { - // final phone = box.read(BoxName.phoneWallet) as String; - // final passengerID = box.read(BoxName.passengerID).toString(); - // final formattedAmount = double.parse(amount).toStringAsFixed(0); - - // Log.print("🚀 بدء عملية دفع MTN"); - // Log.print( - // "📦 Payload: passengerID: $passengerID, amount: $formattedAmount, phone: $phone"); - - // // التحقق بالبصمة (اختياري) + حماية من الـ await - // final localAuth = LocalAuthentication(); - // final isAuthSupported = await localAuth.isDeviceSupported(); - // if (isAuthSupported) { - // final didAuth = await localAuth.authenticate( - // localizedReason: 'استخدم بصمة الإصبع أو الوجه لتأكيد الدفع', - // ); - // if (!didAuth) { - // if (Get.isDialogOpen == true) Get.back(); - // Log.print("❌ المستخدم لم يؤكد بالبصمة/الوجه"); - // return; - // } - // } - - // // 1) بدء الدفع - // final responseData = await CRUD().postWalletMtn( - // link: AppLink.payWithMTNStart, - // payload: { - // "amount": formattedAmount, - // "passengerId": passengerID, - // "phone": phone, - // "lang": box.read(BoxName.lang) ?? 'ar', - // }, - // ); - - // // Log.print("✅ استجابة الخادم (mtn_start_payment.php):"); - // // Log.print(responseData); - // Log.print('responseData: ${responseData}'); - - // // فحص الاستجابة بقوة - // late final Map startRes; - // if (responseData is Map) { - // startRes = responseData; - // } else if (responseData is String) { - // startRes = json.decode(responseData) as Map; - // } else { - // throw Exception("تم استلام نوع بيانات غير متوقع من الخادم."); - // } - - // if (startRes['status'] != 'success') { - // final errorMsg = startRes['message']['Error']?.toString().tr ?? - // "فشل بدء عملية الدفع. حاول مرة أخرى."; - // throw Exception(errorMsg); - // } - - // final messageData = startRes["message"] as Map; - // final invoiceNumber = messageData["invoiceNumber"].toString(); - // final operationNumber = messageData["operationNumber"].toString(); - // final guid = messageData["guid"].toString(); - - // // Log.print( - // // "📄 invoiceNumber: $invoiceNumber, 🔢 operationNumber: $operationNumber, 🧭 guid: $guid"); - - // // أغلق السبينر قبل إظهار حوار OTP - // if (Get.isDialogOpen == true) Get.back(); - - // // 2) إدخال OTP بـ Get.defaultDialog (لا يستخدم context قابل للتلف) - // String otpInput = ""; - // await Get.defaultDialog( - // title: "أدخل كود التحقق", - // barrierDismissible: false, - // content: TextField( - // keyboardType: TextInputType.number, - // decoration: const InputDecoration(hintText: "كود OTP"), - // onChanged: (v) => otpInput = v, - // ), - // confirm: TextButton( - // onPressed: () { - // if (otpInput.isEmpty || - // otpInput.length < 4 || - // otpInput.length > 8) { - // Get.snackbar("تنبيه", "أدخل كود OTP صحيح (4–8 أرقام)"); - // return; - // } - // Get.back(result: otpInput); - // }, - // child: const Text("تأكيد"), - // ), - // cancel: TextButton( - // onPressed: () => Get.back(result: null), - // child: const Text("إلغاء"), - // ), - // ).then((res) => otpInput = (res ?? "") as String); - - // if (otpInput.isEmpty) { - // Log.print("❌ لم يتم إدخال OTP"); - // return; - // } - // Log.print("🔐 تم إدخال OTP: $otpInput"); - - // // سبينر أثناء التأكيد - // Get.dialog(const Center(child: CircularProgressIndicator()), - // barrierDismissible: false); - - // // 3) تأكيد الدفع - // final confirmRes = await CRUD().postWalletMtn( - // link: AppLink.payWithMTNConfirm, - // payload: { - // "invoiceNumber": invoiceNumber, - // "operationNumber": operationNumber, - // "guid": guid, - // "otp": otpInput, - // "phone": phone, - // "lang": box.read(BoxName.lang) ?? 'ar', - // }, - // ); - - // if (Get.isDialogOpen == true) Get.back(); - - // // Log.print("✅ استجابة mtn_confirm.php:"); - // // Log.print('confirmRes: ${confirmRes}'); - - // final ok = (confirmRes is Map && confirmRes['status'] == 'success'); - // if (ok) { - // Get.defaultDialog( - // title: "✅ نجاح", - // content: const Text("تمت عملية الدفع وإضافة الرصيد إلى محفظتك."), - // ); - // await getPassengerWallet(); - // } else { - // final errorMsg = (confirmRes['message']['message']?.toString()) ?? - // "فشل في تأكيد الدفع"; - // Get.defaultDialog(title: "❌ فشل", content: Text(errorMsg.tr)); - // } - // } catch (e, s) { - // Log.print("🔥 خطأ أثناء الدفع عبر MTN:"); - // Log.print(e); - // Log.print(s); - // if (Get.isDialogOpen == true) Get.back(); - // Get.defaultDialog( - // title: 'حدث خطأ', - // content: Text(e.toString().replaceFirst("Exception: ", "")), - // ); - // } - // } - Future payWithSyriaTelWallet(String amount, String currency) async { // helper لفتح لودينغ بأمان Future _showLoading() async { @@ -661,6 +379,104 @@ class PaymentController extends GetxController { } } + Future payWithMTNWallet(BuildContext context, String amount, String currency) async { + try { + final phone = walletphoneController.text.trim(); + if (phone.isEmpty) { + Get.defaultDialog(title: 'Error'.tr, content: Text('Please enter phone number'.tr)); + return; + } + + Get.dialog(const Center(child: CircularProgressIndicator()), barrierDismissible: false); + + var res = await CRUD().postWalletMtn( + link: AppLink.createMtnInvoice, + payload: { + "amount": amount, + "user_id": box.read(BoxName.passengerID).toString(), + "user_type": "passenger", + "mtn_phone": phone, + }, + ); + + Get.back(); // close loading + + late final Map resMap; + if (res is Map) { + resMap = res; + } else if (res is String) { + resMap = json.decode(res) as Map; + } else { + throw Exception("Unexpected response type"); + } + + if (resMap['status'] == 'success') { + Get.to(() => PaymentScreenMtn( + invoiceNumber: resMap['invoice_number'], + mtnNumber: resMap['mtn_payment_number'] ?? '---', + amount: double.parse(amount), + )); + } else { + Get.defaultDialog( + title: 'Error'.tr, + content: Text(resMap['message']?.toString() ?? 'Failed to create invoice'.tr), + ); + } + } catch (e) { + if (Get.isDialogOpen ?? false) Get.back(); + Get.defaultDialog(title: 'Error'.tr, content: Text(e.toString())); + } + } + + Future payWithClickWallet(BuildContext context, String amount, String currency) async { + try { + final phone = walletphoneController.text.trim(); + if (phone.isEmpty) { + Get.defaultDialog(title: 'Error'.tr, content: Text('Please enter phone number'.tr)); + return; + } + + Get.dialog(const Center(child: CircularProgressIndicator()), barrierDismissible: false); + + var res = await CRUD().postWalletMtn( + link: AppLink.createCliqInvoice, + payload: { + "amount": amount, + "user_id": box.read(BoxName.passengerID).toString(), + "user_type": "passenger", + "click_phone": phone, + }, + ); + + Get.back(); // close loading + + late final Map resMap; + if (res is Map) { + resMap = res; + } else if (res is String) { + resMap = json.decode(res) as Map; + } else { + throw Exception("Unexpected response type"); + } + + if (resMap['status'] == 'success') { + Get.to(() => PaymentScreenCliq( + invoiceNumber: resMap['invoice_number'], + cliqAlias: resMap['cliq_alias'] ?? '---', + amount: double.parse(amount), + )); + } else { + Get.defaultDialog( + title: 'Error'.tr, + content: Text(resMap['message']?.toString() ?? 'Failed to create invoice'.tr), + ); + } + } catch (e) { + if (Get.isDialogOpen ?? false) Get.back(); + Get.defaultDialog(title: 'Error'.tr, content: Text(e.toString())); + } + } + @override void onInit() { timestamp = now.millisecondsSinceEpoch; diff --git a/siro_rider/lib/controller/rate/rate_conroller.dart b/siro_rider/lib/controller/rate/rate_conroller.dart index bf1ed6e..3bbb02b 100644 --- a/siro_rider/lib/controller/rate/rate_conroller.dart +++ b/siro_rider/lib/controller/rate/rate_conroller.dart @@ -45,30 +45,16 @@ class RateController extends GetxController { confirm: MyElevatedButton(title: 'Ok', onPressed: () => Get.back())); } else if (Get.find().isWalletChecked == true) { double tip = 0; - tip = (Get.find().totalPassenger) * + tip = double.parse(Get.find().totalPassenger.toString()) * (double.parse(box.read(BoxName.tipPercentage).toString())); if (tip > 0) { var res = await CRUD().post(link: AppLink.addTips, payload: { - 'passengerID': box.read(BoxName.passengerID), + 'passengerID': box.read(BoxName.passengerID).toString(), 'driverID': Get.find().driverId.toString(), 'rideID': Get.find().rideId.toString(), 'tipAmount': tip.toString(), - }); - await Get.find() - .addPassengersWallet(((-1) * tip).toString()); - var token1 = await Get.find().generateTokenDriver( - box.read(BoxName.countryCode) == 'Egypt' - ? tip.toStringAsFixed(0) - : (tip * 100).toString()); - await CRUD().postWallet(link: AppLink.addDriversWalletPoints, payload: { - 'driverID': Get.find().driverId.toString(), - 'paymentID': '${Get.find().rideId}tip', - 'amount': box.read(BoxName.countryCode) == 'Egypt' - ? tip.toStringAsFixed(0) - : (tip * 100).toString(), - 'paymentMethod': 'visa-tip', - 'token': token1, + 'country_code': box.read(BoxName.countryCode).toString(), }); if (res != 'failure') { await NotificationService.sendNotification( @@ -76,7 +62,7 @@ class RateController extends GetxController { target: Get.find().driverToken.toString(), title: 'You Have Tips'.tr, body: - '${'${tip.toString()}\$${' tips\nTotal is'.tr}'} ${tip + (Get.find().totalPassenger)}', + '${'${tip.toString()}\$${' tips\nTotal is'.tr}'} ${tip + double.parse(Get.find().totalPassenger.toString())}', isTopic: false, // Important: this is a token tone: 'ding', driverList: [], diff --git a/siro_rider/lib/env/env.g.dart b/siro_rider/lib/env/env.g.dart deleted file mode 100644 index 577c551..0000000 --- a/siro_rider/lib/env/env.g.dart +++ /dev/null @@ -1,14414 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'env.dart'; - -// ************************************************************************** -// EnviedGenerator -// ************************************************************************** - -// coverage:ignore-file -// ignore_for_file: type=lint -// generated_from: .env -final class _Env { - static const List _enviedkeybasicAuthCredentials = [ - 3519153949, - 3419152788, - 2912845944, - 3909856071, - 102024447, - 714276509, - 2069783984, - 849211503, - 2977836317, - 3699699576, - 2402219875, - 961575679, - 1650865858, - 1046325856, - 2964222366, - 449603406, - 2379104822, - 1146955300, - 3842537471, - 2541483040, - 4132204505, - 2003530930, - 1891068029, - 2946800660, - 1310424808, - 107780630, - 1852540733, - 3263688512, - 2685353940, - 2468261221, - 2642652816, - ]; - - static const List _envieddatabasicAuthCredentials = [ - 3519154026, - 3419152869, - 2912845846, - 3909856042, - 102024334, - 714276588, - 2069784003, - 849211397, - 2977836388, - 3699699470, - 2402219796, - 961575573, - 1650865844, - 1046325850, - 2964222448, - 449603391, - 2379104836, - 1146955389, - 3842537397, - 2541483120, - 4132204441, - 2003530883, - 1891067978, - 2946800679, - 1310424799, - 107780686, - 1852540751, - 3263688472, - 2685353912, - 2468261159, - 2642652924, - ]; - - static final String basicAuthCredentials = String.fromCharCodes( - List.generate( - _envieddatabasicAuthCredentials.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatabasicAuthCredentials[i] ^ - _enviedkeybasicAuthCredentials[i])); - - static const List _enviedkeybasicCompareFaces = [ - 4286381358, - 2783755385, - 465264259, - 646224493, - 3681737418, - 3919080937, - 3622237151, - 225254801, - 1532412247, - 1873959070, - 585270922, - 2964749190, - 1898668606, - 1946995781, - 264559813, - 1278770603, - 3920666442, - 165926944, - 3650929431, - 3625515193, - 2649951911, - 3267881446, - 1914765737, - 2920899768, - 1763024911, - 2963930330, - 724492366, - 4039544587, - ]; - - static const List _envieddatabasicCompareFaces = [ - 4286381396, - 2783755283, - 465264374, - 646224391, - 3681737382, - 3919080860, - 3622237102, - 225254903, - 1532412199, - 1873959156, - 585270960, - 2964749288, - 1898668623, - 1946995767, - 264559772, - 1278770625, - 3920666426, - 165927008, - 3650929446, - 3625515150, - 2649951892, - 3267881425, - 1914765809, - 2920899786, - 1763024983, - 2963930294, - 724492300, - 4039544679, - ]; - - static final String basicCompareFaces = String.fromCharCodes( - List.generate( - _envieddatabasicCompareFaces.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatabasicCompareFaces[i] ^ _enviedkeybasicCompareFaces[i])); - - static const List _enviedkeymapKeyOsm = [ - 3060640001, - 346960127, - 3314294098, - 1030012865, - 1437698263, - 3190131666, - 2624192467, - 2853195809, - 1233109344, - 1470699485, - 411546398, - 3054601556, - 1444666290, - 616257806, - 978664394, - 1949900018, - 224395886, - 1412872648, - 3712784326, - 3736141696, - ]; - - static const List _envieddatamapKeyOsm = [ - 3060640108, - 346960030, - 3314294078, - 1030012837, - 1437698226, - 3190131620, - 2624192403, - 2853195859, - 1233109263, - 1470699432, - 411546474, - 3054601521, - 1444666271, - 616257898, - 978664357, - 1949899934, - 224395778, - 1412872617, - 3712784308, - 3736141811, - ]; - - static final String mapKeyOsm = String.fromCharCodes(List.generate( - _envieddatamapKeyOsm.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatamapKeyOsm[i] ^ _enviedkeymapKeyOsm[i])); - - static const List _enviedkeysss_encryptionSalt = [ - 902995399, - 2082203168, - 608200472, - 3584549682, - 3526956967, - 1881872666, - 2714911356, - 369459796, - 127644444, - 1211822634, - 3470051956, - 3046171699, - 2291535080, - 1755988754, - 3700187058, - 3030591870, - 3224275007, - 1031599735, - 1059479386, - 866222866, - 2494005963, - 1360770546, - 1386678821, - 1686614589, - 2607926240, - 3793974732, - 2823271241, - 706783331, - 3090213729, - 2477052953, - 3922184543, - 3219031649, - 2592858459, - 355801982, - 1028727755, - 1182572517, - 538643747, - 2531875289, - 3113120603, - 2462836846, - 1940765394, - 3268088823, - 1377490059, - 2529292059, - 66366670, - 3350175850, - 636154059, - 1013090096, - 3452064708, - 3630448218, - 1330216132, - 2199017650, - 2506020598, - 3057880454, - 2847145832, - 845501714, - 747272912, - 4125075200, - 1691612427, - 705354137, - 4101017401, - 2138745081, - 1362275669, - ]; - - static const List _envieddatasss_encryptionSalt = [ - 902995389, - 2082203207, - 608200501, - 3584549700, - 3526957004, - 1881872758, - 2714911253, - 369459761, - 127644465, - 1211822616, - 3470051864, - 3046171650, - 2291535026, - 1755988862, - 3700187074, - 3030591750, - 3224275030, - 1031599675, - 1059479312, - 866222884, - 2494005948, - 1360770467, - 1386678890, - 1686614603, - 2607926146, - 3793974702, - 2823271293, - 706783287, - 3090213647, - 2477053018, - 3922184550, - 3219031609, - 2592858409, - 355801862, - 1028727724, - 1182572464, - 538643814, - 2531875232, - 3113120525, - 2462836799, - 1940765339, - 3268088706, - 1377490109, - 2529292111, - 66366599, - 3350175790, - 636154111, - 1013090113, - 3452064660, - 3630448238, - 1330216066, - 2199017703, - 2506020515, - 3057880567, - 2847145735, - 845501761, - 747272933, - 4125075288, - 1691612537, - 705354177, - 4101017429, - 2138745019, - 1362275641, - ]; - - static final String sss_encryptionSalt = String.fromCharCodes( - List.generate( - _envieddatasss_encryptionSalt.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatasss_encryptionSalt[i] ^ _enviedkeysss_encryptionSalt[i])); - - static const List _enviedkeysss_pass = [ - 1893471899, - 2349608271, - 2983057176, - 42644819, - 2638824772, - 4026985743, - 2374941959, - 584830455, - 3974535578, - 4215338506, - 3545242246, - 2709426585, - 1043321232, - 3404331437, - 3575242362, - 202302309, - 2996236292, - 405843549, - 2047297606, - 2588784733, - 3390222770, - 1144256972, - 87840572, - 1548393091, - 3763518616, - 1813426160, - 221621844, - 3288149861, - 3473079977, - 2136666060, - 2384050155, - 3175739836, - ]; - - static const List _envieddatasss_pass = [ - 1893471980, - 2349608254, - 2983057270, - 42644798, - 2638824757, - 4026985854, - 2374942068, - 584830365, - 3974535651, - 4215338620, - 3545242353, - 2709426671, - 1043321258, - 3404331459, - 3575242251, - 202302231, - 2996236393, - 405843460, - 2047297548, - 2588784653, - 3390222834, - 1144257021, - 87840523, - 1548393136, - 3763518639, - 1813426120, - 221621772, - 3288149783, - 3473080049, - 2136666016, - 2384050089, - 3175739856, - ]; - - static final String sss_pass = String.fromCharCodes(List.generate( - _envieddatasss_pass.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatasss_pass[i] ^ _enviedkeysss_pass[i])); - - static const List _enviedkeyaddd = [ - 1709166897, - 714388966, - 2668633056, - 3742156675, - 2560938715, - 734197165, - ]; - - static const List _envieddataaddd = [ - 1709166963, - 714388874, - 2668632994, - 3742156783, - 2560938645, - 734197185, - ]; - - static final String addd = String.fromCharCodes(List.generate( - _envieddataaddd.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataaddd[i] ^ _enviedkeyaddd[i])); - - static const List _enviedkeypassnpassenger = [ - 846546532, - 687274896, - 1685022243, - 427065348, - 779427125, - 3173652022, - 3882681850, - 2203988661, - 1380572535, - 703673650, - 561238537, - 1739009496, - 228518013, - ]; - - static const List _envieddatapassnpassenger = [ - 846546444, - 687274994, - 1685022276, - 427065446, - 779427164, - 3173652034, - 3882681752, - 2203988717, - 1380572421, - 703673706, - 561238651, - 1739009434, - 228517903, - ]; - - static final String passnpassenger = String.fromCharCodes(List.generate( - _envieddatapassnpassenger.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatapassnpassenger[i] ^ _enviedkeypassnpassenger[i])); - - static const List _enviedkeynewId = [ - 3177290336, - 2883773472, - 1829415982, - ]; - - static const List _envieddatanewId = [ - 3177290254, - 2883773509, - 1829416025, - ]; - - static final String newId = String.fromCharCodes(List.generate( - _envieddatanewId.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatanewId[i] ^ _enviedkeynewId[i])); - - static const List _enviedkeyallowed = [ - 163381300, - 899410917, - 1297047114, - 1832468776, - 3165108443, - 4096998934, - 1490676685, - 1439973606, - 1048426519, - 3481102174, - 3456066742, - ]; - - static const List _envieddataallowed = [ - 163381337, - 899410826, - 1297047080, - 1832468801, - 3165108407, - 4096999027, - 1490676704, - 1439973511, - 1048426599, - 3481102126, - 3456066700, - ]; - - static final String allowed = String.fromCharCodes(List.generate( - _envieddataallowed.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataallowed[i] ^ _enviedkeyallowed[i])); - - static const List _enviedkeyallowedWallet = [ - 1787088871, - 2569911000, - 2442601235, - 1064597121, - 3007662749, - 3522810039, - 3300121391, - 2570607599, - 635715896, - 1576453486, - 2027601924, - 1433393895, - ]; - - static const List _envieddataallowedWallet = [ - 1787088819, - 2569910954, - 2442601338, - 1064597233, - 3007662823, - 3522810080, - 3300121422, - 2570607491, - 635715924, - 1576453387, - 2027602032, - 1433393885, - ]; - - static final String allowedWallet = String.fromCharCodes(List.generate( - _envieddataallowedWallet.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataallowedWallet[i] ^ _enviedkeyallowedWallet[i])); - - static const List _enviedkeyapiKeyHere = [ - 3593880178, - 4037354333, - 3115330823, - 3329221346, - 1285131282, - 2636057146, - 4122318862, - 1399352256, - 4202661619, - 196131400, - 424123635, - 87673298, - 2749725413, - 1375039539, - 377452600, - 3464350483, - 3865363635, - 1938149974, - 128348290, - 2825817234, - 2004248264, - 684762773, - 2349236384, - 1600339859, - 2291218709, - 107894378, - 3964540342, - 2834440759, - 2545967188, - 1492688522, - 1085528836, - 457442101, - 3456842820, - 3303081587, - 433115674, - 2105832970, - 505826677, - 3046221728, - 965857228, - 3181483455, - 3364668708, - 3344406113, - 2708986004, - 1134352949, - 3161263094, - 1094800141, - 1388977956, - 1664409105, - 1405638671, - ]; - - static const List _envieddataapiKeyHere = [ - 3593880085, - 4037354242, - 3115330896, - 3329221292, - 1285131335, - 2636057176, - 4122318907, - 1399352204, - 4202661598, - 196131388, - 424123521, - 87673275, - 2749725333, - 1375039561, - 377452559, - 3464350526, - 3865363701, - 1938149998, - 128348397, - 2825817343, - 2004248192, - 684762853, - 2349236469, - 1600339966, - 2291218802, - 107894307, - 3964540364, - 2834440831, - 2545967203, - 1492688591, - 1085528912, - 457442128, - 3456842764, - 3303081546, - 433115746, - 2105833040, - 505826637, - 3046221810, - 965857211, - 3181483512, - 3364668771, - 3344406104, - 2708986059, - 1134353010, - 3161263054, - 1094800247, - 1388978044, - 1664409128, - 1405638734, - ]; - - static final String apiKeyHere = String.fromCharCodes(List.generate( - _envieddataapiKeyHere.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataapiKeyHere[i] ^ _enviedkeyapiKeyHere[i])); - - static const List _enviedkeygetLocationAreaLinks = [ - 1030983922, - 1830364909, - 4257635333, - 2070459031, - 2874292621, - 3209331280, - 3419006876, - 4108543843, - 2552056646, - 1917135110, - 1334924226, - 893905685, - 2788423083, - 340412531, - 4069627648, - 3309198037, - 3919220751, - 2102262303, - 2507660039, - 4214099604, - 2154338237, - 1832691520, - 4250994444, - 2295963708, - 1171285399, - 1996340564, - 72923603, - 3905128695, - 1174399797, - 2243956636, - 3444206530, - 2218631810, - 524164796, - 1238945992, - 3954227757, - 2187942734, - 1868459471, - 353049418, - 348793190, - 2570486058, - 1157308117, - 1607877570, - 540613580, - 4135556821, - 2689807102, - 1011590630, - 1193275234, - 2447038561, - 56196918, - 746761441, - 1870817297, - 2799609826, - 801490819, - 3321627056, - 3688403481, - 81886784, - 2611774327, - 570211596, - 993975372, - 1503632901, - 1042014144, - 538424138, - 2058773924, - 2531437694, - 2954615420, - 261974006, - 1020664114, - 3048633794, - 2032689135, - 3297900598, - 3176408977, - 455944069, - 2406241870, - 4203167376, - 62851156, - ]; - - static const List _envieddatagetLocationAreaLinks = [ - 1030983834, - 1830364825, - 4257635441, - 2070459111, - 2874292734, - 3209331306, - 3419006899, - 4108543820, - 2552056615, - 1917135222, - 1334924203, - 893905723, - 2788423135, - 340412417, - 4069627753, - 3309197989, - 3919220853, - 2102262322, - 2507660130, - 4214099699, - 2154338244, - 1832691504, - 4250994552, - 2295963666, - 1171285492, - 1996340539, - 72923582, - 3905128664, - 1174399809, - 2243956718, - 3444206507, - 2218631922, - 524164806, - 1238946023, - 3954227807, - 2187942695, - 1868459435, - 353049391, - 348793161, - 2570486086, - 1157308090, - 1607877537, - 540613549, - 4135556769, - 2689806999, - 1011590537, - 1193275148, - 2447038542, - 56196945, - 746761348, - 1870817381, - 2799609789, - 801490927, - 3321627103, - 3688403578, - 81886753, - 2611774211, - 570211685, - 993975331, - 1503633003, - 1042014111, - 538424107, - 2058773974, - 2531437595, - 2954615325, - 261973929, - 1020664158, - 3048633771, - 2032689025, - 3297900637, - 3176409058, - 455944107, - 2406241854, - 4203167480, - 62851108, - ]; - - static final String getLocationAreaLinks = String.fromCharCodes( - List.generate( - _envieddatagetLocationAreaLinks.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatagetLocationAreaLinks[i] ^ - _enviedkeygetLocationAreaLinks[i])); - - static const List _enviedkeyinitializationVector = [ - 3611405044, - 1380641868, - 1273467373, - 135561897, - 118679966, - 3614237367, - 1922052817, - 44719497, - 925787378, - 440289953, - 2851169437, - 323580025, - 1402542113, - 1981761193, - 3861396433, - 3368225369, - 4095292677, - 2919502404, - 1519960212, - 77225798, - 3334486119, - 42270059, - ]; - - static const List _envieddatainitializationVector = [ - 3611404933, - 1380641844, - 1273467275, - 135561936, - 118680052, - 3614237378, - 1922052794, - 44719614, - 925787293, - 440289988, - 2851169530, - 323579915, - 1402542159, - 1981761227, - 3861396408, - 3368225327, - 4095292765, - 2919502390, - 1519960268, - 77225780, - 3334486053, - 42269977, - ]; - - static final String initializationVector = String.fromCharCodes( - List.generate( - _envieddatainitializationVector.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatainitializationVector[i] ^ - _enviedkeyinitializationVector[i])); - - static const List _enviedkeybasicCompareFacesURL = [ - 2963278999, - 1231706159, - 1237829897, - 4164326574, - 1203544259, - 419803506, - 2563430362, - 1145147898, - 4266713877, - 1687422842, - 3789397071, - 2940343940, - 369248159, - 26053090, - 1032102515, - 3003665131, - 4209090589, - 169818371, - 3264705697, - 2683002705, - 1656427848, - 2918553424, - 3219753291, - 1325749876, - 59503219, - 3045734554, - 566252987, - 3551738816, - 618970155, - 3815690867, - 3857590562, - 3591437638, - 401634963, - 4087492929, - 3993538514, - 1037866011, - 4195104667, - 2387751973, - 2952442828, - 826838868, - 4252250418, - 2857196284, - 3186847572, - 1241236113, - 2515367635, - 1402161508, - 1350867777, - 2838494564, - 3444584791, - 496640011, - 3883749492, - 2097541549, - 3312862646, - 3542005587, - 2000363680, - 2764561888, - 1454472523, - 3973161279, - 3753781162, - 4282368754, - ]; - - static const List _envieddatabasicCompareFacesURL = [ - 2963279103, - 1231706203, - 1237830013, - 4164326622, - 1203544240, - 419803464, - 2563430389, - 1145147861, - 4266713971, - 1687422747, - 3789397036, - 2940344033, - 369248178, - 26052998, - 1032102422, - 3003665055, - 4209090680, - 169818464, - 3264705749, - 2683002748, - 1656427822, - 2918553446, - 3219753330, - 1325749830, - 59503175, - 3045734569, - 566252930, - 3551738866, - 618970184, - 3815690823, - 3857590593, - 3591437681, - 401635005, - 4087492905, - 3993538487, - 1037866089, - 4195104756, - 2387752014, - 2952442809, - 826838837, - 4252250434, - 2857196172, - 3186847610, - 1241236210, - 2515367612, - 1402161417, - 1350867822, - 2838494471, - 3444584760, - 496640102, - 3883749380, - 2097541580, - 3312862660, - 3542005558, - 2000363775, - 2764561798, - 1454472490, - 3973161308, - 3753781199, - 4282368641, - ]; - - static final String basicCompareFacesURL = String.fromCharCodes( - List.generate( - _envieddatabasicCompareFacesURL.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatabasicCompareFacesURL[i] ^ - _enviedkeybasicCompareFacesURL[i])); - - static const List _enviedkeyaccountSIDTwillo = [ - 3421322762, - 2857483697, - 1955904938, - 1002131221, - 1252992660, - 3903676813, - 1638675655, - 3125190302, - 471338879, - 2533329970, - 4172061735, - 3395523882, - 262355352, - 1111191083, - 3582071858, - 4212909896, - 3262824484, - 3408108420, - 221460951, - 1865913905, - 2183473689, - 3314271961, - 2123442263, - 2285068125, - 950274046, - 3765122410, - 1820216594, - 3752290337, - 2150546053, - 2417151322, - 2200004699, - 2374999429, - 2513609130, - 3373568499, - 1051756201, - 38199397, - 1252504835, - 3155932201, - 1936810569, - 1914142812, - 3795479208, - ]; - - static const List _envieddataaccountSIDTwillo = [ - 3421322843, - 2857483767, - 1955904978, - 1002131237, - 1252992741, - 3903676916, - 1638675699, - 3125190315, - 471338825, - 2533330008, - 4172061778, - 3395523904, - 262355371, - 1111191059, - 3582071809, - 4212909862, - 3262824477, - 3408108540, - 221460898, - 1865913928, - 2183473707, - 3314271976, - 2123442286, - 2285068137, - 950273935, - 3765122396, - 1820216608, - 3752290328, - 2150546164, - 2417151339, - 2200004669, - 2374999535, - 2513609114, - 3373568394, - 1051756190, - 38199357, - 1252504945, - 3155932273, - 1936810533, - 1914142750, - 3795479236, - ]; - - static final String accountSIDTwillo = String.fromCharCodes( - List.generate( - _envieddataaccountSIDTwillo.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataaccountSIDTwillo[i] ^ _enviedkeyaccountSIDTwillo[i])); - - static const List _enviedkeyserverAPI = [ - 3030481933, - 561731687, - 1532468078, - 1841881342, - 3767318582, - 2729953903, - 2148714654, - 715605698, - 3361375633, - 1580309697, - 3136913287, - 2879767580, - 4054265575, - 438717263, - 3463805833, - 3239706292, - 3199814531, - 1839544413, - 2332305922, - 285504926, - 3463188451, - 1995243562, - 1826351244, - 2233571696, - 2792829828, - 759113286, - 3865259689, - 661625175, - 2471558285, - 2389747341, - 2380997961, - 3079386356, - 2776300218, - 2908135291, - 384810040, - 2345532123, - 3322230495, - 4115556331, - 903800075, - 1697115129, - 815029601, - 4010386958, - 3042825640, - 2782017991, - 4190416181, - 3779270322, - 1152131118, - 3726609728, - 2617153740, - 141497699, - 1042108120, - 3991368088, - 2193296480, - 2292270379, - 2268330230, - 1982646414, - 719126335, - 1489335517, - 1039370592, - 3398934773, - 1468453387, - 44241409, - 2946069235, - 1084815681, - 4147598144, - 3333411372, - 3449275664, - 52122604, - 1203902763, - 3073124928, - 3598641133, - 3414445114, - 3662147358, - 4168900863, - 3346502965, - 3912207598, - 2712653385, - 1193782938, - 435958833, - 2117539689, - 3683582843, - 2970678956, - 1069484622, - 3682945222, - 4173875370, - 665857694, - 2080896536, - 931921475, - 3419181311, - 3783734052, - 2624902460, - 3021927546, - 1840830698, - 878242419, - 2643783826, - 577583084, - 3382465826, - 2988376195, - 4246655135, - 2413284050, - 902828880, - 1590761919, - 1401586537, - 20073247, - 475617636, - 4294289045, - 2355132819, - 2927711333, - 3749093655, - 709784377, - 666786023, - 1297361891, - 4135437155, - 289723421, - 3953242104, - 1491418928, - 3625744521, - 395040664, - 403841843, - 3997897032, - 2017814758, - 1440850690, - 1402305980, - 1206349808, - 1456809692, - 2878200037, - 4244717068, - 1298661842, - 3525663166, - 716070213, - 4165832518, - 2594039137, - 1620855140, - 2715611197, - 3944530774, - 3038387789, - 2919090311, - 1217557740, - 3002762851, - 1868403459, - 2876075962, - 2891020877, - 4054243556, - 4068284405, - 2339901513, - 2003545733, - 1254196169, - 3426796080, - 2576315786, - 2178899200, - 3834253677, - 3213527118, - 1676097518, - 4076564366, - 3577752839, - 3911289599, - 4055507396, - 4072059363, - ]; - - static const List _envieddataserverAPI = [ - 3030482012, - 561731638, - 1532468031, - 1841881263, - 3767318617, - 2729953805, - 2148714701, - 715605680, - 3361375715, - 1580309639, - 3136913390, - 2879767590, - 4054265526, - 438717209, - 3463805912, - 3239706252, - 3199814580, - 1839544357, - 2332306007, - 285504937, - 3463188377, - 1995243613, - 1826351311, - 2233571590, - 2792829929, - 759113244, - 3865259731, - 661625101, - 2471558377, - 2389747436, - 2380997937, - 3079386241, - 2776300265, - 2908135241, - 384810078, - 2345532137, - 3322230508, - 4115556274, - 903800127, - 1697115028, - 815029531, - 4010387001, - 3042825701, - 2782017981, - 4190416204, - 3779270397, - 1152131156, - 3726609714, - 2617153780, - 141497612, - 1042108092, - 3991368106, - 2193296386, - 2292270425, - 2268330176, - 1982646469, - 719126374, - 1489335460, - 1039370501, - 3398934707, - 1468453482, - 44241493, - 2946069157, - 1084815629, - 4147598087, - 3333411359, - 3449275739, - 52122591, - 1203902787, - 3073124920, - 3598641112, - 3414445152, - 3662147455, - 4168900778, - 3346502988, - 3912207510, - 2712653438, - 1193783039, - 435958888, - 2117539615, - 3683582778, - 2970679029, - 1069484606, - 3682945159, - 4173875452, - 665857786, - 2080896595, - 931921448, - 3419181266, - 3783734038, - 2624902404, - 3021927500, - 1840830628, - 878242343, - 2643783872, - 577582981, - 3382465809, - 2988376313, - 4246655212, - 2413284075, - 902828857, - 1590761964, - 1401586470, - 20073329, - 475617596, - 4294289121, - 2355132875, - 2927711287, - 3749093726, - 709784385, - 666785940, - 1297361812, - 4135437060, - 289723438, - 3953242035, - 1491418965, - 3625744618, - 395040730, - 403841886, - 3997897019, - 2017814666, - 1440850737, - 1402306026, - 1206349704, - 1456809622, - 2878200028, - 4244717179, - 1298661789, - 3525663123, - 716070195, - 4165832463, - 2594039057, - 1620855059, - 2715611208, - 3944530786, - 3038387741, - 2919090417, - 1217557723, - 3002762759, - 1868403560, - 2876076018, - 2891020838, - 4054243516, - 4068284315, - 2339901472, - 2003545840, - 1254196145, - 3426796157, - 2576315865, - 2178899268, - 3834253578, - 3213527065, - 1676097462, - 4076564476, - 3577752927, - 3911289491, - 4055507334, - 4072059279, - ]; - - static final String serverAPI = String.fromCharCodes(List.generate( - _envieddataserverAPI.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataserverAPI[i] ^ _enviedkeyserverAPI[i])); - - static const List _enviedkeymapAPIKEY = [ - 139422818, - 1274894117, - 705367475, - 190715590, - 2885381275, - 1237552208, - 789992513, - 4210300781, - 831066256, - 1670337347, - 2374393620, - 1329777940, - 3323028931, - 211302211, - 500539022, - 189099516, - 3783448816, - 2865288645, - 954999734, - 3741670607, - 630560556, - 553973186, - 2622942441, - 753712015, - 2703584814, - 577897202, - 3848612565, - 968474137, - 2517180679, - 2557601828, - 1665477934, - 4217909129, - 2053579784, - 2709411570, - 800576793, - 2802364580, - 1739054168, - 185352856, - 3397262411, - ]; - - static const List _envieddatamapAPIKEY = [ - 139422755, - 1274894188, - 705367497, - 190715559, - 2885381320, - 1237552169, - 789992448, - 4210300733, - 831066326, - 1670337297, - 2374393675, - 1329777996, - 3323028897, - 211302161, - 500539072, - 189099468, - 3783448744, - 2865288607, - 954999683, - 3741670534, - 630560598, - 553973233, - 2622942376, - 753712086, - 2703584874, - 577897112, - 3848612507, - 968474176, - 2517180751, - 2557601891, - 1665477988, - 4217909198, - 2053579834, - 2709411457, - 800576811, - 2802364661, - 1739054095, - 185352943, - 3397262342, - ]; - - static final String mapAPIKEY = String.fromCharCodes(List.generate( - _envieddatamapAPIKEY.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatamapAPIKEY[i] ^ _enviedkeymapAPIKEY[i])); - - static const List _enviedkeymapAPIKEYIOS = [ - 501088550, - 666539920, - 4053119542, - 1824218517, - 2072254230, - 1706975033, - 3890071339, - 3548546957, - 1454318904, - 3829309755, - 2379226428, - 582640862, - 1409675323, - 2677261074, - 116284009, - 2837382892, - 131049603, - 3570702196, - 667973366, - 93631426, - 1310172929, - 3364464954, - 1899319673, - 476934999, - 351204332, - 935705275, - 2626325896, - 689073005, - 3190766987, - 3120074678, - 165345389, - 700148630, - 2884292999, - 1431652494, - 2619573134, - 1382531073, - 91332797, - 2433499408, - 329003519, - ]; - - static const List _envieddatamapAPIKEYIOS = [ - 501088615, - 666539993, - 4053119564, - 1824218612, - 2072254277, - 1706975040, - 3890071407, - 3548547049, - 1454318921, - 3829309776, - 2379226480, - 582640787, - 1409675384, - 2677261152, - 116283928, - 2837382790, - 131049685, - 3570702086, - 667973272, - 93631477, - 1310173017, - 3364464983, - 1899319576, - 476934963, - 351204261, - 935705290, - 2626326001, - 689072899, - 3190767090, - 3120074713, - 165345327, - 700148727, - 2884293040, - 1431652574, - 2619573180, - 1382531126, - 91332850, - 2433499509, - 329003442, - ]; - - static final String mapAPIKEYIOS = String.fromCharCodes(List.generate( - _envieddatamapAPIKEYIOS.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatamapAPIKEYIOS[i] ^ _enviedkeymapAPIKEYIOS[i])); - - static const List _enviedkeytwilloRecoveryCode = [ - 1803060704, - 221967584, - 432835583, - 1821726476, - 1226349559, - 3763530154, - 544814582, - 3629646694, - 201594051, - 2259326998, - 210178147, - 1274638712, - 1983209288, - 817991099, - 1380881987, - 2385653800, - 3524466903, - 2729798748, - 1380416107, - 445670555, - 3455719338, - 30921306, - 1021685465, - 2215645380, - 215122366, - 1249478418, - 551708365, - 2828195025, - 1800874424, - 1813381215, - 905465401, - ]; - - static const List _envieddatatwilloRecoveryCode = [ - 1803060643, - 221967521, - 432835498, - 1821726523, - 1226349518, - 3763530222, - 544814526, - 3629646646, - 201593995, - 2259327015, - 210178081, - 1274638610, - 1983209229, - 817991042, - 1380881939, - 2385653885, - 3524466847, - 2729798760, - 1380416046, - 445670607, - 3455719410, - 30921230, - 1021685386, - 2215645340, - 215122404, - 1249478474, - 551708351, - 2828194953, - 1800874452, - 1813381149, - 905465429, - ]; - - static final String twilloRecoveryCode = String.fromCharCodes( - List.generate( - _envieddatatwilloRecoveryCode.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatatwilloRecoveryCode[i] ^ _enviedkeytwilloRecoveryCode[i])); - - static const List _enviedkeyauthTokenTwillo = [ - 2605337086, - 253218539, - 1242078840, - 2571064566, - 2196923648, - 2996759701, - 2230313950, - 1379900346, - 2385774154, - 1278838377, - 3274709234, - 2950264869, - 1792474851, - 416552561, - 208109492, - 2473448525, - 1955114809, - 3148084352, - 3002432679, - 824898019, - 863883499, - 3849369907, - 748322049, - 3653825883, - 2668352116, - 781505256, - 1926531563, - 1126055465, - 1448047978, - 1887032217, - 2204162845, - 2965026673, - 2408707734, - 1763826856, - 3815008732, - 1651050897, - 2703845745, - 3052539282, - 1291302794, - ]; - - static const List _envieddataauthTokenTwillo = [ - 2605337033, - 253218523, - 1242078733, - 2571064527, - 2196923704, - 2996759807, - 2230313899, - 1379900298, - 2385774200, - 1278838360, - 3274709190, - 2950264906, - 1792474779, - 416552457, - 208109440, - 2473448508, - 1955114761, - 3148084469, - 3002432656, - 824898007, - 863883483, - 3849369857, - 748322105, - 3653825838, - 2668352068, - 781505242, - 1926531546, - 1126055516, - 1448047966, - 1887032296, - 2204162920, - 2965026631, - 2408707747, - 1763826928, - 3815008686, - 1651050953, - 2703845661, - 3052539344, - 1291302886, - ]; - - static final String authTokenTwillo = String.fromCharCodes(List.generate( - _envieddataauthTokenTwillo.length, - (int i) => i, - growable: false, - ).map( - (int i) => _envieddataauthTokenTwillo[i] ^ _enviedkeyauthTokenTwillo[i])); - - static const List _enviedkeychatGPTkey = [ - 242389158, - 388191645, - 3905146314, - 1403215961, - 3224564508, - 350206627, - 616380616, - 2744215402, - 2923495073, - 548064766, - 3735391137, - 3834695638, - 906577526, - 2430929318, - 3767592332, - 2513066538, - 3933033600, - 1973603880, - 3000413891, - 917868357, - 3972029993, - 3413133128, - 1051136169, - 654488403, - 318621822, - 23601985, - 467751169, - 1259904615, - 1741531364, - 925428555, - 4013970699, - 3029798037, - 3371318464, - 3333039117, - 251851895, - 421179081, - 1927806760, - 763427961, - 2049921264, - 704701071, - 2677604537, - 3127931526, - 2675794296, - 3336932672, - 1808943782, - 4114362634, - 747091065, - 3482486270, - 632451631, - 2476307458, - 1019029766, - 137606893, - 2496755630, - 21526636, - 790264907, - 1732060293, - 1714553635, - 338936958, - ]; - - static const List _envieddatachatGPTkey = [ - 242389212, - 388191738, - 3905146343, - 1403215981, - 3224564575, - 350206609, - 616380670, - 2744215323, - 2923495061, - 548064685, - 3735391224, - 3834695601, - 906577460, - 2430929389, - 3767592413, - 2513066575, - 3933033672, - 1973603954, - 3000413831, - 917868340, - 3972030018, - 3413133087, - 1051136198, - 654488356, - 318621757, - 23602040, - 467751257, - 1259904533, - 1741531292, - 925428524, - 4013970782, - 3029798096, - 3371318438, - 3333039192, - 251851790, - 421179120, - 1927806818, - 763427883, - 2049921159, - 704701117, - 2677604555, - 3127931627, - 2675794254, - 3336932625, - 1808943764, - 4114362731, - 747090973, - 3482486172, - 632451612, - 2476307561, - 1019029868, - 137606810, - 2496755702, - 21526558, - 790264851, - 1732060393, - 1714553697, - 338936850, - ]; - - static final String chatGPTkey = String.fromCharCodes(List.generate( - _envieddatachatGPTkey.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatachatGPTkey[i] ^ _enviedkeychatGPTkey[i])); - - static const List _enviedkeytransactionCloude = [ - 1605517145, - 847036972, - 831201678, - 729285444, - 848447233, - 4232095709, - 2082361366, - 2495967342, - 534375107, - 2433952400, - 3151805455, - 1904326700, - 2527588209, - 164211966, - 758130668, - 3061164117, - 2662655498, - 943757324, - 456332828, - 910736731, - 4132294739, - 2736082735, - 99702804, - 2422846406, - 3549833802, - 344519539, - 2658163168, - 3273986910, - 1853442086, - 2687901792, - 3489667203, - 2421139504, - 2464001680, - 2440855538, - 3469916602, - 3071175721, - 3570873517, - 3516310567, - 97276872, - 3565398609, - 1488924307, - 2453451722, - 2278608336, - 251894312, - 1505616939, - 2547870165, - 2913618629, - 1049738335, - 772639180, - 1811076655, - 3760483362, - 2880001146, - 3208833118, - 1804865667, - 1770524918, - 168238452, - 3749409902, - 194472735, - 3785911494, - 2675977572, - 2247994263, - 902945434, - ]; - - static const List _envieddatatransactionCloude = [ - 1605517064, - 847036996, - 831201773, - 729285427, - 848447348, - 4232095668, - 2082361466, - 2495967233, - 534375086, - 2433952481, - 3151805548, - 1904326723, - 2527588120, - 164211868, - 758130646, - 3061164036, - 2662655580, - 943757379, - 456332867, - 910736657, - 4132294685, - 2736082806, - 99702865, - 2422846338, - 3549833848, - 344519467, - 2658163127, - 3273986847, - 1853442068, - 2687901782, - 3489667290, - 2421139560, - 2464001755, - 2440855473, - 3469916552, - 3071175805, - 3570873597, - 3516310557, - 97276817, - 3565398554, - 1488924322, - 2453451662, - 2278608262, - 251894368, - 1505616925, - 2547870086, - 2913618575, - 1049738269, - 772639231, - 1811076638, - 3760483436, - 2880001097, - 3208833038, - 1804865734, - 1770524871, - 168238369, - 3749409846, - 194472813, - 3785911454, - 2675977480, - 2247994325, - 902945526, - ]; - - static final String transactionCloude = String.fromCharCodes( - List.generate( - _envieddatatransactionCloude.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatatransactionCloude[i] ^ _enviedkeytransactionCloude[i])); - - static const List _enviedkeyvisionApi = [ - 1097886132, - 3985866682, - 1524130217, - 2017777195, - 2473862255, - 2350128703, - 2120998776, - 4080028120, - 3590458402, - 1659718715, - 949059994, - 4079865077, - 3981420106, - 1990419615, - 3168376197, - 1728834287, - 4180401915, - 1781248630, - 2088244042, - 728927130, - 828324160, - 3481584062, - 2380366331, - 3845685290, - 2535277535, - 2196147607, - 2905796053, - 2446586623, - 2305220679, - 471959978, - 1374719153, - 3706601957, - 299827297, - 1138908884, - 2020617516, - 605697912, - 3713560841, - 2146932887, - ]; - - static const List _envieddatavisionApi = [ - 1097886087, - 3985866698, - 1524130280, - 2017777255, - 2473862172, - 2350128718, - 2120998699, - 4080028043, - 3590458491, - 1659718767, - 949060076, - 4079864975, - 3981420090, - 1990419625, - 3168376252, - 1728834238, - 4180401870, - 1781248560, - 2088243975, - 728927187, - 828324135, - 3481584092, - 2380366209, - 3845685312, - 2535277464, - 2196147617, - 2905795983, - 2446586574, - 2305220669, - 471960001, - 1374719173, - 3706601903, - 299827257, - 1138908838, - 2020617588, - 605697812, - 3713560907, - 2146932987, - ]; - - static final String visionApi = String.fromCharCodes(List.generate( - _envieddatavisionApi.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatavisionApi[i] ^ _enviedkeyvisionApi[i])); - - static const List _enviedkeysecretKey = [ - 4015336164, - 4294548072, - 436876341, - 3447150205, - 2949338070, - 4168115423, - 3831479947, - 2455497239, - 3318553548, - 3719678846, - 3143306693, - 2640311066, - 2781547097, - 3667788788, - 1069759370, - 3997190465, - 2079023732, - 3601413803, - 1246461120, - 2202454754, - 2895945296, - 2204185410, - 2095826370, - 3463443610, - 1469909706, - 689086128, - 123808287, - 360820091, - 3124020903, - 854007359, - 17959094, - 3166300703, - 1920913995, - 2167525277, - 2429935079, - 2679882670, - 4029844546, - 176479569, - 2897991528, - 2019932741, - 3122532927, - 4206737031, - 4112353882, - 2475750662, - 345881429, - 1949749200, - 2998244026, - 939489372, - 4225302176, - 1399356340, - 3394717684, - 2846691720, - 140799259, - 1229086340, - 2412393965, - 630987670, - 1173372796, - 498474180, - 4167759607, - 927891759, - 1638991689, - 1465633907, - 1564880863, - 975813684, - 1087683465, - 2436053240, - 2075821487, - 3300547877, - 4246275907, - 1672799032, - 3598755283, - 667102077, - 1568719535, - 1467241636, - 1215356121, - 3093530166, - 800208581, - 4235463897, - 3546980686, - 698373282, - 3388888848, - 2435402745, - 3441933671, - 3543881842, - 721738749, - 681589950, - 1017222993, - 2155086703, - 1581550, - 155640487, - 2162633079, - 3818614442, - 3351473848, - 2609147527, - 66219496, - 2112588228, - 1257866853, - 825421195, - 2126668981, - 4037999574, - 2841532656, - 1731364060, - 463935396, - 1477462254, - 2816849017, - 3545311289, - 430236379, - 1340026388, - 1353280830, - 3327415251, - 2581666353, - 3022581160, - 1220135957, - 1587392335, - ]; - - static const List _envieddatasecretKey = [ - 4015336094, - 4294547983, - 436876394, - 3447150095, - 2949338041, - 4168115375, - 3831480033, - 2455497288, - 3318553593, - 3719678793, - 3143306636, - 2640311155, - 2781547055, - 3667788738, - 1069759482, - 3997190412, - 2079023666, - 3601413864, - 1246461058, - 2202454692, - 2895945249, - 2204185457, - 2095826305, - 3463443624, - 1469909668, - 689086086, - 123808342, - 360820003, - 3124020939, - 854007378, - 17959132, - 3166300774, - 1920913952, - 2167525357, - 2429935007, - 2679882730, - 4029844527, - 176479494, - 2897991505, - 2019932790, - 3122532972, - 4206737104, - 4112353897, - 2475750768, - 345881379, - 1949749128, - 2998244050, - 939489386, - 4225302168, - 1399356385, - 3394717621, - 2846691761, - 140799311, - 1229086385, - 2412393899, - 630987737, - 1173372718, - 498474128, - 4167759520, - 927891784, - 1638991646, - 1465633792, - 1564880779, - 975813639, - 1087683518, - 2436053163, - 2075821531, - 3300547950, - 4246275888, - 1672799095, - 3598755203, - 667101977, - 1568719576, - 1467241696, - 1215356093, - 3093530181, - 800208572, - 4235463905, - 3546980671, - 698373360, - 3388888873, - 2435402634, - 3441933589, - 3543881791, - 721738664, - 681589970, - 1017222948, - 2155086606, - 1581446, - 155640532, - 2162633028, - 3818614468, - 3351473896, - 2609147599, - 66219422, - 2112588195, - 1257866791, - 825421290, - 2126668934, - 4037999589, - 2841532548, - 1731363995, - 463935439, - 1477462231, - 2816848969, - 3545311311, - 430236301, - 1340026401, - 1353280870, - 3327415201, - 2581666409, - 3022581188, - 1220136023, - 1587392291, - ]; - - static final String secretKey = String.fromCharCodes(List.generate( - _envieddatasecretKey.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatasecretKey[i] ^ _enviedkeysecretKey[i])); - - static const List _enviedkeystripePublishableKe = [ - 1839317751, - 4055198821, - 3653213416, - 3455310338, - 3760944581, - 3672629832, - 4093011737, - 784003973, - 847343954, - 643086942, - 1443690469, - 1528530013, - 79067950, - 682168411, - 3200867997, - 2292398052, - 3638192409, - 1045672322, - 3536248171, - 1366969601, - 3536252828, - 1939114885, - 2561940310, - 546112917, - 3956257752, - 1808807243, - 522815707, - 2050337606, - 1157547450, - 1643284130, - 1599701708, - 2963548178, - 1950300364, - 2753990949, - 361671953, - 1260027854, - 4121309732, - 2073988458, - 2831828, - 3069378595, - 1324701296, - 3576762029, - 1584446120, - 3301011629, - 1001909348, - 3961168685, - 2725407945, - 3592027398, - 2082756909, - 1659395078, - 3166767217, - 1508183835, - 683517484, - 1761560941, - 2027774136, - 2755606542, - 426855793, - 1663823423, - 2831689856, - 3751083812, - 3134275374, - 1007820824, - 1812490555, - 284479710, - 981661688, - 4116375524, - 2152120028, - 968305691, - 2776436853, - 1424024636, - 1690058532, - 3914383580, - 3101625517, - 3767559948, - 223788900, - 2688209364, - 4032446764, - 1648405458, - 2250897834, - 2072228863, - 55235617, - 3123502272, - 1435667919, - 3392401064, - 3713648025, - 2341469150, - 3255122718, - 2122504995, - 1230709287, - 1908780158, - 3697791584, - 1014585792, - 3195820570, - 2458526645, - 2231151324, - 2908160374, - 1794206337, - 1434466934, - 1377686165, - 4209917831, - 2421338853, - 3702190479, - 2410002154, - 2281040672, - 1617682380, - 3526639417, - 468233026, - 2175183498, - 1669160843, - 2345165308, - 683924179, - 3149170488, - 476084031, - 4050895731, - ]; - - static const List _envieddatastripePublishableKe = [ - 1839317633, - 4055198722, - 3653213367, - 3455310450, - 3760944567, - 3672629799, - 4093011817, - 784004079, - 847343885, - 643086955, - 1443690450, - 1528529940, - 79067975, - 682168365, - 3200868011, - 2292397993, - 3638192479, - 1045672385, - 3536248105, - 1366969671, - 3536252909, - 1939114934, - 2561940245, - 546112935, - 3956257718, - 1808807293, - 522815664, - 2050337544, - 1157547504, - 1643284172, - 1599701654, - 2963548240, - 1950300341, - 2753991027, - 361671975, - 1260027808, - 4121309777, - 2073988398, - 2831776, - 3069378683, - 1324701205, - 3576762004, - 1584446177, - 3301011655, - 1001909281, - 3961168765, - 2725407878, - 3592027488, - 2082756933, - 1659395179, - 3166767105, - 1508183903, - 683517528, - 1761560890, - 2027774165, - 2755606650, - 426855746, - 1663823474, - 2831689932, - 3751083894, - 3134275358, - 1007820927, - 1812490602, - 284479662, - 981661585, - 4116375468, - 2152119999, - 968305738, - 2776436760, - 1424024701, - 1690058594, - 3914383505, - 3101625592, - 3767560028, - 223788822, - 2688209294, - 4032446799, - 1648405473, - 2250897915, - 2072228758, - 55235682, - 3123502212, - 1435667877, - 3392401104, - 3713648091, - 2341469060, - 3255122770, - 2122505025, - 1230709343, - 1908780090, - 3697791523, - 1014585843, - 3195820671, - 2458526675, - 2231151268, - 2908160289, - 1794206457, - 1434466828, - 1377686182, - 4209917876, - 2421338759, - 3702190552, - 2410002082, - 2281040657, - 1617682326, - 3526639454, - 468233008, - 2175183609, - 1669160915, - 2345165198, - 683924107, - 3149170516, - 476084093, - 4050895647, - ]; - - static final String stripePublishableKe = String.fromCharCodes( - List.generate( - _envieddatastripePublishableKe.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatastripePublishableKe[i] ^ - _enviedkeystripePublishableKe[i])); - - static const List _enviedkeychatGPTkeySefer = [ - 3481780378, - 2488408238, - 1213188678, - 3282450415, - 1033997396, - 3238031914, - 3800381389, - 1613466561, - 144483971, - 315530640, - 1158827724, - 4170309758, - 1967536791, - 3059190364, - 3889030883, - 2634503668, - 2852081925, - 3033934553, - 4203402991, - 3743270854, - 2748434845, - 1745785365, - 2112598479, - 3184059810, - 2066314683, - 1427862432, - 2934044260, - 3642069627, - 1934688327, - 455439846, - 4191000314, - 837631213, - 1465226339, - 4137515676, - 4045632854, - 2149603429, - 644602439, - 1220893653, - 3286123571, - 307176327, - 3863521071, - 2129564827, - 565234555, - 2633654187, - 3876069411, - 315112522, - 2435426053, - 3467212029, - 3985754679, - 773736579, - 3710129599, - 3983039700, - 1401965244, - 1355807447, - 2203742886, - 1842107697, - 1795219852, - 3703120384, - ]; - - static const List _envieddatachatGPTkeySefer = [ - 3481780448, - 2488408265, - 1213188715, - 3282450342, - 1033997373, - 3238031992, - 3800381438, - 1613466536, - 144484023, - 315530751, - 1158827683, - 4170309636, - 1967536886, - 3059190383, - 3889030842, - 2634503554, - 2852082029, - 3033934511, - 4203402893, - 3743270911, - 2748434927, - 1745785423, - 2112598436, - 3184059795, - 2066314744, - 1427862425, - 2934044220, - 3642069513, - 1934688319, - 455439745, - 4191000239, - 837631144, - 1465226323, - 4137515760, - 4045632878, - 2149603343, - 644602389, - 1220893575, - 3286123625, - 307176437, - 3863521127, - 2129564913, - 565234504, - 2633654266, - 3876069446, - 315112575, - 2435426132, - 3467211941, - 3985754727, - 773736687, - 3710129614, - 3983039618, - 1401965284, - 1355807397, - 2203742974, - 1842107741, - 1795219918, - 3703120492, - ]; - - static final String chatGPTkeySefer = String.fromCharCodes(List.generate( - _envieddatachatGPTkeySefer.length, - (int i) => i, - growable: false, - ).map( - (int i) => _envieddatachatGPTkeySefer[i] ^ _enviedkeychatGPTkeySefer[i])); - - static const List _enviedkeyllamaKey = [ - 3468974626, - 926642541, - 1082357605, - 2085769640, - 2966609750, - 90584284, - 625556588, - 1178663449, - 1763532805, - 1702862398, - 2020237533, - 2137426245, - 469878543, - 2211539993, - 663123122, - 151738963, - 972325983, - 1922633015, - 4130619566, - 4294795451, - 1717230592, - 1253761814, - 238290175, - 2824235106, - 2732900456, - 352781565, - 1384226368, - 3910162632, - 2921128404, - 354155768, - 692771880, - 328649116, - 2804902878, - 3598420345, - 1973223067, - 2881006884, - 965842115, - 295358586, - 4209150984, - 1488138470, - 3406440154, - 4105613890, - 3386372571, - 3738130302, - 1621428922, - 3169621936, - 4045399268, - 3155776899, - 2367892643, - 2920930863, - 2566470495, - 4193903929, - 607733079, - 1290743187, - 2989312781, - 3798373704, - 3376110713, - 1936802518, - 1161989973, - 1571794311, - 1164086087, - 1121099519, - 3742776406, - 4127649343, - 1640794839, - 3475731192, - 3458124837, - 1056226943, - 2690316021, - 3905649921, - 2142458726, - 753916329, - 1274867313, - 465697361, - ]; - - static const List _envieddatallamaKey = [ - 3468974704, - 926642495, - 1082357576, - 2085769709, - 2966609699, - 90584229, - 625556483, - 1178663519, - 1763532865, - 1702862443, - 2020237483, - 2137426211, - 469878621, - 2211540061, - 663123184, - 151738940, - 972325941, - 1922632963, - 4130619544, - 4294795485, - 1717230682, - 1253761885, - 238290110, - 2824235030, - 2732900387, - 352781495, - 1384226419, - 3910162622, - 2921128379, - 354155701, - 692771856, - 328649169, - 2804902826, - 3598420302, - 1973223085, - 2881006876, - 965842080, - 295358506, - 4209151085, - 1488138412, - 3406440076, - 4105613941, - 3386372508, - 3738130224, - 1621428958, - 3169622001, - 4045399183, - 3155776979, - 2367892727, - 2920930916, - 2566470459, - 4193903968, - 607733103, - 1290743260, - 2989312873, - 3798373669, - 3376110656, - 1936802488, - 1161989985, - 1571794400, - 1164086048, - 1121099448, - 3742776359, - 4127649398, - 1640794850, - 3475731135, - 3458124892, - 1056226832, - 2690315949, - 3905650035, - 2142458686, - 753916357, - 1274867251, - 465697341, - ]; - - static final String llamaKey = String.fromCharCodes(List.generate( - _envieddatallamaKey.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatallamaKey[i] ^ _enviedkeyllamaKey[i])); - - static const List _enviedkeyprivateKeyFCM = [ - 1085536354, - 2117980432, - 3306799739, - 1841983872, - 1712404223, - 2262186519, - 2157777467, - 4150668305, - 325024529, - 2723506415, - 1206308484, - 1358232120, - 2189417878, - 935373720, - 1746313307, - 813265728, - 632010940, - 873467287, - 1229687075, - 2909524201, - 274973816, - 2347731494, - 1338722487, - 117948997, - 3986221209, - 1954094011, - 2410354199, - 2337265962, - 2703235542, - 4020650845, - 255509079, - 1020457194, - 464787680, - 988219379, - 2387495565, - 3263720887, - 1593144048, - 4255843428, - 755224448, - 1505632812, - 2965348155, - 2186504905, - 1989935741, - 2124542584, - 3329269738, - 2926109036, - 767012068, - 3813848152, - 1179253254, - 4268404146, - 2334814691, - 2069585713, - 4162817504, - 1351206141, - 2088099270, - 274081735, - 3360573162, - 3570952049, - 122144606, - 803393045, - 525262006, - 103852402, - 2288315268, - 3304166941, - 485424067, - 1204708591, - 2375713068, - 3992905103, - 2251893987, - 3195872905, - 4034441934, - 551949847, - 321179324, - 3825405843, - 2308875251, - 1968464903, - 321932358, - 3600315744, - 2378810289, - 3404894332, - 2549137979, - 2282859265, - 2056378610, - 1290587234, - 2396673472, - 2938124267, - 553438020, - 1881228571, - 2493651485, - 1105635355, - 1410816953, - 3126416171, - 3206121980, - 3997992469, - 3723531113, - 2059981909, - 642832940, - 856970660, - 1512233568, - 2760975304, - 2593280160, - 485980715, - 1008146424, - 1285607526, - 132595010, - 21374975, - 2353511605, - 3855326534, - 143163473, - 784630718, - 2732347287, - 561324353, - 525550095, - 445297249, - 1553083134, - 3064262494, - 30519062, - 1793458618, - 247355209, - 1134279119, - 3070881590, - 879418008, - 3766084471, - 1826713692, - 1571928346, - 1773518061, - 701054897, - 1340631093, - 3180730018, - 3670957592, - 1590914161, - 3075193458, - 2121316450, - 873305468, - 36462730, - 3114095929, - 16258598, - 1823083195, - 2500421080, - 3126003436, - 433577576, - 691671834, - 1709110373, - 928934125, - 766576041, - 3538168671, - 2154380600, - 1867284, - 2055348828, - 1186512334, - 1759112290, - 244091603, - 2701724511, - 2707506788, - 3254080291, - 1567682641, - 1929585270, - 2105902485, - 283649370, - 2808059332, - 21984109, - 3087283938, - 3711374364, - 1442386475, - 2283281943, - 1231006936, - 2951016759, - 2535367279, - 3231269014, - 1310639212, - 2395771600, - 3159821927, - 3498199016, - 1083619337, - 4004544036, - 1687462976, - 843828170, - 3529495194, - 1380398311, - 2340370101, - 3727070323, - 998110942, - 3471121473, - 3450073568, - 1748699910, - 3704610736, - 3340981700, - 3252624413, - 4286661923, - 35250147, - 3123278159, - 1985664252, - 3441207516, - 229839353, - 1632901388, - 3566351477, - 1110685058, - 1749390462, - 2185975649, - 1102555484, - 3622613445, - 163815544, - 794165019, - 1827716839, - 259311062, - 1601493012, - 2664759907, - 1482630079, - 448172301, - 1541517662, - 3361017396, - 12442925, - 1479440892, - 630107509, - 2363652378, - 657813070, - 2823395104, - 1989064289, - 2082361698, - 656868363, - 1985514598, - 2292221355, - 3026989107, - 326024224, - 3350802396, - 705140865, - 2775756809, - 4248267594, - 3117916602, - 2996183745, - 3342043684, - 2109816922, - 131735628, - 1286723645, - 2615653704, - 902288852, - 474764411, - 159250213, - 613017859, - 1465005042, - 3084856908, - 685984197, - 636194235, - 4202543251, - 3084072229, - 418110231, - 3230960518, - 2724189021, - 3943623435, - 630484980, - 4207055448, - 3970420548, - 742437075, - 857083105, - 2322487434, - 3035602517, - 3810119163, - 912608364, - 1185253736, - 3659899564, - 4293560161, - 842337557, - 1228345533, - 508065721, - 3878945523, - 2750671343, - 3444774116, - 674015574, - 203656532, - 845755699, - 829085475, - 1158820187, - 3749720651, - 2868569805, - 2163071307, - 4114830575, - 579975372, - 2045396270, - 3571456202, - 2880322699, - 3786611893, - 794247878, - 2948619491, - 3586079224, - 3423461911, - 2350879543, - 3525378833, - 3295686279, - 2647221635, - 571621218, - 2534614468, - 1934121782, - 3047948616, - 2163170980, - 3700716704, - 200034539, - 3296307380, - 593234061, - 2828846596, - 3202478139, - 2591283556, - 588523465, - 3640357385, - 2136993996, - 875940366, - 2784934566, - 1704795039, - 3417002490, - 3462664461, - 1087126561, - 2449528461, - 877045461, - 173316991, - 2786590731, - 3268851617, - 112842998, - 3026331363, - 1125625609, - 1744390277, - 1251409214, - 493181396, - 4284397103, - 187685506, - 686961108, - 2514440920, - 1199702970, - 4105973880, - 2532201206, - 1158600870, - 3992352894, - 2848387774, - 3450041173, - 2522573071, - 3012910877, - 3630260899, - 300646590, - 1470724744, - 1789793483, - 3468123415, - 4026949611, - 4191460952, - 4052970352, - 1634986255, - 1139983660, - 1349852562, - 48404561, - 2197053561, - 3668826283, - 1412743754, - 2008040715, - 3740902480, - 1759672454, - 2924707767, - 2293874479, - 1790332323, - 2708987693, - 3994362754, - 4113390168, - 1897115504, - 2976342108, - 3196098783, - 853770222, - 1875208249, - 3191047400, - 2407094622, - 4224537593, - 3222836519, - 266738048, - 1513423137, - 2353894958, - 2114425205, - 347189488, - 759583934, - 225464921, - 2672650137, - 2417275516, - 2781533433, - 1383969741, - 2241665463, - 1102721788, - 1261849533, - 547589544, - 3300301578, - 2077924874, - 2893284864, - 1724462037, - 3656845614, - 4007591968, - 2341091702, - 1016131558, - 2777015338, - 2620064644, - 2430166091, - 4126225172, - 3522875847, - 1736834133, - 2662097939, - 4205696505, - 2096953655, - 2810936699, - 804465911, - 4157127994, - 1391364844, - 1021569024, - 1800041482, - 1985623668, - 2684878645, - 555492471, - 2525696941, - 1957424419, - 3527909280, - 1767272482, - 21359628, - 3020321534, - 3113621506, - 2585617493, - 1769644716, - 2421298343, - 3343046064, - 1653058764, - 1753978735, - 2262285349, - 3684209954, - 4053929620, - 3517493269, - 767647536, - 1918390482, - 3857217676, - 1009110292, - 1588807361, - 2984683841, - 515580103, - 274701622, - 3642193543, - 1866506751, - 2821871732, - 2940469654, - 3823409979, - 1212094024, - 3256674376, - 881124468, - 3374665638, - 1346868048, - 1008100250, - 14227651, - 3402565854, - 1121304506, - 4281978284, - 391515760, - 1186667086, - 3949551682, - 348808494, - 1991003804, - 3500568098, - 1266300975, - 4094624159, - 2576304702, - 3066775156, - 3843275408, - 1593669527, - 2513036245, - 2194712465, - 1520341785, - 1903681169, - 1288071388, - 491381245, - 1675998114, - 3467438290, - 3649458080, - 3030470898, - 1437173894, - 3895538845, - 1940348052, - 4130366983, - 2786716903, - 1644435964, - 1115897582, - 710541223, - 829782561, - 1339769361, - 2325825728, - 1791971053, - 2870122083, - 2564980884, - 3742765793, - 262056874, - 2438400602, - 1545066407, - 437751462, - 4281005804, - 3536047437, - 1017035478, - 1659952302, - 2818011523, - 659048397, - 613227570, - 1757056913, - 4013740549, - 1024045124, - 2239597730, - 2199005676, - 1092296362, - 2621417242, - 161103648, - 2654561549, - 3705933034, - 4116218124, - 1830829563, - 3564567002, - 854043773, - 798165390, - 1039848525, - 992815469, - 1593642593, - 1630529889, - 1042937539, - 1919353127, - 3934530445, - 1788196676, - 352686830, - 561809985, - 4214087411, - 3983543649, - 3862801426, - 1938059260, - 1289655026, - 979897043, - 1085546612, - 1558904569, - 1505597789, - 927859855, - 2132736945, - 3840203058, - 718748215, - 2711576833, - 3652274528, - 1719411115, - 1352174176, - 2675475941, - 2706582509, - 1659077676, - 1340726045, - 1378024504, - 3357398403, - 1709691979, - 2175575796, - 1373359080, - 3970383149, - 4021502800, - 1061065555, - 2521841021, - 2727479025, - 1287270750, - 4093614430, - 3973488641, - 3818892712, - 2241497549, - 27943236, - 3273086932, - 1229170977, - 3807172884, - 853419519, - 3482645808, - 3348389928, - 286579514, - 3318504180, - 2632745134, - 3422016745, - 3355782032, - 1227116437, - 3040110052, - 1965638369, - 2923878859, - 3134737308, - 3993078641, - 764440021, - 672618054, - 1635580869, - 3872698699, - 906501940, - 413804204, - 2497558472, - 2970367929, - 3841168338, - 2875510697, - 1415468671, - 2909036276, - 4149919061, - 364026423, - 95761156, - 2113576511, - 1271972680, - 3548019650, - 2076287412, - 4017306139, - 1432083996, - 3904533818, - 1727767353, - 1246726449, - 3467134836, - 148650861, - 1523517899, - 2054849764, - 1494172455, - 1623295738, - 2303356245, - 3941327464, - 1144460083, - 1842096421, - 2785486931, - 1243220690, - 4192599477, - 4197006361, - 760779272, - 3529910928, - 1921874356, - 1137033431, - 3657072110, - 1965491, - 4097534367, - 622726697, - 3563055916, - 3227560643, - 2670112964, - 132777257, - 1996446270, - 4137170142, - 2463773638, - 4019090878, - 3075990052, - 3786380187, - 1871895733, - 1697895460, - 2152339690, - 3685772392, - 2632466768, - 3900013960, - 3802598012, - 4146641338, - 3472229005, - 3416299690, - 923870636, - 3078136941, - 1673760092, - 3888410862, - 668555220, - 1421568934, - 4163099117, - 1797926632, - 684468370, - 810168136, - 3187831198, - 895739254, - 2125158899, - 1139621234, - 3712920767, - 2392948633, - 4107942322, - 2566716398, - 2829940771, - 1299185327, - 2265529887, - 1320750092, - 3212832983, - 306728751, - 1490946087, - 654060542, - 1930075580, - 1850479305, - 1097511424, - 3169531670, - 2807088095, - 4291851655, - 2630499761, - 2458837719, - 2734382998, - 3191205181, - 1234431759, - 1086970154, - 3644867302, - 20628483, - 1851371365, - 740027554, - 1800020632, - 1284009232, - 1088068206, - 972631844, - 3155595289, - 3852420187, - 2831055650, - 2615080090, - 3966254548, - 1369070158, - 2972338506, - 2097908041, - 3384879325, - 670376174, - 1908843389, - 2478472493, - 3012775089, - 4017078425, - 1918175985, - 4176367565, - 1899461541, - 1309265916, - 1768396830, - 2735581779, - 2917380217, - 1420369027, - 2173130411, - 992948060, - 3548558955, - 882752617, - 3278439314, - 3742567363, - 843614814, - 4233940546, - 1503375397, - 3086495279, - 1468572548, - 3803815483, - 2002513, - 924633855, - 3091148365, - 2011946935, - 3601042692, - 3885399235, - 1141413515, - 455924523, - 2242084047, - 482292249, - 1289995632, - 1137511803, - 3374091524, - 2484871337, - 1161660708, - 4099020677, - 3709788811, - 268204093, - 1159671437, - 1120925887, - 1331590015, - 2228774113, - 1884234419, - 87065969, - 331876717, - 2024667782, - 1569340943, - 3194297613, - 228974897, - 1802023868, - 288979922, - 3978099706, - 1276612728, - 1903879006, - 1824108758, - 2785099764, - 1572215343, - 2108353946, - 124757536, - 3543597712, - 1713505708, - 189298924, - 3718097798, - 3058597447, - 697015973, - 563134440, - 1306892321, - 715629631, - 1715149422, - 2013036631, - 587581135, - 1175783084, - 3435805239, - 2549094024, - 23137300, - 3517267680, - 3718729882, - 36614544, - 2190115750, - 4141290943, - 831121412, - 1861553814, - 1460146991, - 3768730000, - 881891312, - 60943423, - 2453836003, - 3384049813, - 2942979167, - 850627788, - 3453777208, - 1189730237, - 3179914697, - 110596776, - 1699511730, - 3508351129, - 2467597387, - 948450228, - 2339131056, - 4203858538, - 1184983903, - 887835348, - 3702557436, - 737384325, - 3987894475, - 2182889900, - 1168958637, - 3133730799, - 2299665491, - 2341894145, - 352258320, - 4220265648, - 4267358455, - 1869770907, - 4138710082, - 3979166653, - 3341228101, - 2528541372, - 2491816885, - 989998293, - 2839646921, - 1642832631, - 681261192, - 227499710, - 168390132, - 2735463622, - 3224853511, - 3580448580, - 2415638996, - 156511176, - 150733534, - 651876942, - 4268328877, - 3838390471, - 482315430, - 250773915, - 4242931519, - 1242976751, - 193454126, - 3371065255, - 3105310500, - 493059064, - 3856586606, - 1213132015, - 588966837, - 2866296937, - 4136308557, - 1979871500, - 3173655395, - 898011520, - 3177135819, - 3779274690, - 1351221062, - 4026440941, - 975758827, - 2785454312, - 3976024711, - 2075740013, - 2055593308, - 3530532438, - 3929628762, - 1630735341, - 3201169877, - 1003927554, - 3359573156, - 3639507041, - 2193907301, - 1808613959, - 4926629, - 2293843019, - 1128173226, - 599268178, - 2352437982, - 1164710456, - 1078164031, - 2352986285, - 1014291137, - 180471227, - 3690797988, - 2715939200, - 4274194808, - 2796097307, - 556069306, - 2467288233, - 3318575675, - 3397344184, - 2370331584, - 401109309, - 2682380790, - 2208267954, - 4291881787, - 21151897, - 2513130988, - 493115498, - 311256947, - 920185716, - 3702037126, - 2414527350, - 2561577348, - 4170200399, - 3842142435, - 190252734, - 1351578442, - 2429577823, - 338312632, - 691950760, - 481636375, - 1268030168, - 1027901697, - 417511500, - 2451028699, - 3382180702, - 3655442731, - 2566230428, - 3022856229, - 1421301139, - 3980596493, - 2281646603, - 2872839279, - 1302221399, - 1365502541, - 684420532, - 2376737216, - 2242815989, - 240814979, - 1994752040, - 3906223122, - 2227728762, - 3156644930, - 2545144973, - 116840972, - 1403188932, - 2713624788, - 4232883388, - 294471339, - 3264851293, - 325824880, - 4182699273, - 2069684060, - 3908747187, - 1605574983, - 2955904833, - 561665247, - 3204320299, - 1721039000, - 2586223327, - 2492969781, - 221418984, - 538072869, - 2592803565, - 2409975186, - 3716452686, - 1830256754, - 441370672, - 1393024510, - 2025187851, - 28410357, - 4061041654, - 2143044652, - 3487302739, - 3697978137, - 2583858962, - 947239044, - 2374879779, - 3699100142, - 1165450858, - 3902700902, - 2682853700, - 3630317683, - 3989397026, - 3675920709, - 1384419368, - 792874190, - 1834510239, - 2013232764, - 1020868781, - 583063941, - 3119960819, - 961240527, - 1340286148, - 465734705, - 3116332103, - 918796805, - 4053666233, - 918620564, - 1107968923, - 2597755085, - 197634261, - 2236538106, - 2279996495, - 512417992, - 3604803323, - 3257914086, - 1067208847, - 2796581642, - 3822344589, - 1434667709, - 3384142305, - 1834585741, - 663644090, - 3313224619, - 1933518118, - 4129076973, - 56034102, - 1293769580, - 4144706380, - 269562010, - 979497654, - 1992170919, - 3491981676, - 963999078, - 1398280667, - 3908367482, - 3302647906, - 630817396, - 341943918, - 2842309531, - 1451926427, - 3397386127, - 1377364199, - 2345739883, - 4126351116, - 3901368064, - 2198039136, - 1887832329, - 933676126, - 2866875958, - 165950815, - 2763887978, - 1650072602, - 1106492627, - 2308285660, - 163580278, - 1581276992, - 1169410429, - 1161358952, - 444857705, - 3787905508, - 1293782039, - 2844263331, - 2886738890, - 3685395278, - 1601620953, - 2519290623, - 1519468699, - 3790210881, - 2094226441, - 2360380313, - 3398306907, - 3603134082, - 3332113362, - 1635903838, - 178751364, - 3884753006, - 181950618, - 2451078581, - 3196524786, - 104370517, - 3866181267, - 425924056, - 2725576042, - 362192809, - 3914497437, - 2141013033, - 691515113, - 942846404, - 3799111513, - 2609990233, - 433480399, - 2467198805, - 4022337975, - 323217885, - 217603413, - 3456859308, - 4007337961, - 614055506, - 2831894770, - 3114209565, - 3305676342, - 370137427, - 1263543636, - 2114082596, - 774629429, - 3567686392, - 3959253110, - 2250098577, - 2303246774, - 893454640, - 2307457929, - 892177970, - 1026600612, - 3694904066, - 37940154, - 1449101885, - 953326631, - 3367139088, - 1595256224, - 1507669000, - 269006243, - 223054556, - 1986003611, - 1039170247, - 297063753, - 3601488623, - 2316436926, - 3762033468, - 3209737845, - 2297587978, - 3366048316, - 2301410322, - 3097969176, - 839899498, - 3282442952, - 982221870, - 2064004740, - 1041347462, - 1811322267, - 1113771634, - 2306400655, - 3832725561, - 2467830708, - 3727518007, - 94094586, - 3355834789, - 2862703676, - 1421288505, - 120561793, - 118538920, - 668651305, - 2225407946, - 2677884663, - 3768050541, - 672390479, - 272942984, - 547980162, - 1925811576, - 1888786058, - 805659951, - 3778221815, - 1000452525, - 1192695981, - 417066163, - 3464037849, - 2591318068, - 3979809735, - 1931713937, - 348441033, - 3391534648, - 3186260435, - 3337558252, - 4241021229, - 4006316331, - 990024486, - 540018664, - 476468588, - 2364116784, - 2426963098, - 1138794579, - 2543232093, - 4033882606, - 2667360293, - 1718693787, - 3112965574, - 3352873006, - 2500162256, - 917631762, - 1785804284, - 1825480243, - 3237827998, - 882241551, - 2356332059, - 4068688357, - 2249583837, - 2245189575, - 1033607244, - 171187105, - 1037242517, - 3459046188, - 4198402706, - 1002293491, - 699804671, - 1722669725, - 692659064, - 3254296159, - 1110992360, - 2415906073, - 1705408268, - 1447584221, - 2730118858, - 381018389, - 2132602483, - 4188790742, - 4022681003, - 4116273612, - 2788641056, - 831585401, - 1022064131, - 99332313, - 3985257888, - 3014690032, - 2906967173, - 4119953409, - 1199742739, - 1529405728, - 2646244847, - 1525112528, - 1590133554, - 3956126852, - 3159372566, - 1041031331, - 523933133, - 713094833, - 4017729928, - 2474499374, - 2274032882, - 724020105, - 3989279324, - 990371971, - 84657242, - 805337768, - 3340497861, - 1447809881, - 948331213, - 2925341325, - 477410495, - 3728035475, - 4248868443, - 1207692067, - 3912942934, - 3956508263, - 2552096469, - 1306714547, - 3809440626, - 3584715925, - 3330104793, - 701943893, - 3351673712, - 1949167976, - 214999864, - 545869442, - 1771710328, - 912755072, - 1884714178, - 3187673843, - 451595272, - 74573965, - 1822316328, - 1519034238, - 2869003300, - 219978568, - 3982152472, - 2156669868, - 134026856, - 3456472543, - 281095369, - 4026024712, - 1290944223, - 3431292649, - 3849666877, - 147437835, - 4294390717, - 354898054, - 1289238332, - 2643957755, - 4088107619, - 3894154483, - 1140711931, - 3232485719, - 2095688585, - 4058965334, - 1406652864, - 1252766862, - 3633712762, - 2361045777, - 3143506582, - 14085863, - 526659713, - 1185408006, - 660814847, - 3693127124, - 3836439459, - 1404090528, - 4194958431, - 3483386578, - 2209987395, - 2514573258, - 2128754978, - 1620094337, - 3065537750, - 2821082491, - 4015520032, - 2699416828, - 1563727035, - 2318997532, - 3009096703, - 4240853869, - 3389576765, - 2694353874, - 2670277705, - 599701034, - 4281275357, - 2093999862, - 2282497045, - 3850236155, - 1250454751, - 1611058439, - 478316863, - 2658557913, - 2541479455, - 1237296763, - 1534834481, - 641293986, - 4257798418, - 747821052, - 4199062952, - 66708659, - 1633386524, - 4067017550, - 264319267, - 2961165242, - 4121665614, - 1160054217, - 1800798484, - 2500854687, - 3690464058, - 748471494, - 1417968619, - 1504925179, - 3328780352, - 1571974576, - 3872213890, - 2271639358, - 3376742057, - 1092290667, - 813770933, - 3097534780, - 2520919323, - 1858667787, - 3755951001, - 533261859, - 1278785330, - 3495927959, - 20611212, - 3059108067, - 285606893, - 1714648318, - 604659004, - 3504355623, - 3198889118, - 1380835532, - 621945810, - 2227978466, - 992577043, - 3218072892, - 3233400660, - 472491067, - 3670337360, - 3491503700, - 3469572750, - 3065199928, - 629845525, - 474179478, - 520889121, - 643711565, - 1419704857, - 352560402, - 2566502214, - 3538916970, - 3482193761, - 2417969695, - 1445021958, - 1584365093, - 2030671657, - 3395271567, - 1572877737, - 3487108341, - 2139837940, - 258499954, - 2034008043, - 3533608451, - 3796980361, - 2732144569, - 1700671014, - 379784814, - 1698797500, - 3707646619, - 2685937249, - 4154939027, - 2275770720, - 2005065992, - 3893824728, - 1053538606, - 1276583041, - 767392289, - 2329231815, - 1844349696, - 109361720, - 385742290, - 4177013720, - 4057721153, - 1557767992, - 872062732, - 3218328969, - 2309551790, - 1135602866, - 971028944, - 1179199215, - 1218017248, - 670701970, - 278119486, - 1654668639, - 2873844239, - 3329606891, - 1905513486, - 1970518972, - 2859566400, - 659735424, - 1270020647, - 352582303, - 1465898630, - 293457185, - 1113584038, - 1162900898, - 1511455766, - 1586301662, - 1684964449, - 3335102112, - 1918297518, - 867004905, - 168453080, - 1719614769, - 1918215206, - 533478040, - 222783565, - 3085341460, - 3464374882, - 733958340, - 2048411703, - 372217802, - 525798875, - 652234189, - 2907990871, - 4151310554, - 787515247, - 3385657349, - 2047711720, - 3081385268, - 1308309535, - 1001244044, - 2890086571, - 665270045, - 1775294707, - 63518887, - 649576604, - 3065301332, - 3502719067, - 3038287952, - 3879218349, - 3179851758, - 3939077195, - 4122811118, - 430501140, - 3035971581, - 902893422, - 427635683, - 2730011451, - 2523183039, - 3272786475, - 2387459503, - 417432601, - 3297045559, - 4060502747, - 939908200, - 3150410563, - 2553407864, - 1572709816, - 2068949480, - 2922742786, - 3439150646, - 3111744726, - 2614684120, - 1384767286, - 183056764, - 3597944479, - 2021718047, - 304391167, - 170753299, - 2455562409, - 3614369200, - 609588703, - 3458840782, - 1006680605, - 4056905045, - 1863866646, - 2624775338, - 186208783, - 1863997245, - 3698612546, - 1138494284, - 3377966922, - 2723569302, - 1696174665, - 1231594080, - 1775194410, - 3144809831, - 3273112191, - 707802323, - 1552489752, - 363893546, - 2570958396, - 2401223919, - 410130005, - 845767803, - 1848399035, - 1027175022, - 4290916264, - 2185755601, - 2478450215, - 209646094, - 3309366240, - 3363219348, - 4022905235, - 3254481462, - 2549408372, - 1172390660, - 4059818617, - 4274730785, - 537664541, - 836331527, - 541289403, - 272421683, - 3078434949, - 552598907, - 2851571027, - 3350772864, - 1238727567, - 1165004395, - 3005921781, - 1100856561, - 2285427135, - 2010991139, - 208585956, - 2673355726, - 3602091483, - 3038826407, - 1411288782, - 3809103714, - 3679331232, - 2932403193, - 2227258167, - 3835831670, - 229609295, - 741525462, - 2031293869, - 3416188007, - 3821780299, - 3370583082, - 3280734342, - 3103555100, - 3674388295, - 3423851501, - 886751393, - 2786690953, - 3002660473, - 3967826657, - 2097679474, - 500967689, - 368540519, - 2492935542, - 2359110093, - 1790252579, - 3331167795, - 2555117519, - 3505928166, - 27756293, - 2576122123, - 1452523982, - 3127160609, - 970813052, - 2565125345, - 1764322590, - 1556734909, - 2235987739, - 1844585618, - 354090702, - 2959351540, - 4058745301, - 2814170779, - 2537400629, - 1562237033, - 4191554306, - 3224368221, - 2221010448, - 4096018618, - 4249718147, - 2801370289, - 3502310923, - 3701664454, - 644714473, - 1347246147, - 544498209, - 1488153636, - 1038554366, - 906519349, - 203296284, - 1333970984, - 2896673534, - 1960913136, - 3197903823, - 3959393609, - 3445230344, - 2904728891, - 3068781067, - 947225262, - 3385573400, - 3344502862, - 2266444987, - 762210448, - 1647682581, - 3570494765, - 3203611454, - 1759931374, - 3856547876, - 729278465, - 3505860349, - 2370708716, - 707420696, - 2229527969, - 3009316491, - 2494180908, - 9884503, - 3480298985, - 3402220791, - 565537650, - 4065839263, - 494162889, - 47273670, - 1202321378, - 764916307, - 62629437, - 468672622, - 1857595321, - 2248643006, - 3811737857, - 2407314564, - 266433106, - 917557949, - 1066162339, - 2132792226, - 3274397868, - 3062020672, - 3765167379, - 2937911740, - 1471502176, - 2695678573, - 3846250102, - 786320986, - 2005279637, - 2393071922, - 811894366, - 775813316, - 450701343, - 1985137779, - 4158891430, - 723802964, - 2105155503, - 3654424909, - 1963782061, - 1575054504, - 676756991, - 335586170, - 452898600, - 573868649, - 2002705710, - 3475536136, - 3076138672, - 958013755, - 3493630507, - 1396510452, - 2234434239, - 1613914085, - 516569916, - 3850006452, - 2116956940, - 3443640755, - 2989496840, - 2367722007, - 1268049243, - 2047485626, - 1481674414, - 2386015404, - 2659193613, - 1447951620, - 4038982735, - 608427975, - 2484364502, - 3959694322, - 1101777209, - 2541413306, - 3565345807, - 2033902288, - 3005838115, - 206671030, - 3560968245, - 2595380954, - 1835881340, - 2975975794, - 513713125, - 3710862094, - 3395886482, - 1179658973, - 1355609318, - 1035428810, - 3890571222, - 3450601011, - 594177530, - 2613765504, - 1820083066, - 4255930691, - 262855456, - 1889064041, - 363624751, - 816015274, - 2415046974, - 2025925411, - 2480300197, - 1189630180, - 1079027340, - 3467742534, - 2136720330, - 1240187370, - 4244115861, - 3977185089, - 2003009309, - 4132007005, - 2679486190, - 350991981, - 2278323638, - 2136824970, - 2046729081, - 2496971765, - 3224982418, - 3661404649, - 1635139260, - 1938557226, - 1007151442, - 4170300236, - 1561837962, - 726973250, - 2454541909, - 2243697273, - 3968379892, - 2072198960, - 337229479, - 1678888051, - 1418736956, - 2705029597, - 1484579177, - 3367785423, - 84043072, - 236552656, - 419850704, - 738786327, - 221744368, - 2327919425, - 2321399502, - 2890018642, - 2396364197, - 3411006195, - 2270479979, - 749836972, - 3619820872, - 3901769288, - 645756009, - 1097476687, - 3074692831, - 2649127997, - 3688014145, - 1040479101, - 3235174823, - 2526083559, - 723743547, - 3499912163, - 1472139631, - 3981425685, - 2411967878, - 393981645, - 3197506923, - 3193695936, - 3106566287, - 2308231928, - 3513514482, - 2833504468, - 2987008167, - 2135808563, - 146921160, - 4033871698, - 865889923, - 871943779, - 2217860701, - 352283082, - 3305859881, - 2766718642, - 4218915165, - 3985342776, - 3564857484, - 3021895197, - 4059524941, - 107609374, - 411075613, - 988007647, - 3981366083, - 3311333715, - 3916627421, - 2422313523, - 211263098, - 964673338, - 2727372083, - 3084658021, - 3991582963, - 2393763329, - 787300743, - 3384399358, - 2867087175, - 3770294393, - 4185313052, - 3837187499, - 2949171162, - 1574658509, - 355529568, - 3093497490, - 3831625331, - 3949013919, - 1924756814, - 2818466486, - 2442202803, - 3741219417, - 2564966489, - 2350271709, - 3336975958, - 2374320061, - 1249800709, - 1628105030, - 3388187254, - 4071837283, - 4027707435, - 2318084948, - 493398516, - 2871559809, - 2538147071, - 3857323015, - 1537174219, - 1015084423, - 1007811834, - 333132782, - 1644187440, - 1403956280, - 3277269056, - 3193248958, - 1096101336, - 3889526353, - 1757280694, - 2289840114, - 3551445955, - 732839688, - 174143470, - 3770844832, - 3727157439, - 888524667, - 3007137510, - 616525616, - 1186691889, - 3588710577, - 2138217208, - 718200117, - 386851126, - 3439583809, - 1284831197, - 1398957692, - 1805694094, - 2343595425, - 1896230702, - 129676655, - 1111991, - 739712956, - 763237123, - 3951020970, - 2574622746, - 1482291327, - 3554150521, - 2118091293, - 1357825597, - 172790042, - 1612620449, - 2340040518, - 881797084, - 4199754505, - 2809796486, - 2157582702, - 447409911, - 111630688, - 3305781894, - 1506089883, - 538883714, - 624452413, - 4056631145, - 360790421, - 121620575, - 3972782349, - 3316390429, - 1243100375, - 1272260408, - 3080480023, - 4117340452, - 1749464530, - 981365583, - 697933604, - 2845166610, - 1701465601, - 30629111, - 1821385790, - 3248107186, - 3498910072, - 1899607094, - 1863657945, - 3863569855, - 3985200248, - 3745056235, - 3321582074, - 3786674968, - 2564687521, - 3294968816, - 2497175466, - 2202299985, - 3274078101, - 2247375778, - 2993709460, - 3847372967, - 3564909645, - 1037302139, - 2326183763, - 1687134225, - 3197807093, - 1870280662, - 3220346902, - 3767188279, - 287883303, - 1369958061, - 3968906095, - 4187816044, - 517411297, - 417572206, - 445283093, - 802965966, - 561525637, - 3571237758, - 1087063676, - 3657768454, - 3911387738, - 969413272, - 1350753235, - 1656035182, - 3598949382, - 2000957403, - 4174331627, - 208223461, - 641053168, - 3307602318, - 418749542, - 2834377088, - 2000099968, - 964986783, - 3630171081, - 936015245, - 3407561402, - 4129610851, - 2008747839, - 2390016365, - 2432469286, - 2729573595, - 947491011, - 1034576666, - 457016082, - 2844782912, - 1701411117, - 2613419969, - 2837373815, - 3369910787, - 3920500550, - 760078164, - 4092806442, - 3770907001, - 3991880895, - 3142762260, - 3505077433, - 1396880770, - 4242339822, - 2173915956, - 3326171082, - 4173722546, - 1542366078, - 1812653728, - 3419105729, - 2708438864, - 3754677675, - 2678918239, - 3566524968, - 392245340, - 1265078623, - 2760776170, - 1547631193, - 276955043, - 328401777, - 4192593497, - 3310988207, - 358134929, - 199398250, - 3431944078, - 2569765796, - 2814608918, - 2281035052, - 3542660275, - 4166401417, - 1895516721, - 4070375049, - 536281444, - 3225284225, - 990386693, - 155606162, - 2938788509, - 4124640395, - 1511989756, - 563440635, - 782802188, - 2461606601, - 1665137949, - 2837793786, - 2247000295, - 2345090308, - 712996351, - 2188841087, - 1283177985, - 4219541248, - 3458908477, - 1391689161, - 1965556112, - 1931654504, - 3320085687, - 246447210, - 2375859845, - 323897742, - 2172800055, - 1229550962, - 3071639195, - 3056011778, - 2781655006, - 2901636528, - 1253729414, - 379958889, - 948148953, - 735408459, - 2364665464, - 1968816619, - 3967119810, - 2270748802, - 938929299, - 1919976769, - 956393171, - 902842244, - 3470734393, - 1474455607, - 4131771277, - 3209173843, - 2143055947, - 3458402259, - 3995385113, - 3845450436, - 342378869, - 1083267231, - 598323984, - 4060045615, - 2310216714, - 2161885205, - 463740147, - 3320733127, - 2679788943, - 209328802, - 4226617261, - 4212229245, - 483698479, - 1333335554, - 1855535372, - 1917921431, - 1272816054, - 1378258566, - 2435066663, - 2140909050, - 3467362303, - 3004567522, - 4160999385, - 923888391, - 1645443780, - 909768319, - 4273537566, - 1960078410, - 4149063086, - 4104657183, - 145000095, - 2609957687, - 3310517812, - 2446897657, - 899164713, - 2229389614, - 2221036390, - 1539334333, - 3330089720, - 1765383561, - 3763711557, - 421911001, - 3448751775, - 1621049960, - 1147639809, - 1529686335, - 3318393987, - 1729090522, - 3435733589, - 1296433531, - 2270640244, - 4158787163, - 941176445, - 644501780, - 1947374871, - 2342262622, - 1749720103, - 145195593, - 3222901788, - 2979029828, - 2387384467, - 1578154651, - 493557771, - 4119914755, - 3755997090, - 1643070984, - 3053439345, - 3689323891, - 2313397070, - 4283660887, - 3464028714, - 1416559202, - 2105543678, - 2133014082, - 2112892852, - 259821546, - 149424358, - 512856449, - 1672418496, - 467361762, - 3250588006, - 908451261, - 1942816266, - 1582371386, - 2896119846, - 816487026, - 631734667, - 1844846604, - 1280076577, - 4170768154, - 3683173117, - 1873327429, - 3743983813, - 1852120335, - 3065944924, - 3061493318, - 1794699881, - 893250914, - 886609179, - 310125993, - 1419872800, - 3040226348, - 2878592958, - 582524761, - 2236999558, - 2025267525, - 4012515166, - 2165063704, - 730766129, - 4135351277, - 2993096973, - 1852127780, - 262657038, - 673567882, - 1775845332, - 4028399509, - 1230948238, - 4234051068, - 1362871229, - 2715924251, - 2066046729, - 3428929162, - 3341616730, - 2339788716, - 2086355143, - 2725199464, - 1849923379, - 1175973567, - 2233476166, - 1991347913, - 829014502, - 1825865339, - 1965184728, - 975267547, - 46595602, - 2557785201, - 811574200, - 3247915358, - 3368385925, - 2379601202, - 788907520, - 2293019671, - 1927501659, - 1605783870, - 2282191786, - 3661322292, - 2626382121, - 280497639, - 1189432246, - 57024570, - 2528929777, - 665327719, - 3870875376, - 1826638339, - 2722124113, - 3148857410, - 3064558797, - 2046711372, - 2034300515, - 1389355484, - 333000346, - 796860408, - 3043618353, - 1914834507, - 629799572, - 1569054780, - 2338392202, - 1094525692, - 3261070506, - 1223637600, - 4153619708, - 790684919, - 942549923, - 3267002088, - 2373341965, - 3994157519, - 3019208121, - 3859399796, - 3380633956, - 3642559988, - 2312856738, - 2500863433, - 437169008, - 2892679370, - 3182486317, - 981944295, - 2128742500, - 2218720359, - 3338824772, - 653202548, - 2934652665, - 2541100326, - 1155095501, - 422531881, - 791380064, - 952490580, - 2927357127, - 3948306502, - 2057902583, - 618351996, - 3235228698, - 483908427, - 710951509, - 3728070755, - 1059306012, - 4167701854, - 119489081, - 1832822401, - 3568246885, - 4060621539, - 4210996815, - 1087603195, - 4274997846, - 3681408352, - 674130462, - 1329482029, - 2151552219, - 2432543996, - 4193589827, - 2241350863, - 3577550019, - 754996191, - 908356171, - 382014318, - 3930049382, - 1610415673, - 1428026736, - 3807150017, - 2786632632, - 1155819551, - 483007515, - 3192245408, - 2270791330, - 1682658050, - 515988825, - 2642227868, - 3141783895, - 1386208292, - 4136005278, - 4294836967, - 76807098, - 3515803733, - 323171098, - 676738701, - 1600625318, - 614848081, - 3320690363, - 2487022667, - 4224312453, - 2054962903, - 1039108684, - 2452358602, - 3580765969, - 3827580620, - 3789921644, - 282750861, - 3532983295, - 3717378749, - 3441345368, - 4031416854, - 1963588602, - 4180140373, - 1629416338, - 1063923805, - 1814362626, - 3872921234, - 2439149606, - 3348820587, - 795111013, - 814070699, - 2120654933, - 2462730759, - 3156373023, - 1122068880, - 2690825404, - 2800882352, - 2333826227, - 4234259008, - 2222639335, - 3313869600, - 4231778008, - 3065460793, - 3342671344, - 3698903867, - 3994077553, - 3852728728, - 2873872078, - 1159732988, - 3664183937, - 3264753981, - 896132042, - 2933072928, - 1604402516, - 3900187847, - 1802668063, - 3240331126, - 2946561709, - 2537152698, - 777979815, - 3476612981, - 3545770158, - 3188490679, - 2062600062, - 843772695, - 4238226694, - 2089972999, - 803433194, - 796626391, - 3346404971, - 1996933672, - 431803232, - 3895904795, - 3063857670, - 1804009891, - 2644942912, - 402652806, - 3842152804, - 1403840999, - 187067540, - 3056934248, - 3183111715, - 2052064746, - 3850468485, - 2556325111, - 349411946, - 3414681983, - 1798381154, - 723299312, - 3351774273, - 3801910514, - 3137977429, - 1210204224, - 4232579361, - 784506845, - 171817949, - 3727539964, - 2056464177, - 677188918, - 355896611, - 2683106624, - 2941256633, - 3993809365, - 3524638048, - 2927742667, - 3050709271, - 3293512662, - 1266062403, - 2126843653, - 2921201225, - 672170134, - 619962283, - 3162636115, - 4281532868, - 65809490, - 1098388873, - 3365558885, - 830256207, - 2604354713, - 1872825439, - 3754882552, - 2442134328, - 3366691918, - 20293746, - 2597281159, - 1917390619, - 2098499134, - 2924053029, - 2787237179, - 1021351964, - 3918119151, - 775779338, - 3963416816, - 2249259874, - 1843819437, - 3740301527, - 736128130, - 3219278705, - 3605727073, - 2041006675, - 1623759802, - 1715504431, - 3862162592, - 2525974333, - 4078329767, - 1509016612, - 2697857535, - 2586819943, - 56523645, - 488930597, - 986413572, - 2642169408, - 138345343, - 2242917601, - 2268662768, - 346318923, - 147197816, - 3841837501, - 3954777406, - 3832129452, - 3640480602, - 2876814872, - 53301794, - 1178549222, - 1042964461, - 3615429402, - 1115665078, - 428385722, - 2106592739, - 2075309051, - 1139461785, - 3501607373, - 3830040059, - 1981667067, - 2078463210, - 2798192082, - 191463444, - 44484226, - 3793254428, - 1866180861, - 247842290, - 2310522127, - 115050178, - 16732183, - 4050705461, - 1520024483, - 76514131, - 684069252, - 1425023956, - 3339540140, - 648002675, - 999675397, - 777037302, - 3022428561, - 1285180841, - 1175522972, - 1864687973, - 3777599201, - 3394737917, - 1835871114, - 3951793907, - 1128392865, - 3797013213, - 1069116187, - 482270381, - 1915945011, - 3969998915, - 627469271, - 4042501393, - 1594261388, - 2589641200, - 1079246605, - 3838731139, - 594852175, - 4277053738, - 2429616906, - 676144626, - 1737892536, - 1227494089, - 2318611500, - 49013431, - 3921227889, - 2786762987, - 910731277, - 1168194847, - 9642518, - 127199510, - 3649925936, - 3769788672, - 1689201483, - 434989233, - 3941246624, - 1672216865, - 373412832, - 3867004521, - 2923749098, - 1626433802, - 3965331907, - 3584237235, - 2811371357, - 262404242, - 28091613, - 449025580, - 705504849, - 2089588568, - 3011712735, - 1470958467, - 763779230, - 618060232, - 3638654393, - 733096155, - 4064999044, - 926371140, - 1915264245, - 2582118340, - 3701511286, - 412821362, - 148261962, - 2949947578, - 2593835345, - 1532575795, - 850237254, - 2230704606, - 2524334125, - 3640940759, - 398723137, - 2219547842, - 4281683642, - 2081601290, - 2696413310, - 2013282185, - 4158801876, - 1971975258, - 3802489706, - 868706236, - 3457812568, - 656351980, - 2205423407, - 3657441566, - 2792302467, - 3917526608, - 3588617544, - 3505484860, - 65995458, - 4182870461, - 2109275750, - 3012147783, - 1353852189, - 2768903595, - 2275333674, - 2460876476, - 1875881256, - 3123444371, - 3616447865, - 1279491158, - 1378636109, - 198439502, - 774098769, - 3333629864, - 1263703309, - 2613493211, - 3759579322, - 3948784374, - 2866276004, - 1225201510, - 276201330, - 3881378420, - 1333270536, - 1167020344, - 3731137530, - 2013128453, - 1268423312, - 584405921, - 4055009467, - 596780915, - 177058472, - 1796575804, - 834791367, - 812106026, - 3930619529, - 2450686982, - 2398592253, - 73633176, - 2418428633, - 1323758403, - 3009947924, - 2059603641, - 3133027782, - 904932493, - 682965041, - 96681623, - 2351559340, - 1778180331, - 97684909, - 544087413, - 132510513, - 2238533219, - 1998974670, - 2218957156, - 3008380196, - 1277902395, - 1268966375, - 1799517161, - 1856927471, - 4089824563, - 2948753658, - 2568533320, - 521835081, - 4038746355, - 2534721941, - 1670201249, - 1811728331, - 1162166913, - 1898549560, - 2948654480, - 2901009943, - 2911677681, - 2815310186, - 2188874160, - 1412854525, - 3961550828, - 484486644, - 4085203908, - 3579822201, - 4008947216, - 1166984689, - 1721572946, - 736203780, - 2747611284, - 39535783, - 764171576, - 1257015450, - 450778844, - 85372012, - 1053725411, - 3644040349, - 2772669201, - 3233733058, - 1431861625, - 3038381355, - 2367217221, - 2283649777, - 2350364789, - 2318128593, - 4107325019, - 157401496, - 2083781936, - 3651226417, - 1235634378, - 3750381335, - 1675554286, - 4155575857, - 467446355, - 4214686643, - 702634429, - 712303747, - 1567960518, - 352541689, - 534026993, - 75369865, - 2267458521, - 3066769069, - 3590411729, - 2942380665, - 881135000, - 439876096, - 2082200155, - 959131142, - 3226183983, - 1805705079, - 416278815, - 782761855, - 2369948756, - 3572666608, - 2017623950, - 3047715311, - 3344610150, - 11286817, - 3614361216, - 419757045, - 3418375005, - 2392045671, - 3625839645, - 4153182169, - 1895009300, - 826795925, - 832382617, - 2855552455, - 516640103, - 3097326913, - 3644017077, - 1736375198, - 1300883196, - 1269079295, - 1674589825, - 837820536, - 3029532241, - 1490398223, - 354933227, - 930667154, - 3953267824, - 2680672233, - 1318017272, - 2378410004, - 3097115705, - 666792429, - 3990985418, - 1648033583, - 1224083855, - 3099232874, - 3602024859, - 523107411, - 1022998311, - 3947062200, - 1268698776, - 4112447178, - 4223496244, - 1895607307, - 1343346586, - 1569239180, - 2399117310, - 2759164687, - 424112886, - 2999714183, - 3839520140, - 3314031783, - 3013173807, - 4008685375, - 1859553179, - 3201257383, - 951117634, - 962987201, - 2171781665, - 2867468515, - 702794205, - 534839755, - 1098520512, - 1024505706, - 24855086, - 1256888647, - 710341508, - 1174171686, - 3969936200, - 352947506, - 1411359712, - 54895376, - 2892538978, - 3811309486, - 1176667167, - 3186571348, - 293018205, - 900275274, - 659668216, - 3631091910, - 3986557832, - 936854211, - 4126162073, - 199206599, - 800343626, - 2500420391, - 2458777080, - 1621984961, - 2230381712, - 3838336724, - 653186549, - 562093785, - 3349474996, - 2470582250, - 3546432743, - 3823404340, - 304228293, - 353650469, - 2795844905, - 3214597663, - 3015830248, - 4096189976, - 1543999863, - 2444608781, - 3075922009, - 2031701569, - 323849278, - 2014036742, - 1932434944, - 1783510442, - 3346370649, - 3330914388, - 3105291624, - 349723999, - 1675851455, - 2585924056, - 267181254, - 434982148, - 2927628990, - 879031917, - 829651192, - 1529714908, - 1305112924, - 655409946, - 294227433, - 3664549654, - 1965090525, - 2820969920, - 3312826671, - 1303484074, - 467549375, - 44215757, - 2655462001, - 703657197, - 3159835075, - 3294492335, - 488218638, - 1964778246, - 233844640, - 4185425491, - 3872509542, - 4098454064, - 2800291797, - 2049071011, - 908392761, - 1142278701, - 2090776555, - 3055917354, - 2147747017, - 3866581642, - 2697987596, - 4061072174, - 416325149, - 4024789595, - 3949568694, - 1651938236, - 2001230579, - 2214888238, - 1290801404, - 56776462, - 3076417887, - 782612972, - 4080283022, - 1316028900, - 1807111207, - 2777418525, - 3799697747, - 3330724827, - 2407025550, - 2192635846, - 1326386701, - 181906566, - 2704591351, - 2332288340, - 2737340964, - 4059820001, - 800157830, - 747116165, - 3945901883, - 458863852, - 378603401, - 91229067, - 3864173461, - 4214835552, - 3064324033, - 4031418546, - 2576908243, - 2186052852, - 693230562, - 821948541, - 1336473536, - 3207554374, - 335661172, - 1077176194, - 1426162892, - 1820589956, - 1417870851, - 3388072177, - 3246018189, - 3372034344, - 1695091022, - 533758591, - 3747368500, - 2774266377, - 2510062662, - 2704449333, - 4121145527, - 2462398332, - 3268788699, - 3053480025, - 1728135667, - 1938970618, - 486276440, - 755968284, - 2808295005, - 243486152, - 606849322, - 3481880680, - 1411375358, - 2656196617, - 4224811188, - 3631388540, - 2278146928, - 3733750977, - 3961916496, - 3261521121, - 1420196296, - 1258193893, - 2659699577, - 1611917360, - 158232170, - 1584612018, - 1267240944, - 2310854457, - 1850517939, - 3176110051, - 416228811, - 3597142785, - 1629335394, - 3536618646, - 3177662378, - 477970022, - 3209901051, - 2324893875, - 415783515, - 1618396512, - 1493894824, - 633482086, - 3982163253, - 733741266, - 3126125659, - 631696737, - 1662825596, - 4060849887, - 240321204, - 2629314537, - 2308625239, - 3298230656, - 2094035418, - 2448544180, - 644550195, - 4086036911, - 3904414186, - 1105783866, - 1999294877, - 12938024, - 3177597289, - 3515511861, - 949893236, - 302406846, - 2303518735, - 1860144402, - 3120657480, - 3694882395, - 533118959, - 3610021195, - 4180819356, - 4211694578, - 807527016, - 3082847207, - 253261105, - 2237573697, - 2801227581, - 1492451588, - 1924428852, - 2492168163, - 3160332339, - 3024419664, - 416040945, - 2865131903, - 3432150747, - 149942035, - 2648035448, - 1196590367, - 3250439783, - 1657627609, - 2921554621, - 3559902096, - 2585257974, - 2672141513, - 1599015608, - 1669205385, - 1232079234, - 2031093583, - 823815510, - 4150417084, - 1820201104, - 1815422022, - 3206591384, - 1858526000, - 3989297436, - 3897322527, - 3039237498, - 1822254470, - 1094685592, - 3014486534, - 3296369807, - 819605426, - 2301430863, - 758485066, - 3519565429, - 2941739565, - 1864720578, - 1001549799, - 3571932630, - 2837022081, - 3111394213, - 2930402907, - 336637218, - 201524404, - 3792471018, - 1441035282, - 4088850205, - 348517556, - 1099546003, - 2693113326, - 1302022818, - 2597824650, - 1460682924, - 3795402845, - 832670082, - 2161598354, - 272941377, - 1956615803, - 4289834814, - 3974568236, - 3129120027, - 2835024837, - 1535440341, - 2764283881, - 3849170814, - 2532849624, - 1393346207, - 3955100587, - 2176470149, - 1501368024, - 2889172741, - 955590581, - 3424074702, - 2823911694, - 138393240, - 2038338061, - 2195665950, - 1815047258, - 25304713, - 4119242703, - 757734756, - 158431145, - 1990222737, - 928084593, - 866445460, - 603077348, - 289207243, - 323744975, - 1673628886, - 230077467, - 1866750776, - 3762323396, - 1834075318, - 1654284016, - 1040388621, - 71195691, - 1992932062, - 2522787843, - 634128198, - 2876095101, - 415221506, - 1999215123, - 2608063479, - 2815438753, - 1530714902, - 2294076006, - 2566134798, - 490172125, - 1058618728, - 2651555461, - 704242038, - 3104613053, - 1307172788, - 77093784, - 615001058, - 2779210399, - 1313973115, - 2762574953, - 3074898838, - 441858326, - 2877948381, - 1094647700, - 3413922526, - 2378611404, - 329721006, - 2913598403, - 2864015806, - 3519308240, - 1729105760, - 1638298188, - 395083425, - 2106960358, - 983494347, - 611499919, - 1835906487, - 2727628584, - 2631083272, - 515509525, - 1452543692, - 2423944150, - 3700294929, - 3518701771, - 802711265, - ]; - - static const List _envieddataprivateKeyFCM = [ - 1085536309, - 2117980490, - 3306799656, - 1841983944, - 1712404104, - 2262186587, - 2157777518, - 4150668383, - 325024600, - 2723506368, - 1206308595, - 1358232148, - 2189417967, - 935373780, - 1746313230, - 813265721, - 632010997, - 873467341, - 1229687147, - 2909524144, - 274973726, - 2347731465, - 1338722503, - 117948962, - 3986221270, - 1954094036, - 2410354209, - 2337266016, - 2703235468, - 4020650797, - 255509051, - 1020457150, - 464787633, - 988219266, - 2387495622, - 3263720956, - 1593144002, - 4255843372, - 755224522, - 1505632833, - 2965348174, - 2186504858, - 1989935671, - 2124542547, - 3329269656, - 2926109016, - 767012013, - 3813848097, - 1179253345, - 4268404168, - 2334814668, - 2069585766, - 4162817483, - 1351206093, - 2088099317, - 274081714, - 3360573100, - 3570951969, - 122144536, - 803393094, - 525261954, - 103852315, - 2288315336, - 3304167019, - 485424119, - 1204708526, - 2375713125, - 3992905210, - 2251893945, - 3195872956, - 4034441957, - 551949920, - 321179386, - 3825405905, - 2308875191, - 1968464978, - 321932415, - 3600315655, - 2378810327, - 3404894286, - 2549137935, - 2282859313, - 2056378516, - 1290587141, - 2396673450, - 2938124163, - 553437998, - 1881228625, - 2493651578, - 1105635434, - 1410816904, - 3126416201, - 3206121867, - 3997992572, - 3723531070, - 2059981921, - 642833016, - 856970710, - 1512233484, - 2760975260, - 2593280200, - 485980703, - 1008146337, - 1285607438, - 132594951, - 21374859, - 2353511677, - 3855326508, - 143163448, - 784630766, - 2732347331, - 561324291, - 525550156, - 445297160, - 1553083035, - 3064262450, - 30519137, - 1793458675, - 247355178, - 1134279062, - 3070881648, - 879418090, - 3766084383, - 1826713646, - 1571928438, - 1773517993, - 701054853, - 1340631117, - 3180730094, - 3670957644, - 1590914105, - 3075193379, - 2121316385, - 873305412, - 36462828, - 3114095964, - 16258677, - 1823083233, - 2500421037, - 3126003382, - 433577564, - 691671918, - 1709110358, - 928934042, - 766576115, - 3538168598, - 2154380651, - 1867334, - 2055348794, - 1186512319, - 1759112200, - 244091558, - 2701724438, - 2707506717, - 3254080342, - 1567682660, - 1929585230, - 2105902572, - 283649330, - 2808059267, - 21984088, - 3087283882, - 3711374378, - 1442386463, - 2283281989, - 1231006897, - 2951016785, - 2535367181, - 3231269074, - 1310639193, - 2395771573, - 3159821825, - 3498198914, - 1083619443, - 4004544097, - 1687463030, - 843828097, - 3529495248, - 1380398244, - 2340370140, - 3727070213, - 998110902, - 3471121416, - 3450073488, - 1748699998, - 3704610771, - 3340981647, - 3252624424, - 4286661960, - 35250130, - 3123278139, - 1985664207, - 3441207534, - 229839253, - 1632901441, - 3566351387, - 1110685166, - 1749390386, - 2185975594, - 1102555430, - 3622613397, - 163815443, - 794165064, - 1827716758, - 259310977, - 1601493030, - 2664759833, - 1482630097, - 448172366, - 1541517574, - 3361017453, - 12442949, - 1479440814, - 630107451, - 2363652437, - 657813023, - 2823395173, - 1989064237, - 2082361673, - 656868472, - 1985514535, - 2292221383, - 3026989151, - 326024269, - 3350802317, - 705140943, - 2775756921, - 4248267522, - 3117916652, - 2996183736, - 3342043667, - 2109816854, - 131735565, - 1286723674, - 2615653690, - 902288876, - 474764361, - 159250204, - 613017929, - 1465004958, - 3084856953, - 685984132, - 636194260, - 4202543318, - 3084072272, - 418110303, - 3230960619, - 2724188932, - 3943623534, - 630484881, - 4207055387, - 3970420488, - 742437020, - 857083048, - 2322487536, - 3035602435, - 3810119118, - 912608259, - 1185253669, - 3659899592, - 4293560105, - 842337637, - 1228345580, - 508065790, - 3878945463, - 2750671275, - 3444774053, - 674015543, - 203656467, - 845755672, - 829085505, - 1158820148, - 3749720690, - 2868569748, - 2163071279, - 4114830478, - 579975416, - 2045396288, - 3571456249, - 2880322776, - 3786611844, - 794247816, - 2948619451, - 3586079158, - 3423461974, - 2350879552, - 3525378884, - 3295686324, - 2647221739, - 571621210, - 2534614449, - 1934121825, - 3047948603, - 2163171068, - 3700716737, - 200034474, - 3296307452, - 593234142, - 2828846645, - 3202478166, - 2591283471, - 588523438, - 3640357483, - 2136994040, - 875940407, - 2784934541, - 1704795128, - 3417002414, - 3462664519, - 1087126640, - 2449528513, - 877045427, - 173316887, - 2786590841, - 3268851673, - 112842898, - 3026331273, - 1125625659, - 1744390383, - 1251409265, - 493181340, - 4284397165, - 187685552, - 686961052, - 2514440889, - 1199703023, - 4105973817, - 2532201153, - 1158600943, - 3992352775, - 2848387783, - 3450041125, - 2522573145, - 3012910917, - 3630260983, - 300646650, - 1470724861, - 1789793422, - 3468123469, - 4026949521, - 4191460865, - 4052970242, - 1634986326, - 1139983711, - 1349852605, - 48404602, - 2197053440, - 3668826336, - 1412743800, - 2008040771, - 3740902438, - 1759672555, - 2924707825, - 2293874499, - 1790332359, - 2708987650, - 3994362820, - 4113390121, - 1897115396, - 2976342123, - 3196098737, - 853770122, - 1875208302, - 3191047321, - 2407094587, - 4224537495, - 3222836545, - 266738156, - 1513423125, - 2353895039, - 2114425088, - 347189446, - 759583893, - 225464875, - 2672650166, - 2417275446, - 2781533356, - 1383969672, - 2241665535, - 1102721684, - 1261849564, - 547589615, - 3300301639, - 2077924940, - 2893284942, - 1724462014, - 3656845639, - 4007592035, - 2341091614, - 1016131472, - 2777015390, - 2620064722, - 2430166019, - 4126225278, - 3522875787, - 1736834077, - 2662098007, - 4205696438, - 2096953717, - 2810936588, - 804465856, - 4157128032, - 1391364766, - 1021569140, - 1800041575, - 1985623617, - 2684878686, - 555492403, - 2525696983, - 1957424468, - 3527909330, - 1767272532, - 21359733, - 3020321436, - 3113621569, - 2585617411, - 1769644790, - 2421298420, - 3343046082, - 1653058710, - 1753978670, - 2262285394, - 3684210024, - 4053929698, - 3517493344, - 767647572, - 1918390406, - 3857217723, - 1009110385, - 1588807323, - 2984683819, - 515580053, - 274701658, - 3642193630, - 1866506637, - 2821871632, - 2940469755, - 3823409929, - 1212094011, - 3256674403, - 881124354, - 3374665619, - 1346867969, - 1008100270, - 14227636, - 3402565768, - 1121304539, - 4281978325, - 391515698, - 1186667069, - 3949551662, - 348808556, - 1991003851, - 3500568082, - 1266300957, - 4094624212, - 2576304746, - 3066775131, - 3843275462, - 1593669605, - 2513036173, - 2194712539, - 1520341866, - 1903681252, - 1288071308, - 491381175, - 1675998185, - 3467438246, - 3649458153, - 3030470853, - 1437173994, - 3895538863, - 1940348158, - 4130367055, - 2786716829, - 1644435893, - 1115897528, - 710541201, - 829782636, - 1339769377, - 2325825718, - 1791970944, - 2870122030, - 2564980940, - 3742765748, - 262056850, - 2438400552, - 1545066443, - 437751495, - 4281005700, - 3536047487, - 1017035441, - 1659952381, - 2818011605, - 659048353, - 613227531, - 1757056971, - 4013740637, - 1024045180, - 2239597775, - 2199005600, - 1092296402, - 2621417337, - 161103729, - 2654561632, - 3705933021, - 4116218213, - 1830829484, - 3564566968, - 854043697, - 798165495, - 1039848474, - 992815413, - 1593642577, - 1630529842, - 1042937591, - 1919353167, - 3934530532, - 1788196668, - 352686720, - 561809958, - 4214087300, - 3983543634, - 3862801500, - 1938059223, - 1289654936, - 979897060, - 1085546499, - 1558904469, - 1505597737, - 927859918, - 2132736969, - 3840203115, - 718748248, - 2711576933, - 3652274438, - 1719411136, - 1352174115, - 2675475841, - 2706582439, - 1659077702, - 1340726061, - 1378024570, - 3357398503, - 1709691950, - 2175575740, - 1373359064, - 3970383223, - 4021502739, - 1061065488, - 2521840950, - 2727478941, - 1287270716, - 4093614367, - 3973488719, - 3818892763, - 2241497574, - 27943208, - 3273086853, - 1229171015, - 3807172897, - 853419415, - 3482645881, - 3348389970, - 286579536, - 3318504095, - 2632745197, - 3422016734, - 3355782082, - 1227116534, - 3040110007, - 1965638274, - 2923878905, - 3134737380, - 3993078563, - 764439995, - 672617995, - 1635580843, - 3872698746, - 906501977, - 413804239, - 2497558449, - 2970367944, - 3841168263, - 2875510725, - 1415468596, - 2909036228, - 4149918999, - 364026462, - 95761258, - 2113576534, - 1271972635, - 3548019621, - 2076287478, - 4017306184, - 1432084085, - 3904533826, - 1727767421, - 1246726402, - 3467134782, - 148650761, - 1523517883, - 2054849699, - 1494172447, - 1623295663, - 2303356161, - 3941327405, - 1144460138, - 1842096496, - 2785486950, - 1243220668, - 4192599507, - 4197006413, - 760779358, - 3529911028, - 1921874387, - 1137033380, - 3657072022, - 1965464, - 4097534457, - 622726730, - 3563055962, - 3227560617, - 2670112929, - 132777244, - 1996446330, - 4137170098, - 2463773609, - 4019090897, - 3075990034, - 3786380257, - 1871895767, - 1697895496, - 2152339617, - 3685772298, - 2632466713, - 3900014046, - 3802597910, - 4146641375, - 3472229045, - 3416299740, - 923870660, - 3078136920, - 1673760017, - 3888410813, - 668555154, - 1421568972, - 4163099040, - 1797926618, - 684468459, - 810168122, - 3187831210, - 895739160, - 2125158844, - 1139621122, - 3712920797, - 2392948680, - 4107942343, - 2566716375, - 2829940758, - 1299185369, - 2265529936, - 1320750171, - 3212833016, - 306728773, - 1490946164, - 654060455, - 1930075625, - 1850479267, - 1097511533, - 3169531684, - 2807088008, - 4291851712, - 2630499777, - 2458837671, - 2734383061, - 3191205200, - 1234431871, - 1086970216, - 3644867248, - 20628602, - 1851371314, - 740027643, - 1800020735, - 1284009340, - 1088068126, - 972631824, - 3155595352, - 3852420151, - 2831055692, - 2615080173, - 3966254480, - 1369070080, - 2972338444, - 2097907973, - 3384879341, - 670376159, - 1908843277, - 2478472478, - 3012775131, - 4017078504, - 1918175962, - 4176367612, - 1899461628, - 1309265813, - 1768396902, - 2735581699, - 2917380141, - 1420369113, - 2173130433, - 992948018, - 3548558875, - 882752605, - 3278439376, - 3742567342, - 843614826, - 4233940506, - 1503375458, - 3086495302, - 1468572611, - 3803815538, - 2002436, - 924633745, - 3091148320, - 2011946973, - 3601042758, - 3885399206, - 1141413576, - 455924506, - 2242084087, - 482292314, - 1289995553, - 1137511758, - 3374091575, - 2484871387, - 1161660739, - 4099020718, - 3709788906, - 268204138, - 1159671547, - 1120925946, - 1331589960, - 2228774068, - 1884234463, - 87065918, - 331876640, - 2024667893, - 1569341024, - 3194297700, - 228974915, - 1802023899, - 288979847, - 3978099659, - 1276612641, - 1903879029, - 1824108706, - 2785099701, - 1572215383, - 2108354016, - 124757570, - 3543597800, - 1713505691, - 189298904, - 3718097918, - 3058597427, - 697016060, - 563134350, - 1306892358, - 715629681, - 1715149316, - 2013036598, - 587581113, - 1175783125, - 3435805299, - 2549094051, - 23137363, - 3517267604, - 3718729935, - 36614599, - 2190115789, - 4141290992, - 831121502, - 1861553862, - 1460147035, - 3768730075, - 881891235, - 60943467, - 2453835910, - 3384049863, - 2942979188, - 850627836, - 3453777229, - 1189730303, - 3179914683, - 110596814, - 1699511782, - 3508351228, - 2467597347, - 948450290, - 2339131131, - 4203858520, - 1184983915, - 887835269, - 3702557317, - 737384437, - 3987894427, - 2182889881, - 1168958690, - 3133730747, - 2299665504, - 2341894245, - 352258370, - 4220265682, - 4267358390, - 1869770988, - 4138710032, - 3979166699, - 3341228075, - 2528541401, - 2491816908, - 989998214, - 2839646861, - 1642832573, - 681261255, - 227499726, - 168390039, - 2735463575, - 3224853574, - 3580448637, - 2415638956, - 156511130, - 150733499, - 651876887, - 4268328925, - 3838390413, - 482315457, - 250774004, - 4242931560, - 1242976733, - 193454103, - 3371065312, - 3105310558, - 493058998, - 3856586530, - 1213131937, - 588966907, - 2866296838, - 4136308488, - 1979871579, - 3173655368, - 898011574, - 3177135870, - 3779274634, - 1351221007, - 4026440860, - 975758770, - 2785454265, - 3976024752, - 2075739962, - 2055593271, - 3530532352, - 3929628720, - 1630735325, - 3201169807, - 1003927603, - 3359573138, - 3639507000, - 2193907242, - 1808613930, - 4926660, - 2293843044, - 1128173309, - 599268154, - 2352437900, - 1164710412, - 1078164082, - 2352986366, - 1014291081, - 180471276, - 3690798036, - 2715939279, - 4274194709, - 2796097386, - 556069314, - 2467288319, - 3318575738, - 3397344225, - 2370331535, - 401109326, - 2682380721, - 2208267970, - 4291881825, - 21151982, - 2513130965, - 493115451, - 311256861, - 920185639, - 3702037236, - 2414527279, - 2561577387, - 4170200332, - 3842142373, - 190252784, - 1351578482, - 2429577770, - 338312691, - 691950784, - 481636430, - 1268030088, - 1027901762, - 417511544, - 2451028617, - 3382180633, - 3655442788, - 2566230482, - 3022856301, - 1421301246, - 3980596582, - 2281646654, - 2872839212, - 1302221319, - 1365502589, - 684420550, - 2376737172, - 2242815931, - 240815042, - 1994752024, - 3906223201, - 2227728643, - 3156644912, - 2545145039, - 116841055, - 1403188980, - 2713624716, - 4232883436, - 294471405, - 3264851246, - 325824826, - 4182699313, - 2069684010, - 3908747227, - 1605574944, - 2955904779, - 561665202, - 3204320361, - 1721039018, - 2586223272, - 2492969823, - 221418941, - 538072918, - 2592803545, - 2409975204, - 3716452615, - 1830256694, - 441370728, - 1393024459, - 2025187967, - 28410291, - 4061041540, - 2143044681, - 3487302656, - 3697978158, - 2583859043, - 947239088, - 2374879810, - 3699100054, - 1165450777, - 3902700841, - 2682853655, - 3630317579, - 3989397112, - 3675920648, - 1384419455, - 792874141, - 1834510286, - 2013232656, - 1020868863, - 583064013, - 3119960720, - 961240503, - 1340286103, - 465734741, - 3116332080, - 918796867, - 4053666287, - 918620629, - 1107969022, - 2597755069, - 197634199, - 2236538035, - 2279996457, - 512417959, - 3604803260, - 3257914033, - 1067208903, - 2796581721, - 3822344664, - 1434667728, - 3384142244, - 1834585789, - 663644105, - 3313224659, - 1933518166, - 4129076894, - 56034124, - 1293769543, - 4144706345, - 269562093, - 979497717, - 1992170947, - 3491981621, - 963998994, - 1398280577, - 3908367368, - 3302647861, - 630817325, - 341943851, - 2842309547, - 1451926513, - 3397386232, - 1377364130, - 2345739802, - 4126351205, - 3901368148, - 2198039049, - 1887832386, - 933676044, - 2866875911, - 165950738, - 2763887966, - 1650072690, - 1106492579, - 2308285618, - 163580239, - 1581276944, - 1169410380, - 1161358853, - 444857632, - 3787905492, - 1293782100, - 2844263403, - 2886738872, - 3685395239, - 1601620975, - 2519290506, - 1519468745, - 3790210836, - 2094226512, - 2360380331, - 3398306834, - 3603134191, - 3332113386, - 1635903848, - 178751471, - 3884752923, - 181950687, - 2451078642, - 3196524723, - 104370528, - 3866181332, - 425923997, - 2725576019, - 362192892, - 3914497455, - 2141013009, - 691515102, - 942846390, - 3799111446, - 2609990188, - 433480365, - 2467198723, - 4022338036, - 323217851, - 217603350, - 3456859271, - 4007337888, - 614055466, - 2831894695, - 3114209577, - 3305676352, - 370137372, - 1263543610, - 2114082666, - 774629468, - 3567686344, - 3959253059, - 2250098679, - 2303246840, - 893454596, - 2307458021, - 892178040, - 1026600657, - 3694904182, - 37940190, - 1449101925, - 953326669, - 3367139175, - 1595256261, - 1507669056, - 269006317, - 223054571, - 1986003671, - 1039170294, - 297063699, - 3601488549, - 2316436874, - 3762033524, - 3209737797, - 2297588043, - 3366048335, - 2301410388, - 3097969278, - 839899417, - 3282442992, - 982221951, - 2064004791, - 1041347534, - 1811322312, - 1113771578, - 2306400708, - 3832725595, - 2467830746, - 3727517954, - 94094519, - 3355834865, - 2862703734, - 1421288556, - 120561901, - 118538990, - 668651291, - 2225407928, - 2677884571, - 3768050437, - 672390401, - 272943079, - 547980271, - 1925811509, - 1888786150, - 805660003, - 3778221757, - 1000452547, - 1192696063, - 417066177, - 3464037789, - 2591318094, - 3979809694, - 1931714040, - 348440986, - 3391534706, - 3186260453, - 3337558171, - 4241021284, - 4006316361, - 990024548, - 540018608, - 476468502, - 2364116836, - 2426963106, - 1138794555, - 2543232111, - 4033882589, - 2667360370, - 1718693827, - 3112965526, - 3352873059, - 2500162206, - 917631840, - 1785804200, - 1825480280, - 3237828092, - 882241639, - 2356332067, - 4068688306, - 2249583798, - 2245189527, - 1033607225, - 171187142, - 1037242576, - 3459046268, - 4198402784, - 1002293379, - 699804623, - 1722669777, - 692658988, - 3254296102, - 1110992290, - 2415906128, - 1705408318, - 1447584170, - 2730118847, - 381018471, - 2132602422, - 4188790718, - 4022681027, - 4116273564, - 2788641129, - 831585301, - 1022064242, - 99332243, - 3985257943, - 3014689974, - 2906967270, - 4119953521, - 1199742841, - 1529405814, - 2646244793, - 1525112483, - 1590133622, - 3956126953, - 3159372624, - 1041031400, - 523933088, - 713094885, - 4017730041, - 2474499427, - 2274032791, - 724020206, - 3989279254, - 990372080, - 84657200, - 805337745, - 3340497798, - 1447809889, - 948331174, - 2925341381, - 477410518, - 3728035563, - 4248868362, - 1207692044, - 3912942909, - 3956508190, - 2552096385, - 1306714499, - 3809440563, - 3584716001, - 3330104712, - 701943910, - 3351673601, - 1949167932, - 214999918, - 545869562, - 1771710239, - 912755144, - 1884714130, - 3187673820, - 451595313, - 74574051, - 1822316368, - 1519034119, - 2869003345, - 219978543, - 3982152564, - 2156669946, - 134026770, - 3456472507, - 281095340, - 4026024818, - 1290944174, - 3431292549, - 3849666943, - 147437883, - 4294390660, - 354898175, - 1289238387, - 2643957649, - 4088107573, - 3894154397, - 1140711818, - 3232485752, - 2095688689, - 4058965251, - 1406652907, - 1252766944, - 3633712660, - 2361045829, - 3143506670, - 14085845, - 526659795, - 1185408094, - 660814790, - 3693127140, - 3836439535, - 1404090576, - 4194958393, - 3483386595, - 2209987450, - 2514573304, - 2128755046, - 1620094387, - 3065537765, - 2821082377, - 4015520115, - 2699416714, - 1563727055, - 2318997610, - 3009096601, - 4240853802, - 3389576713, - 2694353822, - 2670277640, - 599701081, - 4281275375, - 2093999744, - 2282497145, - 3850236052, - 1250454676, - 1611058539, - 478316885, - 2658557842, - 2541479512, - 1237296715, - 1534834504, - 641294059, - 4257798485, - 747820946, - 4199063004, - 66708725, - 1633386582, - 4067017516, - 264319306, - 2961165265, - 4121665549, - 1160054202, - 1800798562, - 2500854702, - 3690464088, - 748471447, - 1417968525, - 1504925091, - 3328780343, - 1571974609, - 3872213942, - 2271639389, - 3376742129, - 1092290569, - 813770883, - 3097534802, - 2520919410, - 1858667872, - 3755951082, - 533261847, - 1278785348, - 3495927968, - 20611301, - 3059107985, - 285606830, - 1714648212, - 604659056, - 3504355677, - 3198889179, - 1380835512, - 621945771, - 2227978411, - 992577111, - 3218072902, - 3233400638, - 472491106, - 3670337329, - 3491503669, - 3469572829, - 3065199986, - 629845622, - 474179494, - 520889158, - 643711550, - 1419704879, - 352560427, - 2566502194, - 3538916883, - 3482193684, - 2417969778, - 1445022017, - 1584365077, - 2030671691, - 3395271660, - 1572877726, - 3487108276, - 2139837854, - 258499896, - 2034007946, - 3533608503, - 3796980424, - 2732144591, - 1700671060, - 379784746, - 1698797512, - 3707646685, - 2685937154, - 4154939131, - 2275770670, - 2005066042, - 3893824693, - 1053538583, - 1276583121, - 767392377, - 2329231744, - 1844349766, - 109361751, - 385742237, - 4177013648, - 4057721090, - 1557767944, - 872062825, - 3218329037, - 2309551843, - 1135602883, - 971028918, - 1179199150, - 1218017198, - 670702065, - 278119436, - 1654668553, - 2873844341, - 3329606815, - 1905513581, - 1970519013, - 2859566380, - 659735494, - 1270020706, - 352582354, - 1465898702, - 293457169, - 1113584096, - 1162900946, - 1511455801, - 1586301576, - 1684964370, - 3335102185, - 1918297563, - 867004800, - 168453004, - 1719614846, - 1918215285, - 533478097, - 222783604, - 3085341504, - 3464374801, - 733958310, - 2048411663, - 372217789, - 525798833, - 652234143, - 2907990843, - 4151310504, - 787515146, - 3385657458, - 2047711705, - 3081385223, - 1308309594, - 1001244157, - 2890086652, - 665270088, - 1775294635, - 63518953, - 649576616, - 3065301356, - 3502719016, - 3038287906, - 3879218427, - 3179851686, - 3939077162, - 4122811048, - 430501234, - 3035971460, - 902893366, - 427635638, - 2730011512, - 2523183069, - 3272786552, - 2387459551, - 417432700, - 3297045586, - 4060502711, - 939908102, - 3150410546, - 2553407803, - 1572709853, - 2068949466, - 2922742835, - 3439150707, - 3111744673, - 2614684063, - 1384767353, - 183056652, - 3597944569, - 2021718136, - 304391054, - 170753396, - 2455562492, - 3614369235, - 609588650, - 3458840801, - 1006680616, - 4056904962, - 1863866738, - 2624775390, - 186208854, - 1863997301, - 3698612585, - 1138494249, - 3377966973, - 2723569360, - 1696174713, - 1231594042, - 1775194393, - 3144809759, - 3273112075, - 707802245, - 1552489774, - 363893574, - 2570958438, - 2401223841, - 410129956, - 845767725, - 1848398988, - 1027174915, - 4290916351, - 2185755528, - 2478450258, - 209646199, - 3309366169, - 3363219442, - 4022905258, - 3254481525, - 2549408333, - 1172390740, - 4059818511, - 4274730824, - 537664603, - 836331631, - 541289355, - 272421737, - 3078435008, - 552598840, - 2851570968, - 3350772952, - 1238727654, - 1165004317, - 3005921682, - 1100856519, - 2285427145, - 2010991185, - 208585908, - 2673355770, - 3602091435, - 3038826454, - 1411288714, - 3809103665, - 3679331286, - 2932403084, - 2227258178, - 3835831617, - 229609334, - 741525388, - 2031293894, - 3416187957, - 3821780347, - 3370583115, - 3280734418, - 3103555194, - 3674388339, - 3423851486, - 886751471, - 2786691033, - 3002660367, - 3967826598, - 2097679392, - 500967744, - 368540462, - 2492935460, - 2359110139, - 1790252651, - 3331167825, - 2555117477, - 3505928082, - 27756334, - 2576122182, - 1452523965, - 3127160648, - 970813007, - 2565125282, - 1764322645, - 1556734926, - 2235987785, - 1844585726, - 354090626, - 2959351430, - 4058745243, - 2814170787, - 2537400646, - 1562236954, - 4191554414, - 3224368165, - 2221010518, - 4096018652, - 4249718209, - 2801370245, - 3502310993, - 3701664415, - 644714393, - 1347246098, - 544498242, - 1488153699, - 1038554259, - 906519409, - 203296356, - 1333971068, - 2896673434, - 1960913088, - 3197903801, - 3959393599, - 3445230438, - 2904728922, - 3068781177, - 947225288, - 3385573485, - 3344502910, - 2266445022, - 762210538, - 1647682671, - 3570494744, - 3203611513, - 1759931323, - 3856547856, - 729278528, - 3505860261, - 2370708653, - 707420715, - 2229528036, - 3009316585, - 2494180888, - 9884453, - 3480298928, - 3402220691, - 565537555, - 4065839344, - 494162827, - 47273717, - 1202321327, - 764916225, - 62629445, - 468672536, - 1857595355, - 2248643052, - 3811737927, - 2407314603, - 266433120, - 917558003, - 1066162414, - 2132792262, - 3274397917, - 3062020642, - 3765167416, - 2937911793, - 1471502165, - 2695678468, - 3846250022, - 786320910, - 2005279683, - 2393071957, - 811894284, - 775813278, - 450701352, - 1985137669, - 4158891467, - 723802896, - 2105155548, - 3654424836, - 1963782082, - 1575054543, - 676756874, - 335586126, - 452898663, - 573868637, - 2002705733, - 3475536239, - 3076138688, - 958013794, - 3493630565, - 1396510366, - 2234434287, - 1613914016, - 516569870, - 3850006518, - 2116956986, - 3443640709, - 2989496921, - 2367722093, - 1268049268, - 2047485689, - 1481674444, - 2386015486, - 2659193668, - 1447951666, - 4038982668, - 608427934, - 2484364432, - 3959694259, - 1101777239, - 2541413372, - 3565345852, - 2033902245, - 3005838160, - 206671101, - 3560968287, - 2595380916, - 1835881266, - 2975975710, - 513713116, - 3710862181, - 3395886503, - 1179658943, - 1355609248, - 1035428742, - 3890571246, - 3450601047, - 594177484, - 2613765624, - 1820083025, - 4255930630, - 262855535, - 1889063987, - 363624782, - 816015346, - 2415046995, - 2025925393, - 2480300231, - 1189630142, - 1079027428, - 3467742475, - 2136720262, - 1240187359, - 4244115934, - 3977185134, - 2003009330, - 4132006953, - 2679486124, - 350991967, - 2278323682, - 2136825081, - 2046729022, - 2496971673, - 3224982439, - 3661404587, - 1635139275, - 1938557213, - 1007151393, - 4170300162, - 1561838061, - 726973221, - 2454541846, - 2243697228, - 3968379842, - 2072199035, - 337229526, - 1678887996, - 1418737017, - 2705029522, - 1484579086, - 3367785465, - 84043031, - 236552638, - 419850644, - 738786398, - 221744287, - 2327919416, - 2321399546, - 2890018588, - 2396364255, - 3411006089, - 2270479906, - 749836993, - 3619820844, - 3901769328, - 645755936, - 1097476618, - 3074692798, - 2649128016, - 3688014132, - 1040479015, - 3235174851, - 2526083468, - 723743570, - 3499912066, - 1472139534, - 3981425735, - 2411967978, - 393981685, - 3197506880, - 3193695983, - 3106566367, - 2308231883, - 3513514431, - 2833504430, - 2987008140, - 2135808593, - 146921211, - 4033871712, - 865889974, - 871943688, - 2217860615, - 352283056, - 3305859944, - 2766718680, - 4218915183, - 3985342813, - 3564857507, - 3021895208, - 4059524907, - 107609467, - 411075653, - 988007600, - 3981366070, - 3311333667, - 3916627429, - 2422313573, - 211263061, - 964673394, - 2727372039, - 3084657920, - 3991582871, - 2393763400, - 787300852, - 3384399287, - 2867087104, - 3770294300, - 4185313109, - 3837187521, - 2949171090, - 1574658435, - 355529493, - 3093497543, - 3831625304, - 3949014000, - 1924756794, - 2818466556, - 2442202763, - 3741219349, - 2564966408, - 2350271716, - 3336975891, - 2374320083, - 1249800776, - 1628104960, - 3388187185, - 4071837186, - 4027707505, - 2318084914, - 493398431, - 2871559912, - 2538146973, - 3857323112, - 1537174147, - 1015084464, - 1007811740, - 333132683, - 1644187511, - 1403956233, - 3277269015, - 3193248913, - 1096101302, - 3889526377, - 1757280709, - 2289840040, - 3551445890, - 732839780, - 174143387, - 3770844883, - 3727157458, - 888524556, - 3007137413, - 616525632, - 1186691924, - 3588710648, - 2138217131, - 718200187, - 386851156, - 3439583794, - 1284831158, - 1398957631, - 1805694179, - 2343595504, - 1896230757, - 129676576, - 1111939, - 739712904, - 763237228, - 3951021027, - 2574622754, - 1482291256, - 3554150473, - 2118091338, - 1357825642, - 172790104, - 1612620497, - 2340040458, - 881797010, - 4199754598, - 2809796530, - 2157582657, - 447409858, - 111630638, - 3305781960, - 1506089898, - 538883796, - 624452361, - 4056631089, - 360790496, - 121620495, - 3972782410, - 3316390475, - 1243100344, - 1272260465, - 3080480127, - 4117340508, - 1749464451, - 981365532, - 697933675, - 2845166704, - 1701465677, - 30629043, - 1821385852, - 3248107258, - 3498909975, - 1899607140, - 1863657901, - 3863569867, - 3985200149, - 3745056166, - 3321582004, - 3786675024, - 2564687569, - 3294968771, - 2497175502, - 2202299910, - 3274078179, - 2247375753, - 2993709510, - 3847372958, - 3564909598, - 1037302070, - 2326183723, - 1687134302, - 3197806976, - 1870280613, - 3220346977, - 3767188335, - 287883389, - 1369958132, - 3968906012, - 4187815968, - 517411252, - 417572132, - 445283153, - 802966011, - 561525747, - 3571237682, - 1087063608, - 3657768501, - 3911387699, - 969413281, - 1350753161, - 1656035092, - 3598949444, - 2000957358, - 4174331559, - 208223383, - 641053106, - 3307602410, - 418749455, - 2834377163, - 2000100071, - 964986841, - 3630171042, - 936015290, - 3407561416, - 4129610805, - 2008747897, - 2390016283, - 2432469362, - 2729573545, - 947491001, - 1034576683, - 457016145, - 2844782857, - 1701411140, - 2613419907, - 2837373747, - 3369910856, - 3920500515, - 760078098, - 4092806494, - 3770906895, - 3991880946, - 3142762365, - 3505077500, - 1396880868, - 4242339755, - 2173915968, - 3326171033, - 4173722593, - 1542365999, - 1812653771, - 3419105672, - 2708438885, - 3754677701, - 2678918193, - 3566524992, - 392245357, - 1265078587, - 2760776098, - 1547631114, - 276955099, - 328401699, - 4192593419, - 3310988269, - 358135011, - 199398151, - 3431944137, - 2569765829, - 2814608953, - 2281035129, - 3542660350, - 4166401484, - 1895516702, - 4070375149, - 536281383, - 3225284325, - 990386775, - 155606229, - 2938788593, - 4124640509, - 1511989672, - 563440545, - 782802297, - 2461606529, - 1665138010, - 2837793684, - 2247000214, - 2345090351, - 712996271, - 2188840984, - 1283178059, - 4219541318, - 3458908497, - 1391689121, - 1965556179, - 1931654491, - 3320085720, - 246447155, - 2375859913, - 323897804, - 2172800095, - 1229550909, - 3071639249, - 3056011873, - 2781654953, - 2901636486, - 1253729459, - 379958792, - 948148906, - 735408387, - 2364665395, - 1968816518, - 3967119867, - 2270748854, - 938929383, - 1919976742, - 956393119, - 902842337, - 3470734462, - 1474455634, - 4131771354, - 3209173769, - 2143055986, - 3458402182, - 3995385184, - 3845450416, - 342378800, - 1083267321, - 598324069, - 4060045657, - 2310216831, - 2161885273, - 463740097, - 3320733088, - 2679788998, - 209328867, - 4226617336, - 4212229160, - 483698526, - 1333335662, - 1855535420, - 1917921508, - 1272816122, - 1378258668, - 2435066688, - 2140908948, - 3467362216, - 3004567456, - 4160999350, - 923888509, - 1645443836, - 909768267, - 4273537606, - 1960078345, - 4149063109, - 4104657233, - 145000137, - 2609957754, - 3310517860, - 2446897611, - 899164751, - 2229389676, - 2221036374, - 1539334398, - 3330089617, - 1765383615, - 3763711499, - 421910936, - 3448751869, - 1621049914, - 1147639911, - 1529686394, - 3318394034, - 1729090464, - 3435733535, - 1296433427, - 2270640204, - 4158787083, - 941176363, - 644501852, - 1947374962, - 2342262564, - 1749720161, - 145195583, - 3222901866, - 2979029761, - 2387384540, - 1578154743, - 493557811, - 4119914824, - 3755997140, - 1643071070, - 3053439258, - 3689323839, - 2313397055, - 4283660817, - 3464028766, - 1416559128, - 2105543596, - 2133014067, - 2112892883, - 259821502, - 149424272, - 512856554, - 1672418444, - 467361716, - 3250587977, - 908451294, - 1942816352, - 1582371453, - 2896119838, - 816486928, - 631734781, - 1844846662, - 1280076626, - 4170768206, - 3683173020, - 1873327373, - 3743983790, - 1852120419, - 3065944889, - 3061493292, - 1794699824, - 893250899, - 886609199, - 310126016, - 1419872854, - 3040226311, - 2878592974, - 582524702, - 2236999606, - 2025267490, - 4012515079, - 2165063746, - 730766085, - 4135351210, - 2993097062, - 1852127821, - 262657135, - 673567935, - 1775845310, - 4028399587, - 1230948317, - 4234050950, - 1362871290, - 2715924346, - 2066046778, - 3428929219, - 3341616640, - 2339788777, - 2086355126, - 2725199360, - 1849923452, - 1175973624, - 2233476211, - 1991347873, - 829014462, - 1825865238, - 1965184669, - 975267481, - 46595678, - 2557785106, - 811574266, - 3247915325, - 3368386019, - 2379601218, - 788907575, - 2293019734, - 1927501611, - 1605783919, - 2282191775, - 3661322353, - 2626382163, - 280497544, - 1189432262, - 57024590, - 2528929736, - 665327650, - 3870875322, - 1826638421, - 2722124092, - 3148857462, - 3064558822, - 2046711335, - 2034300465, - 1389355403, - 333000367, - 796860310, - 3043618406, - 1914834441, - 629799586, - 1569054821, - 2338392282, - 1094525589, - 3261070555, - 1223637506, - 4153619590, - 790684817, - 942549977, - 3267002064, - 2373342028, - 3994157485, - 3019208078, - 3859399771, - 3380633873, - 3642559906, - 2312856724, - 2500863374, - 437168953, - 2892679325, - 3182486398, - 981944237, - 2128742411, - 2218720288, - 3338824819, - 653202450, - 2934652617, - 2541100365, - 1155095450, - 422531864, - 791379979, - 952490545, - 2927357074, - 3948306482, - 2057902523, - 618351941, - 3235228745, - 483908376, - 710951527, - 3728070669, - 1059306030, - 4167701777, - 119489089, - 1832822470, - 3568246870, - 4060621488, - 4210996863, - 1087603107, - 4274997761, - 3681408298, - 674130540, - 1329482100, - 2151552180, - 2432543922, - 4193589882, - 2241350842, - 3577549991, - 754996105, - 908356157, - 382014215, - 3930049312, - 1610415709, - 1428026652, - 3807150068, - 2786632703, - 1155819630, - 483007583, - 3192245457, - 2270791414, - 1682658148, - 515988794, - 2642227880, - 3141783864, - 1386208320, - 4136005319, - 4294836958, - 76807116, - 3515803745, - 323171196, - 676738793, - 1600625392, - 614848098, - 3320690393, - 2487022598, - 4224312546, - 2054962818, - 1039108732, - 2452358650, - 3580765992, - 3827580575, - 3789921621, - 282750964, - 3532983241, - 3717378777, - 3441345302, - 4031416900, - 1963588498, - 4180140348, - 1629416353, - 1063923727, - 1814362711, - 3872921286, - 2439149639, - 3348820517, - 795110956, - 814070728, - 2120654863, - 2462730831, - 3156373086, - 1122068934, - 2690825438, - 2800882421, - 2333826303, - 4234259056, - 2222639281, - 3313869688, - 4231777954, - 3065460833, - 3342671295, - 3698903890, - 3994077534, - 3852728810, - 2873872122, - 1159732917, - 3664184002, - 3264754007, - 896131975, - 2933072998, - 1604402444, - 3900187825, - 1802668104, - 3240331040, - 2946561771, - 2537152642, - 777979871, - 3476612908, - 3545770134, - 3188490725, - 2062599962, - 843772765, - 4238226774, - 2089973090, - 803433102, - 796626338, - 3346404946, - 1996933728, - 431803177, - 3895904889, - 3063857733, - 1804009975, - 2644942897, - 402652845, - 3842152752, - 1403840951, - 187067630, - 3056934183, - 3183111748, - 2052064666, - 3850468557, - 2556325016, - 349411883, - 3414681905, - 1798381080, - 723299229, - 3351774329, - 3801910432, - 3137977407, - 1210204205, - 4232579347, - 784506804, - 171817963, - 3727539894, - 2056464132, - 677188962, - 355896687, - 2683106581, - 2941256671, - 3993809316, - 3524637956, - 2927742616, - 3050709280, - 3293512600, - 1266062346, - 2126843725, - 2921201184, - 672170225, - 619962259, - 3162636062, - 4281532913, - 65809470, - 1098388967, - 3365558796, - 830256247, - 2604354729, - 1872825359, - 3754882452, - 2442134391, - 3366691874, - 20293660, - 2597281258, - 1917390716, - 2098499144, - 2924053071, - 2787237213, - 1021351977, - 3918119068, - 775779388, - 3963416736, - 2249259797, - 1843819468, - 3740301475, - 736128240, - 3219278611, - 3605727023, - 2041006693, - 1623759851, - 1715504484, - 3862162669, - 2525974341, - 4078329804, - 1509016604, - 2697857437, - 2586819840, - 56523595, - 488930665, - 986413675, - 2642169353, - 138345293, - 2242917528, - 2268662711, - 346318898, - 147197773, - 3841837556, - 3954777469, - 3832129510, - 3640480623, - 2876814972, - 53301836, - 1178549125, - 1042964379, - 3615429497, - 1115665124, - 428385685, - 2106592676, - 2075308956, - 1139461837, - 3501607349, - 3830039987, - 1981667006, - 2078463130, - 2798192040, - 191463463, - 44484323, - 3793254519, - 1866180755, - 247842214, - 2310522219, - 115050127, - 16732262, - 4050705535, - 1520024558, - 76514101, - 684069373, - 1425023879, - 3339540216, - 648002628, - 999675462, - 777037211, - 3022428632, - 1285180889, - 1175523016, - 1864687914, - 3777599156, - 3394737841, - 1835871183, - 3951793852, - 1128392853, - 3797013159, - 1069116278, - 482270404, - 1915945080, - 3969998897, - 627469184, - 4042501448, - 1594261498, - 2589641094, - 1079246689, - 3838731206, - 594852130, - 4277053771, - 2429617003, - 676144522, - 1737892495, - 1227494051, - 2318611485, - 49013457, - 3921227835, - 2786762884, - 910731383, - 1168194859, - 9642575, - 127199527, - 3649925994, - 3769788722, - 1689201522, - 434989291, - 3941246669, - 1672216854, - 373412811, - 3867004420, - 2923749037, - 1626433843, - 3965331887, - 3584237300, - 2811371311, - 262404305, - 28091528, - 449025602, - 705504802, - 2089588493, - 3011712742, - 1470958528, - 763779268, - 618060199, - 3638654456, - 733096105, - 4064999083, - 926371104, - 1915264222, - 2582118306, - 3701511194, - 412821304, - 148261924, - 2949947625, - 2593835270, - 1532575812, - 850237218, - 2230704553, - 2524334149, - 3640940699, - 398723182, - 2219547792, - 4281683682, - 2081601378, - 2696413195, - 2013282210, - 4158801828, - 1971975224, - 3802489601, - 868706264, - 3457812525, - 656351966, - 2205423432, - 3657441610, - 2792302574, - 3917526583, - 3588617585, - 3505484893, - 65995440, - 4182870409, - 2109275659, - 3012147760, - 1353852274, - 2768903660, - 2275333747, - 2460876492, - 1875881233, - 3123444436, - 3616447766, - 1279491127, - 1378636072, - 198439464, - 774098742, - 3333629931, - 1263703364, - 2613493166, - 3759579338, - 3948784287, - 2866276072, - 1225201490, - 276201254, - 3881378375, - 1333270594, - 1167020381, - 3731137425, - 2013128523, - 1268423363, - 584405902, - 4055009526, - 596780805, - 177058501, - 1796575846, - 834791297, - 812106056, - 3930619616, - 2450687041, - 2398592133, - 73633268, - 2418428653, - 1323758359, - 3009947970, - 2059603695, - 3133027753, - 904932591, - 682965083, - 96681634, - 2351559393, - 1778180248, - 97684980, - 544087357, - 132510544, - 2238533140, - 1998974594, - 2218957079, - 3008380177, - 1277902456, - 1268966366, - 1799517096, - 1856927371, - 4089824585, - 2948753552, - 2568533261, - 521835068, - 4038746296, - 2534721955, - 1670201290, - 1811728319, - 1162167024, - 1898549625, - 2948654562, - 2901009959, - 2911677598, - 2815310171, - 2188874185, - 1412854430, - 3961550766, - 484486531, - 4085203874, - 3579822099, - 4008947238, - 1166984647, - 1721572921, - 736203889, - 2747611365, - 39535860, - 764171606, - 1257015503, - 450778859, - 85371943, - 1053725362, - 3644040440, - 2772669301, - 3233733039, - 1431861525, - 3038381423, - 2367217206, - 2283649730, - 2350364717, - 2318128572, - 4107324983, - 157401561, - 2083781953, - 3651226453, - 1235634317, - 3750381436, - 1675554264, - 4155575911, - 467446369, - 4214686705, - 702634488, - 712303856, - 1567960561, - 352541654, - 534026899, - 75369890, - 2267458491, - 3066769099, - 3590411684, - 2942380588, - 881135058, - 439876215, - 2082200170, - 959131200, - 3226184012, - 1805705006, - 416278905, - 782761798, - 2369948697, - 3572666534, - 2017624022, - 3047715234, - 3344610103, - 11286863, - 3614361294, - 419756996, - 3418374957, - 2392045573, - 3625839705, - 4153182098, - 1895009374, - 826795971, - 832382701, - 2855552421, - 516640076, - 3097326875, - 3644017095, - 1736375288, - 1300883159, - 1269079230, - 1674589912, - 837820457, - 3029532264, - 1490398314, - 354933151, - 930667207, - 3953267744, - 2680672153, - 1318017163, - 2378410107, - 3097115773, - 666792341, - 3990985381, - 1648033602, - 1224083901, - 3099232804, - 3602024913, - 523107329, - 1022998336, - 3947062226, - 1268698866, - 4112447150, - 4223496263, - 1895607367, - 1343346673, - 1569239232, - 2399117239, - 2759164767, - 424112782, - 2999714242, - 3839520214, - 3314031761, - 3013173863, - 4008685429, - 1859553225, - 3201257446, - 951117575, - 962987170, - 2171781711, - 2867468459, - 702794149, - 534839807, - 1098520569, - 1024505647, - 24855164, - 1256888684, - 710341630, - 1174171716, - 3969936172, - 352947582, - 1411359691, - 54895399, - 2892538927, - 3811309541, - 1176667248, - 3186571320, - 293018143, - 900275224, - 659668098, - 3631091882, - 3986557919, - 936854263, - 4126162164, - 199206557, - 800343554, - 2500420459, - 2458776993, - 1621984938, - 2230381795, - 3838336695, - 653186451, - 562093729, - 3349474947, - 2470582152, - 3546432662, - 3823404387, - 304228255, - 353650518, - 2795844961, - 3214597674, - 3015830200, - 4096190060, - 1543999773, - 2444608841, - 3075921961, - 2031701624, - 323849339, - 2014036834, - 1932434993, - 1783510482, - 3346370619, - 3330914332, - 3105291544, - 349723954, - 1675851464, - 2585923998, - 267181220, - 434982258, - 2927628937, - 879031861, - 829651118, - 1529714926, - 1305112881, - 655409987, - 294227343, - 3664549701, - 1965090441, - 2820969974, - 3312826721, - 1303484127, - 467549319, - 44215721, - 2655461949, - 703657140, - 3159835048, - 3294492288, - 488218680, - 1964778353, - 233844683, - 4185425450, - 3872509500, - 4098454089, - 2800291767, - 2049071061, - 908392705, - 1142278725, - 2090776485, - 3055917391, - 2147747064, - 3866581725, - 2697987686, - 4061072129, - 416325161, - 4024789556, - 3949568669, - 1651938261, - 2001230526, - 2214888316, - 1290801298, - 56776513, - 3076417836, - 782612911, - 4080283099, - 1316028805, - 1807111252, - 2777418569, - 3799697770, - 3330724764, - 2407025605, - 2192635776, - 1326386751, - 181906659, - 2704591245, - 2332288315, - 2737340993, - 4059819915, - 800157879, - 747116247, - 3945901931, - 458863766, - 378603463, - 91229112, - 3864173522, - 4214835466, - 3064324016, - 4031418592, - 2576908259, - 2186052755, - 693230468, - 821948431, - 1336473518, - 3207554338, - 335661082, - 1077176246, - 1426162940, - 1820590050, - 1417870939, - 3388072119, - 3246018275, - 3372034332, - 1695090955, - 533758541, - 3747368538, - 2774266417, - 2510062606, - 2704449381, - 4121145487, - 2462398255, - 3268788624, - 3053479996, - 1728135600, - 1938970514, - 486276401, - 755968338, - 2808294971, - 243486179, - 606849281, - 3481880608, - 1411375291, - 2656196723, - 4224811222, - 3631388422, - 2278146836, - 3733751032, - 3961916465, - 3261521110, - 1420196268, - 1258193807, - 2659699489, - 1611917429, - 158232153, - 1584612074, - 1267240863, - 2310854487, - 1850517899, - 3176110028, - 416228777, - 3597142880, - 1629335335, - 3536618743, - 3177662462, - 477969971, - 3209900985, - 2324893944, - 415783425, - 1618396469, - 1493894855, - 633482031, - 3982163311, - 733741291, - 3126125588, - 631696679, - 1662825477, - 4060849839, - 240321249, - 2629314498, - 2308625154, - 3298230757, - 2094035381, - 2448544132, - 644550256, - 4086036965, - 3904414106, - 1105783923, - 1999294884, - 12938091, - 3177597203, - 3515511920, - 949893149, - 302406862, - 2303518825, - 1860144458, - 3120657464, - 3694882408, - 533118851, - 3610021132, - 4180819413, - 4211694495, - 807526974, - 3082847119, - 253261122, - 2237573669, - 2801227628, - 1492451662, - 1924428806, - 2492168098, - 3160332356, - 3024419586, - 416040863, - 2865131814, - 3432150765, - 149942107, - 2648035347, - 1196590407, - 3250439732, - 1657627630, - 2921554569, - 3559902179, - 2585257874, - 2672141553, - 1599015564, - 1669205433, - 1232079306, - 2031093558, - 823815439, - 4150417094, - 1820201172, - 1815421953, - 3206591444, - 1858525952, - 3989297502, - 3897322535, - 3039237399, - 1822254544, - 1094685678, - 3014486625, - 3296369886, - 819605445, - 2301430806, - 758484992, - 3519565348, - 2941739604, - 1864720513, - 1001549772, - 3571932590, - 2837022153, - 3111394295, - 2930402870, - 336637292, - 201524449, - 3792470956, - 1441035357, - 4088850212, - 348517569, - 1099546100, - 2693113219, - 1302022858, - 2597824709, - 1460682945, - 3795402757, - 832670163, - 2161598456, - 272941335, - 1956615701, - 4289834837, - 3974568319, - 3129120079, - 2835024892, - 1535440269, - 2764283800, - 3849170740, - 2532849576, - 1393346290, - 3955100548, - 2176470259, - 1501367983, - 2889172817, - 955590644, - 3424074647, - 2823911740, - 138393248, - 2038338126, - 2195665969, - 1815047195, - 25304805, - 4119242750, - 757734669, - 158431202, - 1990222844, - 928084540, - 866445566, - 603077282, - 289207226, - 323744920, - 1673628820, - 230077529, - 1866750838, - 3762323375, - 1834075343, - 1654283938, - 1040388679, - 71195727, - 1992932072, - 2522787951, - 634128146, - 2876094984, - 415221617, - 1999215147, - 2608063424, - 2815438799, - 1530715007, - 2294075964, - 2566134908, - 490172150, - 1058618652, - 2651555573, - 704241932, - 3104613119, - 1307172836, - 77093844, - 615001013, - 2779210409, - 1313973035, - 2762574899, - 3074898898, - 441858423, - 2877948316, - 1094647799, - 3413922445, - 2378611449, - 329721039, - 2913598359, - 2864015854, - 3519308163, - 1729105743, - 1638298152, - 395083479, - 2106960342, - 983494394, - 611499992, - 1835906434, - 2727628623, - 2631083332, - 515509616, - 1452543625, - 2423944126, - 3700294992, - 3518701814, - 802711260, - ]; - - static final String privateKeyFCM = String.fromCharCodes(List.generate( - _envieddataprivateKeyFCM.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataprivateKeyFCM[i] ^ _enviedkeyprivateKeyFCM[i])); - - static const List _enviedkeywhatsapp = [ - 2195178301, - 3209380850, - 1354557741, - 3929837379, - 1591686318, - 4071448521, - 3185014801, - 2843870169, - 4138568645, - 4151498043, - 2009638225, - 1788134088, - 692552165, - 1814325043, - 74171917, - 125768942, - 699397262, - 386340904, - 1662558290, - 2127416697, - 585544007, - 1965711064, - 1685593387, - 3809982822, - 1429440299, - 2822552659, - 682862704, - 2900742296, - 1315219140, - 2568147650, - 3433092805, - 2096720512, - 3558503385, - 3030328327, - 3978098942, - 2207533466, - 958706050, - 2404477182, - 4010028186, - 1254763188, - 2880760711, - 4232257065, - 2886911806, - 2223199226, - 1440935776, - 3660652774, - 1159627196, - 2870001472, - 90361961, - 3674388050, - 395337328, - 2431151023, - 372277701, - 24261392, - 3891421216, - 3397668061, - 862485094, - 3961829532, - 2293076854, - 2540450332, - 2677209958, - 432765038, - 1667396322, - 3809917285, - 3301074614, - 1274683329, - 1248313923, - 22214291, - 1711065323, - 2113754018, - 164312308, - 363863883, - 2238507626, - 2591288262, - 3960354826, - 2018244503, - 3477557962, - 1704464098, - 2877525932, - 257901994, - 1816659461, - 4229879381, - 3489093377, - 551393958, - 2537805475, - 1897371090, - 2763877329, - 1996277607, - 2399098915, - 1121715459, - 3614002814, - 2357512223, - 1296599339, - 1879213339, - 2923557284, - 421747258, - 4276033811, - 3304851021, - 1705047204, - 1995359807, - 2423007263, - 196793214, - 2222802126, - 779165875, - 3944609229, - 1600819663, - 958509817, - 1458920477, - 1557043792, - 4017603323, - 1921251172, - 3416801714, - 692142935, - 2175162433, - 1708936620, - 1755875901, - 3212952007, - 3701352111, - 2496150072, - 1852492092, - 3008159071, - 3127938689, - 3924346392, - 2965283356, - 2520654939, - 1887806822, - 4082420582, - 3786680357, - 389645735, - 1102559840, - 3433447458, - 1831088100, - 3654951710, - 3885368661, - 1820711043, - 2316653757, - 859130893, - 284201899, - 2775377843, - 2134107539, - 2511195831, - 1326689378, - 1768277617, - 1227335424, - 3034173561, - 4129615929, - 3071108492, - 2054831300, - 129591603, - 3567725506, - 3214497052, - 453068456, - 59334561, - 3676086223, - 693176829, - 301127476, - 1208826363, - 2521489431, - 611371415, - 1277900119, - 546156606, - 749490027, - 3111892475, - 5222637, - 2717236262, - 428555533, - 1624443954, - 2469656005, - 1567989936, - 947776256, - 597957949, - 3774420439, - 3528075689, - 3000608003, - 979036119, - 4022838460, - 3869851866, - 2585506398, - 3297419369, - 4096822531, - 3785166482, - 1241855345, - 3382265108, - 2071876894, - 3774296598, - 1859545063, - 48690547, - 2448172526, - 508575221, - 3079528144, - 2126566410, - 3719512705, - 3567964726, - 387031529, - 2940653106, - 4072585693, - 2710228746, - 1776950620, - 3178200575, - 159674039, - 386365052, - 1027281953, - 3038099569, - 1048572713, - 1770522600, - 1825291100, - 4197445491, - 2879263647, - 3866415307, - 3743397482, - 2882999645, - 3727700660, - 2370802571, - 4274588782, - 3006185657, - 814187990, - 2829073772, - 2988525058, - 1605832067, - 1320167835, - 3924541678, - 2238305706, - 978901059, - 1333890184, - 3405197759, - ]; - - static const List _envieddatawhatsapp = [ - 2195178360, - 3209380787, - 1354557804, - 3929837324, - 1591686362, - 4071448491, - 3185014859, - 2843870107, - 4138568598, - 4151498094, - 2009638170, - 1788134143, - 692552145, - 1814325105, - 74171970, - 125768852, - 699397337, - 386340881, - 1662558251, - 2127416603, - 585544048, - 1965711084, - 1685593454, - 3809982721, - 1429440362, - 2822552611, - 682862625, - 2900742337, - 1315219120, - 2568147595, - 3433092861, - 2096720568, - 3558503351, - 3030328414, - 3978098826, - 2207533535, - 958706107, - 2404477076, - 4010028235, - 1254763229, - 2880760766, - 4232257144, - 2886911824, - 2223199158, - 1440935719, - 3660652694, - 1159627211, - 2870001523, - 90361903, - 3674387971, - 395337216, - 2431151052, - 372277744, - 24261492, - 3891421272, - 3397667988, - 862485002, - 3961829592, - 2293076753, - 2540450378, - 2677209900, - 432764948, - 1667396225, - 3809917224, - 3301074639, - 1274683318, - 1248313862, - 22214353, - 1711065242, - 2113754092, - 164312237, - 363863853, - 2238507609, - 2591288245, - 3960354866, - 2018244583, - 3477557921, - 1704464009, - 2877525914, - 257902025, - 1816659551, - 4229879319, - 3489093428, - 551394039, - 2537805459, - 1897371046, - 2763877306, - 1996277548, - 2399098966, - 1121715536, - 3614002737, - 2357512261, - 1296599401, - 1879213416, - 2923557355, - 421747276, - 4276033886, - 3304850967, - 1705047269, - 1995359756, - 2423007307, - 196793117, - 2222802106, - 779165915, - 3944609277, - 1600819590, - 958509717, - 1458920543, - 1557043736, - 4017603240, - 1921251077, - 3416801791, - 692142849, - 2175162421, - 1708936655, - 1755875951, - 3212951965, - 3701352172, - 2496150091, - 1852492125, - 3008158987, - 3127938762, - 3924346454, - 2965283407, - 2520654862, - 1887806742, - 4082420480, - 3786680425, - 389645813, - 1102559783, - 3433447536, - 1831088006, - 3654951726, - 3885368615, - 1820711147, - 2316653809, - 859130984, - 284201937, - 2775377917, - 2134107605, - 2511195867, - 1326689294, - 1768277505, - 1227335513, - 3034173499, - 4129615966, - 3071108577, - 2054831274, - 129591637, - 3567725472, - 3214497140, - 453068541, - 59334592, - 3676086197, - 693176750, - 301127534, - 1208826297, - 2521489486, - 611371471, - 1277900083, - 546156620, - 749490015, - 3111892427, - 5222531, - 2717236299, - 428555587, - 1624443910, - 2469655956, - 1567990005, - 947776359, - 597957962, - 3774420402, - 3528075746, - 3000608049, - 979036082, - 4022838477, - 3869851779, - 2585506319, - 3297419271, - 4096822615, - 3785166534, - 1241855295, - 3382265185, - 2071876972, - 3774296687, - 1859545011, - 48690492, - 2448172439, - 508575159, - 3079528123, - 2126566465, - 3719512795, - 3567964788, - 387031512, - 2940653183, - 4072585605, - 2710228807, - 1776950571, - 3178200521, - 159674082, - 386365003, - 1027282032, - 3038099487, - 1048572797, - 1770522554, - 1825291021, - 4197445431, - 2879263719, - 3866415235, - 3743397384, - 2882999560, - 3727700706, - 2370802663, - 4274588703, - 3006185694, - 814187935, - 2829073726, - 2988525142, - 1605832177, - 1320167923, - 3924541583, - 2238305733, - 978901036, - 1333890258, - 3405197819, - ]; - - static final String whatsapp = String.fromCharCodes(List.generate( - _envieddatawhatsapp.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatawhatsapp[i] ^ _enviedkeywhatsapp[i])); - - static const List _enviedkeywhatappID = [ - 989542896, - 1312943830, - 4249780588, - 662508841, - 2421555065, - 459150042, - 3082103575, - 3384119932, - 1156738938, - 1133581554, - 4137434583, - 3461970751, - 1388535488, - 304993762, - 356632629, - 253112440, - ]; - - static const List _envieddatawhatappID = [ - 989542851, - 1312943840, - 4249780565, - 662508816, - 2421555018, - 459150051, - 3082103584, - 3384119887, - 1156738892, - 1133581504, - 4137434607, - 3461970702, - 1388535537, - 304993754, - 356632578, - 253112385, - ]; - - static final String whatappID = String.fromCharCodes(List.generate( - _envieddatawhatappID.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatawhatappID[i] ^ _enviedkeywhatappID[i])); - - static const List _enviedkeyserverPHP = [ - 1596386464, - 4184763474, - 3336799785, - 2511532898, - 1073383562, - 2680352819, - 6213250, - 3028870952, - 3765838608, - 667045674, - 2389685740, - 1318393649, - 3558916360, - 3107718237, - 1941477742, - 3568196280, - 550152871, - 3861822687, - 3516485351, - 3801468140, - 688236691, - 1449136176, - 3798082515, - 523384365, - 3379327226, - 1465957842, - 1673525064, - 3992363005, - ]; - - static const List _envieddataserverPHP = [ - 1596386504, - 4184763430, - 3336799837, - 2511532818, - 1073383673, - 2680352777, - 6213293, - 3028870919, - 3765838705, - 667045722, - 2389685637, - 1318393631, - 3558916475, - 3107718200, - 1941477640, - 3568196317, - 550152917, - 3861822705, - 3516485259, - 3801468037, - 688236773, - 1449136213, - 3798082556, - 523384414, - 3379327135, - 1465957812, - 1673525037, - 3992362895, - ]; - - static final String serverPHP = String.fromCharCodes(List.generate( - _envieddataserverPHP.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataserverPHP[i] ^ _enviedkeyserverPHP[i])); - - static const List _enviedkeyseferAlexandriaServer = [ - 3358548595, - 2512426865, - 4211675632, - 736757099, - 4035970416, - 275731637, - 1556924929, - 229626338, - 2020624319, - 3797804671, - 2355630569, - 2593772477, - 2607101885, - 3119099041, - 2061692935, - 1999953759, - 2475610928, - 2999190758, - 1098196106, - 583762613, - 4184420487, - 2880339752, - 3518760739, - 2052354987, - 3672884492, - 2288706798, - 960697452, - 1237051374, - 4091542731, - 2885104159, - 3611912999, - 3730363361, - 3160794307, - 4128967402, - ]; - - static const List _envieddataseferAlexandriaServer = [ - 3358548507, - 2512426757, - 4211675524, - 736757019, - 4035970307, - 275731599, - 1556924974, - 229626317, - 2020624332, - 3797804570, - 2355630479, - 2593772504, - 2607101903, - 3119099072, - 2061693035, - 1999953722, - 2475610952, - 2999190663, - 1098196196, - 583762641, - 4184420597, - 2880339777, - 3518760770, - 2052354949, - 3672884607, - 2288706695, - 960697368, - 1237051275, - 4091542756, - 2885104236, - 3611913026, - 3730363271, - 3160794278, - 4128967320, - ]; - - static final String seferAlexandriaServer = String.fromCharCodes( - List.generate( - _envieddataseferAlexandriaServer.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataseferAlexandriaServer[i] ^ - _enviedkeyseferAlexandriaServer[i])); - - static const List _enviedkeyseferPaymentServer = [ - 2536778377, - 914589121, - 4294383065, - 4187691988, - 1313379883, - 3096121362, - 2467489969, - 1785568245, - 2023741290, - 1558192803, - 4020226669, - 1287675149, - 3596015768, - 3697427363, - 3726876343, - 3117159911, - 314938860, - 1092767539, - 1505217695, - 714664040, - 2209431449, - 2772347254, - 1664626586, - 298494882, - 975206623, - 415930237, - ]; - - static const List _envieddataseferPaymentServer = [ - 2536778465, - 914589109, - 4294383021, - 4187691940, - 1313379928, - 3096121384, - 2467489950, - 1785568218, - 2023741209, - 1558192838, - 4020226571, - 1287675240, - 3596015850, - 3697427411, - 3726876352, - 3117159881, - 314938783, - 1092767579, - 1505217776, - 714663960, - 2209431478, - 2772347141, - 1664626687, - 298494916, - 975206586, - 415930127, - ]; - - static final String seferPaymentServer = String.fromCharCodes( - List.generate( - _envieddataseferPaymentServer.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataseferPaymentServer[i] ^ _enviedkeyseferPaymentServer[i])); - - static const List _enviedkeyseferCairoServer = [ - 696334204, - 82205298, - 3710476921, - 4092767670, - 2190067332, - 1670086747, - 1381900254, - 1688623029, - 2013479453, - 1171258800, - 2598200499, - 2895700044, - 3077488725, - 121049537, - 882201803, - 2605480560, - 3705670814, - 1493938047, - 193485687, - 1588057356, - 215003196, - 1980543392, - 2593350780, - 696663381, - 1099553710, - 2824766986, - 1273774926, - 389654838, - 2798992030, - 3843201537, - 2443362958, - 2887005875, - 2521267288, - 162322523, - 2110833538, - 2692111954, - 1533322716, - 3324903079, - 77020491, - 116375034, - 3205463677, - 87462844, - 3463747915, - ]; - - static const List _envieddataseferCairoServer = [ - 696334100, - 82205190, - 3710476813, - 4092767686, - 2190067447, - 1670086753, - 1381900273, - 1688623002, - 2013479534, - 1171258837, - 2598200513, - 2895700026, - 3077488688, - 121049523, - 882201829, - 2605480451, - 3705670907, - 1493937945, - 193485586, - 1588057470, - 215003154, - 1980543436, - 2593350677, - 696663331, - 1099553739, - 2824767013, - 1273774909, - 389654867, - 2798992120, - 3843201636, - 2443363068, - 2887005853, - 2521267259, - 162322487, - 2110833643, - 2692111921, - 1533322679, - 3324903048, - 77020472, - 116374943, - 3205463579, - 87462873, - 3463747897, - ]; - - static final String seferCairoServer = String.fromCharCodes( - List.generate( - _envieddataseferCairoServer.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataseferCairoServer[i] ^ _enviedkeyseferCairoServer[i])); - - static const List _enviedkeyseferGizaServer = [ - 1896330948, - 2817987802, - 3416139627, - 1186349963, - 1973864273, - 2421814679, - 3267349214, - 366331080, - 3924450237, - 2494709682, - 361900306, - 609805057, - 2425514810, - 4085913011, - 723237017, - 4232595940, - 1644502061, - 1329346891, - 104712329, - 325616937, - 1372199061, - 939642319, - 2936220426, - 88034485, - 3569749753, - 628084804, - 937654873, - 3155284282, - 4070949377, - 2727816229, - ]; - - static const List _envieddataseferGizaServer = [ - 1896330924, - 2817987758, - 3416139551, - 1186350075, - 1973864226, - 2421814701, - 3267349233, - 366331111, - 3924450266, - 2494709723, - 361900392, - 609805152, - 2425514825, - 4085913046, - 723237119, - 4232595841, - 1644502111, - 1329346917, - 104712422, - 325616967, - 1372199161, - 939642278, - 2936220516, - 88034512, - 3569749718, - 628084791, - 937654844, - 3155284316, - 4070949476, - 2727816279, - ]; - - static final String seferGizaServer = String.fromCharCodes(List.generate( - _envieddataseferGizaServer.length, - (int i) => i, - growable: false, - ).map( - (int i) => _envieddataseferGizaServer[i] ^ _enviedkeyseferGizaServer[i])); - - static const List _enviedkeychatGPTkeySeferNew = [ - 3466533538, - 2038222324, - 424905249, - 657497677, - 318605853, - 25823056, - 2122702942, - 3276918720, - 229974915, - 313873793, - 66707537, - 2125062029, - 418011015, - 3286523022, - 3874869365, - 1738222491, - 1832141258, - 3991814487, - 1394206019, - 1362842969, - 2048833378, - 549182735, - 2582344274, - 3862745041, - 485631606, - 3396351541, - 3395759411, - 3923657519, - 2485452191, - 3450575002, - 51239110, - 701696952, - 169855577, - 2101939952, - 386881292, - 3931378865, - 1788305527, - 2140319768, - 915405024, - 2168797947, - 965441877, - 864489716, - 2459344062, - 4073375293, - 2027821373, - 3854161652, - 4247545755, - 2368242223, - 4156535058, - 4190459134, - 146823609, - 274418455, - 926108913, - 1213802406, - 1505340403, - 4248083829, - 283157476, - 1905871628, - ]; - - static const List _envieddatachatGPTkeySeferNew = [ - 3466533592, - 2038222227, - 424905228, - 657497623, - 318605865, - 25823039, - 2122702879, - 3276918666, - 229975008, - 313873856, - 66707459, - 2125062082, - 418011104, - 3286523072, - 3874869293, - 1738222577, - 1832141229, - 3991814437, - 1394205958, - 1362842896, - 2048833335, - 549182775, - 2582344244, - 3862744986, - 485631541, - 3396351500, - 3395759467, - 3923657565, - 2485452263, - 3450575101, - 51239059, - 701697021, - 169855597, - 2101939873, - 386881400, - 3931378883, - 1788305413, - 2140319860, - 915404945, - 2168797898, - 965441836, - 864489629, - 2459344075, - 4073375301, - 2027821325, - 3854161566, - 4247545815, - 2368242204, - 4156535158, - 4190459063, - 146823661, - 274418500, - 926108841, - 1213802452, - 1505340331, - 4248083737, - 283157414, - 1905871712, - ]; - - static final String chatGPTkeySeferNew = String.fromCharCodes( - List.generate( - _envieddatachatGPTkeySeferNew.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatachatGPTkeySeferNew[i] ^ _enviedkeychatGPTkeySeferNew[i])); - - static const List _enviedkeycohere = [ - 461114257, - 1909279421, - 2571976523, - 3833424498, - 4108484119, - 2763189153, - 1555394195, - 768191425, - 2583342941, - 2986819785, - 3554360607, - 904530186, - 3674480823, - 511161046, - 2903018933, - 2034412479, - 1318265865, - 210960433, - 2648764878, - 1081389400, - 815968213, - 1680999960, - 3705188975, - 3217580678, - 3395565768, - 3707066727, - 2457012709, - 3196855878, - 1223377586, - 4269901275, - 2145367579, - 2084645856, - 919445276, - 887658305, - 39983299, - 2766187929, - 3565171062, - 3226295112, - 2524509497, - 4176116153, - 3325311635, - 2760789061, - 3596276175, - 2939813184, - 3655446295, - 139494125, - 3949175622, - ]; - - static const List _envieddatacohere = [ - 461114320, - 1909279432, - 2571976487, - 3833424389, - 4108484211, - 2763189145, - 1555394282, - 768191476, - 2583342862, - 2986819737, - 3554360648, - 904530277, - 3674480836, - 511161062, - 2903018973, - 2034412533, - 1318265953, - 210960477, - 2648764809, - 1081389416, - 815968161, - 1681000055, - 3705188922, - 3217580768, - 3395565808, - 3707066624, - 2457012650, - 3196855854, - 1223377639, - 4269901198, - 2145367657, - 2084645776, - 919445370, - 887658356, - 39983250, - 2766187947, - 3565170978, - 3226295064, - 2524509524, - 4176116207, - 3325311700, - 2760789021, - 3596276157, - 2939813144, - 3655446395, - 139494063, - 3949175594, - ]; - - static final String cohere = String.fromCharCodes(List.generate( - _envieddatacohere.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatacohere[i] ^ _enviedkeycohere[i])); - - static const List _enviedkeyclaudeAiAPI = [ - 3865518948, - 3691370737, - 153446920, - 2831596722, - 276220260, - 3835327173, - 2029631399, - 1751783204, - 3546570644, - 3223277567, - 2249520572, - 3021181899, - 4217743719, - 3054127439, - 3053149162, - 3407318902, - 2698972141, - 1463864797, - 3473787449, - 3149571604, - 2552911671, - 926290749, - 384126610, - 1186214951, - 2315825860, - 3624681797, - 1335410838, - 1725266679, - 3926100668, - 3167871771, - 155899774, - 3020911388, - 3210585518, - 1945161006, - 3469755727, - 223619508, - 811556885, - 3406051438, - 1257144806, - 512409761, - 2709697942, - 82036611, - 3464715523, - 1487923078, - 2660912469, - 2123828998, - 3927632976, - 3115047666, - 2387112906, - 3451946414, - 2038358785, - 656670454, - 1670023080, - 3545160744, - 3558280203, - 2680808716, - 1863700488, - 3991492399, - 3358198061, - 3173780453, - 974696064, - 2087721129, - 121537675, - 707663622, - 2009141519, - 3454852459, - 1387808088, - 1239033534, - 4184576603, - 458014798, - 2011840473, - 1826021233, - 776086541, - 1101947340, - 565508932, - 405292776, - 1312787214, - 656794198, - 290298861, - 1848376527, - 3931415046, - 2513478435, - 1212901434, - 4115540979, - 88458918, - 2791271761, - 1220140566, - 3518763645, - 1382833174, - 746086992, - 1546012069, - 1083122868, - 3393640872, - 2746504074, - 532953435, - 1027840401, - 2181683573, - 3123978849, - 3599977697, - 3838316380, - 173045403, - 3104850093, - 1404873562, - 3674449953, - 3614418559, - 2511654960, - 1427723575, - 121766171, - 3317988018, - 2951678773, - 4259760746, - 2956466636, - 684482035, - 387203139, - 1017126403, - ]; - - static const List _envieddataclaudeAiAPI = [ - 3865518878, - 3691370646, - 153446949, - 2831596739, - 276220166, - 3835327142, - 2029631370, - 1751783253, - 3546570722, - 3223277456, - 2249520527, - 3021181938, - 4217743627, - 3054127458, - 3053149074, - 3407318817, - 2698972066, - 1463864741, - 3473787504, - 3149571667, - 2552911680, - 926290794, - 384126662, - 1186215016, - 2315825854, - 3624681734, - 1335410896, - 1725266613, - 3926100690, - 3167871826, - 155899687, - 3020911439, - 3210585573, - 1945161061, - 3469755687, - 223619538, - 811556972, - 3406051348, - 1257144761, - 512409834, - 2709697984, - 82036674, - 3464715637, - 1487923188, - 2660912413, - 2123829035, - 3927632998, - 3115047597, - 2387112958, - 3451946484, - 2038358852, - 656670396, - 1670023140, - 3545160734, - 3558280243, - 2680808779, - 1863700567, - 3991492478, - 3358198127, - 3173780397, - 974696114, - 2087721119, - 121537764, - 707663715, - 2009141595, - 3454852388, - 1387808021, - 1239033587, - 4184576564, - 458014751, - 2011840428, - 1826021142, - 776086580, - 1101947271, - 565508913, - 405292711, - 1312787300, - 656794172, - 290298790, - 1848376476, - 3931415126, - 2513478524, - 1212901499, - 4115540935, - 88458997, - 2791271778, - 1220140613, - 3518763560, - 1382833234, - 746086972, - 1546012103, - 1083122892, - 3393640954, - 2746504115, - 532953407, - 1027840484, - 2181683491, - 3123978779, - 3599977614, - 3838316301, - 173045430, - 3104850144, - 1404873521, - 3674450041, - 3614418464, - 2511655013, - 1427723622, - 121766218, - 3317988067, - 2951678829, - 4259760664, - 2956466580, - 684481951, - 387203073, - 1017126511, - ]; - - static final String claudeAiAPI = String.fromCharCodes(List.generate( - _envieddataclaudeAiAPI.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataclaudeAiAPI[i] ^ _enviedkeyclaudeAiAPI[i])); - - static const List _enviedkeypayPalClientId = [ - 1417678867, - 859809472, - 1893866620, - 76147435, - 2344469715, - 27085632, - 1195225715, - 3334407434, - 2270571526, - 3830243977, - 2841189154, - 1406375990, - 2428043550, - 3394915516, - 1529631236, - 3192457920, - 904524636, - 2772367473, - 3581045416, - 3218543009, - 3102449874, - 2543684227, - 600303817, - 1891847041, - 856826713, - 1049355133, - 3672953571, - 389925974, - 55813972, - 3030235698, - 3435846944, - 3855759220, - 760590774, - 2624080268, - 3012415415, - 2143075304, - 3295633911, - 66346832, - 648991051, - 3718256520, - 10021964, - 4280365731, - 2978489502, - 1779750536, - 821551981, - 3363875568, - 3149066482, - 3879034467, - 2339143794, - 590415096, - 1499871715, - 2648064182, - 585275144, - 3000069715, - 4237559885, - 2787035513, - 200871348, - 3036013234, - 1460627235, - 3867857809, - 31809830, - 579752314, - 3008074094, - 502211605, - 269519034, - 3074850116, - 4019892143, - 382952498, - 3557029364, - 2516706871, - 3143765389, - 397362660, - 1352541903, - 2626325733, - 4165782338, - 2706947015, - 2891622639, - 3816666629, - 2977145829, - 2858774920, - 2442731139, - 1271073831, - 3394814892, - 2823537888, - 1253144115, - 1492966545, - 3940162498, - ]; - - static const List _envieddatapayPalClientId = [ - 1417678914, - 859809409, - 1893866544, - 76147346, - 2344469694, - 27085612, - 1195225621, - 3334407492, - 2270571599, - 3830244028, - 2841189238, - 1406376012, - 2428043626, - 3394915464, - 1529631351, - 3192457965, - 904524581, - 2772367362, - 3581045447, - 3218543067, - 3102449892, - 2543684341, - 600303757, - 1891847093, - 856826630, - 1049355027, - 3672953490, - 389925902, - 55813988, - 3030235745, - 3435847029, - 3855759104, - 760590813, - 2624080335, - 3012415464, - 2143075225, - 3295633838, - 66346758, - 648991078, - 3718256605, - 10021931, - 4280365768, - 2978489515, - 1779750639, - 821551884, - 3363875517, - 3149066413, - 3879034459, - 2339143720, - 590415061, - 1499871624, - 2648064209, - 585275196, - 3000069663, - 4237559928, - 2787035466, - 200871391, - 3036013194, - 1460627318, - 3867857892, - 31809886, - 579752229, - 3008074074, - 502211711, - 269519103, - 3074850067, - 4019892215, - 382952566, - 3557029279, - 2516706937, - 3143765501, - 397362620, - 1352541832, - 2626325686, - 4165782293, - 2706946967, - 2891622559, - 3816666700, - 2977145759, - 2858774988, - 2442731205, - 1271073919, - 3394814942, - 2823537848, - 1253144159, - 1492966611, - 3940162478, - ]; - - static final String payPalClientId = String.fromCharCodes(List.generate( - _envieddatapayPalClientId.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatapayPalClientId[i] ^ _enviedkeypayPalClientId[i])); - - static const List _enviedkeypayPalSecret = [ - 305307351, - 3871644781, - 689366590, - 1145404139, - 2738959721, - 2603602599, - 1954834424, - 248616681, - 2944246499, - 151733761, - 2982419777, - 3117076764, - 1066830186, - 822987100, - 187896188, - 78534598, - 1036683290, - 75687099, - 3120225806, - 2773389544, - 1767958175, - 1913249305, - 3440830193, - 846020206, - 184611923, - 3422454224, - 666548823, - 2890272748, - 311826648, - 656894851, - 1015140947, - 944766913, - 2824039557, - 1729684740, - 3823670423, - 2340377013, - 3488764746, - 4214065147, - 3592570438, - 2636452054, - 2933103145, - 655748206, - 3740569120, - 1506594710, - 2344840654, - 3783597206, - 1177928127, - 1803755571, - 3706364536, - 329851065, - 405114068, - 4165888009, - 1966619058, - 2914286955, - 4199143837, - 3319499606, - 1484938375, - 2281390537, - 3699915191, - 13784010, - 1905775355, - 2964823272, - 2833850347, - 2710162265, - 177271164, - 3402747143, - 643614458, - 2591204193, - 4248973377, - 3395135148, - 2934150319, - 1845856018, - 2286304688, - 1694302679, - 3169934074, - 3279088172, - 4149021202, - 2370967428, - 2749475055, - 2468489206, - 181482439, - 2194607960, - 2595544111, - 3739497023, - 510497184, - 2051497186, - ]; - - static const List _envieddatapayPalSecret = [ - 305307293, - 3871644719, - 689366655, - 1145404074, - 2738959647, - 2603602646, - 1954834354, - 248616632, - 2944246436, - 151733844, - 2982419762, - 3117076823, - 1066830126, - 822987116, - 187896102, - 78534572, - 1036683378, - 75687055, - 3120225861, - 2773389442, - 1767958266, - 1913249402, - 3440830091, - 846020118, - 184611893, - 3422454162, - 666548753, - 2890272660, - 311826677, - 656894896, - 1015140971, - 944766866, - 2824039649, - 1729684840, - 3823670517, - 2340377084, - 3488764697, - 4214065102, - 3592570480, - 2636451968, - 2933103227, - 655748131, - 3740569112, - 1506594776, - 2344840586, - 3783597296, - 1177928154, - 1803755525, - 3706364437, - 329851091, - 405114009, - 4165888108, - 1966619112, - 2914286881, - 4199143925, - 3319499544, - 1484938443, - 2281390467, - 3699915218, - 13783969, - 1905775310, - 2964823216, - 2833850252, - 2710162184, - 177271103, - 3402747254, - 643614385, - 2591204130, - 4248973321, - 3395135192, - 2934150397, - 1845856116, - 2286304646, - 1694302618, - 3169933968, - 3279088254, - 4149021291, - 2370967465, - 2749474953, - 2468489166, - 181482399, - 2194607914, - 2595544183, - 3739497043, - 510497250, - 2051497102, - ]; - - static final String payPalSecret = String.fromCharCodes(List.generate( - _envieddatapayPalSecret.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatapayPalSecret[i] ^ _enviedkeypayPalSecret[i])); - - static const List _enviedkeygeminiApi = [ - 3690096455, - 1417732909, - 2764692064, - 3433425888, - 1659025258, - 2338551706, - 3239196813, - 3861595826, - 613546669, - 2587147504, - 2564872744, - 1394577429, - 2282407548, - 2183761185, - 4147587143, - 307911120, - 3228520373, - 863876420, - 562835940, - 3083656154, - 3581237596, - 4262756485, - 2080755889, - 1417423534, - 3270140256, - 1119288214, - 2335430493, - 2399828377, - 3105418678, - 3054840816, - 64685077, - 1056626707, - 1383961575, - 3919929174, - 2365849596, - 3191106216, - 1905457454, - 3855851362, - 1167805280, - 2040371101, - 2604217690, - 2712993575, - 3780772931, - 2641420901, - 603130156, - 3310724309, - ]; - - static const List _envieddatageminiApi = [ - 3690096406, - 1417732962, - 2764691981, - 3433425809, - 1659025200, - 2338551785, - 3239196892, - 3861595883, - 613546688, - 2587147456, - 2564872720, - 1394577507, - 2282407440, - 2183761262, - 4147587126, - 307911098, - 3228520444, - 863876467, - 562835855, - 3083656118, - 3581237514, - 4262756559, - 2080755927, - 1417423576, - 3270140208, - 1119288226, - 2335430410, - 2399828443, - 3105418736, - 3054840757, - 64685178, - 1056626806, - 1383961482, - 3919929148, - 2365849499, - 3191106257, - 1905457437, - 3855851355, - 1167805270, - 2040371188, - 2604217602, - 2712993621, - 3780772891, - 2641420809, - 603130222, - 3310724281, - ]; - - static final String geminiApi = String.fromCharCodes(List.generate( - _envieddatageminiApi.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatageminiApi[i] ^ _enviedkeygeminiApi[i])); - - static const List _enviedkeygeminiApiMasa = [ - 3772131040, - 1688514242, - 3407103765, - 670407426, - 4245831149, - 1144564359, - 3133842252, - 2063063350, - 582842987, - 5693210, - 290490415, - 33367945, - 3516177805, - 889001519, - 4248627504, - 4255672262, - 3162735609, - 1898084084, - 3094835894, - 1217020613, - 2737831259, - 1746746299, - 2249501909, - 1281780688, - 1053716075, - 2903755646, - 299589947, - 1541045903, - 2814109884, - 2513653826, - 3410756219, - 2455411323, - 1199743729, - 4167850945, - 2855776277, - 959159085, - 356925827, - 1747777173, - 394036049, - 3414569226, - 361478210, - 2420080300, - 2520147016, - 2630978853, - 2043642686, - 3752728673, - ]; - - static const List _envieddatageminiApiMasa = [ - 3772130993, - 1688514189, - 3407103864, - 670407539, - 4245831095, - 1144564468, - 3133842205, - 2063063423, - 582842907, - 5693310, - 290490466, - 33367997, - 3516177871, - 889001597, - 4248627523, - 4255672205, - 3162735508, - 1898083989, - 3094835954, - 1217020559, - 2737831188, - 1746746347, - 2249501922, - 1281780660, - 1053716017, - 2903755534, - 299589902, - 1541045922, - 2814109919, - 2513653876, - 3410756149, - 2455411244, - 1199743639, - 4167850914, - 2855776381, - 959159066, - 356925907, - 1747777236, - 394036029, - 3414569307, - 361478170, - 2420080350, - 2520146960, - 2630978889, - 2043642748, - 3752728589, - ]; - - static final String geminiApiMasa = String.fromCharCodes(List.generate( - _envieddatageminiApiMasa.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatageminiApiMasa[i] ^ _enviedkeygeminiApiMasa[i])); - - static const List _enviedkeyagoraAppId = [ - 3832317263, - 824600247, - 3080315056, - 3900931085, - 3473146124, - 779342915, - 2106289893, - 4205358956, - 609217799, - 1622368308, - 1521325953, - 3605300568, - 1579213160, - 991885568, - 1524540163, - 2447823791, - 1013931428, - 918937707, - 3682127949, - 1050456304, - 3920967779, - 2171786206, - 1108080459, - 3070563345, - 2197592583, - 746902908, - 2210288744, - 1032466985, - 3021648317, - 126989861, - 2544891506, - 3009303115, - 2937548858, - 683882045, - 3936767547, - 370481240, - 3508452786, - 3339342045, - 3498572810, - ]; - - static const List _envieddataagoraAppId = [ - 3832317304, - 824600198, - 3080315016, - 3900931125, - 3473146172, - 779342885, - 2106289879, - 4205358854, - 609217841, - 1622368263, - 1521326007, - 3605300535, - 1579213149, - 991885616, - 1524540218, - 2447823813, - 1013931414, - 918937695, - 3682127924, - 1050456261, - 3920967761, - 2171786215, - 1108080511, - 3070563365, - 2197592639, - 746902860, - 2210288657, - 1032466970, - 3021648269, - 126989904, - 2544891466, - 3009303167, - 2937548802, - 683882085, - 3936767561, - 370481152, - 3508452830, - 3339341983, - 3498572902, - ]; - - static final String agoraAppId = String.fromCharCodes(List.generate( - _envieddataagoraAppId.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataagoraAppId[i] ^ _enviedkeyagoraAppId[i])); - - static const List _enviedkeyagoraAppCertificate = [ - 1345790685, - 277008906, - 712387213, - 2289188027, - 1227355014, - 1836280768, - 1155062051, - 3431414770, - 3380335678, - 2131685751, - 65917614, - 2003693415, - 1644478452, - 994286877, - 2389817048, - 4038511669, - 2184300421, - 3864603606, - 1080502774, - 36888323, - 1215888920, - 1185478675, - 3510739353, - 3980684621, - 1870632155, - 2213035926, - 2857261249, - 3913977985, - 1356518905, - 753962228, - 734893468, - 3696638500, - 830484066, - 2698409883, - 1505861823, - 3692474140, - 21414369, - 1558490013, - 2378350697, - 3707537020, - ]; - - static const List _envieddataagoraAppCertificate = [ - 1345790647, - 277008955, - 712387258, - 2289188042, - 1227355071, - 1836280820, - 1155062039, - 3431414663, - 3380335626, - 2131685710, - 65917597, - 2003693406, - 1644478404, - 994286967, - 2389817008, - 4038511684, - 2184300466, - 3864603619, - 1080502734, - 36888438, - 1215888937, - 1185478693, - 3510739373, - 3980684660, - 1870632175, - 2213035938, - 2857261305, - 3913978096, - 1356518859, - 753962125, - 734893482, - 3696638556, - 830483972, - 2698409966, - 1505861863, - 3692474222, - 21414329, - 1558490097, - 2378350635, - 3707536912, - ]; - - static final String agoraAppCertificate = String.fromCharCodes( - List.generate( - _envieddataagoraAppCertificate.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataagoraAppCertificate[i] ^ - _enviedkeyagoraAppCertificate[i])); - - static const List _enviedkeypayPalClientIdLive = [ - 302903440, - 3292875835, - 2362055895, - 3585667840, - 743482780, - 1422113737, - 1444303642, - 3269260833, - 4164497487, - 1298032106, - 1671393889, - 532219890, - 948494266, - 2106157317, - 1441779883, - 3002736248, - 1545429168, - 751491591, - 1596665175, - 2684278206, - 3850460631, - 3040111389, - 2640275917, - 2251019271, - 1643537098, - 988976877, - 2600502720, - 2235958487, - 705192076, - 72114598, - 744847749, - 1201199910, - 847784818, - 3608902160, - 203114023, - 3337169304, - 837924028, - 2762310474, - 1520857522, - 3902653986, - 2364086535, - 1531387574, - 870549805, - 3403890842, - 782199654, - 603141943, - 567628668, - 2645511554, - 4091072485, - 1710195964, - 1164202158, - 2346576506, - 2689896013, - 3199516072, - 1284610630, - 705765155, - 2360233961, - 3772968831, - 2400775783, - 38939757, - 1165307680, - 3355269317, - 3723627239, - 924036739, - 553674211, - 113509580, - 4047501928, - 211915725, - 1380725891, - 1019477356, - 2473690813, - 207989982, - 669022980, - 3826644819, - 1184902078, - 3014826049, - 983172125, - 2389068590, - 2597841182, - 2566350736, - 1112051600, - 652592991, - 2989213427, - 689608253, - 1133723955, - 3001269612, - 1950515532, - ]; - - static const List _envieddatapayPalClientIdLive = [ - 302903489, - 3292875873, - 2362055825, - 3585667947, - 743482870, - 1422113672, - 1444303733, - 3269260923, - 4164497449, - 1298032045, - 1671393813, - 532219804, - 948494301, - 2106157387, - 1441779928, - 3002736157, - 1545429186, - 751491691, - 1596665147, - 2684278152, - 3850460581, - 3040111406, - 2640275886, - 2251019332, - 1643537151, - 988976859, - 2600502680, - 2235958459, - 705192125, - 72114645, - 744847827, - 1201199978, - 847784739, - 3608902267, - 203114057, - 3337169325, - 837924056, - 2762310407, - 1520857552, - 3902654043, - 2364086626, - 1531387604, - 870549829, - 3403890912, - 782199596, - 603141998, - 567628617, - 2645511611, - 4091072416, - 1710195885, - 1164202141, - 2346576402, - 2689895991, - 3199516063, - 1284610591, - 705765211, - 2360233864, - 3772968762, - 2400775702, - 38939688, - 1165307748, - 3355269276, - 3723627191, - 924036823, - 553674166, - 113509514, - 4047501835, - 211915676, - 1380725972, - 1019477277, - 2473690827, - 207989947, - 669023060, - 3826644786, - 1184902127, - 3014826100, - 983172168, - 2389068644, - 2597841236, - 2566350790, - 1112051650, - 652592903, - 2989213313, - 689608293, - 1133723999, - 3001269550, - 1950515488, - ]; - - static final String payPalClientIdLive = String.fromCharCodes( - List.generate( - _envieddatapayPalClientIdLive.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatapayPalClientIdLive[i] ^ _enviedkeypayPalClientIdLive[i])); - - static const List _enviedkeypayPalSecretLive = [ - 695171155, - 2676646885, - 1862843345, - 3894515463, - 210448382, - 2644734685, - 652425667, - 3217376634, - 2924563208, - 1057937010, - 1241730561, - 3137465678, - 4006937194, - 4064330582, - 2756599958, - 23442622, - 750678129, - 1695865750, - 2651221535, - 1293424022, - 1108227265, - 2275950844, - 2170279363, - 1846839803, - 1630407691, - 4005371051, - 242932876, - 2923859209, - 3249150789, - 3306462476, - 1988415613, - 2496474295, - 4184579276, - 4282302872, - 97152587, - 4014492647, - 1793443824, - 4252275162, - 3167172389, - 997279167, - 3574485750, - 2385395859, - 2793682355, - 3851273543, - 2378925554, - 873578708, - 1873884350, - 991729440, - 2853049240, - 3733600232, - 3073646637, - 2552993454, - 4021513788, - 3719980103, - 267850051, - 2513587800, - 3006719392, - 995741028, - 2798205499, - 1606705869, - 2183257014, - 4258375452, - 785961064, - 3774608, - 3605921531, - 2433428076, - 1478600213, - 1631595295, - 1831698129, - 1447878570, - 2151237769, - 4126451914, - 3206123371, - 3709425729, - 3721487284, - 863078982, - 4272753026, - 3234564696, - 247470280, - 1897178236, - 1775541971, - 3704090925, - 2253986849, - 2833362075, - 1351938944, - 215728786, - 3308847238, - 3374445957, - ]; - - static const List _envieddatapayPalSecretLive = [ - 695171097, - 2676646836, - 1862843285, - 3894515526, - 210448298, - 2644734636, - 652425640, - 3217376529, - 2924563302, - 1057936950, - 1241730663, - 3137465639, - 4006937132, - 4064330534, - 2756600019, - 23442687, - 750678079, - 1695865760, - 2651221551, - 1293424093, - 1108227203, - 2275950792, - 2170279347, - 1846839740, - 1630407803, - 4005371119, - 242932973, - 2923859267, - 3249150767, - 3306462581, - 1988415500, - 2496474357, - 4184579213, - 4282302972, - 97152626, - 4014492557, - 1793443720, - 4252275095, - 3167172455, - 997279215, - 3574485638, - 2385395945, - 2793682404, - 3851273490, - 2378925507, - 873578628, - 1873884303, - 991729483, - 2853049259, - 3733600160, - 3073646620, - 2552993476, - 4021513830, - 3719980079, - 267850002, - 2513587762, - 3006719438, - 995741011, - 2798205448, - 1606705800, - 2183257086, - 4258375535, - 785960995, - 3774657, - 3605921429, - 2433427981, - 1478600226, - 1631595307, - 1831698049, - 1447878546, - 2151237881, - 4126451955, - 3206123347, - 3709425705, - 3721487315, - 863078921, - 4272753132, - 3234564629, - 247470249, - 1897178155, - 1775541891, - 3704091002, - 2253986937, - 2833362153, - 1351939032, - 215728894, - 3308847300, - 3374446057, - ]; - - static final String payPalSecretLive = String.fromCharCodes( - List.generate( - _envieddatapayPalSecretLive.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatapayPalSecretLive[i] ^ _enviedkeypayPalSecretLive[i])); - - static const List _enviedkeyintegrationIdPayMob = [ - 1453771218, - 99799846, - 2120053699, - 1415147158, - 1481111911, - 2831947708, - 408680540, - 1381239986, - 1498235397, - 385457610, - 2932459519, - 3703450582, - 1559665575, - ]; - - static const List _envieddataintegrationIdPayMob = [ - 1453771234, - 99799828, - 2120053744, - 1415147169, - 1481111889, - 2831947663, - 408680556, - 1381240042, - 1498235511, - 385457554, - 2932459411, - 3703450516, - 1559665611, - ]; - - static final String integrationIdPayMob = String.fromCharCodes( - List.generate( - _envieddataintegrationIdPayMob.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataintegrationIdPayMob[i] ^ - _enviedkeyintegrationIdPayMob[i])); - - static const List _enviedkeypasswordPayMob = [ - 2651214382, - 2543188177, - 47156322, - 800364083, - 4209799751, - 676623082, - 832144016, - 4270956576, - 1996245296, - 2249932344, - 467292801, - 1298438647, - 1763820894, - 568046576, - 1851455399, - 3871675882, - 1470528502, - 2794214989, - 560206516, - 3419180189, - 3875504829, - 3938504646, - ]; - - static const List _envieddatapasswordPayMob = [ - 2651214409, - 2543188113, - 47156236, - 800364120, - 4209799683, - 676623064, - 832144051, - 4270956569, - 1996245257, - 2249932371, - 467292832, - 1298438559, - 1763820826, - 568046511, - 1851455369, - 3871675805, - 1470528430, - 2794214975, - 560206572, - 3419180273, - 3875504895, - 3938504618, - ]; - - static final String passwordPayMob = String.fromCharCodes(List.generate( - _envieddatapasswordPayMob.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatapasswordPayMob[i] ^ _enviedkeypasswordPayMob[i])); - - static const List _enviedkeyusernamePayMob = [ - 1143635967, - 3737213395, - 2565222656, - 489734030, - 3993568495, - 3599499068, - 4017240137, - 1318040604, - 2921759128, - 784177800, - 1318608577, - 2398722427, - 1340469675, - 2838957610, - 1566515748, - 1431741204, - 2301052706, - ]; - - static const List _envieddatausernamePayMob = [ - 1143635916, - 3737213412, - 2565222707, - 489734079, - 3993568470, - 3599499021, - 4017240185, - 1318040616, - 2921759144, - 784177853, - 1318608627, - 2398722339, - 1340469721, - 2838957682, - 1566515784, - 1431741270, - 2301052750, - ]; - - static final String usernamePayMob = String.fromCharCodes(List.generate( - _envieddatausernamePayMob.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatausernamePayMob[i] ^ _enviedkeyusernamePayMob[i])); - - static const List _enviedkeypayMobApikey = [ - 877946335, - 990571313, - 23816359, - 1823019159, - 2064816345, - 4090654266, - 1795448028, - 3436525757, - 1774958597, - 3699700862, - 1989799618, - 3365842929, - 3970531925, - 1296526345, - 1133951785, - 3590514719, - 3588530864, - 2622815636, - 4088730428, - 3133503776, - 3327497261, - 1474374901, - 3583397553, - 2330124316, - 171747989, - 3917404514, - 2233312564, - 3686539197, - 2245010592, - 566840474, - 489723560, - 1821123120, - 1824596000, - 4161653166, - 2653471133, - 318268533, - 3370331868, - 553413114, - 611455261, - 3605201835, - 2963126191, - 1062589215, - 1615167122, - 2707234350, - 4199759030, - 2948947655, - 1160211393, - 1700873236, - 1938002794, - 3374199317, - 3465724160, - 4294693417, - 3911595922, - 2210748827, - 1852099657, - 2147815756, - 1549272082, - 4034263503, - 3707579325, - 748137275, - 3086794963, - 1789977551, - 1252684202, - 1270032683, - 1794697737, - 2993515719, - 1916813237, - 1630188210, - 3312639584, - 2938764538, - 1788738213, - 442600113, - 769817879, - 3388808280, - 1953112730, - 3607334401, - 1772739524, - 2065897249, - 1861719065, - 3423257774, - 3276171255, - 1891388347, - 4036029556, - 787258637, - 3361104153, - 1995069332, - 338144944, - 3577027112, - 3861579086, - 53129487, - 2318131426, - 2851713162, - 3889534770, - 4188327589, - 1119114777, - 3044759775, - 2125934961, - 674982934, - 2455174062, - 1358105253, - 2046998389, - 3899740613, - 3196420711, - 2814940357, - 2472907957, - 3349364562, - 3863504114, - 210642177, - 1266598270, - 3385216451, - 2302666667, - 2769963737, - 2278237766, - 2778874414, - 1304585274, - 334500021, - 3841074701, - 405695381, - 3178606810, - 911292980, - 3560803097, - 2698467315, - 2138540760, - 1708488625, - 1536010377, - 1740744300, - 3554944638, - 1338537760, - 153759107, - 2392258583, - 2517325729, - 1562137179, - 261181330, - 4057344068, - 3606326413, - 43284431, - 2576883894, - 867864581, - 47851640, - 2812786467, - 973176921, - 225989476, - 3632475970, - 3393105632, - 4119873963, - 305548531, - 1700626973, - 3305100287, - 213266753, - 2645964560, - 1249400330, - 1028029236, - 1979363583, - 352332716, - 2959904965, - 1222014745, - 335719055, - 3034844941, - 226441292, - 1926875436, - 3577159923, - 1775113424, - 3199679251, - 3830679614, - 3983650981, - 2954990804, - 1144108644, - 4193816731, - 2129708087, - 2232005629, - 509576731, - 2804010237, - 3348342995, - 3569501774, - 2480116438, - 3951430678, - 3690246575, - 4096388324, - 3733757497, - 800782411, - 2059710812, - 871457814, - 3428515992, - 1203485575, - 1966769807, - 874102638, - 3987488303, - 4263596618, - 3676547691, - 1030709040, - 3714933910, - 3610741808, - 1152296636, - 369443622, - 2966607033, - 2162159764, - 3673440552, - 735430115, - 588154192, - 65278090, - 645065734, - 2597761550, - 3763337418, - 3659667110, - 1631259412, - 2455931148, - 2718813596, - 2661144102, - 899770730, - 3944823544, - 1758731207, - 2967039660, - 1120523741, - 799682919, - 105499444, - 2163862354, - 3499198809, - 1366869290, - 3064414018, - 2952589477, - 4007837456, - 3407273905, - 94642333, - 2873343743, - 3785938068, - 51406210, - 1548429565, - 2243336746, - 4282623484, - 1996588028, - 689083797, - 401092822, - 1365669879, - 1860665063, - 3793892048, - 1338061163, - 1710252589, - 4182186618, - 3248149368, - 1401531703, - 2816626795, - 3034314057, - 3141649374, - 828841320, - 3911654567, - 25345696, - 3800395331, - 2960398276, - 3279834243, - 190002666, - 4163701276, - 1729602162, - 2048511200, - 463396109, - 3003408720, - 540446820, - 1847801397, - 641291196, - 851056219, - 747867377, - 1352886168, - 4277298099, - 2190596762, - 3330112223, - 835337040, - 3071117778, - 4057287278, - 2360094621, - 2955739871, - 3874768359, - 657711989, - 1291344580, - 3708415956, - 1542001892, - 1699492760, - 2559897189, - 363791616, - 2724635379, - 3720457045, - 4092067985, - 3528369260, - 4273739568, - 2810497199, - 1498459680, - 146421583, - 686612339, - ]; - - static const List _envieddatapayMobApikey = [ - 877946258, - 990571381, - 23816405, - 1823019216, - 2064816296, - 4090654321, - 1795447961, - 3436525802, - 1774958678, - 3699700815, - 1989799600, - 3365842855, - 3970531876, - 1296526433, - 1133951811, - 3590514808, - 3588530903, - 2622815708, - 4088730442, - 3133503845, - 3327497341, - 1474374833, - 3583397575, - 2330124364, - 171748095, - 3917404456, - 2233312515, - 3686539211, - 2245010682, - 566840542, - 489723626, - 1821123189, - 1824596056, - 4161653212, - 2653471186, - 318268482, - 3370331791, - 553413065, - 611455327, - 3605201902, - 2963126253, - 1062589304, - 1615167200, - 2707234370, - 4199759056, - 2948947602, - 1160211382, - 1700873280, - 1938002731, - 3374199334, - 3465724265, - 4294693404, - 3911595968, - 2210748917, - 1852099609, - 2147815801, - 1549272136, - 4034263457, - 3707579339, - 748137300, - 3086794911, - 1789977596, - 1252684263, - 1270032665, - 1794697818, - 2993515774, - 1916813255, - 1630188279, - 3312639522, - 2938764445, - 1788738263, - 442600157, - 769817945, - 3388808204, - 1953112830, - 3607334500, - 1772739516, - 2065897321, - 1861719084, - 3423257822, - 3276171171, - 1891388395, - 4036029458, - 787258682, - 3361104215, - 1995069406, - 338144962, - 3577027166, - 3861579063, - 53129534, - 2318131344, - 2851713263, - 3889534824, - 4188327663, - 1119114863, - 3044759790, - 2125934885, - 674983032, - 2455174041, - 1358105311, - 2046998291, - 3899740658, - 3196420625, - 2814940305, - 2472908028, - 3349364502, - 3863504011, - 210642294, - 1266598164, - 3385216395, - 2302666700, - 2769963752, - 2278237701, - 2778874393, - 1304585334, - 334500048, - 3841074804, - 405695398, - 3178606818, - 911293052, - 3560803149, - 2698467255, - 2138540705, - 1708488703, - 1536010440, - 1740744287, - 3554944520, - 1338537751, - 153759191, - 2392258631, - 2517325767, - 1562137151, - 261181418, - 4057344014, - 3606326527, - 43284398, - 2576883918, - 867864628, - 47851530, - 2812786516, - 973176841, - 225989385, - 3632475922, - 3393105556, - 4119874022, - 305548473, - 1700627044, - 3305100165, - 213266736, - 2645964635, - 1249400399, - 1028029293, - 1979363493, - 352332745, - 2959904930, - 1222014833, - 335719166, - 3034844990, - 226441217, - 1926875481, - 3577159871, - 1775113349, - 3199679329, - 3830679672, - 3983651053, - 2954990823, - 1144108581, - 4193816746, - 2129708150, - 2232005530, - 509576787, - 2804010142, - 3348342939, - 3569501823, - 2480116451, - 3951430741, - 3690246645, - 4096388317, - 3733757548, - 800782378, - 2059710726, - 871457858, - 3428516052, - 1203485640, - 1966769911, - 874102528, - 3987488344, - 4263596666, - 3676547625, - 1030709092, - 3714934002, - 3610741834, - 1152296692, - 369443694, - 2966607051, - 2162159830, - 3673440617, - 735430033, - 588154169, - 65278201, - 645065820, - 2597761643, - 3763337400, - 3659667187, - 1631259481, - 2455931225, - 2718813641, - 2661144156, - 899770672, - 3944823497, - 1758731141, - 2967039682, - 1120523679, - 799682818, - 105499505, - 2163862331, - 3499198771, - 1366869346, - 3064414004, - 2952589547, - 4007837562, - 3407273960, - 94642385, - 2873343633, - 3785938119, - 51406259, - 1548429503, - 2243336831, - 4282623413, - 1996587967, - 689083864, - 401092798, - 1365669796, - 1860664970, - 3793891968, - 1338061059, - 1710252652, - 4182186571, - 3248149325, - 1401531742, - 2816626701, - 3034313985, - 3141649319, - 828841278, - 3911654614, - 25345771, - 3800395270, - 2960398217, - 3279834315, - 190002621, - 4163701349, - 1729602105, - 2048511148, - 463396207, - 3003408681, - 540446737, - 1847801468, - 641291244, - 851056173, - 747867282, - 1352886224, - 4277298058, - 2190596815, - 3330112186, - 835336988, - 3071117793, - 4057287192, - 2360094663, - 2955739814, - 3874768291, - 657711891, - 1291344633, - 3708415927, - 1542001810, - 1699492859, - 2559897149, - 363791730, - 2724635307, - 3720457017, - 4092068051, - 3528369152, - 4273739602, - 2810497229, - 1498459714, - 146421549, - 686612241, - ]; - - static final String payMobApikey = String.fromCharCodes(List.generate( - _envieddatapayMobApikey.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatapayMobApikey[i] ^ _enviedkeypayMobApikey[i])); - - static const List _enviedkeyintegrationIdPayMobWallet = [ - 2066270508, - 2179622687, - 4209350984, - 2023379120, - 918298745, - 4188540777, - 1436949766, - 1673129085, - 3096697544, - 1051366131, - 1844348124, - 3261881089, - 2688865342, - ]; - - static const List _envieddataintegrationIdPayMobWallet = [ - 2066270492, - 2179622701, - 4209351039, - 2023379079, - 918298702, - 4188540762, - 1436949823, - 1673128997, - 3096697530, - 1051366059, - 1844348080, - 3261881155, - 2688865362, - ]; - - static final String integrationIdPayMobWallet = String.fromCharCodes( - List.generate( - _envieddataintegrationIdPayMobWallet.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataintegrationIdPayMobWallet[i] ^ - _enviedkeyintegrationIdPayMobWallet[i])); - - static const List _enviedkeysmsPasswordEgypt = [ - 1036102193, - 3328298157, - 1009522011, - 2154832644, - 146526601, - 3215783358, - 3428970750, - 833300789, - 2123059710, - 1796562644, - 1137775961, - 3063260733, - 2341043278, - 574608647, - 1146191723, - 2004583682, - ]; - - static const List _envieddatasmsPasswordEgypt = [ - 1036102267, - 3328298116, - 1009521933, - 2154832748, - 146526644, - 3215783375, - 3428970652, - 833300762, - 2123059646, - 1796562585, - 1137775873, - 3063260751, - 2341043222, - 574608747, - 1146191657, - 2004583790, - ]; - - static final String smsPasswordEgypt = String.fromCharCodes( - List.generate( - _envieddatasmsPasswordEgypt.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatasmsPasswordEgypt[i] ^ _enviedkeysmsPasswordEgypt[i])); - - static const List _enviedkeyocpApimSubscriptionKey = [ - 2583408717, - 3139137085, - 3400535982, - 3371139763, - 2618732941, - 1135353242, - 2909433580, - 3199672204, - 1367475262, - 2731871611, - 2779704131, - 500958052, - 199224277, - 883083230, - 182004026, - 2635205194, - 2017358985, - 339330106, - 3582294687, - 3722754054, - 2438197565, - 453063356, - 1271826618, - 699223625, - 3158057028, - 514742855, - 2520546711, - 3825184791, - 140749722, - 1664915553, - 2427400812, - 2458460667, - ]; - - static const List _envieddataocpApimSubscriptionKey = [ - 2583408765, - 3139137115, - 3400535963, - 3371139799, - 2618733036, - 1135353337, - 2909433487, - 3199672303, - 1367475290, - 2731871513, - 2779704096, - 500957953, - 199224289, - 883083247, - 182003977, - 2635205243, - 2017359083, - 339330059, - 3582294782, - 3722754099, - 2438197595, - 453063301, - 1271826575, - 699223675, - 3158057085, - 514742910, - 2520546721, - 3825184804, - 140749738, - 1664915539, - 2427400713, - 2458460616, - ]; - - static final String ocpApimSubscriptionKey = String.fromCharCodes( - List.generate( - _envieddataocpApimSubscriptionKey.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataocpApimSubscriptionKey[i] ^ - _enviedkeyocpApimSubscriptionKey[i])); - - static const List _enviedkeychatGPTkeySeferNew4 = [ - 3406563435, - 3563034046, - 690649274, - 1554978139, - 2398992838, - 3639163103, - 2637637167, - 1772006303, - 938009264, - 2696239346, - 2751257740, - 3502166065, - 501613147, - 1577851406, - 375602274, - 2345443321, - 117707980, - 813125276, - 302861949, - 2000329884, - 642188689, - 4153850329, - 80129667, - 3196520857, - 1257144832, - 2517661876, - 3483222691, - 1853187444, - 2113711216, - 2506031566, - 2841945112, - 852129076, - 119027544, - 699426537, - 1235099854, - 3619798932, - 515995761, - 1863347877, - 2321798745, - 3540956111, - 157038889, - 4132801943, - 1528823742, - 1694756598, - 1915757126, - 3217481261, - 509534292, - 1017992970, - 1995797155, - 1353983403, - 3381841113, - 37576376, - 26142595, - 119998388, - 932911126, - 4200148166, - 689018464, - 293890884, - 1656791519, - 533099226, - 1586731781, - 1074321930, - 1198257812, - ]; - - static const List _envieddatachatGPTkeySeferNew4 = [ - 3406563345, - 3563034073, - 690649239, - 1554978093, - 2398992810, - 3639163062, - 2637637194, - 1772006322, - 938009218, - 2696239262, - 2751257789, - 3502166123, - 501613111, - 1577851518, - 375602202, - 2345443216, - 117707937, - 813125328, - 302861879, - 2000329898, - 642188774, - 4153850248, - 80129740, - 3196520943, - 1257144930, - 2517661910, - 3483222679, - 1853187360, - 2113711134, - 2506031501, - 2841945121, - 852129132, - 119027498, - 699426449, - 1235099817, - 3619798977, - 515995700, - 1863347932, - 2321798671, - 3540956062, - 157038944, - 4132802018, - 1528823688, - 1694756514, - 1915757071, - 3217481321, - 509534304, - 1017993083, - 1995797235, - 1353983391, - 3381841055, - 37576429, - 26142678, - 119998405, - 932911225, - 4200148117, - 689018453, - 293890844, - 1656791469, - 533099138, - 1586731881, - 1074321992, - 1198257912, - ]; - - static final String chatGPTkeySeferNew4 = String.fromCharCodes( - List.generate( - _envieddatachatGPTkeySeferNew4.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatachatGPTkeySeferNew4[i] ^ - _enviedkeychatGPTkeySeferNew4[i])); - - static const List _enviedkeyanthropicAIkeySeferNew = [ - 1774799936, - 4115313919, - 3222156615, - 1546388780, - 378729630, - 4251115069, - 1979741490, - 1477855026, - 3897515850, - 1777461771, - 3243844657, - 1743983638, - 160886277, - 959562429, - 2949562129, - 4164593423, - 1954648346, - 1729455482, - 2596530700, - 2841153017, - 3299000959, - 2379089744, - 3801341164, - 4166410547, - 311752772, - 719169069, - 1251108655, - 528113318, - 1672114786, - 1309795872, - 1452399026, - 983970801, - 3790281399, - 2018982743, - 2679552167, - 1071484190, - 3918740730, - 167913724, - 3588254069, - 270495646, - 1098733191, - 2690937116, - 2429000554, - 1801335101, - 3364180440, - 1660330751, - 1671116610, - 3892754616, - 3802372244, - 1118700780, - 2139139595, - 1148740618, - 3164384937, - 482525141, - 490669876, - 1058435112, - 255814950, - 3262547038, - 3010417694, - 361682477, - 3462316701, - 3228240998, - 121976268, - 3984241679, - 1225063411, - 3464430938, - 882294470, - 1108727021, - 2416288074, - 3786161809, - 2271179934, - 2708159501, - 719018249, - 3887425679, - 990488566, - 2720536411, - 3066958953, - 3917248453, - 2517290334, - 835064590, - 785246896, - 1532626184, - 2052212562, - 2558974963, - 2364432277, - 1250335244, - 812639328, - 1610646406, - 1139612461, - 174768355, - 2085213186, - 176956703, - 3090364213, - 2582716285, - 3790544145, - 2285580486, - 284111530, - 792844130, - 1960788626, - 1607983971, - 408107270, - 116464010, - 4113203535, - 2301312800, - 4175271726, - 3821564429, - 2159091607, - 2671152551, - 895224109, - 472365106, - 2692906889, - 1641928316, - 397083448, - 1835071686, - 2561251042, - ]; - - static const List _envieddataanthropicAIkeySeferNew = [ - 1774799930, - 4115313816, - 3222156650, - 1546388829, - 378729724, - 4251115102, - 1979741471, - 1477855043, - 3897515836, - 1777461860, - 3243844610, - 1743983663, - 160886312, - 959562448, - 2949562239, - 4164593467, - 1954648396, - 1729455390, - 2596530753, - 2841152936, - 3299000906, - 2379089726, - 3801341081, - 4166410617, - 311752737, - 719169124, - 1251108726, - 528113358, - 1672114735, - 1309795950, - 1452398982, - 983970721, - 3790281459, - 2018982670, - 2679552213, - 1071484201, - 3918740619, - 167913619, - 3588253965, - 270495661, - 1098733226, - 2690937192, - 2429000536, - 1801335124, - 3364180457, - 1660330675, - 1671116586, - 3892754575, - 3802372341, - 1118700706, - 2139139679, - 1148740686, - 3164384975, - 482525068, - 490669938, - 1058435077, - 255815009, - 3262547000, - 3010417702, - 361682522, - 3462316789, - 3228240947, - 121976198, - 3984241749, - 1225063344, - 3464430889, - 882294514, - 1108727002, - 2416288015, - 3786161908, - 2271180027, - 2708159585, - 719018306, - 3887425761, - 990488526, - 2720536324, - 3066958908, - 3917248422, - 2517290291, - 835064667, - 785246973, - 1532626277, - 2052212539, - 2558974880, - 2364432345, - 1250335341, - 812639238, - 1610646454, - 1139612536, - 174768297, - 2085213285, - 176956719, - 3090364273, - 2582716171, - 3790544196, - 2285580458, - 284111611, - 792844048, - 1960788694, - 1607983895, - 408107307, - 116464061, - 4113203577, - 2301312867, - 4175271804, - 3821564543, - 2159091708, - 2671152630, - 895224188, - 472365162, - 2692907003, - 1641928228, - 397083476, - 1835071620, - 2561250958, - ]; - - static final String anthropicAIkeySeferNew = String.fromCharCodes( - List.generate( - _envieddataanthropicAIkeySeferNew.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataanthropicAIkeySeferNew[i] ^ - _enviedkeyanthropicAIkeySeferNew[i])); - - static const List _enviedkeyllama3Key = [ - 308392153, - 4158758615, - 982779006, - 3149955873, - 1385267168, - 141885099, - 1096489902, - 2841193549, - 687730870, - 563592626, - 313475201, - 2241326636, - 892791234, - 2469874221, - 575276958, - 1494531917, - 2767395238, - 2624935926, - 3147383533, - 2963920132, - 1413102478, - 304928473, - 1491112895, - 439438177, - 2400647419, - 318979792, - 1749752019, - 1314764142, - 1750275808, - 3667490716, - 1199385559, - 1965244755, - 229689763, - 1947960280, - 3663549076, - 473770641, - 2884246786, - 2276123140, - 3444819483, - 3614132346, - 236508355, - 2239990175, - 2082265405, - 2051703147, - 624004786, - 2370235192, - 2673579557, - 2503825690, - 1524422255, - 2319767976, - 1618130579, - 4055760735, - 3483015048, - 733873214, - 329946775, - 3889718945, - 156964139, - 3979122586, - 142356391, - 33407231, - 3721123503, - 3443622753, - 3230200567, - ]; - - static const List _envieddatallama3Key = [ - 308392114, - 4158758573, - 982778905, - 3149955966, - 1385267093, - 141885183, - 1096489974, - 2841193524, - 687730821, - 563592663, - 313475256, - 2241326696, - 892791168, - 2469874255, - 575277021, - 1494531868, - 2767395223, - 2624935856, - 3147383427, - 2963920201, - 1413102537, - 304928436, - 1491112903, - 439438136, - 2400647308, - 318979716, - 1749751960, - 1314764055, - 1750275731, - 3667490788, - 1199385582, - 1965244678, - 229689840, - 1947960297, - 3663549174, - 473770724, - 2884246896, - 2276123260, - 3444819537, - 3614132240, - 236508407, - 2239990265, - 2082265467, - 2051703068, - 624004861, - 2370235218, - 2673579584, - 2503825710, - 1524422179, - 2319768050, - 1618130641, - 4055760650, - 3483015118, - 733873269, - 329946845, - 3889719026, - 156964122, - 3979122626, - 142356437, - 33407143, - 3721123523, - 3443622691, - 3230200475, - ]; - - static final String llama3Key = String.fromCharCodes(List.generate( - _envieddatallama3Key.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatallama3Key[i] ^ _enviedkeyllama3Key[i])); - - static const List _enviedkeypayMobOutClientSecrret = [ - 1401068748, - 2852926941, - 7309612, - 1220270238, - 2225174103, - 1809021950, - 681502915, - 1041622274, - 204886644, - 2510054244, - 1600712160, - 447707884, - 3739788400, - 2711169315, - 3013654206, - 138623278, - 2760079478, - 2293148410, - 2961417926, - 2195431184, - 340079548, - 2278256035, - 1390725642, - 1592619301, - 1654163042, - 3726373492, - 3404431385, - 1602641867, - 1931893044, - 4201216849, - 1467354191, - 3163854595, - 1209890042, - 402494834, - 247525392, - 3540720369, - 1681650873, - 1895858053, - 4085107428, - 811763435, - 2651306246, - 3221296577, - 3349009092, - 2049066983, - 2459049135, - 266771154, - 317642173, - 223911294, - 938180301, - 2457719457, - 1624489059, - 1089142449, - 1586059837, - 1454105334, - 2402239425, - 3983300033, - 1413704133, - 939762337, - 3791440635, - 1510012782, - 3847119353, - 4102874597, - 1325180195, - 1716945219, - 817591451, - 3505432673, - 151336573, - 3202100121, - 3481967218, - 4035017012, - 2587189393, - 1539541222, - 1214896486, - 187849261, - 1117745377, - 4112610466, - 2176732092, - 2818078659, - 310581177, - 1774722501, - 4215806903, - 31258578, - 3940850890, - 4189475214, - 1203541873, - 1253920281, - 1599786361, - 587131240, - 3972144197, - 378948903, - 2878531847, - 1325449357, - 2637176925, - 1429419831, - 1165038902, - 135116912, - 803089253, - 1110376659, - 631145643, - 792720530, - 2746536843, - 636317943, - 3246112219, - 3743508984, - 3274289987, - 1646025409, - 2088190630, - 2993345997, - 269781813, - 1105808031, - 3993656546, - 302451567, - 3290855526, - 827949003, - 736131779, - 2802076939, - 1422305308, - 836575547, - 1232893195, - 3608048317, - 119183246, - 1729831070, - 3875720567, - 4270978783, - 974762975, - 1665671485, - 3202954854, - 376161690, - 1074848150, - 1193482534, - 2950856016, - 2171813003, - 2198733550, - 2756081685, - 2406301479, - ]; - - static const List _envieddatapayMobOutClientSecrret = [ - 1401068724, - 2852926884, - 7309638, - 1220270324, - 2225174021, - 1809021842, - 681502888, - 1041622371, - 204886556, - 2510054190, - 1600712109, - 447707868, - 3739788328, - 2711169344, - 3013654157, - 138623254, - 2760079393, - 2293148304, - 2961417863, - 2195431264, - 340079615, - 2278256108, - 1390725730, - 1592619293, - 1654162944, - 3726373378, - 3404431486, - 1602641799, - 1931893005, - 4201216802, - 1467354147, - 3163854661, - 1209889930, - 402494780, - 247525492, - 3540720316, - 1681650816, - 1895858140, - 4085107329, - 811763368, - 2651306355, - 3221296632, - 3349009029, - 2049066895, - 2459049187, - 266771107, - 317642207, - 223911185, - 938180230, - 2457719532, - 1624489011, - 1089142469, - 1586059856, - 1454105253, - 2402239415, - 3983300002, - 1413704183, - 939762415, - 3791440578, - 1510012705, - 3847119309, - 4102874513, - 1325180283, - 1716945211, - 817591517, - 3505432621, - 151336491, - 3202100139, - 3481967160, - 4035017077, - 2587189447, - 1539541200, - 1214896405, - 187849305, - 1117745315, - 4112610545, - 2176732136, - 2818078594, - 310581246, - 1774722435, - 4215806960, - 31258513, - 3940850844, - 4189475323, - 1203541779, - 1253920350, - 1599786268, - 587131230, - 3972144136, - 378948969, - 2878531959, - 1325449454, - 2637176938, - 1429419898, - 1165038924, - 135116858, - 803089163, - 1110376585, - 631145624, - 792720577, - 2746536930, - 636317859, - 3246112237, - 3743508927, - 3274289971, - 1646025376, - 2088190672, - 2993345935, - 269781850, - 1105808092, - 3993656494, - 302451512, - 3290855437, - 827948958, - 736131765, - 2802077021, - 1422305406, - 836575583, - 1232893272, - 3608048377, - 119183343, - 1729831123, - 3875720519, - 4270978725, - 974762903, - 1665671499, - 3202954771, - 376161752, - 1074848217, - 1193482622, - 2950855970, - 2171813075, - 2198733442, - 2756081751, - 2406301515, - ]; - - static final String payMobOutClientSecrret = String.fromCharCodes( - List.generate( - _envieddatapayMobOutClientSecrret.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatapayMobOutClientSecrret[i] ^ - _enviedkeypayMobOutClientSecrret[i])); - - static const List _enviedkeypayMobOutClient_id = [ - 2706047868, - 2588692946, - 2641097301, - 4259575080, - 244793647, - 3990250407, - 3868644691, - 3866649017, - 2867711495, - 3666992980, - 3172122632, - 1574874074, - 2359181060, - 2082319323, - 1532227728, - 700856499, - 677493712, - 1664165460, - 1454264780, - 1279201775, - 2697895276, - 3462338334, - 422619954, - 972799563, - 2199129212, - 602887297, - 1520259867, - 3274221891, - 3723098123, - 1712911046, - 4012869951, - 2895804605, - 3033221215, - 1914940416, - 2747279918, - 2576389996, - 3413627825, - 3240731854, - 2771149372, - 3443093041, - 3726373400, - 2972420084, - 1435600490, - 439494205, - 1751083113, - 367769074, - 132705350, - ]; - - static const List _envieddatapayMobOutClient_id = [ - 2706047782, - 2588692962, - 2641097312, - 4259575133, - 244793691, - 3990250387, - 3868644715, - 3866649053, - 2867711569, - 3666992959, - 3172122723, - 1574873993, - 2359181110, - 2082319292, - 1532227801, - 700856449, - 677493674, - 1664165425, - 1454264738, - 1279201705, - 2697895210, - 3462338429, - 422620025, - 972799544, - 2199129114, - 602887365, - 1520259920, - 3274221861, - 3723098179, - 1712910983, - 4012869994, - 2895804557, - 3033221128, - 1914940485, - 2747279970, - 2576389917, - 3413627898, - 3240731831, - 2771149430, - 3443092993, - 3726373460, - 2972420012, - 1435600408, - 439494245, - 1751083013, - 367769008, - 132705322, - ]; - - static final String payMobOutClient_id = String.fromCharCodes( - List.generate( - _envieddatapayMobOutClient_id.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatapayMobOutClient_id[i] ^ _enviedkeypayMobOutClient_id[i])); - - static const List _enviedkeypayMobOutPassword = [ - 4117879067, - 4177992814, - 1707360739, - 474099042, - 836026737, - 4222508434, - 34728452, - 2579868690, - 315454297, - 4292997604, - 4221309985, - 3223671112, - 2133814021, - 4064322352, - 3128447263, - 3960859082, - 1057176922, - 3729780277, - 4089107523, - 1009047973, - 1403091786, - 1347590320, - 4227439091, - 1298645704, - 1703200248, - 1173335146, - 1364974508, - 3124789370, - 3917602715, - 2268510062, - 2967700802, - 2095458888, - ]; - - static const List _envieddatapayMobOutPassword = [ - 4117879135, - 4177992796, - 1707360665, - 474098984, - 836026679, - 4222508522, - 34728559, - 2579868759, - 315454330, - 4292997544, - 4221310063, - 3223671075, - 2133814070, - 4064322374, - 3128447333, - 3960859129, - 1057176930, - 3729780303, - 4089107569, - 1009048001, - 1403091731, - 1347590344, - 4227438979, - 1298645638, - 1703200158, - 1173335101, - 1364974580, - 3124789256, - 3917602755, - 2268509954, - 2967700736, - 2095458852, - ]; - - static final String payMobOutPassword = String.fromCharCodes( - List.generate( - _envieddatapayMobOutPassword.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatapayMobOutPassword[i] ^ _enviedkeypayMobOutPassword[i])); - - static const List _enviedkeypayMobOutUserName = [ - 2307033185, - 2818738602, - 2608114765, - 2801400093, - 3881127907, - 1822912763, - 3831048450, - 1062373761, - 1266949160, - 2988365597, - 547072755, - 2834290134, - 2196011376, - 627283096, - 1553087477, - 1107709085, - 2087146629, - 39030521, - 3443332468, - 2931076625, - 3067847490, - 1844056965, - 3767489181, - 545918313, - ]; - - static const List _envieddatapayMobOutUserName = [ - 2307033115, - 2818738624, - 2608114744, - 2801400183, - 3881127823, - 1822912676, - 3831048563, - 1062373879, - 1266949191, - 2988365634, - 547072661, - 2834290081, - 2196011291, - 627283186, - 1553087379, - 1107709178, - 2087146735, - 39030421, - 3443332396, - 2931076707, - 3067847450, - 1844057065, - 3767489247, - 545918213, - ]; - - static final String payMobOutUserName = String.fromCharCodes( - List.generate( - _envieddatapayMobOutUserName.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatapayMobOutUserName[i] ^ _enviedkeypayMobOutUserName[i])); - - static const List _enviedkeyA = [3927393825]; - - static const List _envieddataA = [3927393904]; - - static final String A = String.fromCharCodes(List.generate( - _envieddataA.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataA[i] ^ _enviedkeyA[i])); - - static const List _enviedkeyB = [1816253219]; - - static const List _envieddataB = [1816253307]; - - static final String B = String.fromCharCodes(List.generate( - _envieddataB.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataB[i] ^ _enviedkeyB[i])); - - static const List _enviedkeyC = [1941444907]; - - static const List _envieddataC = [1941444973]; - - static final String C = String.fromCharCodes(List.generate( - _envieddataC.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataC[i] ^ _enviedkeyC[i])); - - static const List _enviedkeyD = [884821849]; - - static const List _envieddataD = [884821760]; - - static final String D = String.fromCharCodes(List.generate( - _envieddataD.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataD[i] ^ _enviedkeyD[i])); - - static const List _enviedkeyE = [3613623060]; - - static const List _envieddataE = [3613623134]; - - static final String E = String.fromCharCodes(List.generate( - _envieddataE.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataE[i] ^ _enviedkeyE[i])); - - static const List _enviedkeyF = [65090977]; - - static const List _envieddataF = [65091060]; - - static final String F = String.fromCharCodes(List.generate( - _envieddataF.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataF[i] ^ _enviedkeyF[i])); - - static const List _enviedkeyG = [1595226334]; - - static const List _envieddataG = [1595226261]; - - static final String G = String.fromCharCodes(List.generate( - _envieddataG.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataG[i] ^ _enviedkeyG[i])); - - static const List _enviedkeyH = [590409698]; - - static const List _envieddataH = [590409653]; - - static final String H = String.fromCharCodes(List.generate( - _envieddataH.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataH[i] ^ _enviedkeyH[i])); - - static const List _enviedkeyI = [3473596254]; - - static const List _envieddataI = [3473596177]; - - static final String I = String.fromCharCodes(List.generate( - _envieddataI.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataI[i] ^ _enviedkeyI[i])); - - static const List _enviedkeyJ = [756630357]; - - static const List _envieddataJ = [756630288]; - - static final String J = String.fromCharCodes(List.generate( - _envieddataJ.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataJ[i] ^ _enviedkeyJ[i])); - - static const List _enviedkeyK = [1628007221]; - - static const List _envieddataK = [1628007282]; - - static final String K = String.fromCharCodes(List.generate( - _envieddataK.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataK[i] ^ _enviedkeyK[i])); - - static const List _enviedkeyL = [2442154538]; - - static const List _envieddataL = [2442154616]; - - static final String L = String.fromCharCodes(List.generate( - _envieddataL.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataL[i] ^ _enviedkeyL[i])); - - static const List _enviedkeyM = [3038562330]; - - static const List _envieddataM = [3038562388]; - - static final String M = String.fromCharCodes(List.generate( - _envieddataM.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataM[i] ^ _enviedkeyM[i])); - - static const List _enviedkeyN = [1744105640]; - - static const List _envieddataN = [1744105706]; - - static final String N = String.fromCharCodes(List.generate( - _envieddataN.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataN[i] ^ _enviedkeyN[i])); - - static const List _enviedkeyO = [1804796630]; - - static const List _envieddataO = [1804796575]; - - static final String O = String.fromCharCodes(List.generate( - _envieddataO.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataO[i] ^ _enviedkeyO[i])); - - static const List _enviedkeyP = [178819859]; - - static const List _envieddataP = [178819909]; - - static final String P = String.fromCharCodes(List.generate( - _envieddataP.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataP[i] ^ _enviedkeyP[i])); - - static const List _enviedkeyQ = [563658548]; - - static const List _envieddataQ = [563658613]; - - static final String Q = String.fromCharCodes(List.generate( - _envieddataQ.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataQ[i] ^ _enviedkeyQ[i])); - - static const List _enviedkeyR = [2594490884]; - - static const List _envieddataR = [2594490952]; - - static final String R = String.fromCharCodes(List.generate( - _envieddataR.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataR[i] ^ _enviedkeyR[i])); - - static const List _enviedkeyS = [1903746908]; - - static const List _envieddataS = [1903746822]; - - static final String S = String.fromCharCodes(List.generate( - _envieddataS.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataS[i] ^ _enviedkeyS[i])); - - static const List _enviedkeyT = [1513739119]; - - static const List _envieddataT = [1513739052]; - - static final String T = String.fromCharCodes(List.generate( - _envieddataT.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataT[i] ^ _enviedkeyT[i])); - - static const List _enviedkeyU = [2646093318]; - - static const List _envieddataU = [2646093390]; - - static final String U = String.fromCharCodes(List.generate( - _envieddataU.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataU[i] ^ _enviedkeyU[i])); - - static const List _enviedkeyV = [1782962373]; - - static const List _envieddataV = [1782962325]; - - static final String V = String.fromCharCodes(List.generate( - _envieddataV.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataV[i] ^ _enviedkeyV[i])); - - static const List _enviedkeyW = [1739500627]; - - static const List _envieddataW = [1739500551]; - - static final String W = String.fromCharCodes(List.generate( - _envieddataW.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataW[i] ^ _enviedkeyW[i])); - - static const List _enviedkeyX = [2642207717]; - - static const List _envieddataX = [2642207649]; - - static final String X = String.fromCharCodes(List.generate( - _envieddataX.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataX[i] ^ _enviedkeyX[i])); - - static const List _enviedkeyY = [2532365704]; - - static const List _envieddataY = [2532365787]; - - static final String Y = String.fromCharCodes(List.generate( - _envieddataY.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataY[i] ^ _enviedkeyY[i])); - - static const List _enviedkeyZ = [3659612056]; - - static const List _envieddataZ = [3659612117]; - - static final String Z = String.fromCharCodes(List.generate( - _envieddataZ.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataZ[i] ^ _enviedkeyZ[i])); - - static const List _enviedkeya = [1529015279]; - - static const List _envieddataa = [1529015198]; - - static final String a = String.fromCharCodes(List.generate( - _envieddataa.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataa[i] ^ _enviedkeya[i])); - - static const List _enviedkeyb = [1505472212]; - - static const List _envieddatab = [1505472172]; - - static final String b = String.fromCharCodes(List.generate( - _envieddatab.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatab[i] ^ _enviedkeyb[i])); - - static const List _enviedkeyc = [817639110]; - - static const List _envieddatac = [817639072]; - - static final String c = String.fromCharCodes(List.generate( - _envieddatac.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatac[i] ^ _enviedkeyc[i])); - - static const List _enviedkeyd = [903440428]; - - static const List _envieddatad = [903440469]; - - static final String d = String.fromCharCodes(List.generate( - _envieddatad.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatad[i] ^ _enviedkeyd[i])); - - static const List _enviedkeye = [2638867399]; - - static const List _envieddatae = [2638867373]; - - static final String e = String.fromCharCodes(List.generate( - _envieddatae.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatae[i] ^ _enviedkeye[i])); - - static const List _enviedkeyf = [1828324771]; - - static const List _envieddataf = [1828324822]; - - static final String f = String.fromCharCodes(List.generate( - _envieddataf.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataf[i] ^ _enviedkeyf[i])); - - static const List _enviedkeyg = [3603845793]; - - static const List _envieddatag = [3603845834]; - - static final String g = String.fromCharCodes(List.generate( - _envieddatag.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatag[i] ^ _enviedkeyg[i])); - - static const List _enviedkeyh = [1757567873]; - - static const List _envieddatah = [1757567990]; - - static final String h = String.fromCharCodes(List.generate( - _envieddatah.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatah[i] ^ _enviedkeyh[i])); - - static const List _enviedkeyi = [3471161909]; - - static const List _envieddatai = [3471161946]; - - static final String i = String.fromCharCodes(List.generate( - _envieddatai.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatai[i] ^ _enviedkeyi[i])); - - static const List _enviedkeyj = [1676293665]; - - static const List _envieddataj = [1676293700]; - - static final String j = String.fromCharCodes(List.generate( - _envieddataj.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataj[i] ^ _enviedkeyj[i])); - - static const List _enviedkeyk = [4187391328]; - - static const List _envieddatak = [4187391239]; - - static final String k = String.fromCharCodes(List.generate( - _envieddatak.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatak[i] ^ _enviedkeyk[i])); - - static const List _enviedkeyl = [1278707921]; - - static const List _envieddatal = [1278707875]; - - static final String l = String.fromCharCodes(List.generate( - _envieddatal.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatal[i] ^ _enviedkeyl[i])); - - static const List _enviedkeym = [1916844783]; - - static const List _envieddatam = [1916844673]; - - static final String m = String.fromCharCodes(List.generate( - _envieddatam.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatam[i] ^ _enviedkeym[i])); - - static const List _enviedkeyn = [1362889177]; - - static const List _envieddatan = [1362889147]; - - static final String n = String.fromCharCodes(List.generate( - _envieddatan.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatan[i] ^ _enviedkeyn[i])); - - static const List _enviedkeyo = [418710104]; - - static const List _envieddatao = [418710065]; - - static final String o = String.fromCharCodes(List.generate( - _envieddatao.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatao[i] ^ _enviedkeyo[i])); - - static const List _enviedkeyp = [398109159]; - - static const List _envieddatap = [398109073]; - - static final String p = String.fromCharCodes(List.generate( - _envieddatap.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatap[i] ^ _enviedkeyp[i])); - - static const List _enviedkeyq = [2105298030]; - - static const List _envieddataq = [2105297935]; - - static final String q = String.fromCharCodes(List.generate( - _envieddataq.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataq[i] ^ _enviedkeyq[i])); - - static const List _enviedkeyr = [2100108351]; - - static const List _envieddatar = [2100108371]; - - static final String r = String.fromCharCodes(List.generate( - _envieddatar.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatar[i] ^ _enviedkeyr[i])); - - static const List _enviedkeys = [4047470971]; - - static const List _envieddatas = [4047470849]; - - static final String s = String.fromCharCodes(List.generate( - _envieddatas.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatas[i] ^ _enviedkeys[i])); - - static const List _enviedkeyt = [1833080943]; - - static const List _envieddatat = [1833080844]; - - static final String t = String.fromCharCodes(List.generate( - _envieddatat.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatat[i] ^ _enviedkeyt[i])); - - static const List _enviedkeyu = [2006201138]; - - static const List _envieddatau = [2006201178]; - - static final String u = String.fromCharCodes(List.generate( - _envieddatau.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatau[i] ^ _enviedkeyu[i])); - - static const List _enviedkeyv = [825548532]; - - static const List _envieddatav = [825548420]; - - static final String v = String.fromCharCodes(List.generate( - _envieddatav.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatav[i] ^ _enviedkeyv[i])); - - static const List _enviedkeyw = [4292322568]; - - static const List _envieddataw = [4292322684]; - - static final String w = String.fromCharCodes(List.generate( - _envieddataw.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataw[i] ^ _enviedkeyw[i])); - - static const List _enviedkeyx = [348180012]; - - static const List _envieddatax = [348180040]; - - static final String x = String.fromCharCodes(List.generate( - _envieddatax.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatax[i] ^ _enviedkeyx[i])); - - static const List _enviedkeyy = [2454981964]; - - static const List _envieddatay = [2454981951]; - - static final String y = String.fromCharCodes(List.generate( - _envieddatay.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatay[i] ^ _enviedkeyy[i])); - - static const List _enviedkeyz = [1174677600]; - - static const List _envieddataz = [1174677517]; - - static final String z = String.fromCharCodes(List.generate( - _envieddataz.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataz[i] ^ _enviedkeyz[i])); - - static const List _enviedkeykeyOfApp = [ - 376420277, - 1964177614, - 266714728, - 1589971676, - 266386235, - 3307941698, - 1924858906, - 4256919686, - 1813772791, - 1728846133, - 798034838, - 3662472525, - 691128840, - 477115701, - 3282180146, - 1251529271, - 889650269, - 2707228821, - 4080664693, - 2355927710, - 1891415689, - 681110781, - 126791933, - 3944121008, - 1922649647, - 1159120196, - 828533761, - 2859252017, - 3822253640, - 101185729, - 793224752, - 721431820, - 1330516560, - 4291582049, - 3576316367, - 1170681606, - 1169376090, - 60979340, - ]; - - static const List _envieddatakeyOfApp = [ - 376420311, - 1964177583, - 266714628, - 1589971631, - 266386270, - 3307941684, - 1924858970, - 4256919729, - 1813772737, - 1728846092, - 798034848, - 3662472505, - 691128937, - 477115735, - 3282180188, - 1251529302, - 889650236, - 2707228911, - 4080664592, - 2355927789, - 1891415780, - 681110680, - 126791829, - 3944121045, - 1922649693, - 1159120161, - 828533862, - 2859252043, - 3822253624, - 101185703, - 793224794, - 721431907, - 1330516488, - 4291581971, - 3576316311, - 1170681716, - 1169376024, - 60979454, - ]; - - static final String keyOfApp = String.fromCharCodes(List.generate( - _envieddatakeyOfApp.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatakeyOfApp[i] ^ _enviedkeykeyOfApp[i])); - - static const List _enviedkeymapSaasKey = [ - 2877431794, - 2886615796, - 4211327812, - 109001071, - 4034617210, - 3902380042, - 2590750097, - 3360017058, - 348778886, - 1822175429, - 2967876957, - 2935638874, - 1241006808, - 1499775304, - 661053536, - 1132994499, - 2067923235, - 145077982, - 2732841582, - 3799819178, - 2732272387, - 2586277473, - 3948821369, - 2593524521, - 1788404973, - 2721766612, - 3676918592, - ]; - - static const List _envieddatamapSaasKey = [ - 2877431707, - 2886615706, - 4211327771, - 109001046, - 4034617166, - 3902380093, - 2590750121, - 3360017088, - 348778933, - 1822175479, - 2967876965, - 2935638889, - 1241006830, - 1499775276, - 661053521, - 1132994554, - 2067923264, - 145077944, - 2732841480, - 3799819165, - 2732272432, - 2586277381, - 3948821275, - 2593524506, - 1788404957, - 2721766626, - 3676918643, - ]; - - static final String mapSaasKey = String.fromCharCodes(List.generate( - _envieddatamapSaasKey.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatamapSaasKey[i] ^ _enviedkeymapSaasKey[i])); -} diff --git a/siro_rider/lib/views/auth/otp_page.dart b/siro_rider/lib/views/auth/otp_page.dart index d16d690..fcd759f 100644 --- a/siro_rider/lib/views/auth/otp_page.dart +++ b/siro_rider/lib/views/auth/otp_page.dart @@ -6,6 +6,9 @@ import 'package:siro_rider/controller/auth/login_controller.dart'; import '../../constant/colors.dart'; import '../../controller/auth/otp_controller.dart'; import '../../controller/local/phone_intel/intl_phone_field.dart'; +import '../../controller/functions/country_logic.dart'; +import '../../constant/box_name.dart'; +import '../../main.dart'; // ───────────────────────────────────────────────────────────────────────────── // SHARED DESIGN TOKENS @@ -485,7 +488,7 @@ class _PhoneNumberScreenState extends State { const BorderSide(color: Color(0xFFEF4444), width: 1.5), ), ), - initialCountryCode: 'SY', + initialCountryCode: CountryLogic.getCountryPrefix(box.read(BoxName.countryCode) ?? 'Syria'), onChanged: (phone) { _phoneController.text = phone.completeNumber; }, diff --git a/siro_rider/lib/views/auth/sms_verfy_page.dart b/siro_rider/lib/views/auth/sms_verfy_page.dart index aa162cb..56772d2 100644 --- a/siro_rider/lib/views/auth/sms_verfy_page.dart +++ b/siro_rider/lib/views/auth/sms_verfy_page.dart @@ -9,6 +9,9 @@ import 'package:get/get.dart'; import '../../controller/local/phone_intel/intl_phone_field.dart'; import '../../print.dart'; import '../widgets/mycircular.dart'; +import '../../controller/functions/country_logic.dart'; +import '../../../constant/box_name.dart'; +import '../../../main.dart'; // import 'package:intl_phone_field/intl_phone_field.dart'; class SmsSignupEgypt extends StatelessWidget { @@ -52,7 +55,7 @@ class SmsSignupEgypt extends StatelessWidget { borderSide: BorderSide(), ), ), - initialCountryCode: 'EG', + initialCountryCode: CountryLogic.getCountryPrefix(box.read(BoxName.countryCode) ?? 'Syria'), onChanged: (phone) { // Properly concatenate country code and number registerController.phoneController.text = diff --git a/siro_rider/lib/views/home/map_widget.dart/apply_order_widget.dart b/siro_rider/lib/views/home/map_widget.dart/apply_order_widget.dart index a0689dc..dd652fa 100644 --- a/siro_rider/lib/views/home/map_widget.dart/apply_order_widget.dart +++ b/siro_rider/lib/views/home/map_widget.dart/apply_order_widget.dart @@ -1,3 +1,4 @@ +import 'package:siro_rider/constant/currency.dart'; import 'package:siro_rider/constant/colors.dart'; import 'package:siro_rider/constant/links.dart'; import 'package:siro_rider/constant/style.dart'; @@ -188,7 +189,7 @@ class ApplyOrderWidget extends StatelessWidget { ), ), Text( - 'SYP'.tr, + CurrencyHelper.currency, style: TextStyle( fontSize: 12, fontWeight: FontWeight.bold, diff --git a/siro_rider/lib/views/home/map_widget.dart/buttom_sheet_map_show.dart b/siro_rider/lib/views/home/map_widget.dart/buttom_sheet_map_show.dart index c3dee90..d349c5f 100644 --- a/siro_rider/lib/views/home/map_widget.dart/buttom_sheet_map_show.dart +++ b/siro_rider/lib/views/home/map_widget.dart/buttom_sheet_map_show.dart @@ -551,7 +551,7 @@ class Details extends StatelessWidget { ], ), Text( - 'Cost for passenger ${controller.totalPassenger.toStringAsFixed(2)} ', + 'Cost for passenger ${double.parse(controller.totalPassenger.toString()).toStringAsFixed(2)} ', style: AppStyle.title, ), ], diff --git a/siro_rider/lib/views/home/map_widget.dart/car_details_widget_to_go.dart b/siro_rider/lib/views/home/map_widget.dart/car_details_widget_to_go.dart index 4ef8412..acdb4cf 100644 --- a/siro_rider/lib/views/home/map_widget.dart/car_details_widget_to_go.dart +++ b/siro_rider/lib/views/home/map_widget.dart/car_details_widget_to_go.dart @@ -1,4 +1,6 @@ +import 'package:siro_rider/constant/currency.dart'; import 'package:flutter/material.dart'; +import 'package:siro_rider/controller/home/map/map_engine_controller.dart'; import 'package:get/get.dart'; import 'package:siro_rider/constant/box_name.dart'; import 'package:siro_rider/constant/colors.dart'; @@ -245,7 +247,7 @@ class CarDetailsTypeToChoose extends StatelessWidget { borderRadius: BorderRadius.circular(20), ), child: Text( - '${_getPassengerPriceText(carTypes[controller.selectedIndex], controller)} ${'SYP'.tr}', + '${_getPassengerPriceText(carTypes[controller.selectedIndex], controller)} ${CurrencyHelper.currency}', style: const TextStyle( color: Colors.white, fontSize: 13, @@ -413,7 +415,7 @@ class CarDetailsTypeToChoose extends StatelessWidget { ), child: FittedBox( child: Text( - '${_getPassengerPriceText(carType, controller)} ${'SYP'.tr}', + '${_getPassengerPriceText(carType, controller)} ${CurrencyHelper.currency}', style: TextStyle( fontSize: 11, fontWeight: FontWeight.w700, @@ -537,7 +539,7 @@ class CarDetailsTypeToChoose extends StatelessWidget { const SizedBox(width: 10), Expanded( child: Text( - '${'You have a negative balance of'.tr} ${passengerWallet.toStringAsFixed(2)} ${'SYP'.tr}.', + '${'You have a negative balance of'.tr} ${passengerWallet.toStringAsFixed(2)} ${CurrencyHelper.currency}.', style: TextStyle( color: Colors.red.shade800, fontWeight: FontWeight.w600, @@ -557,7 +559,7 @@ class CarDetailsTypeToChoose extends StatelessWidget { // ═══════════════════════════════════════════════════════════════════════════ String _getPassengerPriceText( CarType carType, RideLifecycleController mapPassengerController) { - double rawPrice; + String rawPrice; switch (carType.carType) { case 'Comfort': rawPrice = mapPassengerController.totalPassengerComfort; @@ -587,9 +589,7 @@ class CarDetailsTypeToChoose extends StatelessWidget { default: return '...'; } - final int roundedPrice = rawPrice.round(); - final formatter = NumberFormat.decimalPattern(); - return formatter.format(roundedPrice); + return rawPrice; } // ═══════════════════════════════════════════════════════════════════════════ @@ -743,7 +743,7 @@ class CarDetailsTypeToChoose extends StatelessWidget { borderRadius: BorderRadius.circular(20), ), child: Text( - '${_getPassengerPriceText(carType, mapPassengerController)} ${'SYP'.tr}', + '${_getPassengerPriceText(carType, mapPassengerController)} ${CurrencyHelper.currency}', style: const TextStyle( fontSize: 16, fontWeight: FontWeight.w800, @@ -931,7 +931,7 @@ class CarDetailsTypeToChoose extends StatelessWidget { } } - double _getOriginalPrice( + String _getOriginalPrice( CarType carType, RideLifecycleController mapPassengerController) { switch (carType.carType) { case 'Comfort': @@ -947,15 +947,11 @@ class CarDetailsTypeToChoose extends StatelessWidget { case 'Lady': return mapPassengerController.totalPassengerLady; default: - return 0.0; + return '0'; } } - Widget _buildRayehGaiOption( - BuildContext context, - RideLifecycleController mapPassengerController, - String carTypeName, - double price) { + Widget _buildRayehGaiOption(BuildContext context, RideLifecycleController mapPassengerController, String carTypeName, String price) { return GestureDetector( onTap: () { Navigator.of(context).pop(); @@ -969,7 +965,7 @@ class CarDetailsTypeToChoose extends StatelessWidget { padding: const EdgeInsets.all(8.0), child: Column(children: [ Text(carTypeName.tr), - Text(price.toStringAsFixed(0)) + Text(double.parse(price).toStringAsFixed(0)) ])), ); } @@ -1031,7 +1027,7 @@ class BurcMoney extends StatelessWidget { ), TextSpan( text: - '${'You have a balance of'.tr} ${passengerWallet.toStringAsFixed(2)} ${box.read(BoxName.countryCode) == 'Egypt' ? 'LE'.tr : 'SYP'.tr} ${'due to a previous trip.'.tr}', + '${'You have a balance of'.tr} ${passengerWallet.toStringAsFixed(2)} ${box.read(BoxName.countryCode) == 'Egypt' ? 'LE'.tr : CurrencyHelper.currency} ${'due to a previous trip.'.tr}', style: AppStyle.subtitle.copyWith( color: Colors.white, ), diff --git a/siro_rider/lib/views/home/map_widget.dart/cash_confirm_bottom_page.dart b/siro_rider/lib/views/home/map_widget.dart/cash_confirm_bottom_page.dart index 2cfd875..5888ae8 100644 --- a/siro_rider/lib/views/home/map_widget.dart/cash_confirm_bottom_page.dart +++ b/siro_rider/lib/views/home/map_widget.dart/cash_confirm_bottom_page.dart @@ -1,3 +1,4 @@ +import 'package:siro_rider/constant/currency.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:siro_rider/constant/box_name.dart'; @@ -80,7 +81,7 @@ class CashConfirmPageShown extends StatelessWidget { icon: Icons.account_balance_wallet_outlined, title: '${AppInformation.appName} Balance'.tr, subtitle: - '${'Balance:'.tr} ${box.read(BoxName.passengerWalletTotal) ?? '0.0'} ${'SYP'.tr}', + '${'Balance:'.tr} ${box.read(BoxName.passengerWalletTotal) ?? '0.0'} ${CurrencyHelper.currency}', isSelected: paymentCtrl.isWalletChecked, selectedColor: selectedColor, onTap: () => @@ -107,7 +108,7 @@ class CashConfirmPageShown extends StatelessWidget { final bool isWalletSufficient = (double.tryParse( box.read(BoxName.passengerWalletTotal) ?? '0') ?? 0) >= - controller.totalPassenger; + double.parse(controller.totalPassenger.toString()); // إذا تم اختيار المحفظة والرصيد غير كافٍ if (paymentCtrl.isWalletChecked && !isWalletSufficient) { diff --git a/siro_rider/lib/views/home/map_widget.dart/ride_begin_passenger.dart b/siro_rider/lib/views/home/map_widget.dart/ride_begin_passenger.dart index 1a1bd0d..a1d43e3 100644 --- a/siro_rider/lib/views/home/map_widget.dart/ride_begin_passenger.dart +++ b/siro_rider/lib/views/home/map_widget.dart/ride_begin_passenger.dart @@ -1,3 +1,4 @@ +import 'package:siro_rider/constant/currency.dart'; import 'package:flutter/material.dart'; import 'package:flutter_font_icons/flutter_font_icons.dart'; import 'package:get/get.dart'; @@ -7,7 +8,7 @@ import 'package:intl/intl.dart'; import '../../../constant/box_name.dart'; import '../../../constant/colors.dart'; import '../../../constant/links.dart'; -import '../../../constant/style.dart'; +import 'package:siro_rider/controller/functions/country_logic.dart'; import '../../../controller/functions/audio_record1.dart'; import '../../../controller/functions/launch.dart'; import '../../../controller/functions/toast.dart'; @@ -17,6 +18,7 @@ import '../../../controller/home/map/ride_state.dart'; import '../../../controller/profile/profile_controller.dart'; import '../../../main.dart'; import '../../../views/home/profile/complaint_page.dart'; +import '../../../controller/functions/country_logic.dart'; class RideBeginPassenger extends StatelessWidget { const RideBeginPassenger({super.key}); @@ -115,7 +117,8 @@ class RideBeginPassenger extends StatelessWidget { decoration: BoxDecoration( shape: BoxShape.circle, border: Border.all( - color: AppColor.primaryColor.withValues(alpha: 0.5), width: 1.5), + color: AppColor.primaryColor.withValues(alpha: 0.5), + width: 1.5), ), child: CircleAvatar( radius: 24, @@ -207,7 +210,7 @@ class RideBeginPassenger extends StatelessWidget { color: AppColor.primaryColor, ), ), - Text('SYP', + Text(CurrencyHelper.currency, style: TextStyle(fontSize: 9, color: AppColor.grayColor)), ], ), @@ -240,7 +243,8 @@ class RideBeginPassenger extends StatelessWidget { box.write(BoxName.sosPhonePassenger, profileController.prfoileData['sosPhone']); } else { - makePhoneCall('112'); + makePhoneCall(CountryLogic.getEmergencyNumber( + box.read(BoxName.countryCode) ?? 'Syria')); } }, ), @@ -255,13 +259,12 @@ class RideBeginPassenger extends StatelessWidget { // لا يوجد رقم طوارئ — نعرض الديالوج لإدخاله await uiController.shareTripWithFamily(); } else { - final formattedPhone = uiController.formatSyrianPhoneNumber( - phone.toString()); + final formattedPhone = + CountryLogic.formatCurrentCountryPhone(phone.toString()); uiController.sendWhatsapp(formattedPhone); } }, ), - _compactBtn( icon: Icons.share, label: 'Share'.tr, @@ -287,12 +290,14 @@ class RideBeginPassenger extends StatelessWidget { if (!audioCtx.isRecording) { await audioCtx.startRecording(rideId: controller.rideId); if (context.mounted) { - Toast.show(context, 'Start Record'.tr, AppColor.greenColor); + Toast.show( + context, 'Start Record'.tr, AppColor.greenColor); } } else { await audioCtx.stopRecording(); if (context.mounted) { - Toast.show(context, 'Record saved'.tr, AppColor.greenColor); + Toast.show( + context, 'Record saved'.tr, AppColor.greenColor); } } }, diff --git a/siro_rider/lib/views/home/map_widget.dart/ride_from_start_app.dart b/siro_rider/lib/views/home/map_widget.dart/ride_from_start_app.dart index 724ef81..e15aaf6 100644 --- a/siro_rider/lib/views/home/map_widget.dart/ride_from_start_app.dart +++ b/siro_rider/lib/views/home/map_widget.dart/ride_from_start_app.dart @@ -1,7 +1,9 @@ +import 'package:siro_rider/constant/currency.dart'; import 'package:siro_rider/controller/functions/launch.dart'; import 'package:flutter/material.dart'; import 'package:flutter_font_icons/flutter_font_icons.dart'; import 'package:get/get.dart'; +import '../../../controller/functions/country_logic.dart'; // ... استيراد ملفاتك الأخرى ... import '../../../constant/box_name.dart'; @@ -38,7 +40,7 @@ class RideFromStartApp extends StatelessWidget { final driverName = rideData['driverName'] ?? 'Captain'.tr; final driverRate = controller.driverRate; final carType = rideData['carType'] ?? 'Car'.tr; - final carModel = controller.model ?? ''; + final carModel = controller.model; final arrivalTime = box.read(BoxName.arrivalTime) ?? '--:--'; // تحديد البيانات للعرض @@ -177,7 +179,7 @@ class RideFromStartApp extends StatelessWidget { "Distance".tr), _buildVerticalDivider(), _buildInfoColumn( - Icons.attach_money, "$displayPrice SYP", "Price".tr), + Icons.attach_money, "$displayPrice ${CurrencyHelper.currency}", "Price".tr), ], ), ), @@ -213,7 +215,7 @@ class RideFromStartApp extends StatelessWidget { flex: 1, child: ElevatedButton.icon( onPressed: () => - makePhoneCall(box.read(BoxName.sosPhonePassenger)), + makePhoneCall(CountryLogic.getEmergencyNumber(box.read(BoxName.countryCode) ?? 'Syria')), icon: const Icon(Icons.sos, color: Colors.white), label: Text("SOS".tr, style: const TextStyle(color: Colors.white)), diff --git a/siro_rider/lib/views/home/map_widget.dart/vip_begin.dart b/siro_rider/lib/views/home/map_widget.dart/vip_begin.dart index 53a182c..9802a06 100644 --- a/siro_rider/lib/views/home/map_widget.dart/vip_begin.dart +++ b/siro_rider/lib/views/home/map_widget.dart/vip_begin.dart @@ -14,6 +14,7 @@ import '../../../controller/functions/launch.dart'; import '../../../controller/functions/toast.dart'; import '../../../controller/home/map/ride_lifecycle_controller.dart'; import '../../../controller/home/map/ui_interactions_controller.dart'; +import '../../../controller/functions/country_logic.dart'; class VipRideBeginPassenger extends StatelessWidget { const VipRideBeginPassenger({ @@ -196,7 +197,7 @@ class VipRideBeginPassenger extends StatelessWidget { profileController.prfoileData['sosPhone']); } } else { - makePhoneCall('122'); + makePhoneCall(CountryLogic.getEmergencyNumber(box.read(BoxName.countryCode) ?? 'Syria')); // box.read(BoxName.sosPhonePassenger)); } }, diff --git a/siro_rider/lib/views/home/my_wallet/passenger_wallet.dart b/siro_rider/lib/views/home/my_wallet/passenger_wallet.dart index 48d00cb..4d32fe7 100644 --- a/siro_rider/lib/views/home/my_wallet/passenger_wallet.dart +++ b/siro_rider/lib/views/home/my_wallet/passenger_wallet.dart @@ -1,3 +1,4 @@ +import 'package:siro_rider/constant/currency.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; @@ -153,7 +154,7 @@ class PassengerWallet extends StatelessWidget { .copyWith(color: Colors.white.withOpacity(0.7)), ), Text( - '${box.read(BoxName.passengerWalletTotal) ?? '0.0'} ${'SYP'.tr}', + '${box.read(BoxName.passengerWalletTotal) ?? '0.0'} ${CurrencyHelper.currency}', style: AppStyle.headTitle2.copyWith( color: Colors.white, fontSize: 28, diff --git a/siro_rider/lib/views/home/my_wallet/passenger_wallet_dialoge.dart b/siro_rider/lib/views/home/my_wallet/passenger_wallet_dialoge.dart index 88cebaf..474b6cc 100644 --- a/siro_rider/lib/views/home/my_wallet/passenger_wallet_dialoge.dart +++ b/siro_rider/lib/views/home/my_wallet/passenger_wallet_dialoge.dart @@ -1,6 +1,7 @@ +import 'package:siro_rider/constant/currency.dart'; import 'package:siro_rider/print.dart'; import 'package:siro_rider/constant/style.dart'; -import 'package:siro_rider/controller/functions/encrypt_decrypt.dart'; +// import 'package:siro_rider/controller/functions/encrypt_decrypt.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; @@ -42,7 +43,7 @@ class PassengerWalletDialog extends StatelessWidget { child: Text( box.read(BoxName.countryCode) == 'Syria' ? '10000 ${'LE'.tr}' - : '10 ${'SYP'.tr}', + : '10 ${CurrencyHelper.currency}', ), ), CupertinoActionSheetAction( @@ -55,7 +56,7 @@ class PassengerWalletDialog extends StatelessWidget { child: Text( box.read(BoxName.countryCode) == 'Syria' ? '20000 ${'LE'.tr} = 2050 ${'LE'.tr}' - : '20 ${'SYP'.tr}', + : '20 ${CurrencyHelper.currency}', ), ), CupertinoActionSheetAction( @@ -68,7 +69,7 @@ class PassengerWalletDialog extends StatelessWidget { child: Text( box.read(BoxName.countryCode) == 'Syria' ? '40000 ${'LE'.tr} = 4150 ${'LE'.tr}' - : '40 ${'SYP'.tr}', + : '40 ${CurrencyHelper.currency}', ), ), CupertinoActionSheetAction( @@ -81,7 +82,7 @@ class PassengerWalletDialog extends StatelessWidget { child: Text( box.read(BoxName.countryCode) == 'Syria' ? '100000 ${'LE'.tr} = 11000 ${'LE'.tr}' - : '50 ${'SYP'.tr}', + : '50 ${CurrencyHelper.currency}', ), ), ], @@ -130,10 +131,10 @@ void showPaymentBottomSheet(BuildContext context) { borderRadius: BorderRadius.vertical(top: Radius.circular(15.0)), ), builder: (BuildContext context) { - return WillPopScope( - onWillPop: () async { + return PopScope( + canPop: true, + onPopInvokedWithResult: (didPop, result) async { Get.back(); - return false; }, child: Container( padding: const EdgeInsets.all(16.0), @@ -154,7 +155,7 @@ void showPaymentBottomSheet(BuildContext context) { controller: controller, amount: 500, bonusAmount: 30, - currency: 'SYP'.tr, + currency: CurrencyHelper.currency, ), const SizedBox(height: 8.0), @@ -163,7 +164,7 @@ void showPaymentBottomSheet(BuildContext context) { controller: controller, amount: 1000, bonusAmount: 70, - currency: 'SYP'.tr, + currency: CurrencyHelper.currency, ), const SizedBox(height: 8.0), @@ -172,7 +173,7 @@ void showPaymentBottomSheet(BuildContext context) { controller: controller, amount: 2000, bonusAmount: 180, - currency: 'SYP'.tr, + currency: CurrencyHelper.currency, ), const SizedBox(height: 8.0), @@ -181,7 +182,7 @@ void showPaymentBottomSheet(BuildContext context) { controller: controller, amount: 5000, bonusAmount: 700, - currency: 'SYP'.tr, + currency: CurrencyHelper.currency, ), const SizedBox(height: 16.0), @@ -266,7 +267,7 @@ void showPaymentOptions(BuildContext context, PaymentController controller) { // controller.payWithMTNWallet( // context, // controller.selectedAmount.toString(), - // 'SYP', + // CurrencyHelper.currency, // ); // await controller.getPassengerWallet(); // controller.isLoading = false; @@ -331,148 +332,215 @@ void showPaymentOptions(BuildContext context, PaymentController controller) { // Get.back(); // Get.defaultDialog( // barrierDismissible: false, - // title: 'Insert Wallet phone number'.tr, - // content: Form( - // key: controller.formKey, - // child: MyTextForm( - // controller: controller.walletphoneController, - // label: 'Insert Wallet phone number'.tr, - // hint: '963941234567', - // type: TextInputType.phone)), - // confirm: MyElevatedButton( - // title: 'OK'.tr, - // onPressed: () async { - // Get.back(); - // if (controller.formKey.currentState!.validate()) { - // if (controller.selectedAmount != 0) { - // controller.isLoading = true; - // controller.update(); - // box.write(BoxName.phoneWallet, - // (controller.walletphoneController.text)); - // Get.back(); - // await controller.payWithMTNWallet( - // context, - // controller.selectedAmount.toString(), - // 'SYP', - // ); - // await controller.getPassengerWallet(); - // controller.isLoading = false; - // controller.update(); - // } else { - // Toast.show( - // context, - // '⚠️ You need to choose an amount!'.tr, - // AppColor.redColor, - // ); - // } - // } - // })); - // }, - // child: Padding( - // padding: const EdgeInsets.all(8.0), - // child: Row( - // mainAxisAlignment: MainAxisAlignment.spaceBetween, - // children: [ - // Text( - // 'Pay by MTN Wallet'.tr, - // style: AppStyle.title, - // ), - // const SizedBox(width: 10), - // Image.asset( - // 'assets/images/cashMTN.png', - // width: 70, - // height: 70, - // fit: BoxFit.contain, - // ), - // ], - // ), - // )), + if (box.read(BoxName.countryCode) == 'Syria') + GestureDetector( + onTap: () async { + Get.back(); + Get.defaultDialog( + barrierDismissible: false, + title: 'Insert Wallet phone number'.tr, + content: Form( + key: controller.formKey, + child: MyTextForm( + controller: controller.walletphoneController, + label: 'Insert Wallet phone number'.tr, + hint: '963941234567', + type: TextInputType.phone)), + confirm: MyElevatedButton( + title: 'OK'.tr, + onPressed: () async { + Get.back(); + if (controller.formKey.currentState!.validate()) { + if (controller.selectedAmount != 0) { + controller.isLoading = true; + controller.update(); + box.write(BoxName.phoneWallet, + (controller.walletphoneController.text)); + await controller.payWithMTNWallet( + context, + controller.selectedAmount.toString(), + CurrencyHelper.currency, + ); + await controller.getPassengerWallet(); - GestureDetector( - onTap: () async { - Get.back(); - Get.defaultDialog( - barrierDismissible: false, - title: 'Insert Wallet phone number'.tr, - content: Form( - key: controller.formKey, - child: MyTextForm( - controller: controller.walletphoneController, - label: 'Insert Wallet phone number'.tr, - hint: '963941234567', - type: TextInputType.phone)), - confirm: MyElevatedButton( - title: 'OK'.tr, - onPressed: () async { - Get.back(); - if (controller.formKey.currentState!.validate()) { - box.write(BoxName.phoneWallet, - controller.walletphoneController.text); - await controller.payWithSyriaTelWallet( - controller.selectedAmount.toString(), 'SYP'); - } - })); - }, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - 'Pay by Syriatel Wallet'.tr, + controller.isLoading = false; + controller.update(); + } else { + Toast.show( + context, + '⚠️ You need to choose an amount!'.tr, + AppColor.redColor, + ); + } + } + })); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + 'Pay by MTN Wallet'.tr, + style: AppStyle.title, + ), + const SizedBox(width: 10), + Image.asset( + 'assets/images/cashMTN.png', + width: 70, + height: 70, + fit: BoxFit.contain, + ), + ], + ), + )), + + if (box.read(BoxName.countryCode) == 'Jordan') + GestureDetector( + onTap: () async { + Get.back(); + Get.defaultDialog( + barrierDismissible: false, + title: 'Insert Wallet phone number'.tr, + content: Form( + key: controller.formKey, + child: MyTextForm( + controller: controller.walletphoneController, + label: 'Insert Wallet phone number'.tr, + hint: '962791234567', + type: TextInputType.phone)), + confirm: MyElevatedButton( + title: 'OK'.tr, + onPressed: () async { + Get.back(); + if (controller.formKey.currentState!.validate()) { + if (controller.selectedAmount != 0) { + controller.isLoading = true; + controller.update(); + box.write(BoxName.phoneWallet, + (controller.walletphoneController.text)); + await controller.payWithClickWallet( + context, + controller.selectedAmount.toString(), + CurrencyHelper.currency, + ); + await controller.getPassengerWallet(); + + controller.isLoading = false; + controller.update(); + } else { + Toast.show( + context, + '⚠️ You need to choose an amount!'.tr, + AppColor.redColor, + ); + } + } + })); + }, + child: Container( + margin: const EdgeInsets.only(top: 10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.transparent, + ), + child: ListTile( + title: Text( + 'Pay by Cliq'.tr, style: AppStyle.title, ), - const SizedBox(width: 10), - Image.asset( - 'assets/images/syriatel.png', - width: 70, - height: 70, - fit: BoxFit.fill, - ), - ], - ), - )), - GestureDetector( - onTap: () async { - // التحقق بالبصمة قبل أي شيء - bool isAuthSupported = - await LocalAuthentication().isDeviceSupported(); + trailing: const Icon(Icons.payment, size: 40, color: Colors.green), + ), + )), if (box.read(BoxName.countryCode) == 'Syria') + GestureDetector( + onTap: () async { + Get.back(); + Get.defaultDialog( + barrierDismissible: false, + title: 'Insert Wallet phone number'.tr, + content: Form( + key: controller.formKey, + child: MyTextForm( + controller: controller.walletphoneController, + label: 'Insert Wallet phone number'.tr, + hint: '963941234567', + type: TextInputType.phone)), + confirm: MyElevatedButton( + title: 'OK'.tr, + onPressed: () async { + Get.back(); + if (controller.formKey.currentState!.validate()) { + box.write(BoxName.phoneWallet, + controller.walletphoneController.text); + await controller.payWithSyriaTelWallet( + controller.selectedAmount.toString(), + CurrencyHelper.currency); + } + })); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + 'Pay by Syriatel Wallet'.tr, + style: AppStyle.title, + ), + const SizedBox(width: 10), + Image.asset( + 'assets/images/syriatel.png', + width: 70, + height: 70, + fit: BoxFit.fill, + ), + ], + ), + )), + if (box.read(BoxName.countryCode) == 'Syria') + GestureDetector( + onTap: () async { + // التحقق بالبصمة قبل أي شيء + bool isAuthSupported = + await LocalAuthentication().isDeviceSupported(); - if (isAuthSupported) { - bool didAuthenticate = await LocalAuthentication().authenticate( - localizedReason: 'استخدم بصمة الإصبع أو الوجه لتأكيد الدفع', - ); + if (isAuthSupported) { + bool didAuthenticate = + await LocalAuthentication().authenticate( + localizedReason: 'استخدم بصمة الإصبع أو الوجه لتأكيد الدفع', + ); - if (!didAuthenticate) { - Log.print("❌ User did not authenticate with biometrics"); - return; + if (!didAuthenticate) { + Log.print("❌ User did not authenticate with biometrics"); + return; + } } - } - // الانتقال مباشرة لإنشاء الفاتورة بعد النجاح بالبصمة - Get.to(() => PaymentScreenSmsProvider( - amount: double.parse(controller.selectedAmount.toString()))); - }, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - 'Pay by Sham Cash'.tr, - style: AppStyle.title, - ), - const SizedBox(width: 10), - Image.asset( - 'assets/images/shamCash.png', - width: 70, - height: 70, - fit: BoxFit.fill, - ), - ], - ), - )), + // الانتقال مباشرة لإنشاء الفاتورة بعد النجاح بالبصمة + Get.to(() => PaymentScreenSmsProvider( + amount: + double.parse(controller.selectedAmount.toString()))); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + 'Pay by Sham Cash'.tr, + style: AppStyle.title, + ), + const SizedBox(width: 10), + Image.asset( + 'assets/images/shamCash.png', + width: 70, + height: 70, + fit: BoxFit.fill, + ), + ], + ), + )), ], cancelButton: CupertinoActionSheetAction( child: Text('Cancel'.tr), @@ -483,4 +551,4 @@ void showPaymentOptions(BuildContext context, PaymentController controller) { ), ), ); -} \ No newline at end of file +} diff --git a/siro_rider/lib/views/home/my_wallet/payment_screen_cliq.dart b/siro_rider/lib/views/home/my_wallet/payment_screen_cliq.dart new file mode 100644 index 0000000..97f1c83 --- /dev/null +++ b/siro_rider/lib/views/home/my_wallet/payment_screen_cliq.dart @@ -0,0 +1,208 @@ +import 'dart:async'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:get/get.dart'; +import 'package:intl/intl.dart'; +import '../../../constant/links.dart'; +import '../../../controller/functions/crud.dart'; + +class PaymentScreenCliq extends StatefulWidget { + final double amount; + final String invoiceNumber; + final String cliqAlias; + + const PaymentScreenCliq({ + Key? key, + required this.amount, + required this.invoiceNumber, + required this.cliqAlias, + }) : super(key: key); + + @override + State createState() => _PaymentScreenCliqState(); +} + +class _PaymentScreenCliqState extends State with SingleTickerProviderStateMixin { + Timer? _pollingTimer; + String _status = 'waiting'; // waiting, uploading, verifying, success, error + final TextEditingController _proofController = TextEditingController(); + + late AnimationController _blinkController; + late Animation _colorAnimation; + late Animation _shadowAnimation; + + @override + void initState() { + super.initState(); + _blinkController = AnimationController(duration: const Duration(milliseconds: 800), vsync: this)..repeat(reverse: true); + _colorAnimation = ColorTween(begin: Colors.red.shade700, end: Colors.red.shade100).animate(_blinkController); + _shadowAnimation = Tween(begin: 2.0, end: 15.0).animate(CurvedAnimation(parent: _blinkController, curve: Curves.easeInOut)); + + _startPolling(); + } + + @override + void dispose() { + _pollingTimer?.cancel(); + _blinkController.dispose(); + _proofController.dispose(); + super.dispose(); + } + + void _startPolling() { + _pollingTimer = Timer.periodic(const Duration(seconds: 5), (timer) async { + if (_status == 'success' || _status == 'verifying') return; + try { + final res = await CRUD().postWallet(link: AppLink.checkCliqStatus, payload: {'invoice_number': widget.invoiceNumber}); + if (res != 'failure' && res['status'] == 'success' && res['invoice_status'] == 'completed') { + timer.cancel(); + if (mounted) setState(() => _status = 'success'); + } + } catch (_) {} + }); + } + + Future _submitProof() async { + if (_proofController.text.trim().isEmpty) { + Get.snackbar('Error'.tr, 'Please paste the transfer message'.tr, backgroundColor: Colors.red); + return; + } + setState(() => _status = 'verifying'); + + try { + final res = await CRUD().postWallet(link: AppLink.uploadCliqProof, payload: { + 'invoice_number': widget.invoiceNumber, + 'proof_text': _proofController.text.trim(), + }); + + if (res != 'failure' && res['status'] == 'success') { + if (mounted) setState(() => _status = 'success'); + } else { + if (mounted) setState(() => _status = 'error'); + Get.defaultDialog(title: 'Failed'.tr, content: Text(res['message']?.toString() ?? 'Verification failed')); + } + } catch (e) { + if (mounted) setState(() => _status = 'error'); + Get.defaultDialog(title: 'Error'.tr, content: Text('Error uploading proof'.tr)); + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.grey[50], + appBar: AppBar(title: const Text("Cliq Payment"), centerTitle: true, backgroundColor: Colors.white, foregroundColor: Colors.black), + body: SafeArea( + child: Padding( + padding: const EdgeInsets.all(20.0), + child: _status == 'success' ? _buildSuccessUI() : _buildWaitingUI(), + ), + ), + ); + } + + Widget _buildWaitingUI() { + final currencyFormat = NumberFormat.decimalPattern('ar_SY'); + + return SingleChildScrollView( + child: Column( + children: [ + Container( + width: double.infinity, + padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 15), + decoration: BoxDecoration(gradient: LinearGradient(colors: [Colors.blue.shade800, Colors.blue.shade600]), borderRadius: BorderRadius.circular(16)), + child: Column( + children: [ + const Text("المبلغ المطلوب", style: TextStyle(color: Colors.white70, fontSize: 14)), + const SizedBox(height: 5), + Text("${currencyFormat.format(widget.amount)} ل.س", style: const TextStyle(color: Colors.white, fontSize: 28, fontWeight: FontWeight.bold)), + ], + ), + ), + const SizedBox(height: 25), + + AnimatedBuilder( + animation: _blinkController, + builder: (context, child) { + return Container( + padding: const EdgeInsets.all(20), + decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(16), border: Border.all(color: _colorAnimation.value ?? Colors.red, width: 3.0), boxShadow: [BoxShadow(color: (_colorAnimation.value ?? Colors.red).withOpacity(0.4), blurRadius: _shadowAnimation.value, spreadRadius: 2)]), + child: Column( + children: [ + const Text("يرجى تحويل المبلغ إلى الاسم المستعار التالي (Alias):", textAlign: TextAlign.center, style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold)), + const SizedBox(height: 15), + InkWell( + onTap: () { + Clipboard.setData(ClipboardData(text: widget.cliqAlias)); + ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: const Text("تم نسخ الاسم ✅", textAlign: TextAlign.center), backgroundColor: Colors.green.shade600)); + }, + child: Container( + padding: const EdgeInsets.all(15), + decoration: BoxDecoration(color: Colors.blue.shade50, borderRadius: BorderRadius.circular(12), border: Border.all(color: Colors.blue.shade200)), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text(widget.cliqAlias, style: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold, letterSpacing: 2.0)), + const Icon(Icons.copy, color: Colors.blue), + ], + ), + ), + ), + ], + ), + ); + }, + ), + + const SizedBox(height: 30), + const Text("بعد إتمام التحويل، يرجى نسخ رسالة البنك النصية ولصقها هنا للتحقق التلقائي:", textAlign: TextAlign.center, style: TextStyle(fontSize: 14)), + const SizedBox(height: 10), + TextField( + controller: _proofController, + maxLines: 4, + decoration: InputDecoration( + hintText: "قم بلصق نص رسالة التحويل هنا...", + border: OutlineInputBorder(borderRadius: BorderRadius.circular(12)), + filled: true, + fillColor: Colors.white, + ), + ), + const SizedBox(height: 15), + SizedBox( + width: double.infinity, + height: 50, + child: ElevatedButton( + style: ElevatedButton.styleFrom(backgroundColor: Colors.blue.shade800, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12))), + onPressed: _status == 'verifying' ? null : _submitProof, + child: _status == 'verifying' + ? const CircularProgressIndicator(color: Colors.white) + : const Text("تحقق من الدفع", style: TextStyle(fontSize: 18, color: Colors.white, fontWeight: FontWeight.bold)), + ), + ), + const SizedBox(height: 20), + const Text("جاري فحص الفاتورة تلقائياً كل 5 ثوانٍ...", style: TextStyle(color: Colors.grey, fontSize: 12)), + ], + ), + ); + } + + Widget _buildSuccessUI() { + return Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Icon(Icons.verified_rounded, color: Colors.green, size: 100), + const SizedBox(height: 20), + const Text("تم الدفع بنجاح!", style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold)), + const SizedBox(height: 40), + SizedBox( + width: double.infinity, + child: ElevatedButton( + style: ElevatedButton.styleFrom(backgroundColor: Colors.green, foregroundColor: Colors.white, padding: const EdgeInsets.symmetric(vertical: 16)), + onPressed: () { Get.back(); Get.back(); }, + child: const Text("متابعة", style: TextStyle(fontSize: 18)), + ), + ), + ], + ); + } +} diff --git a/siro_rider/lib/views/home/my_wallet/payment_screen_mtn.dart b/siro_rider/lib/views/home/my_wallet/payment_screen_mtn.dart new file mode 100644 index 0000000..4687602 --- /dev/null +++ b/siro_rider/lib/views/home/my_wallet/payment_screen_mtn.dart @@ -0,0 +1,208 @@ +import 'dart:async'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:get/get.dart'; +import 'package:intl/intl.dart'; +import '../../../constant/links.dart'; +import '../../../controller/functions/crud.dart'; + +class PaymentScreenMtn extends StatefulWidget { + final double amount; + final String invoiceNumber; + final String mtnNumber; + + const PaymentScreenMtn({ + Key? key, + required this.amount, + required this.invoiceNumber, + required this.mtnNumber, + }) : super(key: key); + + @override + State createState() => _PaymentScreenMtnState(); +} + +class _PaymentScreenMtnState extends State with SingleTickerProviderStateMixin { + Timer? _pollingTimer; + String _status = 'waiting'; // waiting, uploading, verifying, success, error + final TextEditingController _proofController = TextEditingController(); + + late AnimationController _blinkController; + late Animation _colorAnimation; + late Animation _shadowAnimation; + + @override + void initState() { + super.initState(); + _blinkController = AnimationController(duration: const Duration(milliseconds: 800), vsync: this)..repeat(reverse: true); + _colorAnimation = ColorTween(begin: Colors.red.shade700, end: Colors.red.shade100).animate(_blinkController); + _shadowAnimation = Tween(begin: 2.0, end: 15.0).animate(CurvedAnimation(parent: _blinkController, curve: Curves.easeInOut)); + + _startPolling(); + } + + @override + void dispose() { + _pollingTimer?.cancel(); + _blinkController.dispose(); + _proofController.dispose(); + super.dispose(); + } + + void _startPolling() { + _pollingTimer = Timer.periodic(const Duration(seconds: 5), (timer) async { + if (_status == 'success' || _status == 'verifying') return; + try { + final res = await CRUD().postWallet(link: AppLink.checkMtnStatus, payload: {'invoice_number': widget.invoiceNumber}); + if (res != 'failure' && res['status'] == 'success' && res['invoice_status'] == 'completed') { + timer.cancel(); + if (mounted) setState(() => _status = 'success'); + } + } catch (_) {} + }); + } + + Future _submitProof() async { + if (_proofController.text.trim().isEmpty) { + Get.snackbar('Error'.tr, 'Please paste the transfer message'.tr, backgroundColor: Colors.red); + return; + } + setState(() => _status = 'verifying'); + + try { + final res = await CRUD().postWallet(link: AppLink.uploadMtnProof, payload: { + 'invoice_number': widget.invoiceNumber, + 'proof_text': _proofController.text.trim(), + }); + + if (res != 'failure' && res['status'] == 'success') { + if (mounted) setState(() => _status = 'success'); + } else { + if (mounted) setState(() => _status = 'error'); + Get.defaultDialog(title: 'Failed'.tr, content: Text(res['message']?.toString() ?? 'Verification failed')); + } + } catch (e) { + if (mounted) setState(() => _status = 'error'); + Get.defaultDialog(title: 'Error'.tr, content: Text('Error uploading proof'.tr)); + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.grey[50], + appBar: AppBar(title: const Text("MTN Payment"), centerTitle: true, backgroundColor: Colors.white, foregroundColor: Colors.black), + body: SafeArea( + child: Padding( + padding: const EdgeInsets.all(20.0), + child: _status == 'success' ? _buildSuccessUI() : _buildWaitingUI(), + ), + ), + ); + } + + Widget _buildWaitingUI() { + final currencyFormat = NumberFormat.decimalPattern('ar_SY'); + + return SingleChildScrollView( + child: Column( + children: [ + Container( + width: double.infinity, + padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 15), + decoration: BoxDecoration(gradient: LinearGradient(colors: [Colors.blue.shade800, Colors.blue.shade600]), borderRadius: BorderRadius.circular(16)), + child: Column( + children: [ + const Text("المبلغ المطلوب", style: TextStyle(color: Colors.white70, fontSize: 14)), + const SizedBox(height: 5), + Text("${currencyFormat.format(widget.amount)} ل.س", style: const TextStyle(color: Colors.white, fontSize: 28, fontWeight: FontWeight.bold)), + ], + ), + ), + const SizedBox(height: 25), + + AnimatedBuilder( + animation: _blinkController, + builder: (context, child) { + return Container( + padding: const EdgeInsets.all(20), + decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(16), border: Border.all(color: _colorAnimation.value ?? Colors.red, width: 3.0), boxShadow: [BoxShadow(color: (_colorAnimation.value ?? Colors.red).withOpacity(0.4), blurRadius: _shadowAnimation.value, spreadRadius: 2)]), + child: Column( + children: [ + const Text("يرجى تحويل المبلغ إلى الرقم التالي:", textAlign: TextAlign.center, style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold)), + const SizedBox(height: 15), + InkWell( + onTap: () { + Clipboard.setData(ClipboardData(text: widget.mtnNumber)); + ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: const Text("تم نسخ الرقم ✅", textAlign: TextAlign.center), backgroundColor: Colors.green.shade600)); + }, + child: Container( + padding: const EdgeInsets.all(15), + decoration: BoxDecoration(color: Colors.blue.shade50, borderRadius: BorderRadius.circular(12), border: Border.all(color: Colors.blue.shade200)), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text(widget.mtnNumber, style: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold, letterSpacing: 2.0)), + const Icon(Icons.copy, color: Colors.blue), + ], + ), + ), + ), + ], + ), + ); + }, + ), + + const SizedBox(height: 30), + const Text("بعد إتمام التحويل، يرجى نسخ رسالة البنك النصية ولصقها هنا للتحقق التلقائي:", textAlign: TextAlign.center, style: TextStyle(fontSize: 14)), + const SizedBox(height: 10), + TextField( + controller: _proofController, + maxLines: 4, + decoration: InputDecoration( + hintText: "قم بلصق نص رسالة التحويل هنا...", + border: OutlineInputBorder(borderRadius: BorderRadius.circular(12)), + filled: true, + fillColor: Colors.white, + ), + ), + const SizedBox(height: 15), + SizedBox( + width: double.infinity, + height: 50, + child: ElevatedButton( + style: ElevatedButton.styleFrom(backgroundColor: Colors.blue.shade800, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12))), + onPressed: _status == 'verifying' ? null : _submitProof, + child: _status == 'verifying' + ? const CircularProgressIndicator(color: Colors.white) + : const Text("تحقق من الدفع", style: TextStyle(fontSize: 18, color: Colors.white, fontWeight: FontWeight.bold)), + ), + ), + const SizedBox(height: 20), + const Text("جاري فحص الفاتورة تلقائياً كل 5 ثوانٍ...", style: TextStyle(color: Colors.grey, fontSize: 12)), + ], + ), + ); + } + + Widget _buildSuccessUI() { + return Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Icon(Icons.verified_rounded, color: Colors.green, size: 100), + const SizedBox(height: 20), + const Text("تم الدفع بنجاح!", style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold)), + const SizedBox(height: 40), + SizedBox( + width: double.infinity, + child: ElevatedButton( + style: ElevatedButton.styleFrom(backgroundColor: Colors.green, foregroundColor: Colors.white, padding: const EdgeInsets.symmetric(vertical: 16)), + onPressed: () { Get.back(); Get.back(); }, + child: const Text("متابعة", style: TextStyle(fontSize: 18)), + ), + ), + ], + ); + } +} diff --git a/siro_rider/lib/views/home/profile/order_history.dart b/siro_rider/lib/views/home/profile/order_history.dart index a67ff24..0d91e6c 100644 --- a/siro_rider/lib/views/home/profile/order_history.dart +++ b/siro_rider/lib/views/home/profile/order_history.dart @@ -1,3 +1,4 @@ +import 'package:siro_rider/constant/currency.dart'; import 'dart:math' as math; import 'dart:typed_data'; @@ -191,7 +192,7 @@ class _HistoryCard extends StatelessWidget { Text('Total Price'.tr, style: AppStyle.title.copyWith(fontSize: 15)), Text( - '${ride['price']} ${'SYP'.tr}', + '${ride['price']} ${CurrencyHelper.currency}', style: AppStyle.headTitle.copyWith( fontSize: 20, color: AppColor.primaryColor), ), @@ -559,7 +560,7 @@ class _RideDetailSheetState extends State<_RideDetailSheet> { color: AppColor.writeColor.withOpacity(0.55))), const SizedBox(height: 2), - Text('${ride['price']} ${'SYP'.tr}', + Text('${ride['price']} ${CurrencyHelper.currency}', style: AppStyle.headTitle.copyWith( fontSize: 22, color: AppColor.primaryColor)), ], diff --git a/siro_service/.env b/siro_service/.env deleted file mode 100644 index a776e1a..0000000 --- a/siro_service/.env +++ /dev/null @@ -1,119 +0,0 @@ -basicAuthCredentials=wqnmqqsjyvwjv:nqrYJP@1737XrXlBl -basicCompareFaces=zjujluqfpj:nqrYjp@1737XrXlBl -basicCompareFacesURL='https://face-detect-f6924392c4c7.herokuapp.com/compare_faces' -accountSIDTwillo=QFx0qy456juj383n9xuy2194q629q1fj0y7XrXlBl -serverAPI=QQQQobSrrFi:QVQ87xU7zwCvmZzZdaxuS2f23Y4mz7MzyOzr8od2br6KYyeFaTVLG3K3hx5ZaUyx7eYvAYpAVdKk-286NTRi3zs9iSOnXtXRIxswg3KecBmsl3VxJ9wO-vIpwu4Pv7dkHkXniuxMSDgWXrXlBl -mapAPIKEY=AIzaSyCFsWBqvkXzk1Gb-bCGxwqTwJQKIeHjH64 -email=@intaleqapp.com -getapiKey=zg-4C26q4SYgBKQeHZDqkWowC9XrxgUEfUy9JRw2rm6Q2adb3kjwXrXlBl -mapAPIKEYIOS=AIzaSyDzGO9a-1IDMLD2FxhmOO9ONL1gMssFa9g -twilloRecoveryCode=CAU79DHPH1BjE9PUH4ETXTSXZXrXlBl -apiKeyHere=g_WNUb5L-tripz7-F8omHpUmgIzH7ETeH9xZ8RwGG9_G8zX9A -authTokenTwillo=70u98ju0214oxx4q0u74028u021u4qu65XrXlBl -chatGPTkey=zg-4C26q4SYgBKQeHZDqkWowC9XrxgUEfUy9JRw2rm6Q2adb3kjwXrXlBl -transactionCloude=Qhcwuilomqcoib:QVO_JNYED2XWA26YXKC2TP:YK1DVH6SJB31N3PE1UXrXlBl -visionApi=3pALsqSSYTvzp69Q5FMIgbzjG6Z1zktJXrXlBl -chatGPTkeySefer=zg-IiR3i4ooza3Yvhvb9rZk1C9XrxgUE0l8jRRZrHj3Qe5QXPlqVXrXlBl -chatGPTkeySeferNew=zg-Z4oAJcAROgNXjgrEIU8fKC9XrxgUE4Qtrrlq1yiux0jL3dITSXrXlBl -secretKey=zg_ropj_57Iiv6pMFCBFq3C2n6IXlmjykpxDmW93SW3vvXh68UA9T5FORTWgWsT37StKsOPdwDdsy8qR9srMUluahs3nPHvgBa33tGk90vV5XrXlBl -stripe_publishableKe=vg_propj_57Iiv6MFCBFq3C2n6kNJnZByV6nuDtXe9IjEPOfhmpDtWmt3MLR0gQpiHcQmAFMUPrZc3QiCDjxBZLbxDC3efxWxz33bWH1ZgrsXrXlBl -llamaKey=RR-EuyoFDUvfRDBoj46fZKAtKJ3voM8Mt768cPeJV7GNdAkPTKdY8Odm9n4ggGqI5GyoXrXlBl -serverPHP=https://api.sefer.live/sefer -seferAlexandriaServer=https://seferalexandria.site/sefer -seferPaymentServer=https://seferpw.shop/sefer -# seferCairoServer=https://sefer.click/sefer -seferCairoServer=https://server.sefer.live/sefer.click/sefer -seferGizaServer=https://gizasefer.online/sefer -whatappID=3699397362811879 -whatsapp=EAAOtbZBSUK74BOzW9yb74EgApQYtI88nYtE9jQi9QnLGpw3FQpc5dxIlDgVJzcMywEBqNYf3s8pkk6cZB5Q0tkKuSOZBsOvMZA3Tcth0IlBHSaMVtcRZCsaTKNSUpfLRGRb0rhLezNFllpYBgmnfbhUazSZBYXdr40nmN4QEgweK2eqYQnTTNuryTOyBkKZB1MXMw6U7QnTRQDxHbUVlqgIRTrhaooZD -cohere=Aulwd8y5SPWos0hJhlG0toUf8gOhUUrpf5Q2TPmVGXrXlBl -claudeAiAPI=zg-qbc-qvo39l-xWOxIGwWTOzCFBnIYSKKhfyz_KVAvrH-6_4ZEJL68G_QBH26oeTOMMoQug9KuOjjKSP_A4S3SUDlbxR9duVzoQ-MkX_UQQQXrXlBl -payPalClientId=QALymlfNI5Tzt4s-ysoz6vD4_nqX0SUtkC_qYV-Ugk5gaM_8Z-kg4L53k8Uux_4jEWXDkNpXGSWPpIzDFXrXlBl -payPalClientIdLive=QZFkjAoZfGtngNserll6r3cC56Xl1sVLQkn5dMbyebhzJY59EQ3hz7YxaEqEDYPTUFcQWqvePaQ5UJJVRXrXlBl -payPalSecret=JBAAvqJQGUsKD0Zjh4KjeczxfBFx-38SdlbIS56VRM8NDfe6mjMeZJhNLJek5XgQCqKCHtRf6MjRy-f8XrXlBl -payPalSecretLive=JQDATqkknDfiFpEAN60KB4pGpDaJjyqBAd9jxMBPpzWU1P1k3H1jZhQjn73EHsKQna74P8p98hgOnMaWPWXrXlBl -geminiApi=QOmqZsQYm08vlOqjI7klVJfvP4WBFEoemjgy396iXrXlBl -geminiApiMasa=QOmqZsQIpdM4BRsKmaDJOP7dZp5-c6NWfch7PAlQXrXlBl -agoraAppId=71880f2j636o509j24y5294480y30u848XrXlBl -agoraAppCertificate=j17q944u49390jhq758u1649448q2y6xfuXrXlBl -usernamePayMob=37319104052XrXlBl -passwordPayMob='g@nkD2#99k!hD_.wXrXlBl' -integrationIdPayMob=0237630XrXlBl -payMobApikey='MDrGqKEWS1rVqhjggHvEPDvPjJ7vZDBExrO7S3BEBgrlfUwTA3i5RnP5ZnvoL3M2S9rEBgrlNTdexH5pTPf7NJrvy1reZJv1Tn7zf7vTIDywjHg1C7Ley38HTDyNA3v7TPfdxJrax1rwPmPtMJyzqKEYZeghq3MuLUrFH3A1AgHcH15CZ9UaZTLOxnw0BTdzHHrBArisZerUMUUzZ1BnBeEijHvNjYLnS1BUICMhSmPhA15ifHyVqKEMHWyKLbyuIPvcH9UeL3vZyDf=cvcXrXlBlbbbbb' -integrationIdPayMobWallet=0277739XrXlBl -ocpApimSubscriptionKey=0f5dacccdbce4131b1a5f952996302e3 -smsPasswordEgypt="J)Vh=qb/@MXrXlBl" -chatGPTkeySeferNew4=zg-vlie-2l1ZlpximLJ6wQOvbb4TnC9XrxgUEyVQIu6TID4qP4FUUqoS5XrXlBl -anthropicAIkeySeferNew=zg-qbc-qvo39-mn4VdMQ5nuJeIYhMN4PDYr7qox3-t2i1Lh7aNTDfYF-Gf8whUJZCs47EeelKn8_UcmUMmiSLaf0UJg0DvUlQrDt-76CRrkQQXrXlBl -llama3Key=kzg_uTXy3e9DBbCQ1FnMGmxYwTKysx9US1burxJj4fFwOje4LZBUFKJS1XrXlBl -payMobOutClientSecrret='xyjjRlkahJM0Xc38WjApCOh8bvgL9slFpNdM9YeCu9AhLqboKMPtmSvc2N9O4tXxFLV2JAV6stBSTAGFGCVubGe6MNpc7MzJnZ3SiT6GpavBoCLWkUvVbdSDaM0zHvuBOXrXlBl' -payMobOutClient_id='Z05ut48dVkkS2gI2zenFFcKsfDKfHAU0WELqKyJ0LXrXlBl' -payMobOutPassword='D2zJFxkE#LNk3vz38z2dYxpNfWXrXlBl' -payMobOutUserName='zjujl_qvo_fwkjfgjlXrXlBl' -keyOfApp=balsev@7696tabnaazesmeheregzpfjoXrXrBr -initializationVector=qxfyjukwoegrnbivXrXrBr -privateKeyFCM=WZSHwLUNI/wlyLUyIZHYf/pgOo6JZplTQqKK2HJmuSJ+r4Iygz/W+03uFPFS4iLv4AIuZ5+wFBDU9gf240fgjhjJgq1bwiW4TrlTh4YhEtHjiPTBCielwIcYFrhrlD4xLTHQC8feSZuZ4t3wZISRfqjuIyu58yhG5H64RifbD5efjzE6KJCivhIpXcK5k1t32lMnlLKzPkSqW2znCXYhRNOQEL+sAllmQNpHVy7LAgr829Jl5AoEuHmYeeCLOIzV5oMdHpQGDDAaG+bo9Yda4n3S1NXNAwU3h8uWsXaAHS1mkgb49+gTJQLfhrxdj2jOHB2HaUA7IyypVXTDuEZzYrYs/+yK2HvmFld/Fqt7ndWqenfl4Qu6+r/JUEHhaGMFNkiChvtVHjLHDOBw7Zrtm5kDzwrvybCVZSrZAwJvudT7eZjRlYrdm2s+v5Q4wVayBslBW02KT/VrXJsuPJKtI7l2jHzIV6M0vmMXU8rlah2gSVl9ZX8mLxcQm7iWbLyWX0S4hixngw3N+j7wltAxYodfkCdJj0BdeH0ZCCKlbANs+lQf5hIzjkC7RcSc2xRnMn1mcyqUlK0BiniSgBSixD3JdpG8UTEYU5nfTVdgsx+fcvje5Dloo6zblKbIVje8vh5MSFjM2yr4nOpbQu95vOW/jSYUjm2WGppCmpBVyWYglp4AlnwDNFL01p3jq+1YixPTZjnp4Bm4XGiGIUnmjBeC18CQ53rg+aWvE7UlOMsoirgU1Y+tAxzbx74xtYfgNjavyD+GtUWkOZPtKSTeR+0uBrfTehFK24QypP5OT3dRbAwRVneySDJOpcQA9xReYpJgoW29GzNLNNoEW+65HIqYQ7WkVj0Z16YOma/WhR4MSHWpOmqxVAYOsGpZw9QnSrY/CFN8uKhYPC4RGONHmk5CP0rTNA0syrBS0XPFsJ8vhgJmB2wjUs46IDX5tFreS7q4axsOSxZMWSQlRHcxSdwFVAepBIfoGWHSUmE0sxpsz+ewCdYtZrWYE0jwEqiTiKR1M4hpn9P1mI0CHri6uRUY2Im86kuEGA5GE9U287rOubVCfC+IxU4vOnNi05fN4lJutdXjweHN7L1ZJ4H0AsFfs8Q3HSHKbn5MTJUlF2rlhNomMlLJnRrDzYiSJ6wIbBXzT8h23WXPMNrTkbh8WkPugEPrp0LTyJI2wurEhhPIlqJwFcpjVVsDmFKmTqMegJsj9C8kHixQ/kyT0AtQ3qTVxgHP/9nxyuglVzdezqlB09yOjVnq/xU+nnTx2RX90Lpf192D23rSvtvfG4LAs2vloKljKG0yIGntFJbikCsv1bQfXwa4cXb6niks4v7irCjLzEtyIDzjYaaSJc0gs69tyumG0bc7AjJa4AvrDtFchN2m9PXGFoOHC0eDMqfANc2VztcYlFEMH0Fp/VsIuiTOSI9Tsb8wjRlrew13EqWUXN48srVHaFfyXUCbSpeelnqCe21EwGOpfgqgUcu/5WdtYH+e7F0Z3xtV6lZNqV7mWYuyyf9C9PviFh0ZECKXivg6vrP4pqDSvuu79ZkR0aTf43NPvGRIIR6Hbjt+Msi3CKsRlLrN8sslxFfB4ZYpQcGmDxTd0vvnarfu0ezz5GU4AXA3Eb4rYdaoB3MRxvbRF/2NMdqb+M5iPTVgRZ7vmDsIogu4O4kgpYNjPE2B66Qz/CbRI6CYFAnF3usKjnNl9k5bFL8d6x+EOZaXm2bZhML5K//tB2TsGl5Bw7sNggC56KqOEOg6WnDIoy4NzzImd8IEamuZdkiaaRl8+/P3Mz+b325kZzAj2e/5feXoup8V/H4edIsIGeIjHNuU+otJ8LQ9EnMFGaZfkiboH7feG1W/n8sZAlusmwcpeISNbskCmQKO44oI8G0WWBpLNo4/5NN1V4XuPGVoIhxQSObLDBHoRttmMNHp3dWv+R9SMxOuswXZYsLUJD5vLD3i9ZzBuLrBdiKgFk7rVFvTrz1CIiBDKeFtvMiEfEtSSQkI5nnh1dHSxRRBrmGa/UME/dCdRGlvTZuHGnq+PgJFlhC3oYLBhOJcw65asHKm94tgLeGeWZ9UytEfuvuL2gIAUUql0sLjgnWBoz84XCkNVMP2fB0Ci6NAbRfE1zJh8PVHezFvvEOl8KvVkLqFtzRqgTvkLV/cjG8bvJsTaHklejY14iv+pG0gYZ4Gkia5jvSzGa3IZEqhOG5hXmEBLcBcfp7ApQ5Ezopt9EJVm4+kRW5nWB6YPiqbzfz8Ab7/uV6GIWSJoG7f0kW1keUtL9SS2n2OxG3S0XWJrYoN9udVviFdl5GqDqTfc4odY9v4fdV3bMgU009S9y6dNRhi3RUTaNIcZHAVbEL0VXzXOi/r4ICjMFXvWVF8xY8RdJPedu9HIbCTq+TPzOgpHoANzm8Rjm2i6J5TLUfqdS7NIHig8M5lni80PlOlnmgvjf5s6PwatrbN6QKMxk8bg6LoI2yGy5ICJ5dncvcR/GgTxHEpz3aknTdMqJMfyST7CmIpTOULEO4zmiKrWYvvlEmaax7j1fJoz4Y1Z29Zm7+mG9lGrCUnsU9CZoAr/d+flJnSWwdwhL/RXhu+pbkdu2gTmg9ar4mwoGYp9GoaefgCIupiL4T3JekNS/MvmZFbiGxl4TVVobj5MsYHawLs5C9AdzjEuK6ktqAr0o1ycBwfj66kuqSnU7KQedmlDs3XmlAqdGk6V2BEs7/b+bfuUJw1FcYf9MVXMQnN1pbDKJVtb+Zrf+AYQ9etUPpsoDxom2NJRgjjdsLkLIPxEZ6HJRAEcnHx49ER+zbdL+7MKolBRzlW4mZHLYkscfx7bqWZsH5PtjDp9Ed1xbHpmwFbv7XV2mYfST6Nu8dLYk/6wkyZybv8hNe1Wj/4o+iMRnOsCUasT9GKF2ezoej1RPzN3GjqR0gfrndn40fXFn4E2n8HP8SKeChiNf++HEzbzd9a7djXE3Xon8/baEaTUBKZUoIZ9OFypU+Ueo0CJpI9CzEipfXp3lGImVhsdQJ2AwRnY6HkXS74sd840HyYzDGL0B8mVvgQwYJQyC+xHRmNUFO9ugmhOmXQjVnkST9XqJpm/vwTAY28C/Al1iKmMjFqWBBNkyRJd6lTus87niZr+tpzBPLW6PZDaAcS5aTPS/dv01W5gLeEhA== -sss_pass=wqnmqqsjyvwv:nqrmYJP@17378XrXlBl -sss_encryptionSalt=zg-vklie-2l1ZlpxiLJ6wQOvbb4TnC9XrxgUEyVQIu6TID4qP4FUUqoS5XrXlBl -addd=BlBlNl -getLocationAreaLinks =https://api.tripz-egypt.com/tripz/ride/location/get_location_area_links.php -anthropicAIkeySeferNewHamzaayedpython=zg-qbc-qvo39-vCB-WnzEwFNArO0YlTapvfhtmguKWsXJSKqg_NZSjHBYVXMZK1yUK88SobdckV0KuPaBh0c_WHtGsRO_439PBk-e2QqgkQQXrXlBl -emailService=seferservice@gmail.com -allowed=Tripz: -allowedWallet=TripzWallet: -passnpassenger=hbgbitbXrXrBr -ALLOWED_ADMIN_PHONES=962798583052,962790849027,962787021927 -newId=new -a=q -b=x -c=f -d=y -e=j -f=u -g=k -h=w -i=o -j=e -k=g -l=r -m=n -n=b -o=i -p=v -q=a -r=l -s=z -t=c -u=h -v=p -w=t -x=d -y=s -z=m - -A=Q -B=X -C=F -D=Y -E=J -F=U -G=K -H=W -I=O -J=E -K=G -L=R -M=N -N=B -O=I -P=V -Q=A -R=L -S=Z -T=C -U=H -V=P -W=T -X=D -Y=S -Z=M \ No newline at end of file diff --git a/siro_service/.gitignore b/siro_service/.gitignore index 3820a95..aa09d9b 100644 --- a/siro_service/.gitignore +++ b/siro_service/.gitignore @@ -43,3 +43,8 @@ app.*.map.json /android/app/debug /android/app/profile /android/app/release + +# Sensitive keys & environment files +key.properties +*.env +**/lib/env/env.g.dart diff --git a/siro_service/lib/env/env.g.dart b/siro_service/lib/env/env.g.dart deleted file mode 100644 index 28c2add..0000000 --- a/siro_service/lib/env/env.g.dart +++ /dev/null @@ -1,2137 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'env.dart'; - -// ************************************************************************** -// EnviedGenerator -// ************************************************************************** - -// coverage:ignore-file -// ignore_for_file: type=lint -// generated_from: .env -final class _Env { - static const List _enviedkeyaddd = [ - 2944646534, - 184956441, - 1523109562, - 1544795598, - 3511617037, - 4160804049, - ]; - - static const List _envieddataaddd = [ - 2944646596, - 184956533, - 1523109624, - 1544795554, - 3511617091, - 4160804029, - ]; - - static final String addd = String.fromCharCodes(List.generate( - _envieddataaddd.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataaddd[i] ^ _enviedkeyaddd[i])); - - static const List _enviedkeygetapiKey = [ - 2035796273, - 3146053856, - 2467356459, - 4257546489, - 2259212003, - 2552026386, - 2908333074, - 2123276852, - 2208891437, - 3307268002, - 239983529, - 927250205, - 3328676268, - 324556092, - 3266286920, - 1040680703, - 74008423, - 1174368731, - 3735078667, - 4255491676, - 3312137385, - 2306497700, - 3299223255, - 2316065890, - 1580413268, - 51660587, - 2239062813, - 178121089, - 3168636322, - 1723499809, - 639423077, - 1154188445, - 2869482367, - 2279247823, - 505069535, - 1373636715, - 2489054678, - 1808738448, - 1558766555, - 2701145693, - 1931617294, - 3928720618, - 3579282095, - 2758907826, - 4072500720, - 3251647712, - 4047031597, - 4273100062, - 1607221376, - 704424241, - 1556739285, - 3270914923, - 2389712261, - 794667618, - 492718785, - 4073563380, - 2032656621, - 373061452, - ]; - - static const List _envieddatagetapiKey = [ - 2035796299, - 3146053767, - 2467356422, - 4257546445, - 2259211936, - 2552026400, - 2908333092, - 2123276869, - 2208891417, - 3307268081, - 239983600, - 927250298, - 3328676334, - 324556151, - 3266286873, - 1040680602, - 74008367, - 1174368641, - 3735078735, - 4255491629, - 3312137410, - 2306497779, - 3299223224, - 2316065813, - 1580413207, - 51660562, - 2239062853, - 178121203, - 3168636378, - 1723499846, - 639423024, - 1154188504, - 2869482265, - 2279247770, - 505069478, - 1373636690, - 2489054620, - 1808738498, - 1558766508, - 2701145711, - 1931617404, - 3928720519, - 3579282073, - 2758907875, - 4072500674, - 3251647617, - 4047031625, - 4273100156, - 1607221427, - 704424282, - 1556739263, - 3270914844, - 2389712349, - 794667536, - 492718745, - 4073563288, - 2032656559, - 373061408, - ]; - - static final String getapiKey = String.fromCharCodes(List.generate( - _envieddatagetapiKey.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatagetapiKey[i] ^ _enviedkeygetapiKey[i])); - - static const List _enviedkeypassnpassenger = [ - 446510466, - 4287105743, - 3247356487, - 3311127524, - 79203576, - 1577808120, - 2459072808, - 3281103088, - 3879323872, - 3963532887, - 2359409106, - 2701858765, - 2913653551, - ]; - - static const List _envieddatapassnpassenger = [ - 446510570, - 4287105709, - 3247356448, - 3311127430, - 79203473, - 1577808012, - 2459072842, - 3281103016, - 3879323794, - 3963532815, - 2359409056, - 2701858703, - 2913653597, - ]; - - static final String passnpassenger = String.fromCharCodes(List.generate( - _envieddatapassnpassenger.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatapassnpassenger[i] ^ _enviedkeypassnpassenger[i])); - - static const List _enviedkeynewId = [ - 3021480117, - 3652665475, - 1216681108, - ]; - - static const List _envieddatanewId = [ - 3021480155, - 3652665574, - 1216681187, - ]; - - static final String newId = String.fromCharCodes(List.generate( - _envieddatanewId.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatanewId[i] ^ _enviedkeynewId[i])); - - static const List _enviedkeyallowed = [ - 2234293514, - 3006141801, - 2399632043, - 1952302208, - 329493009, - 203209763, - ]; - - static const List _envieddataallowed = [ - 2234293598, - 3006141723, - 2399632066, - 1952302320, - 329493099, - 203209753, - ]; - - static final String allowed = String.fromCharCodes(List.generate( - _envieddataallowed.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataallowed[i] ^ _enviedkeyallowed[i])); - - static const List _enviedkeybasicAuthCredentials = [ - 3340092559, - 1048349933, - 3926325779, - 4064542949, - 3504802350, - 689128322, - 534155882, - 853788758, - 1630992554, - 2337068549, - 2866477930, - 3569439651, - 571085485, - 810611111, - 2785721934, - 3361418893, - 1998063976, - 4033983128, - 658107822, - 3831406358, - 2020547745, - 3040819718, - 1738734517, - 485962854, - 2004975045, - 2015268428, - 896019186, - 1566326749, - 919804003, - 3624010482, - 4230096165, - ]; - - static const List _envieddatabasicAuthCredentials = [ - 3340092664, - 1048349852, - 3926325885, - 4064542856, - 3504802399, - 689128435, - 534155801, - 853788732, - 1630992595, - 2337068659, - 2866477853, - 3569439689, - 571085531, - 810611101, - 2785721888, - 3361419004, - 1998063898, - 4033983169, - 658107876, - 3831406406, - 2020547809, - 3040819767, - 1738734466, - 485962837, - 2004975090, - 2015268372, - 896019072, - 1566326661, - 919803919, - 3624010416, - 4230096201, - ]; - - static final String basicAuthCredentials = String.fromCharCodes( - List.generate( - _envieddatabasicAuthCredentials.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatabasicAuthCredentials[i] ^ - _enviedkeybasicAuthCredentials[i])); - - static const List _enviedkeyvisionApi = [ - 581176627, - 1546460188, - 3753242113, - 1368503404, - 2135507973, - 781295285, - 3325815350, - 980777243, - 352976952, - 1598690460, - 1460783347, - 281009227, - 3893150717, - 125113938, - 1381531906, - 72598442, - 755826025, - 1987503711, - 2120277971, - 3141363430, - 617170179, - 2157340339, - 831228006, - 1869399614, - 3436813591, - 2070128414, - 3964803056, - 151747218, - 919256712, - 2916741498, - 3446380381, - 3886353949, - 3536081873, - 1559500787, - 3420307704, - 2217023283, - 3444610791, - 3875158743, - ]; - - static const List _envieddatavisionApi = [ - 581176576, - 1546460268, - 3753242176, - 1368503328, - 2135508086, - 781295300, - 3325815397, - 980777288, - 352976993, - 1598690504, - 1460783237, - 281009201, - 3893150605, - 125113956, - 1381531963, - 72598523, - 755826012, - 1987503641, - 2120277918, - 3141363375, - 617170276, - 2157340369, - 831227932, - 1869399636, - 3436813648, - 2070128424, - 3964802986, - 151747235, - 919256818, - 2916741393, - 3446380329, - 3886354007, - 3536081801, - 1559500673, - 3420307616, - 2217023327, - 3444610725, - 3875158715, - ]; - - static final String visionApi = String.fromCharCodes(List.generate( - _envieddatavisionApi.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatavisionApi[i] ^ _enviedkeyvisionApi[i])); - - static const List _enviedkeysmsPasswordEgypt = [ - 2800302963, - 1416419809, - 2743188693, - 3838247872, - 4060529019, - 4032291392, - 3436926448, - 1803324912, - 2385891593, - 3064127274, - 1287643096, - 372136679, - 3060244136, - 2369012154, - 2846312218, - 2431834177, - ]; - - static const List _envieddatasmsPasswordEgypt = [ - 2800302905, - 1416419784, - 2743188611, - 3838247848, - 4060528966, - 4032291377, - 3436926354, - 1803324895, - 2385891657, - 3064127335, - 1287643008, - 372136597, - 3060244208, - 2369012182, - 2846312280, - 2431834157, - ]; - - static final String smsPasswordEgypt = String.fromCharCodes( - List.generate( - _envieddatasmsPasswordEgypt.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatasmsPasswordEgypt[i] ^ _enviedkeysmsPasswordEgypt[i])); - - static const List _enviedkeyocpApimSubscriptionKey = [ - 3212670649, - 1434796849, - 3427161081, - 1917953402, - 693239346, - 4241495890, - 665908335, - 3592468309, - 1360798934, - 4118122063, - 3172676337, - 1188767714, - 3223034597, - 2426093161, - 792100072, - 3041539554, - 821834604, - 3779328337, - 2263085834, - 3218008018, - 2052729503, - 1325899180, - 979954310, - 69266691, - 147029351, - 1646110931, - 3962682895, - 3031893004, - 1523931480, - 1820407176, - 2704573697, - 4190396675, - ]; - - static const List _envieddataocpApimSubscriptionKey = [ - 3212670601, - 1434796887, - 3427161036, - 1917953310, - 693239379, - 4241495857, - 665908236, - 3592468278, - 1360798898, - 4118122029, - 3172676242, - 1188767623, - 3223034577, - 2426093144, - 792100059, - 3041539539, - 821834510, - 3779328352, - 2263085931, - 3218008039, - 2052729593, - 1325899157, - 979954355, - 69266737, - 147029342, - 1646110954, - 3962682937, - 3031893055, - 1523931496, - 1820407226, - 2704573796, - 4190396720, - ]; - - static final String ocpApimSubscriptionKey = String.fromCharCodes( - List.generate( - _envieddataocpApimSubscriptionKey.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataocpApimSubscriptionKey[i] ^ - _enviedkeyocpApimSubscriptionKey[i])); - - static const List _enviedkeyserverPHP = [ - 884180313, - 4005717553, - 1106734699, - 3429689210, - 1877290658, - 3845575088, - 1078214900, - 1117798411, - 3263206882, - 1809181127, - 3264428409, - 2758496621, - 893715042, - 122379667, - 1675102488, - 4292378762, - 11178325, - 2292151507, - 2307370973, - 2088078708, - 3639047040, - 767189757, - 1549653436, - 2394618647, - 3600972003, - 3574956904, - 2894828690, - 2616220697, - ]; - - static const List _envieddataserverPHP = [ - 884180273, - 4005717573, - 1106734623, - 3429689098, - 1877290705, - 3845575050, - 1078214875, - 1117798436, - 3263206787, - 1809181111, - 3264428304, - 2758496579, - 893714961, - 122379766, - 1675102590, - 4292378863, - 11178279, - 2292151549, - 2307370929, - 2088078621, - 3639047158, - 767189656, - 1549653395, - 2394618724, - 3600971910, - 3574956814, - 2894828791, - 2616220779, - ]; - - static final String serverPHP = String.fromCharCodes(List.generate( - _envieddataserverPHP.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataserverPHP[i] ^ _enviedkeyserverPHP[i])); - - static const List _enviedkeyseferAlexandriaServer = [ - 2381124786, - 1125388689, - 3191350751, - 743746606, - 1329577162, - 1222973518, - 1503356489, - 862967249, - 332680023, - 2689513747, - 918210508, - 3690011715, - 538709206, - 2632963958, - 2570214803, - 2656189670, - 3271641643, - 1187037133, - 3572001393, - 75089705, - 3008552627, - 1927933915, - 2392060827, - 2961584642, - 1791788506, - 283111420, - 2806702586, - 457195779, - 2681820740, - 3878835005, - 266323606, - 1047117602, - 2706997288, - 2599955321, - ]; - - static const List _envieddataseferAlexandriaServer = [ - 2381124826, - 1125388773, - 3191350699, - 743746654, - 1329577145, - 1222973556, - 1503356518, - 862967294, - 332679972, - 2689513846, - 918210474, - 3690011686, - 538709156, - 2632963863, - 2570214911, - 2656189571, - 3271641683, - 1187037100, - 3572001311, - 75089741, - 3008552641, - 1927933874, - 2392060922, - 2961584684, - 1791788457, - 283111317, - 2806702478, - 457195878, - 2681820779, - 3878835022, - 266323699, - 1047117636, - 2706997325, - 2599955211, - ]; - - static final String seferAlexandriaServer = String.fromCharCodes( - List.generate( - _envieddataseferAlexandriaServer.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataseferAlexandriaServer[i] ^ - _enviedkeyseferAlexandriaServer[i])); - - static const List _enviedkeyseferPaymentServer = [ - 2120177226, - 1979596405, - 2087713620, - 1968755197, - 4003342652, - 3672043801, - 3655016466, - 3773834693, - 3629701280, - 4157916645, - 653237921, - 2506582679, - 1078151164, - 3321315326, - 1232737695, - 3525992111, - 3848218034, - 4096223868, - 29161496, - 2634361177, - 2595147465, - 1621343417, - 486565593, - 1756550098, - 2025274596, - 2890487445, - ]; - - static const List _envieddataseferPaymentServer = [ - 2120177186, - 1979596289, - 2087713568, - 1968755085, - 4003342671, - 3672043811, - 3655016509, - 3773834730, - 3629701331, - 4157916544, - 653237959, - 2506582770, - 1078151054, - 3321315214, - 1232737768, - 3525992065, - 3848218049, - 4096223764, - 29161591, - 2634361129, - 2595147494, - 1621343434, - 486565564, - 1756550068, - 2025274497, - 2890487527, - ]; - - static final String seferPaymentServer = String.fromCharCodes( - List.generate( - _envieddataseferPaymentServer.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataseferPaymentServer[i] ^ _enviedkeyseferPaymentServer[i])); - - static const List _enviedkeyseferCairoServer = [ - 4236380159, - 3819299464, - 59838035, - 4035470289, - 954980335, - 3619403605, - 69009252, - 3019991356, - 2824152897, - 521756287, - 1914119911, - 2307220478, - 3637417530, - 2053694398, - 524568142, - 3280211098, - 1659644265, - 3291252722, - 1788832103, - 583815103, - 1320755152, - 2750766973, - 1675619396, - 3690207478, - 2753170802, - 3231770208, - 2358386705, - 1745501215, - 3005356614, - 204799211, - 3282180084, - 2605474808, - 181879134, - 2741330263, - 3117563987, - 4210101245, - 426382330, - 1862828418, - 2182721483, - 3846227384, - 3772222789, - 2020563020, - 71597798, - ]; - - static const List _envieddataseferCairoServer = [ - 4236380055, - 3819299580, - 59837991, - 4035470241, - 954980252, - 3619403631, - 69009227, - 3019991315, - 2824152882, - 521756186, - 1914119829, - 2307220360, - 3637417567, - 2053694412, - 524568160, - 3280211177, - 1659644172, - 3291252628, - 1788832002, - 583815117, - 1320755198, - 2750766865, - 1675619373, - 3690207360, - 2753170711, - 3231770191, - 2358386786, - 1745501306, - 3005356576, - 204799118, - 3282179974, - 2605474774, - 181879101, - 2741330235, - 3117563962, - 4210101150, - 426382225, - 1862828461, - 2182721464, - 3846227421, - 3772222755, - 2020562985, - 71597716, - ]; - - static final String seferCairoServer = String.fromCharCodes( - List.generate( - _envieddataseferCairoServer.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataseferCairoServer[i] ^ _enviedkeyseferCairoServer[i])); - - static const List _enviedkeyseferGizaServer = [ - 1497308605, - 182388587, - 2335833952, - 3101924418, - 4082417418, - 1246314915, - 2900652933, - 1760622675, - 1692409129, - 1378284691, - 3447161248, - 3898819024, - 123423056, - 2973776738, - 1820076317, - 2620384686, - 1684210689, - 4019097015, - 1431146957, - 2548774503, - 1202481663, - 2068086454, - 1478318945, - 2641264135, - 1792201330, - 3628077946, - 2657958807, - 2140803338, - 147474742, - 854324818, - ]; - - static const List _envieddataseferGizaServer = [ - 1497308629, - 182388511, - 2335833876, - 3101924402, - 4082417529, - 1246314905, - 2900652970, - 1760622716, - 1692409166, - 1378284794, - 3447161306, - 3898818993, - 123423011, - 2973776647, - 1820076411, - 2620384715, - 1684210803, - 4019096985, - 1431146914, - 2548774409, - 1202481555, - 2068086495, - 1478318863, - 2641264226, - 1792201309, - 3628077833, - 2657958898, - 2140803436, - 147474771, - 854324768, - ]; - - static final String seferGizaServer = String.fromCharCodes(List.generate( - _envieddataseferGizaServer.length, - (int i) => i, - growable: false, - ).map( - (int i) => _envieddataseferGizaServer[i] ^ _enviedkeyseferGizaServer[i])); - - static const List _enviedkeyanthropicAIkeySeferNew = [ - 4071914277, - 3989653049, - 1873138712, - 1951838920, - 4283539928, - 2102709475, - 2428171286, - 155991429, - 1065796101, - 3052694009, - 4137574792, - 2163231458, - 1729237802, - 691842241, - 851804493, - 3273168242, - 395921001, - 2203562356, - 2541200292, - 192191850, - 2389307380, - 222501594, - 2972448287, - 2046285060, - 1801896535, - 2351706310, - 1445250193, - 3242400720, - 4050570040, - 1937686519, - 3916065903, - 932743805, - 587043528, - 4067563431, - 1222591131, - 4016366933, - 2151023640, - 1179286173, - 3888334434, - 927072863, - 1350894045, - 4180881645, - 376152278, - 878018409, - 757675320, - 3278685439, - 1706103562, - 1887710195, - 3192647199, - 3036506359, - 3274446223, - 2325858435, - 2506620828, - 4276224748, - 1613018488, - 1570710560, - 421561651, - 533224975, - 861232399, - 2230694768, - 3671758495, - 1716939417, - 913158548, - 2190909261, - 1756738519, - 3285191550, - 153005087, - 1781547241, - 3036422092, - 685630520, - 3595175361, - 1670581023, - 166369048, - 1550706533, - 843680759, - 1633179101, - 1834799444, - 3621390405, - 2982485748, - 29863932, - 1689419893, - 4010307460, - 1537775870, - 65913735, - 3650842924, - 3751647823, - 32009632, - 3229065527, - 3987618559, - 3331870389, - 339542212, - 3040478954, - 619268024, - 2868344906, - 3702347591, - 4025971797, - 3022862394, - 2616157518, - 2112464718, - 1732065371, - 230356279, - 11656713, - 3095960857, - 1888337338, - 2362233339, - 1824810359, - 2981756514, - 1570031915, - 678768889, - 3999486820, - 2528681022, - 1726473643, - 867616349, - 3408451333, - 3043426788, - ]; - - static const List _envieddataanthropicAIkeySeferNew = [ - 4071914335, - 3989653086, - 1873138741, - 1951838905, - 4283539898, - 2102709376, - 2428171323, - 155991540, - 1065796211, - 3052693910, - 4137574843, - 2163231451, - 1729237767, - 691842220, - 851804451, - 3273168198, - 395920959, - 2203562256, - 2541200361, - 192191803, - 2389307329, - 222501556, - 2972448362, - 2046285134, - 1801896498, - 2351706255, - 1445250248, - 3242400696, - 4050570101, - 1937686457, - 3916065883, - 932743725, - 587043468, - 4067563518, - 1222591209, - 4016366946, - 2151023721, - 1179286258, - 3888334362, - 927072876, - 1350894064, - 4180881561, - 376152292, - 878018304, - 757675273, - 3278685363, - 1706103650, - 1887710148, - 3192647294, - 3036506297, - 3274446299, - 2325858503, - 2506620922, - 4276224693, - 1613018430, - 1570710541, - 421561716, - 533225065, - 861232439, - 2230694663, - 3671758583, - 1716939468, - 913158622, - 2190909207, - 1756738452, - 3285191437, - 153005099, - 1781547230, - 3036422025, - 685630557, - 3595175332, - 1670581107, - 166369107, - 1550706443, - 843680719, - 1633179010, - 1834799361, - 3621390374, - 2982485657, - 29863849, - 1689419832, - 4010307561, - 1537775767, - 65913812, - 3650842976, - 3751647790, - 32009670, - 3229065479, - 3987618474, - 3331870463, - 339542179, - 3040478938, - 619268092, - 2868344892, - 3702347538, - 4025971769, - 3022862443, - 2616157500, - 2112464650, - 1732065327, - 230356250, - 11656766, - 3095960879, - 1888337401, - 2362233257, - 1824810245, - 2981756425, - 1570031994, - 678768808, - 3999486780, - 2528681036, - 1726473715, - 867616305, - 3408451399, - 3043426696, - ]; - - static final String anthropicAIkeySeferNew = String.fromCharCodes( - List.generate( - _envieddataanthropicAIkeySeferNew.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataanthropicAIkeySeferNew[i] ^ - _enviedkeyanthropicAIkeySeferNew[i])); - - static const List _enviedkeyanthropicAIkeySeferNewHamzaayedpython = - [ - 3009786566, - 4091262606, - 3795942719, - 96677523, - 3541026035, - 1338226181, - 1712387565, - 1276960307, - 1567012643, - 2705405807, - 835869330, - 2569309261, - 3943190725, - 201336230, - 909695920, - 595304714, - 3430183179, - 2521910518, - 2111837691, - 2442903791, - 338093182, - 4101653323, - 3655518250, - 986591685, - 2989682319, - 3726410306, - 1307269584, - 1378182224, - 3544564335, - 455936937, - 1158735567, - 3950841237, - 526487255, - 2546139612, - 4280995000, - 1160449816, - 3813087545, - 1674438581, - 758242437, - 3168516132, - 884880745, - 474835532, - 1740520983, - 1712574983, - 2559463121, - 1368366407, - 633463994, - 4097416448, - 3514187642, - 221909235, - 4214533051, - 4233970271, - 1750387514, - 2341653090, - 21616569, - 545212353, - 4271824021, - 3313361281, - 3323368463, - 4176591512, - 4189027694, - 882829978, - 2450237314, - 2416651749, - 726185425, - 131730347, - 1734683944, - 436117583, - 2236660625, - 3575151050, - 2416003764, - 181777166, - 1384104542, - 1731416674, - 3928830170, - 2277542999, - 802316448, - 2013308795, - 3930796922, - 679945455, - 3147371053, - 893912965, - 2439639132, - 46465841, - 2338054294, - 1136602995, - 3883226935, - 2716541490, - 1568465927, - 3054637257, - 1601600393, - 3637734894, - 1126146121, - 4162125307, - 2502652644, - 1369446736, - 4200767444, - 2238862131, - 648884149, - 1102752962, - 537477088, - 2895056584, - 1389149744, - 787125519, - 3428833862, - 1753344080, - 777572465, - 4041107171, - 145995983, - 643050346, - 593145550, - 4186169845, - 97917703, - 2013944250, - ]; - - static const List _envieddataanthropicAIkeySeferNewHamzaayedpython = - [ - 3009786556, - 4091262697, - 3795942674, - 96677602, - 3541025937, - 1338226278, - 1712387520, - 1276960322, - 1567012693, - 2705405696, - 835869345, - 2569309300, - 3943190760, - 201336272, - 909695987, - 595304776, - 3430183206, - 2521910433, - 2111837589, - 2442903701, - 338093115, - 4101653308, - 3655518316, - 986591627, - 2989682382, - 3726410288, - 1307269535, - 1378182240, - 3544564278, - 455936965, - 1158735515, - 3950841332, - 526487207, - 2546139562, - 4280995038, - 1160449904, - 3813087565, - 1674438616, - 758242530, - 3168516177, - 884880674, - 474835483, - 1740521060, - 1712575071, - 2559463067, - 1368366356, - 633464049, - 4097416561, - 3514187549, - 221909164, - 4214533109, - 4233970181, - 1750387561, - 2341653000, - 21616625, - 545212291, - 4271824076, - 3313361367, - 3323368535, - 4176591573, - 4189027636, - 882830033, - 2450237363, - 2416651676, - 726185348, - 131730400, - 1734683920, - 436117623, - 2236660674, - 3575151013, - 2416003798, - 181777258, - 1384104509, - 1731416585, - 3928830092, - 2277543015, - 802316523, - 2013308686, - 3930796842, - 679945358, - 3147371119, - 893913069, - 2439639148, - 46465874, - 2338054345, - 1136602916, - 3883227007, - 2716541510, - 1568465984, - 3054637242, - 1601600475, - 3637734817, - 1126146070, - 4162125263, - 2502652631, - 1369446761, - 4200767364, - 2238862193, - 648884190, - 1102753007, - 537476997, - 2895056634, - 1389149793, - 787125630, - 3428833825, - 1753344059, - 777572384, - 4041107122, - 145995927, - 643050264, - 593145494, - 4186169753, - 97917765, - 2013944278, - ]; - - static final String anthropicAIkeySeferNewHamzaayedpython = - String.fromCharCodes(List.generate( - _envieddataanthropicAIkeySeferNewHamzaayedpython.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddataanthropicAIkeySeferNewHamzaayedpython[i] ^ - _enviedkeyanthropicAIkeySeferNewHamzaayedpython[i])); - - static const List _enviedkeyA = [893420161]; - - static const List _envieddataA = [893420240]; - - static final String A = String.fromCharCodes(List.generate( - _envieddataA.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataA[i] ^ _enviedkeyA[i])); - - static const List _enviedkeyB = [3269408540]; - - static const List _envieddataB = [3269408580]; - - static final String B = String.fromCharCodes(List.generate( - _envieddataB.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataB[i] ^ _enviedkeyB[i])); - - static const List _enviedkeyC = [1918576547]; - - static const List _envieddataC = [1918576613]; - - static final String C = String.fromCharCodes(List.generate( - _envieddataC.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataC[i] ^ _enviedkeyC[i])); - - static const List _enviedkeyD = [2554216033]; - - static const List _envieddataD = [2554215992]; - - static final String D = String.fromCharCodes(List.generate( - _envieddataD.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataD[i] ^ _enviedkeyD[i])); - - static const List _enviedkeyE = [3033185546]; - - static const List _envieddataE = [3033185600]; - - static final String E = String.fromCharCodes(List.generate( - _envieddataE.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataE[i] ^ _enviedkeyE[i])); - - static const List _enviedkeyF = [3555710056]; - - static const List _envieddataF = [3555710013]; - - static final String F = String.fromCharCodes(List.generate( - _envieddataF.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataF[i] ^ _enviedkeyF[i])); - - static const List _enviedkeyG = [4096959981]; - - static const List _envieddataG = [4096959910]; - - static final String G = String.fromCharCodes(List.generate( - _envieddataG.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataG[i] ^ _enviedkeyG[i])); - - static const List _enviedkeyH = [3666372375]; - - static const List _envieddataH = [3666372416]; - - static final String H = String.fromCharCodes(List.generate( - _envieddataH.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataH[i] ^ _enviedkeyH[i])); - - static const List _enviedkeyI = [1429148901]; - - static const List _envieddataI = [1429148842]; - - static final String I = String.fromCharCodes(List.generate( - _envieddataI.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataI[i] ^ _enviedkeyI[i])); - - static const List _enviedkeyJ = [2734384097]; - - static const List _envieddataJ = [2734384036]; - - static final String J = String.fromCharCodes(List.generate( - _envieddataJ.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataJ[i] ^ _enviedkeyJ[i])); - - static const List _enviedkeyK = [757165462]; - - static const List _envieddataK = [757165521]; - - static final String K = String.fromCharCodes(List.generate( - _envieddataK.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataK[i] ^ _enviedkeyK[i])); - - static const List _enviedkeyL = [3146888544]; - - static const List _envieddataL = [3146888498]; - - static final String L = String.fromCharCodes(List.generate( - _envieddataL.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataL[i] ^ _enviedkeyL[i])); - - static const List _enviedkeyM = [1794207372]; - - static const List _envieddataM = [1794207426]; - - static final String M = String.fromCharCodes(List.generate( - _envieddataM.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataM[i] ^ _enviedkeyM[i])); - - static const List _enviedkeyN = [429102337]; - - static const List _envieddataN = [429102403]; - - static final String N = String.fromCharCodes(List.generate( - _envieddataN.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataN[i] ^ _enviedkeyN[i])); - - static const List _enviedkeyO = [2279665789]; - - static const List _envieddataO = [2279665716]; - - static final String O = String.fromCharCodes(List.generate( - _envieddataO.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataO[i] ^ _enviedkeyO[i])); - - static const List _enviedkeyP = [3642215970]; - - static const List _envieddataP = [3642216052]; - - static final String P = String.fromCharCodes(List.generate( - _envieddataP.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataP[i] ^ _enviedkeyP[i])); - - static const List _enviedkeyQ = [1682613368]; - - static const List _envieddataQ = [1682613305]; - - static final String Q = String.fromCharCodes(List.generate( - _envieddataQ.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataQ[i] ^ _enviedkeyQ[i])); - - static const List _enviedkeyR = [1636111286]; - - static const List _envieddataR = [1636111354]; - - static final String R = String.fromCharCodes(List.generate( - _envieddataR.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataR[i] ^ _enviedkeyR[i])); - - static const List _enviedkeyS = [2459926478]; - - static const List _envieddataS = [2459926420]; - - static final String S = String.fromCharCodes(List.generate( - _envieddataS.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataS[i] ^ _enviedkeyS[i])); - - static const List _enviedkeyT = [363838866]; - - static const List _envieddataT = [363838929]; - - static final String T = String.fromCharCodes(List.generate( - _envieddataT.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataT[i] ^ _enviedkeyT[i])); - - static const List _enviedkeyU = [38484038]; - - static const List _envieddataU = [38483982]; - - static final String U = String.fromCharCodes(List.generate( - _envieddataU.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataU[i] ^ _enviedkeyU[i])); - - static const List _enviedkeyV = [2863470470]; - - static const List _envieddataV = [2863470550]; - - static final String V = String.fromCharCodes(List.generate( - _envieddataV.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataV[i] ^ _enviedkeyV[i])); - - static const List _enviedkeyW = [2838476573]; - - static const List _envieddataW = [2838476617]; - - static final String W = String.fromCharCodes(List.generate( - _envieddataW.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataW[i] ^ _enviedkeyW[i])); - - static const List _enviedkeyX = [3057464704]; - - static const List _envieddataX = [3057464772]; - - static final String X = String.fromCharCodes(List.generate( - _envieddataX.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataX[i] ^ _enviedkeyX[i])); - - static const List _enviedkeyY = [1241320716]; - - static const List _envieddataY = [1241320799]; - - static final String Y = String.fromCharCodes(List.generate( - _envieddataY.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataY[i] ^ _enviedkeyY[i])); - - static const List _enviedkeyZ = [1255209364]; - - static const List _envieddataZ = [1255209433]; - - static final String Z = String.fromCharCodes(List.generate( - _envieddataZ.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataZ[i] ^ _enviedkeyZ[i])); - - static const List _enviedkeya = [568085047]; - - static const List _envieddataa = [568085062]; - - static final String a = String.fromCharCodes(List.generate( - _envieddataa.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataa[i] ^ _enviedkeya[i])); - - static const List _enviedkeyb = [1642026309]; - - static const List _envieddatab = [1642026301]; - - static final String b = String.fromCharCodes(List.generate( - _envieddatab.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatab[i] ^ _enviedkeyb[i])); - - static const List _enviedkeyc = [2509013684]; - - static const List _envieddatac = [2509013714]; - - static final String c = String.fromCharCodes(List.generate( - _envieddatac.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatac[i] ^ _enviedkeyc[i])); - - static const List _enviedkeyd = [1008508797]; - - static const List _envieddatad = [1008508676]; - - static final String d = String.fromCharCodes(List.generate( - _envieddatad.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatad[i] ^ _enviedkeyd[i])); - - static const List _enviedkeye = [1352402714]; - - static const List _envieddatae = [1352402800]; - - static final String e = String.fromCharCodes(List.generate( - _envieddatae.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatae[i] ^ _enviedkeye[i])); - - static const List _enviedkeyf = [2569205088]; - - static const List _envieddataf = [2569205013]; - - static final String f = String.fromCharCodes(List.generate( - _envieddataf.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataf[i] ^ _enviedkeyf[i])); - - static const List _enviedkeyg = [2879075999]; - - static const List _envieddatag = [2879076084]; - - static final String g = String.fromCharCodes(List.generate( - _envieddatag.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatag[i] ^ _enviedkeyg[i])); - - static const List _enviedkeyh = [375583189]; - - static const List _envieddatah = [375583138]; - - static final String h = String.fromCharCodes(List.generate( - _envieddatah.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatah[i] ^ _enviedkeyh[i])); - - static const List _enviedkeyi = [4210731010]; - - static const List _envieddatai = [4210731117]; - - static final String i = String.fromCharCodes(List.generate( - _envieddatai.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatai[i] ^ _enviedkeyi[i])); - - static const List _enviedkeyj = [6131337]; - - static const List _envieddataj = [6131436]; - - static final String j = String.fromCharCodes(List.generate( - _envieddataj.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataj[i] ^ _enviedkeyj[i])); - - static const List _enviedkeyk = [221621693]; - - static const List _envieddatak = [221621722]; - - static final String k = String.fromCharCodes(List.generate( - _envieddatak.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatak[i] ^ _enviedkeyk[i])); - - static const List _enviedkeyl = [2294132260]; - - static const List _envieddatal = [2294132310]; - - static final String l = String.fromCharCodes(List.generate( - _envieddatal.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatal[i] ^ _enviedkeyl[i])); - - static const List _enviedkeym = [2608084000]; - - static const List _envieddatam = [2608084046]; - - static final String m = String.fromCharCodes(List.generate( - _envieddatam.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatam[i] ^ _enviedkeym[i])); - - static const List _enviedkeyn = [2601175985]; - - static const List _envieddatan = [2601176019]; - - static final String n = String.fromCharCodes(List.generate( - _envieddatan.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatan[i] ^ _enviedkeyn[i])); - - static const List _enviedkeyo = [3909994747]; - - static const List _envieddatao = [3909994642]; - - static final String o = String.fromCharCodes(List.generate( - _envieddatao.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatao[i] ^ _enviedkeyo[i])); - - static const List _enviedkeyp = [651725330]; - - static const List _envieddatap = [651725412]; - - static final String p = String.fromCharCodes(List.generate( - _envieddatap.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatap[i] ^ _enviedkeyp[i])); - - static const List _enviedkeyq = [1325950910]; - - static const List _envieddataq = [1325950943]; - - static final String q = String.fromCharCodes(List.generate( - _envieddataq.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataq[i] ^ _enviedkeyq[i])); - - static const List _enviedkeyr = [3271274506]; - - static const List _envieddatar = [3271274598]; - - static final String r = String.fromCharCodes(List.generate( - _envieddatar.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatar[i] ^ _enviedkeyr[i])); - - static const List _enviedkeys = [2336036811]; - - static const List _envieddatas = [2336036785]; - - static final String s = String.fromCharCodes(List.generate( - _envieddatas.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatas[i] ^ _enviedkeys[i])); - - static const List _enviedkeyt = [1383478533]; - - static const List _envieddatat = [1383478630]; - - static final String t = String.fromCharCodes(List.generate( - _envieddatat.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatat[i] ^ _enviedkeyt[i])); - - static const List _enviedkeyu = [2444286973]; - - static const List _envieddatau = [2444286869]; - - static final String u = String.fromCharCodes(List.generate( - _envieddatau.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatau[i] ^ _enviedkeyu[i])); - - static const List _enviedkeyv = [1458112617]; - - static const List _envieddatav = [1458112537]; - - static final String v = String.fromCharCodes(List.generate( - _envieddatav.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatav[i] ^ _enviedkeyv[i])); - - static const List _enviedkeyw = [71924034]; - - static const List _envieddataw = [71924022]; - - static final String w = String.fromCharCodes(List.generate( - _envieddataw.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataw[i] ^ _enviedkeyw[i])); - - static const List _enviedkeyx = [1359006522]; - - static const List _envieddatax = [1359006558]; - - static final String x = String.fromCharCodes(List.generate( - _envieddatax.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatax[i] ^ _enviedkeyx[i])); - - static const List _enviedkeyy = [3332150537]; - - static const List _envieddatay = [3332150650]; - - static final String y = String.fromCharCodes(List.generate( - _envieddatay.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatay[i] ^ _enviedkeyy[i])); - - static const List _enviedkeyz = [1824355608]; - - static const List _envieddataz = [1824355701]; - - static final String z = String.fromCharCodes(List.generate( - _envieddataz.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataz[i] ^ _enviedkeyz[i])); - - static const List _enviedkeyemailService = [ - 3775596196, - 2947443596, - 2783847140, - 2247685356, - 972079067, - 141322098, - 4019086335, - 1237348697, - 3250824773, - 3850928265, - 4082170899, - 1227740946, - 982988325, - 1647984014, - 3223470789, - 1423577108, - 202587414, - 1418586202, - 2719748979, - 166166698, - 86664357, - 3870217031, - ]; - - static const List _envieddataemailService = [ - 3775596247, - 2947443689, - 2783847042, - 2247685257, - 972079017, - 141321985, - 4019086234, - 1237348651, - 3250824755, - 3850928352, - 4082170992, - 1227741047, - 982988389, - 1647984105, - 3223470760, - 1423577205, - 202587519, - 1418586166, - 2719748957, - 166166729, - 86664394, - 3870217002, - ]; - - static final String emailService = String.fromCharCodes(List.generate( - _envieddataemailService.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddataemailService[i] ^ _enviedkeyemailService[i])); - - static const List _enviedkeykeyOfApp = [ - 2023410308, - 757112951, - 1537122277, - 668521675, - 1384900157, - 1069054411, - 1160080514, - 1218153233, - 2914773850, - 2034327881, - 2324138750, - 2321692888, - 3624635087, - 1533165910, - 4023632749, - 2534181527, - 241083972, - 1149945117, - 4121376070, - 2975459637, - 2695352352, - 2957292566, - 3706548337, - 756631617, - 2608661645, - 1703794510, - 2209741081, - 1087161357, - 137999115, - 4041442026, - 2564469806, - 1668093012, - 365507902, - 1161868895, - 4250793820, - 2906820781, - 4024524669, - 3088096180, - ]; - - static const List _envieddatakeyOfApp = [ - 2023410406, - 757112854, - 1537122185, - 668521656, - 1384900184, - 1069054397, - 1160080578, - 1218153254, - 2914773868, - 2034327920, - 2324138696, - 2321692844, - 3624635054, - 1533165876, - 4023632643, - 2534181622, - 241083941, - 1149945191, - 4121376035, - 2975459654, - 2695352397, - 2957292659, - 3706548249, - 756631588, - 2608661759, - 1703794475, - 2209741182, - 1087161463, - 137999227, - 4041441932, - 2564469828, - 1668092987, - 365507942, - 1161868845, - 4250793732, - 2906820831, - 4024524607, - 3088096198, - ]; - - static final String keyOfApp = String.fromCharCodes(List.generate( - _envieddatakeyOfApp.length, - (int i) => i, - growable: false, - ).map((int i) => _envieddatakeyOfApp[i] ^ _enviedkeykeyOfApp[i])); - - static const List _enviedkeyinitializationVector = [ - 1863003107, - 2204174216, - 327868560, - 2737928160, - 3801385149, - 1059481659, - 503276973, - 1884809156, - 1130110591, - 1537276675, - 782730225, - 683683819, - 158991753, - 2666883667, - 2093242061, - 1415878199, - 2125531306, - 1655743922, - 3305664976, - 2536898978, - 929195412, - 2402803151, - ]; - - static const List _envieddatainitializationVector = [ - 1863003026, - 2204174320, - 327868662, - 2737928089, - 3801385175, - 1059481678, - 503276998, - 1884809139, - 1130110480, - 1537276774, - 782730134, - 683683737, - 158991847, - 2666883633, - 2093242020, - 1415878209, - 2125531378, - 1655743936, - 3305664904, - 2536899024, - 929195478, - 2402803133, - ]; - - static final String initializationVector = String.fromCharCodes( - List.generate( - _envieddatainitializationVector.length, - (int i) => i, - growable: false, - ).map((int i) => - _envieddatainitializationVector[i] ^ - _enviedkeyinitializationVector[i])); -} diff --git a/transform_links.dart b/transform_links.dart new file mode 100644 index 0000000..edde3b4 --- /dev/null +++ b/transform_links.dart @@ -0,0 +1,55 @@ +import 'dart:io'; + +void main(List args) { + if (args.isEmpty) { + print('Usage: dart transform_links.dart '); + return; + } + + File file = File(args[0]); + if (!file.existsSync()) { + print('File not found: ${args[0]}'); + return; + } + + List lines = file.readAsLinesSync(); + List newLines = []; + + for (String line in lines) { + // We only want to transform static String declarations inside the class. + if (line.trim().startsWith('static String ') || line.trim().startsWith('static final String ') || line.trim().startsWith('static const String ')) { + // Don't transform appDomain or if it's already a getter + if (line.contains(' get ') || line.contains('appDomain')) { + newLines.add(line); + continue; + } + + String modified = line; + // Remove 'final ' and 'const ' since getters can't be final/const + modified = modified.replaceAll('static final String ', 'static String '); + modified = modified.replaceAll('static const String ', 'static String '); + + // Replace '=' with '=>' and remove ';' to add it later? + // Actually, it's easier: `static String X = Y;` -> `static String get X => Y;` + int eqIndex = modified.indexOf('='); + if (eqIndex != -1) { + String beforeEq = modified.substring(0, eqIndex).trimRight(); // e.g. "static String paymentServer" + String afterEq = modified.substring(eqIndex + 1); // e.g. " 'https://...';" + + // Insert 'get ' before the variable name + List parts = beforeEq.split(' '); + String varName = parts.last; + parts.removeLast(); + beforeEq = parts.join(' ') + ' get ' + varName; + + modified = beforeEq + ' =>' + afterEq; + } + newLines.add(modified); + } else { + newLines.add(line); + } + } + + file.writeAsStringSync(newLines.join('\n')); + print('Transformed ${args[0]}'); +} diff --git a/transform_links.py b/transform_links.py new file mode 100644 index 0000000..b578e9a --- /dev/null +++ b/transform_links.py @@ -0,0 +1,47 @@ +import sys +import os + +def transform(filepath): + if not os.path.exists(filepath): + print(f"File not found: {filepath}") + return + + with open(filepath, 'r') as f: + lines = f.readlines() + + new_lines = [] + for line in lines: + stripped = line.strip() + if stripped.startswith('static String ') or stripped.startswith('static final String ') or stripped.startswith('static const String '): + if ' get ' in line or 'appDomain' in line: + new_lines.append(line) + continue + + modified = line.replace('static final String ', 'static String ') + modified = modified.replace('static const String ', 'static String ') + + eq_index = modified.find('=') + if eq_index != -1: + before_eq = modified[:eq_index].rstrip() + after_eq = modified[eq_index+1:] + + parts = before_eq.split() + var_name = parts[-1] + parts.pop() + + before_eq = ' '.join(parts) + ' get ' + var_name + modified = before_eq + ' =>' + after_eq + new_lines.append(modified) + else: + new_lines.append(line) + + with open(filepath, 'w') as f: + f.writelines(new_lines) + print(f"Transformed {filepath}") + +if __name__ == '__main__': + if len(sys.argv) < 2: + print("Usage: python3 transform_links.py ") + else: + for f in sys.argv[1:]: + transform(f) diff --git a/walletintaleq.intaleq.xyz/mtnpayment.html b/walletintaleq.intaleq.xyz/mtnpayment.html new file mode 100755 index 0000000..1f6c69f --- /dev/null +++ b/walletintaleq.intaleq.xyz/mtnpayment.html @@ -0,0 +1,292 @@ + + + + + + الدليل التفاعلي للتكامل بين Intaleq و MTN + + + + + + + +
+ +
+
+ +
+

الدليل التفاعلي للتكامل بين Intaleq و MTN

+

دليلك الكامل لفهم واختبار آلية الدفع عبر MTN. تم تصميم هذا الدليل لتسهيل عملية التطوير وضمان تكامل سلس وفعال.

+
+ +
+ + +
+

آلية عمل دورة الدفع

+
+
+
1
+

إنشاء الفاتورة

+

يبدأ المستخدم (سائق/راكب) عملية الدفع من تطبيق Intaleq، فيقوم نظامنا بإنشاء فاتورة داخلية بحالة "انتظار".

+
+
+
2
+

استعلام MTN

+

عندما يقوم المستخدم بفتح تطبيق MTN Cash Mobile للدفع، يقوم سيرفر MTN بإرسال طلب استعلام إلى سيرفرنا باستخدام رقم هاتف المستخدم للتحقق من وجود فاتورة معلقة وقيمتها.

+
+
+
3
+

تأكيد الدفع

+

بعد أن يكمل المستخدم عملية الدفع بنجاح في تطبيق MTN، يقوم سيرفر MTN بإرسال طلب تأكيد (Webhook) إلى سيرفرنا يحتوي على تفاصيل العملية الناجحة.

+
+
+
4
+

إتمام العملية

+

يتحقق سيرفرنا من صحة طلب التأكيد، ويقوم بتحديث حالة الفاتورة إلى "مكتملة"، ثم يضيف الرصيد تلقائياً إلى محفظة المستخدم في تطبيق Intaleq.

+
+
+
+ + +
+

آلية الحماية والتوثيق

+

لضمان أن جميع الطلبات تأتي من مصدر موثوق (سيرفرات MTN حصراً)، نعتمد على آلية المفتاح السري المشترك (Shared Secret Key). يجب على سيرفراتكم إرسال هذا المفتاح في كل طلب يتم إرساله إلى نقاط النهاية الخاصة بنا.

+
+

الهيدر المطلوب: X-AUTH-TOKEN

+
+

سيتم تزويدكم بالمفتاح السري (Secret Key) بشكل آمن عبر قنوات التواصل الرسمية.

+
+
+
+ + +
+
+
+ +
+
+

زيادة مستوى الأمان: القائمة البيضاء (IP Whitelisting)

+

للوصول إلى أعلى مستويات الأمان وحماية التكامل، نعتمد آلية القائمة البيضاء لعناوين IP. هذه الآلية تضمن أن سيرفراتنا لن تقبل الطلبات إلا من سيرفرات MTN المصرح بها حصراً.

+
+

الإجراء المطلوب:

+

نرجو منكم تزويدنا بقائمة ثابتة وكاملة لجميع عناوين IP العامة (Public IPs) التي تستخدمونها لإرسال الطلبات إلى نقاط النهاية الخاصة بنا، ليقوم فريقنا بإضافتها إلى جدار الحماية.

+
+
+
+
+ + + +
+

نقاط النهاية (API Endpoints)

+
+ + +
+ + +
+

نقطة النهاية: الاستعلام عن فاتورة

+

تستخدمها سيرفرات MTN للتحقق من وجود فاتورة معلقة لمستخدم معين قبل عرضها له في تطبيق الدفع.

+
+
+

تفاصيل الطلب:

+
+

Method: GET

+
+

URL:

+
+ https://walletintaleq.intaleq.xyz/v1/main/ride/mtn_new/query_mtn_invoice.php + +
+
+

Header: X-AUTH-TOKEN: [المفتاح السري]

+

Query Parameter:

+
    +
  • phone_number (إلزامي): رقم هاتف المستخدم.
  • +
+
+
+
+

جرّب الآن:

+
+
+ + +
+ +
+
+
+
+

الاستجابات المتوقعة:

+
// The response from the server will appear here...
+
+
+ + +
+

نقطة النهاية: تأكيد الدفع (Webhook)

+

بعد إتمام الدفع، يجب على سيرفرات MTN إرسال طلب إلى نقطة النهاية هذه لتأكيد العملية وإضافة الرصيد للمستخدم.

+
+
+

تفاصيل الطلب:

+
+

Method: POST

+
+

URL:

+
+ https://walletintaleq.intaleq.xyz/v1/main/ride/mtn_new/mtn_webhook_handler.php + +
+
+

Header: X-AUTH-TOKEN: [المفتاح السري]

+

Body (JSON): انظر هيكل البيانات أدناه.

+
+
+
+

جرّب الآن:

+
+
+ + +
+ +
+
+
+
+

هيكل JSON Body والاستجابات المتوقعة:

+
// The response from the server will appear here...
+
+// Example Request Body:
+{
+    "invoice_number": "MTN-FAKE-12345",
+    "transaction_id": "MTN_TRX_ABC123456",
+    "amount_paid": 50000.00,
+    "status": "success",
+    "payment_timestamp": "2023-03-15T12:00:00Z"
+}
+
+
+ +
+
+ +
+

© 2025 Intaleq. All rights reserved.

+
+ +
+ + + + + diff --git a/walletintaleq.intaleq.xyz/ttt.php b/walletintaleq.intaleq.xyz/ttt.php new file mode 100755 index 0000000..e1b18f5 --- /dev/null +++ b/walletintaleq.intaleq.xyz/ttt.php @@ -0,0 +1,12 @@ + 128 hex chars + $token = bin2hex(random_bytes(64)); + echo "Token (128 chars): " . $token . PHP_EOL; +} catch (Exception $e) { + // random_bytes قد يرمي Exception إذا لم تتوفر مصادر عشوائية كافية + fwrite(STDERR, "Failed to generate token: " . $e->getMessage() . PHP_EOL); + exit(1); +} \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/composer.json b/walletintaleq.intaleq.xyz/v2/composer.json new file mode 100644 index 0000000..daf2904 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/composer.json @@ -0,0 +1,12 @@ +{ + "name": "root/v1", + "autoload": { + "psr-4": { + "Root\\V1\\": "src/" + } + }, + "require": { + "firebase/php-jwt": "^6.11", + "vlucas/phpdotenv": "^5.6" + } +} diff --git a/walletintaleq.intaleq.xyz/v2/composer.lock b/walletintaleq.intaleq.xyz/v2/composer.lock new file mode 100644 index 0000000..2b446d0 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/composer.lock @@ -0,0 +1,543 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "b5ca8e9d1f3a2639d0ba6eaeb261ec12", + "packages": [ + { + "name": "firebase/php-jwt", + "version": "v6.11.1", + "source": { + "type": "git", + "url": "https://github.com/firebase/php-jwt.git", + "reference": "d1e91ecf8c598d073d0995afa8cd5c75c6e19e66" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/d1e91ecf8c598d073d0995afa8cd5c75c6e19e66", + "reference": "d1e91ecf8c598d073d0995afa8cd5c75c6e19e66", + "shasum": "" + }, + "require": { + "php": "^8.0" + }, + "require-dev": { + "guzzlehttp/guzzle": "^7.4", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.5", + "psr/cache": "^2.0||^3.0", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0" + }, + "suggest": { + "ext-sodium": "Support EdDSA (Ed25519) signatures", + "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present" + }, + "type": "library", + "autoload": { + "psr-4": { + "Firebase\\JWT\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Neuman Vong", + "email": "neuman+pear@twilio.com", + "role": "Developer" + }, + { + "name": "Anant Narayanan", + "email": "anant@php.net", + "role": "Developer" + } + ], + "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.", + "homepage": "https://github.com/firebase/php-jwt", + "keywords": [ + "jwt", + "php" + ], + "support": { + "issues": "https://github.com/firebase/php-jwt/issues", + "source": "https://github.com/firebase/php-jwt/tree/v6.11.1" + }, + "time": "2025-04-09T20:32:01+00:00" + }, + { + "name": "graham-campbell/result-type", + "version": "v1.1.3", + "source": { + "type": "git", + "url": "https://github.com/GrahamCampbell/Result-Type.git", + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/3ba905c11371512af9d9bdd27d99b782216b6945", + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.3" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" + }, + "type": "library", + "autoload": { + "psr-4": { + "GrahamCampbell\\ResultType\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "An Implementation Of The Result Type", + "keywords": [ + "Graham Campbell", + "GrahamCampbell", + "Result Type", + "Result-Type", + "result" + ], + "support": { + "issues": "https://github.com/GrahamCampbell/Result-Type/issues", + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.3" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", + "type": "tidelift" + } + ], + "time": "2024-07-20T21:45:45+00:00" + }, + { + "name": "phpoption/phpoption", + "version": "1.9.3", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/php-option.git", + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/e3fac8b24f56113f7cb96af14958c0dd16330f54", + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpOption\\": "src/PhpOption/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh" + }, + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "Option Type for PHP", + "keywords": [ + "language", + "option", + "php", + "type" + ], + "support": { + "issues": "https://github.com/schmittjoh/php-option/issues", + "source": "https://github.com/schmittjoh/php-option/tree/1.9.3" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", + "type": "tidelift" + } + ], + "time": "2024-07-20T21:41:07+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.32.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.32.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.32.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", + "shasum": "" + }, + "require": { + "ext-iconv": "*", + "php": ">=7.2" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.32.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-12-23T08:48:59+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.32.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/0cc9dd0f17f61d8131e7df6b84bd344899fe2608", + "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.32.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-01-02T08:10:11+00:00" + }, + { + "name": "vlucas/phpdotenv", + "version": "v5.6.2", + "source": { + "type": "git", + "url": "https://github.com/vlucas/phpdotenv.git", + "reference": "24ac4c74f91ee2c193fa1aaa5c249cb0822809af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/24ac4c74f91ee2c193fa1aaa5c249cb0822809af", + "reference": "24ac4c74f91ee2c193fa1aaa5c249cb0822809af", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "graham-campbell/result-type": "^1.1.3", + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.3", + "symfony/polyfill-ctype": "^1.24", + "symfony/polyfill-mbstring": "^1.24", + "symfony/polyfill-php80": "^1.24" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "ext-filter": "*", + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + }, + "suggest": { + "ext-filter": "Required to use the boolean validator." + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, + "branch-alias": { + "dev-master": "5.6-dev" + } + }, + "autoload": { + "psr-4": { + "Dotenv\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Vance Lucas", + "email": "vance@vancelucas.com", + "homepage": "https://github.com/vlucas" + } + ], + "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "keywords": [ + "dotenv", + "env", + "environment" + ], + "support": { + "issues": "https://github.com/vlucas/phpdotenv/issues", + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.2" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", + "type": "tidelift" + } + ], + "time": "2025-04-30T23:37:27+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": {}, + "prefer-stable": false, + "prefer-lowest": false, + "platform": {}, + "platform-dev": {}, + "plugin-api-version": "2.6.0" +} diff --git a/walletintaleq.intaleq.xyz/v2/main/.DS_Store b/walletintaleq.intaleq.xyz/v2/main/.DS_Store new file mode 100755 index 0000000..9800318 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/.DS_Store differ diff --git a/walletintaleq.intaleq.xyz/v2/main/.env b/walletintaleq.intaleq.xyz/v2/main/.env new file mode 100755 index 0000000..b6a8017 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/.env @@ -0,0 +1,17 @@ +PASS=@:1F62hwYsdmju^1RpXrXlBl +USER=seferli1_spd563608XrXlBl +USERNAME=hamzaphFlut@g.cXrXlBl +PASSWORD=malFlu@2101Ham +SECRET_KEY=seferegypt +CLAUDAISEFER=zg-qbc-qvo39-n4VdMQ5nuJeIYhMN4PDYr7qox3-t2i1Lh7aNTDfYF-Gf8whUJZCs47EeelKn8_UcmUMmiSLaf0UJg0DvUlQrDt-76CRrkQQXrXlBl +PASSWORDPAYMOB=g@nkD2#99!hD_.wXrXlBl +PAYMOBOUTCLIENTSECRET=xyjjRlahJM0Xc38WjApCOh8bvgL9slFpNdM9YeCu9AhLqboKMPtmSvc2N9O4tXxFLV2JAV6stBSTAGFGCVubGe6MNpc7MzJnZ3SiT6GpavBoCLWkUvVbdSDaM0zHvuBOXrXlBl +PAYMOBOUTCLIENT_ID=Z05ut48dVkS2gI2zenFFcKsfDKfHAU0WELqKyJ0LXrXlBl +PayPalClientIdLive=QZFjAoZfGtngNserll6r3cC56Xl1sVLQkn5dMbyebhzJY59EQ3hz7YxaEqEDYPTUFcQWqvePaQ5UJJVRXrXlBl +SMSPASSWORDEGYPT=J)Vh=qb/@MXrXlBl +OCP-APIM-SUBSCRIPTION-KEY=3u5yqfffyxfj0797x7q5u851882931j9XrXlBl +visionApi=3pALsqSSYTvzp69Q5FMIgbzjG6Z1zktJXrXlBl +payPalSecretLive=JQDATqnDfiFpEAN60KB4pGpDaJjyqBAd9jxMBPpzWU1P1k3H1jZhQjn73EHsKQna74P8p98hgOnMaWPWXrXlBl +publishableKeyStripe=vg_ropj_57Iiv6MFCBFq3C2n6kNJnZByV6nuDtXe9IjEPOfhmpDtWmt3MLR0gQpiHcQmAFMUPrZc3QiCDjxBZLbxDC3efxWxz33bWH1ZgrsXrXlBl +secretKeyStripe=zg_ropj_57Iiv6MFCBFq3C2n6IXlmjykpxDmW93SW3vvXh68UA9T5FORTWgWsT37StKsOPdwDdsy8qR9srMUluahs3nPHvgBa33tGk90vV5XrXlBl +passwordnewpassenger=unknown \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/.htaccess b/walletintaleq.intaleq.xyz/v2/main/.htaccess new file mode 100755 index 0000000..9486526 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/.htaccess @@ -0,0 +1,6 @@ +# DO NOT REMOVE OR MODIFY. CLOUDLINUX ENV VARS CONFIGURATION BEGIN + +SetEnv appId 12994c6e707543e68d5638894d04f989 +SetEnv appCertificate e21a388f83034a159f2783889a6d7bcf + +# DO NOT REMOVE OR MODIFY. CLOUDLINUX ENV VARS CONFIGURATION END \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/Admin/.DS_Store b/walletintaleq.intaleq.xyz/v2/main/Admin/.DS_Store new file mode 100644 index 0000000..fa8c467 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/Admin/.DS_Store differ diff --git a/walletintaleq.intaleq.xyz/v2/main/Admin/AdminCaptain/add.php b/walletintaleq.intaleq.xyz/v2/main/Admin/AdminCaptain/add.php new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/Admin/AdminCaptain/delete.php b/walletintaleq.intaleq.xyz/v2/main/Admin/AdminCaptain/delete.php new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/Admin/AdminCaptain/error_log b/walletintaleq.intaleq.xyz/v2/main/Admin/AdminCaptain/error_log new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/Admin/AdminCaptain/get.php b/walletintaleq.intaleq.xyz/v2/main/Admin/AdminCaptain/get.php new file mode 100644 index 0000000..a33db6e --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/Admin/AdminCaptain/get.php @@ -0,0 +1,103 @@ +prepare($sql); +$stmt->execute(); +$result = $stmt->fetchAll(PDO::FETCH_ASSOC); + +if ($stmt->rowCount() > 0) { + // Print all the records + // printData($result); + printSuccess($data = $result); +} else { + // Print a failure message + printFailure($message = "No records found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/Admin/AdminCaptain/getCaptainDetailsByEmailOrIDOrPhone.php b/walletintaleq.intaleq.xyz/v2/main/Admin/AdminCaptain/getCaptainDetailsByEmailOrIDOrPhone.php new file mode 100644 index 0000000..9dcd557 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/Admin/AdminCaptain/getCaptainDetailsByEmailOrIDOrPhone.php @@ -0,0 +1,109 @@ +prepare($sql); +$stmt->execute(); +$result = $stmt->fetchAll(PDO::FETCH_ASSOC); + +if ($stmt->rowCount() > 0) { + // Print all the records + // printData($result); + printSuccess($data = $result); +} else { + // Print a failure message + printFailure($message = "No records found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/Admin/AdminCaptain/getCaptainDetailsById.php b/walletintaleq.intaleq.xyz/v2/main/Admin/AdminCaptain/getCaptainDetailsById.php new file mode 100644 index 0000000..cb51767 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/Admin/AdminCaptain/getCaptainDetailsById.php @@ -0,0 +1,107 @@ +prepare($sql); +$stmt->execute(); +$result = $stmt->fetchAll(PDO::FETCH_ASSOC); + +if ($stmt->rowCount() > 0) { + // Print all the records + // printData($result); + printSuccess($data = $result); +} else { + // Print a failure message + printFailure($message = "No records found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/Admin/AdminCaptain/update.php b/walletintaleq.intaleq.xyz/v2/main/Admin/AdminCaptain/update.php new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/Admin/AdminRide/get.php b/walletintaleq.intaleq.xyz/v2/main/Admin/AdminRide/get.php new file mode 100644 index 0000000..3272b1d --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/Admin/AdminRide/get.php @@ -0,0 +1,145 @@ +prepare($sql); +$stmt->execute(); +$result = $stmt->fetchAll(PDO::FETCH_ASSOC); + +if ($stmt->rowCount() > 0) { + // Print all the records + // printData($result); + printSuccess($data = $result); +} else { + // Print a failure message + printFailure($message = "No records found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/Admin/AdminRide/getRidesPerMonth.php b/walletintaleq.intaleq.xyz/v2/main/Admin/AdminRide/getRidesPerMonth.php new file mode 100644 index 0000000..a42c10c --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/Admin/AdminRide/getRidesPerMonth.php @@ -0,0 +1,35 @@ +prepare($sql); +$stmt->execute(); +$result = $stmt->fetchAll(PDO::FETCH_ASSOC); + +if ($stmt->rowCount() > 0) { + // Print all the records + // printData($result); + printSuccess($data = $result); +} else { + // Print a failure message + printFailure($message = "No records found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/Admin/adminUser/add.php b/walletintaleq.intaleq.xyz/v2/main/Admin/adminUser/add.php new file mode 100644 index 0000000..107e46f --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/Admin/adminUser/add.php @@ -0,0 +1,25 @@ +prepare($sql); +$stmt->bindParam(':deviceNumber', $deviceNumber); +$stmt->bindParam(':name', $name); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Print a success message + printSuccess($message = "Admin user data saved successfully"); +} else { + // Print a failure message + printFailure($message = "Failed to save admin user data"); +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/Admin/adminUser/delete.php b/walletintaleq.intaleq.xyz/v2/main/Admin/adminUser/delete.php new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/Admin/adminUser/error_log b/walletintaleq.intaleq.xyz/v2/main/Admin/adminUser/error_log new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/Admin/adminUser/get.php b/walletintaleq.intaleq.xyz/v2/main/Admin/adminUser/get.php new file mode 100644 index 0000000..ec03516 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/Admin/adminUser/get.php @@ -0,0 +1,24 @@ +prepare($sql); +$stmt->execute(); +$result = $stmt->fetchAll(PDO::FETCH_ASSOC); + +if (count($result) === 1) { + // Print the first record as a success message + printSuccess( $result[0]); +} else { + // Print a failure message + printFailure($message = "Failed to retrieve Password or user name incorrect"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/Admin/adminUser/update.php b/walletintaleq.intaleq.xyz/v2/main/Admin/adminUser/update.php new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/Admin/dashbord.php b/walletintaleq.intaleq.xyz/v2/main/Admin/dashbord.php new file mode 100644 index 0000000..971b639 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/Admin/dashbord.php @@ -0,0 +1,404 @@ +prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { +$result = $stmt->fetchAll(PDO::FETCH_ASSOC); + // Print all the records + // printData($result); + printSuccess($data = $result); +} else { + // Print a failure message + printFailure($message = "No records found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/Admin/dashbordPayment.php b/walletintaleq.intaleq.xyz/v2/main/Admin/dashbordPayment.php new file mode 100755 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/Admin/error_log b/walletintaleq.intaleq.xyz/v2/main/Admin/error_log new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/Admin/getPassengerDetails.php b/walletintaleq.intaleq.xyz/v2/main/Admin/getPassengerDetails.php new file mode 100644 index 0000000..d37d1fe --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/Admin/getPassengerDetails.php @@ -0,0 +1,110 @@ +prepare($sql); +$stmt->execute(); +$result = $stmt->fetchAll(PDO::FETCH_ASSOC); + +if ($stmt->rowCount() > 0) { + // Print all the records + // printData($result); + printSuccess($data = $result); +} else { + // Print a failure message + printFailure($message = "No records found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/Admin/getPassengerDetailsByPassengerID.php b/walletintaleq.intaleq.xyz/v2/main/Admin/getPassengerDetailsByPassengerID.php new file mode 100644 index 0000000..af6c9d0 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/Admin/getPassengerDetailsByPassengerID.php @@ -0,0 +1,111 @@ +prepare($sql); +$stmt->execute(); +$result = $stmt->fetchAll(PDO::FETCH_ASSOC); + +if ($stmt->rowCount() > 0) { + // Print all the records + // printData($result); + printSuccess($data = $result); +} else { + // Print a failure message + printFailure($message = "No records found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/Admin/getPassengerbyEmail.php b/walletintaleq.intaleq.xyz/v2/main/Admin/getPassengerbyEmail.php new file mode 100644 index 0000000..52d738a --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/Admin/getPassengerbyEmail.php @@ -0,0 +1,112 @@ +prepare($sql); +$stmt->execute(); +$result = $stmt->fetchAll(PDO::FETCH_ASSOC); + +if ($stmt->rowCount() > 0) { + // Print all the records + // printData($result); + printSuccess($data = $result); +} else { + // Print a failure message + printFailure($message = "No records found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/Admin/getPaymentsDashboard.php b/walletintaleq.intaleq.xyz/v2/main/Admin/getPaymentsDashboard.php new file mode 100755 index 0000000..d886418 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/Admin/getPaymentsDashboard.php @@ -0,0 +1,47 @@ +prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + $result = $stmt->fetchAll(PDO::FETCH_ASSOC); + + // ✅ Always log what we’re sending back + error_log('📊 Dashboard Result: ' . json_encode($result, JSON_PRETTY_PRINT)); + + printSuccess($result); +} else { + error_log('⚠️ Dashboard: No records found'); + printFailure("No records found"); +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/Admin/getVisaForEachDriver.php b/walletintaleq.intaleq.xyz/v2/main/Admin/getVisaForEachDriver.php new file mode 100644 index 0000000..cf273a5 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/Admin/getVisaForEachDriver.php @@ -0,0 +1,51 @@ + 0 + AND total_amount > 100 +LIMIT 0, 25; + +"; +$stmt = $con->prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Fetch the record + $row = $stmt->fetchAll(PDO::FETCH_ASSOC); + + printSuccess( $row); + +} + else{ + // Print a failure message + printFailure($message = "No wallet record found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/Admin/sendEmailToDrivertransaction.php b/walletintaleq.intaleq.xyz/v2/main/Admin/sendEmailToDrivertransaction.php new file mode 100644 index 0000000..497f96e --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/Admin/sendEmailToDrivertransaction.php @@ -0,0 +1,79 @@ + + + + + +
+ +

Payment Sent - SEFER

+

Thank you for being a valued driver on the SEFER platform.

+

SEFER has sent a payment of $totalAmount to your account. Please note that it may take a few days for the bank to process this transaction.

+

We appreciate your service and hope to continue our partnership.

+

Regards,
SEFER Team

+
+ +"; + +// Arabic email content +$bodyEmailAr = " + + + + +
+ SEFER +

تم إرسال الدفع - سفر

+

شكراً لك على كونك سائقًا متميزًا على منصة سفر.

+

لقد أرسلت سفر دفعة قدرها $totalAmount إلى حسابك. يرجى ملاحظة أنه قد يستغرق البنك عدة أيام لمعالجة هذه المعاملة.

+

نحن نقدر خدمتك ونأمل أن نستمر في شراكتنا.

+

مع خالص التحية،
فريق سفر

+
+ +"; + +// Set the email headers +$supportEmail = 'seferteam@sefer.live'; +$headers = "MIME-Version: 1.0\r\n"; +$headers .= "Content-Type: text/html; charset=UTF-8\r\n"; +$headers .= "From: $supportEmail\r\n"; + +// Send email to the driver +if (!empty($driverEmail)) { + if (mail($driverEmail, "Payment Sent - SEFER", $bodyEmail, $headers)) { + // echo "Email sent successfully to $driverEmail"; + printSuccess($message = "'Email sent successfully to ' . $driverEmail"); + + } else { + printFailure($message = "Failed to send email to ' . $driverEmail"); + + } +} else { + printFailure($message = "Invalid email address: ' . $driverEmail"); + +} + +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/Admin/v2/financial/dashboard_wallet.php b/walletintaleq.intaleq.xyz/v2/main/Admin/v2/financial/dashboard_wallet.php new file mode 100755 index 0000000..e27f46d --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/Admin/v2/financial/dashboard_wallet.php @@ -0,0 +1,28 @@ +prepare(" + SELECT + (SELECT IFNULL(SUM(amount), 0) FROM payments WHERE status = 'completed') as payments, + (SELECT IFNULL(SUM(balance), 0) FROM driverWallet) as driverWallet, + (SELECT IFNULL(SUM(balance), 0) FROM passengerWallet) as passengerWallet, + (SELECT IFNULL(SUM(balance), 0) FROM seferWallet) as seferWallet + "); + $stmt->execute(); + $stats = $stmt->fetch(PDO::FETCH_ASSOC); + + // نعيد البيانات داخل رسالة (Array) لتطابق توقعات الفلاتر + jsonSuccess([$stats]); + +} catch (Exception $e) { + jsonError('Wallet Query failed: ' . $e->getMessage(), 500); +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/Admin/v2/financial/settlements.php b/walletintaleq.intaleq.xyz/v2/main/Admin/v2/financial/settlements.php new file mode 100644 index 0000000..83fea1e --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/Admin/v2/financial/settlements.php @@ -0,0 +1,40 @@ +prepare(" + SELECT + d.id, d.first_name, d.last_name, d.phone, + SUM(r.price_for_driver) as total_earned, + COUNT(r.id) as total_rides + FROM driver d + LEFT JOIN ride r ON d.id = r.driver_id AND r.status = 'Finished' + GROUP BY d.id + HAVING total_earned > 0 + ORDER BY total_earned DESC + LIMIT 50 + "); + $stmt->execute(); + $drivers = $stmt->fetchAll(PDO::FETCH_ASSOC); + + // فك تشفير البيانات + foreach ($drivers as &$driver) { + $driver['first_name'] = $encryptionHelper->decryptData($driver['first_name']); + $driver['last_name'] = $encryptionHelper->decryptData($driver['last_name']); + $driver['phone'] = $encryptionHelper->decryptData($driver['phone']); + } + + echo json_encode([ + 'status' => 'success', + 'data' => $drivers + ]); +} catch (Exception $e) { + http_response_code(500); + echo json_encode(['status' => 'error', 'message' => $e->getMessage()]); +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/Admin/v2/financial/stats.php b/walletintaleq.intaleq.xyz/v2/main/Admin/v2/financial/stats.php new file mode 100644 index 0000000..d533d6b --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/Admin/v2/financial/stats.php @@ -0,0 +1,30 @@ +prepare(" + SELECT + SUM(price_for_passenger) as total_revenue, + SUM(price_for_driver) as total_driver_pay, + SUM(price_for_passenger - price_for_driver) as total_platform_commission, + (SELECT SUM(amount) FROM payments WHERE payment_method = 'Cash') as cash_payments, + (SELECT SUM(amount) FROM payments WHERE payment_method != 'Cash') as digital_payments + FROM ride + WHERE status = 'Finished' + "); + $stmt->execute(); + $stats = $stmt->fetch(PDO::FETCH_ASSOC); + + echo json_encode([ + 'status' => 'success', + 'data' => $stats + ]); +} catch (Exception $e) { + http_response_code(500); + echo json_encode(['status' => 'error', 'message' => $e->getMessage()]); +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/Agora/.DS_Store b/walletintaleq.intaleq.xyz/v2/main/Agora/.DS_Store new file mode 100644 index 0000000..bd33bec Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/Agora/.DS_Store differ diff --git a/walletintaleq.intaleq.xyz/v2/main/Agora/.htaccess b/walletintaleq.intaleq.xyz/v2/main/Agora/.htaccess new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/Agora/agora.php b/walletintaleq.intaleq.xyz/v2/main/Agora/agora.php new file mode 100644 index 0000000..d1fca8f --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/Agora/agora.php @@ -0,0 +1,52 @@ +get('/token', function ($request, $response) use ($app, $appId, $appCertificate) { + // Get parameters + $channelName = $request->getQueryParam('channelName'); + $uid = $request->getQueryParam('uid', 0); + $role = $request->getQueryParam('role', RtcRole::SUBSCRIBER); + $expireTime = $request->getQueryParam('expireTime', 3600); + + try { + // Generate token + $token = generateToken($channelName, $uid, $role, $expireTime); + + // Respond with JSON + $response->withJson(['token' => $token]); + } catch (Exception $e) { + // Handle error + $response->withStatus(500)->withJson(['error' => $e->getMessage()]); + } +}); + +// Start server +$app->run($port); + diff --git a/walletintaleq.intaleq.xyz/v2/main/Agora/index.js b/walletintaleq.intaleq.xyz/v2/main/Agora/index.js new file mode 100644 index 0000000..be947d5 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/Agora/index.js @@ -0,0 +1,9 @@ +var http = require('http'); +var server = http.createServer(function(req, res) { + res.writeHead(200, {'Content-Type': 'text/plain'}); + var message = 'It works!\n', + version = 'NodeJS ' + process.versions.node + '\n', + response = [message, version].join('\n'); + res.end(response); +}); +server.listen(); diff --git a/walletintaleq.intaleq.xyz/v2/main/Agora/stderr.log b/walletintaleq.intaleq.xyz/v2/main/Agora/stderr.log new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/Agora/tmp/restart.txt b/walletintaleq.intaleq.xyz/v2/main/Agora/tmp/restart.txt new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/EgyptDocuments/error_log b/walletintaleq.intaleq.xyz/v2/main/EgyptDocuments/error_log new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/EgyptDocuments/uploadEgyptIdBack.php b/walletintaleq.intaleq.xyz/v2/main/EgyptDocuments/uploadEgyptIdBack.php new file mode 100644 index 0000000..569af02 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/EgyptDocuments/uploadEgyptIdBack.php @@ -0,0 +1,60 @@ + "Failed to save image")); ; + exit; +} + +// Store additional information (modify based on your needs) +$image_url = $target_dir . $new_filename; // Update if needed +$image_details = [ + "name" => $image_name, + "size" => $image_size, + "extension" => $image_extension, + "url" => $image_url, +]; + +// Use the image details for further processing (e.g., display, store in database) +// ... + + echo json_encode(array('status' => 'Image uploaded successfully!')); + +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/EgyptDocuments/uploadEgyptidFront.php b/walletintaleq.intaleq.xyz/v2/main/EgyptDocuments/uploadEgyptidFront.php new file mode 100644 index 0000000..67fadbd --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/EgyptDocuments/uploadEgyptidFront.php @@ -0,0 +1,60 @@ + "Failed to save image")); ; + exit; +} + +// Store additional information (modify based on your needs) +$image_url = $target_dir . $new_filename; // Update if needed +$image_details = [ + "name" => $image_name, + "size" => $image_size, + "extension" => $image_extension, + "url" => $image_url, +]; + +// Use the image details for further processing (e.g., display, store in database) +// ... + + echo json_encode(array('status' => 'Image uploaded successfully!')); + +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/.DS_Store b/walletintaleq.intaleq.xyz/v2/main/auth/.DS_Store new file mode 100644 index 0000000..c52b177 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/auth/.DS_Store differ diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/Tester/error_log b/walletintaleq.intaleq.xyz/v2/main/auth/Tester/error_log new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/Tester/getTesterApp.php b/walletintaleq.intaleq.xyz/v2/main/auth/Tester/getTesterApp.php new file mode 100644 index 0000000..5a91c63 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/Tester/getTesterApp.php @@ -0,0 +1,29 @@ +prepare($sql); +$stmt->execute(); +$result = $stmt->fetchAll(PDO::FETCH_ASSOC); + +if ($stmt->rowCount() > 0) { + // Print the retrieved data + // echo json_encode($result); + printSuccess($data = $result); +} else { + // Print a failure message + + printFailure($message = "No driver order data found"); +} + +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/Tester/updateTesterApp.php b/walletintaleq.intaleq.xyz/v2/main/auth/Tester/updateTesterApp.php new file mode 100644 index 0000000..2f5fd09 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/Tester/updateTesterApp.php @@ -0,0 +1,23 @@ +prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Print a success message + printSuccess($message = "Test data updated successfully"); +} else { + // Print a failure message + printFailure($message = "Failed to update driver order data"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/captin/addCriminalDocuments.php b/walletintaleq.intaleq.xyz/v2/main/auth/captin/addCriminalDocuments.php new file mode 100644 index 0000000..d283767 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/captin/addCriminalDocuments.php @@ -0,0 +1,35 @@ +prepare($sql); + + // Bind parameters + $stmt->bindParam(':driverId', $driverId, PDO::PARAM_INT); + $stmt->bindParam(':issueDate', $issueDate, PDO::PARAM_STR); + $stmt->bindParam(':inspectionResult', $inspectionResult, PDO::PARAM_STR); + + // Execute the statement + $stmt->execute(); + + // Check if the insertion was successful + if ($stmt->rowCount() > 0) { + printSuccess("Criminal document data saved successfully"); + } else { + printFailure("Failed to save criminal document data"); + } +} catch (PDOException $e) { + // Log the error and print a generic failure message + error_log("Database Error: " . $e->getMessage()); + printFailure("An error occurred while saving the data"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/captin/deletecaptainAccounr.php b/walletintaleq.intaleq.xyz/v2/main/auth/captin/deletecaptainAccounr.php new file mode 100644 index 0000000..b1ea012 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/captin/deletecaptainAccounr.php @@ -0,0 +1,19 @@ +prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Print a success message + printSuccess($message = "Record deleted successfully"); +} else { + // Print a failure message + printFailure($message = "Failed to delete record"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/captin/error_log b/walletintaleq.intaleq.xyz/v2/main/auth/captin/error_log new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/captin/forgetPassword.php b/walletintaleq.intaleq.xyz/v2/main/auth/captin/forgetPassword.php new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/captin/getAccount.php b/walletintaleq.intaleq.xyz/v2/main/auth/captin/getAccount.php new file mode 100644 index 0000000..dc34a5b --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/captin/getAccount.php @@ -0,0 +1,22 @@ +prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Fetch the record + $row = $stmt->fetchAll(PDO::FETCH_ASSOC); + + printSuccess( $row); + +} + else{ + // Print a failure message + printFailure($message = "No wallet record found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/captin/getPromptDriverDocumentsEgypt.php b/walletintaleq.intaleq.xyz/v2/main/auth/captin/getPromptDriverDocumentsEgypt.php new file mode 100644 index 0000000..44a7815 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/captin/getPromptDriverDocumentsEgypt.php @@ -0,0 +1,23 @@ +prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Fetch the record + $row = $stmt->fetchAll(PDO::FETCH_ASSOC); + + printSuccess( $row); + +} + else{ + // Print a failure message + printFailure($message = "No wallet record found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/captin/login.php b/walletintaleq.intaleq.xyz/v2/main/auth/captin/login.php new file mode 100644 index 0000000..3965453 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/captin/login.php @@ -0,0 +1,67 @@ +prepare($sql); +$stmt->bindParam(':email', $email); +$stmt->bindParam(':phone', $phone); +$stmt->execute(); +$data = $stmt->fetchAll(PDO::FETCH_ASSOC); +$count = $stmt->rowCount(); + +if ($count > 0) { + $stored_password = $data[0]['password']; + if (password_verify($password, $stored_password)) { + unset($data[0]['password']); + echo json_encode([ + "status" => "success", + "count" => $count, + "data" => $data + ]); + } else { + // The password is incorrect + echo json_encode([ + "status" => "Failure", + "data" => "Incorrect password." + ]); + // printFailure("Incorrect password."); + } +} else { + // The user does not exist + echo json_encode([ + "status" => "Failure", + "data" => "User does not exist." + ]); + // printFailure("User does not exist."); +} +$conn->close(); + +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/captin/loginFromGoogle.php b/walletintaleq.intaleq.xyz/v2/main/auth/captin/loginFromGoogle.php new file mode 100644 index 0000000..b433864 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/captin/loginFromGoogle.php @@ -0,0 +1,56 @@ +prepare($sql); +$stmt->bindParam(':email', $email); +$stmt->bindParam(':id', $driverID); +$stmt->execute(); +$data = $stmt->fetchAll(PDO::FETCH_ASSOC); +$count = $stmt->rowCount(); + +if ($count > 0) { + + echo json_encode([ + "status" => "success", + "count" => $count, + "data" => $data + ]); + +} else { + // The user does not exist + // echo json_encode([ + // "status" => "Failure", + // "data" => "User does not exist." + // ]); + printFailure("User does not exist."); +} +$stmt = null; // Close the statement +$con = null; // Close the connection +exit(); \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/captin/register.php b/walletintaleq.intaleq.xyz/v2/main/auth/captin/register.php new file mode 100755 index 0000000..6570c39 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/captin/register.php @@ -0,0 +1,110 @@ +prepare("SELECT * FROM driver WHERE phone = :phone OR email = :email"); + $stmt->bindParam(':phone', $inputData['phone'], PDO::PARAM_STR); + $stmt->bindParam(':email', $inputData['email'], PDO::PARAM_STR); + $stmt->execute(); + + if ($stmt->rowCount() > 0) { + printFailure("The email or phone number is already registered."); + } + + // Prepare SQL for inserting new driver + $sql = " + INSERT INTO `driver` ( + `id`, `phone`, `email`, `password`, `gender`, `license_type`, `national_number`, + `name_arabic`, `name_english`, `issue_date`, `expiry_date`, `license_categories`, + `address`, `card_id`, `occupation`, `licenseIssueDate`, `religion`, `status`, + `birthdate`, `site`, `first_name`, `last_name`, `education`, + `employmentType`, `maritalStatus`, `created_at`, `updated_at` + ) VALUES ( + :id, :phone, :email, :hashedPassword, :gender, :license_type, :national_number, + :name_arabic, :name_english, :issue_date, :expiry_date, :license_categories, + :address, :card_id, :occupation, :licenseIssueDate, :religion, :status, + :birthdate, :site, :first_name, :last_name, :education, + :employmentType, :maritalStatus, NOW(), NOW() + ) + "; + + $stmt = $con->prepare($sql); + if (!$stmt) { + throw new Exception("Failed to prepare statement: " . $con->error); + } + + // Bind parameters + $paramsToBind = [ + 'id', 'phone', 'email', 'hashedPassword', 'gender', 'license_type', 'national_number', + 'name_arabic', 'name_english', 'issue_date', 'expiry_date', 'license_categories', + 'address', 'card_id', 'occupation', 'licenseIssueDate', 'religion', 'status', + 'birthdate', 'site', 'first_name', 'last_name', 'education', + 'employmentType', 'maritalStatus' + ]; + + foreach ($paramsToBind as $param) { + if (isset($inputData[$param])) { + $stmt->bindValue(":$param", $inputData[$param], PDO::PARAM_STR); + } else { + $stmt->bindValue(":$param", null, PDO::PARAM_STR); + } + } + + // Log SQL and parameters for debugging + error_log("SQL: " . $sql); + error_log("Params: " . print_r($inputData, true)); + + // Execute the statement + if (!$stmt->execute()) { + throw new Exception("Failed to execute statement: " . $stmt->errorInfo()[2]); + } + + // Check if the record was successfully saved + if ($stmt->rowCount() > 0) { + printSuccess($inputData['id']); + } else { + printFailure("Failed to save driver data"); + } + +} catch (PDOException $e) { + error_log("Database error: " . $e->getMessage()); + printFailure("A database error occurred: " . $e->getMessage()); +} catch (Exception $e) { + error_log("An error occurred: " . $e->getMessage()); + printFailure("An error occurred: " . $e->getMessage()); +} \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/captin/removeAccount.php b/walletintaleq.intaleq.xyz/v2/main/auth/captin/removeAccount.php new file mode 100644 index 0000000..187aeec --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/captin/removeAccount.php @@ -0,0 +1,19 @@ +prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Print a success message + printSuccess($message = "Record deleted successfully"); +} else { + // Print a failure message + printFailure($message = "Failed to delete record"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/captin/sendOtpMessageDriver.php b/walletintaleq.intaleq.xyz/v2/main/auth/captin/sendOtpMessageDriver.php new file mode 100644 index 0000000..53a1312 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/captin/sendOtpMessageDriver.php @@ -0,0 +1,44 @@ +prepare($sql); +$stmt->execute(); + +$rowCount = $stmt->rowCount(); + +if ($rowCount > 0) { + // The phone number already exists, so update the data + $sql = "UPDATE `phone_verification` SET `token_code` = '$token_code', `expiration_time` = DATE_ADD(NOW(), INTERVAL 5 MINUTE) WHERE `phone_number` = '$phone_number'"; + $stmt = $con->prepare($sql); + $stmt->execute(); + + if ($stmt->rowCount() > 0) { + // The update was successful + printSuccess($message = "Phone verification data updated successfully"); + } else { + // The update was unsuccessful + printFailure($message = "Failed to update phone verification data"); + } +} else { + // The phone number does not exist, so insert the data + $sql = "INSERT INTO `phone_verification` (`phone_number`, `driverId` ,`email`,`token_code`, `expiration_time`, `is_verified`, `created_at`) VALUES ('$phone_number','$driverId','$email', '$token_code', DATE_ADD(NOW(), INTERVAL 5 MINUTE), 0, NOW())"; + $stmt = $con->prepare($sql); + $stmt->execute(); + + if ($stmt->rowCount() > 0) { + // The insertion was successful + printSuccess($message = "Phone verification data saved successfully"); + } else { + // The insertion was unsuccessful + printFailure($message = "Failed to save phone verification data"); + } +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/captin/updateAccountBank.php b/walletintaleq.intaleq.xyz/v2/main/auth/captin/updateAccountBank.php new file mode 100644 index 0000000..bac2dd7 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/captin/updateAccountBank.php @@ -0,0 +1,111 @@ +prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Print success message + printSuccess($message = "Driver data updated successfully"); +} else { + // Print failure message + printFailure($message = "Failed to update driver data"); +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/captin/verifyEmail.php b/walletintaleq.intaleq.xyz/v2/main/auth/captin/verifyEmail.php new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/captin/verifyOtpDriver.php b/walletintaleq.intaleq.xyz/v2/main/auth/captin/verifyOtpDriver.php new file mode 100644 index 0000000..84cfad3 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/captin/verifyOtpDriver.php @@ -0,0 +1,33 @@ + NOW()"; +$stmt = $con->prepare($sql); +$stmt->execute(); +$result = $stmt->fetch(); + +if ($result) { + // $id = $result["id"]; + $sql = "UPDATE `phone_verification` SET `is_verified` = 1 WHERE `phone_number` = $phone_number"; + $stmt = $con->prepare($sql); + $stmt->execute(); + + printSuccess($message = "Your phone number has been verified."); +} else { + printFailure($message = "Your phone number could not be verified. Please try again."); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/checkPhoneNumberISVerfiedDriver.php b/walletintaleq.intaleq.xyz/v2/main/auth/checkPhoneNumberISVerfiedDriver.php new file mode 100644 index 0000000..e8bf5d7 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/checkPhoneNumberISVerfiedDriver.php @@ -0,0 +1,27 @@ +prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Fetch the records + $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); + + printSuccess($rows); + +} else { + // Print a failure message + printFailure($message = "No Phone verified yet found"); +} + +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/checkPhoneNumberISVerfiedPassenger.php b/walletintaleq.intaleq.xyz/v2/main/auth/checkPhoneNumberISVerfiedPassenger.php new file mode 100644 index 0000000..d90941c --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/checkPhoneNumberISVerfiedPassenger.php @@ -0,0 +1,27 @@ +prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Fetch the records + $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); + + printSuccess($rows); + +} else { + // Print a failure message + printFailure($message = "No Phone verified yet found"); +} + +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/cnMap.php b/walletintaleq.intaleq.xyz/v2/main/auth/cnMap.php new file mode 100644 index 0000000..ddd726a --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/cnMap.php @@ -0,0 +1,23 @@ + "3", + "1" => "7", + "2" => "1", + "3" => "9", + "4" => "0", + "5" => "5", + "6" => "2", + "7" => "6", + "8" => "4", + "9" => "8" +); + +// Convert the map to a JSON string with JSON_FORCE_OBJECT option +$jsonString = json_encode($cn, JSON_FORCE_OBJECT); + +// Send the JSON string to the Flutter app +echo $jsonString; +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/cn_map.json b/walletintaleq.intaleq.xyz/v2/main/auth/cn_map.json new file mode 100644 index 0000000..c398c06 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/cn_map.json @@ -0,0 +1 @@ +["3","7","1","9","0","5","2","6","4","8"] \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/driver/add.php b/walletintaleq.intaleq.xyz/v2/main/auth/driver/add.php new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/driver/delete.php b/walletintaleq.intaleq.xyz/v2/main/auth/driver/delete.php new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/driver/get.php b/walletintaleq.intaleq.xyz/v2/main/auth/driver/get.php new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/driver/update.php b/walletintaleq.intaleq.xyz/v2/main/auth/driver/update.php new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/error_log b/walletintaleq.intaleq.xyz/v2/main/auth/error_log new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/login.php b/walletintaleq.intaleq.xyz/v2/main/auth/login.php new file mode 100644 index 0000000..350c256 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/login.php @@ -0,0 +1,67 @@ +prepare($sql); +$stmt->bindParam(':email', $email); +$stmt->bindParam(':phone', $phone); +$stmt->execute(); +$data = $stmt->fetchAll(PDO::FETCH_ASSOC); +$count = $stmt->rowCount(); + +if ($count > 0) { + $stored_password = $data[0]['password']; + if (password_verify($password, $stored_password)) { + unset($data[0]['password']); + echo json_encode([ + "status" => "success", + "count" => $count, + "data" => $data + ]); + } else { + // The password is incorrect + echo json_encode([ + "status" => "Failure", + "data" => "Incorrect password." + ]); + // printFailure("Incorrect password."); + } +} else { + // The user does not exist + echo json_encode([ + "status" => "Failure", + "data" => "User does not exist." + ]); + // printFailure("User does not exist."); +} +$conn->close(); + +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/loginFromGooglePassenger.php b/walletintaleq.intaleq.xyz/v2/main/auth/loginFromGooglePassenger.php new file mode 100644 index 0000000..e09acfa --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/loginFromGooglePassenger.php @@ -0,0 +1,41 @@ +prepare($sql); +$stmt->bindParam(':email', $email); +$stmt->bindParam(':id', $id); +$stmt->execute(); +$data = $stmt->fetchAll(PDO::FETCH_ASSOC); +$count = $stmt->rowCount(); + +header('Content-Type: application/json'); // Ensure the response is JSON + +if ($count > 0) { + echo json_encode([ + "status" => "success", + "count" => $count, + "data" => $data + ]); +} else { + echo json_encode([ + "status" => "Failure", + "data" => "User does not exist." + ]); +} + +$stmt = null; // Close the statement +$con = null; // Close the connection +exit(); // Ensure no further output diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/otpmessage.php b/walletintaleq.intaleq.xyz/v2/main/auth/otpmessage.php new file mode 100644 index 0000000..e107805 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/otpmessage.php @@ -0,0 +1,42 @@ +prepare($sql); +$stmt->execute(); + +$rowCount = $stmt->rowCount(); + +if ($rowCount > 0) { + // The phone number already exists, so update the data + $sql = "UPDATE `phone_verification_passenger` SET `token` = '$token_code', `expiration_time` = DATE_ADD(NOW(), INTERVAL 5 MINUTE) WHERE `phone_number` = '$phone_number'"; + $stmt = $con->prepare($sql); + $stmt->execute(); + + if ($stmt->rowCount() > 0) { + // The update was successful + printSuccess($message = "Phone verification data updated successfully"); + } else { + // The update was unsuccessful + printFailure($message = "Failed to update phone verification data"); + } +} else { + // The phone number does not exist, so insert the data + $sql = "INSERT INTO `phone_verification_passenger` (`phone_number`, `token`, `expiration_time`, `verified`, `created_at`) VALUES ('$phone_number', '$token_code', DATE_ADD(NOW(), INTERVAL 5 MINUTE), 0, NOW())"; + $stmt = $con->prepare($sql); + $stmt->execute(); + + if ($stmt->rowCount() > 0) { + // The insertion was successful + printSuccess($message = "Phone verification data saved successfully"); + } else { + // The insertion was unsuccessful + printFailure($message = "Failed to save phone verification data"); + } +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/packageInfo.php b/walletintaleq.intaleq.xyz/v2/main/auth/packageInfo.php new file mode 100644 index 0000000..ce50ff1 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/packageInfo.php @@ -0,0 +1,30 @@ +prepare($sql); +$stmt->execute(); +$result = $stmt->fetchAll(PDO::FETCH_ASSOC); + +if ($stmt->rowCount() > 0) { + // Print all the records + // printData($result); + printSuccess($data = $result); +} else { + // Print a failure message + printFailure($message = "No records found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/passengerOTP/sendOtpPassenger.php b/walletintaleq.intaleq.xyz/v2/main/auth/passengerOTP/sendOtpPassenger.php new file mode 100644 index 0000000..53585b4 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/passengerOTP/sendOtpPassenger.php @@ -0,0 +1,42 @@ +prepare($sql); +$stmt->execute(); + +$rowCount = $stmt->rowCount(); + +if ($rowCount > 0) { + // The phone number already exists, so update the data + $sql = "UPDATE `phone_verification_passenger` SET `token_code` = '$token_code', `expiration_time` = DATE_ADD(NOW(), INTERVAL 5 MINUTE) WHERE `phone_number` = '$phone_number'"; + $stmt = $con->prepare($sql); + $stmt->execute(); + + if ($stmt->rowCount() > 0) { + // The update was successful + printSuccess($message = "Phone verification data updated successfully"); + } else { + // The update was unsuccessful + printFailure($message = "Failed to update phone verification data"); + } +} else { + // The phone number does not exist, so insert the data + $sql = "INSERT INTO `phone_verification_passenger` (`phone_number`, `token_code`, `expiration_time`, `is_verified`, `created_at`) VALUES ('$phone_number', '$token_code', DATE_ADD(NOW(), INTERVAL 5 MINUTE), 0, NOW())"; + $stmt = $con->prepare($sql); + $stmt->execute(); + + if ($stmt->rowCount() > 0) { + // The insertion was successful + printSuccess($message = "Phone verification data saved successfully"); + } else { + // The insertion was unsuccessful + printFailure($message = "Failed to save phone verification data"); + } +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/passengerOTP/verifyOtpPassenger.php b/walletintaleq.intaleq.xyz/v2/main/auth/passengerOTP/verifyOtpPassenger.php new file mode 100644 index 0000000..925d2ca --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/passengerOTP/verifyOtpPassenger.php @@ -0,0 +1,23 @@ + NOW()"; +$stmt = $con->prepare($sql); +$stmt->execute(); +$result = $stmt->fetch(); + +if ($result) { + // $id = $result["id"]; + $sql = "UPDATE `phone_verification_passenger` SET `is_verified` = 1 WHERE `phone_number` = $phone_number"; + $stmt = $con->prepare($sql); + $stmt->execute(); + + printSuccess($message = "Your phone number has been verified."); +} else { + printFailure($message = "Your phone number could not be verified. Please try again."); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/passengerRemovedAccountEmail.php b/walletintaleq.intaleq.xyz/v2/main/auth/passengerRemovedAccountEmail.php new file mode 100644 index 0000000..9e09ed5 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/passengerRemovedAccountEmail.php @@ -0,0 +1,30 @@ + \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/resetPassword.php b/walletintaleq.intaleq.xyz/v2/main/auth/resetPassword.php new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/sendEmail.php b/walletintaleq.intaleq.xyz/v2/main/auth/sendEmail.php new file mode 100644 index 0000000..4fc8ebf --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/sendEmail.php @@ -0,0 +1,34 @@ + + +Verify your email address + + +

Hi [$email],

+ +

We recently received a request to verify your email address for your account on Ride App.

+ +

To verify your email address, please write this to app .

+$token + +

If you did not request to verify your email address, please ignore this email.

+ +

Thank you,

+SEFER Team. + + +"; + +mail($email, $subject, $bodyEmail, $headers); \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/sendVerifyEmail.php b/walletintaleq.intaleq.xyz/v2/main/auth/sendVerifyEmail.php new file mode 100644 index 0000000..57ba8d0 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/sendVerifyEmail.php @@ -0,0 +1,72 @@ +prepare($sql); +$stmt->execute(); + +$rowCount = $stmt->rowCount(); + +$admin='support@mobile-app.store'; +$headers = "MIME-Version: 1.0" . "\r\n"; +$headers .= "Content-type: text/html; charset=UTF-8" . "\r\n"; +$headers .= "From: $admin" . "\r\n"; + +$subject = "Verify your email address"; +$bodyEmail = " + + +Verify your email address + + +

Hi [$email],

+ +

We recently received a request to verify your email address for your account on SEFER App.

+ +

To verify your email address, please write this to app .

+$token + +

If you did not request to verify your email address, please ignore this email.

+ +

Thank you,

+SEFER Team. + + +"; + + + +if ($rowCount > 0) { + // The email already exists, so update the data + $sql = "UPDATE `email_verifications` SET `token` = '$token' WHERE `email` = '$email'"; + $stmt = $con->prepare($sql); + $stmt->execute(); + + if ($stmt->rowCount() > 0) { + // The update was successful + printSuccess($message = "Email verification data updated successfully"); + mail($email, $subject, $bodyEmail, $headers); + } else { + // The update was unsuccessful + printFailure($message = "Failed to update email verification data"); + } +} else { + // The email does not exist, so insert the data + $sql = "INSERT INTO `email_verifications` (`email`, `token`) VALUES ('$email', '$token')"; + $stmt = $con->prepare($sql); + $stmt->execute(); + + if ($stmt->rowCount() > 0) { + // The insertion was successful + printSuccess($message = "Email verification data saved successfully"); + mail($email, $subject, $bodyEmail, $headers); + } else { + // The insertion was unsuccessful + printFailure($message = "Failed to save email verification data"); + } +} +?> + diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/signup.php b/walletintaleq.intaleq.xyz/v2/main/auth/signup.php new file mode 100644 index 0000000..19175db --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/signup.php @@ -0,0 +1,64 @@ +prepare($sql); +$stmt->execute(); +$results = $stmt->fetchAll(); + +if (count($results) > 0) { + // The phone number or email address already exists in the database + // Print a message and exit + printFailure($message="The email or phone number is already registered."); + exit; +} else { + // The phone number or email address does not exist in the database + // Insert a new record + $sql = "INSERT INTO `passengers` ( + `id`, + `phone`, + `email`, + `password`, + `gender`, + `birthdate`, + `site`, + `first_name`, + `last_name` + ) VALUES ( + '$id', + '$phone', + '$email', + '$hashedPassword', + '$gender', + '$birthdate', + '$site', + '$first_name', + '$last_name' + )"; + + $stmt = $con->prepare($sql); + $stmt->execute(); +} + +// Check if the record was successfully saved +if ($stmt->rowCount() > 0) { + // Print a success message + printSuccess($message = "success to save passenger data"); +} else { + // Print a failure message + printFailure($message = "Failed to save passenger data"); +} + +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/sms/getSender.php b/walletintaleq.intaleq.xyz/v2/main/auth/sms/getSender.php new file mode 100644 index 0000000..0d311d8 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/sms/getSender.php @@ -0,0 +1,28 @@ +prepare($sql); +$stmt->execute(); +$result = $stmt->fetchAll(PDO::FETCH_ASSOC); + +if ($stmt->rowCount() > 0) { + + printSuccess($data = $result); +} else { + + + printFailure($message = "No driver order data found"); +} + +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/sms/updatePhoneInvalidSMS.php b/walletintaleq.intaleq.xyz/v2/main/auth/sms/updatePhoneInvalidSMS.php new file mode 100644 index 0000000..bb31134 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/sms/updatePhoneInvalidSMS.php @@ -0,0 +1,33 @@ +prepare($sql); + +// Bind the phone number parameter +$stmt->bindParam(":phone_number", $phone_number); + +// Execute the query +$stmt->execute(); + +// Get the number of affected rows +$affectedRows = $stmt->rowCount(); + +// Check if the update was successful +if ($affectedRows > 0) { + // Return a success response + printSuccess($data = ["message" => "Phone number verified successfully"]); +} else { + // Return a failure response + printFailure($message = "No phone number found or verification failed"); +} + +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/sms/updatePhoneInvalidSMSPassenger.php b/walletintaleq.intaleq.xyz/v2/main/auth/sms/updatePhoneInvalidSMSPassenger.php new file mode 100644 index 0000000..49541e7 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/sms/updatePhoneInvalidSMSPassenger.php @@ -0,0 +1,33 @@ +prepare($sql); + +// Bind the phone number parameter +$stmt->bindParam(":phone_number", $phone_number); + +// Execute the query +$stmt->execute(); + +// Get the number of affected rows +$affectedRows = $stmt->rowCount(); + +// Check if the update was successful +if ($affectedRows > 0) { + // Return a success response + printSuccess($data = ["message" => "Phone number verified successfully"]); +} else { + // Return a failure response + printFailure($message = "No phone number found or verification failed"); +} + +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/token/update_driver_auth.php b/walletintaleq.intaleq.xyz/v2/main/auth/token/update_driver_auth.php new file mode 100755 index 0000000..d621ee8 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/token/update_driver_auth.php @@ -0,0 +1,39 @@ + "failure", + "message" => "Missing required fields" + ]); + exit; +} + +try { + // بدون أي تشفير: خزّن التوكن كما هو + $tokenPlain = $newToken; + + $stmt = $con->prepare("UPDATE driverToken SET token = ?, fingerPrint = ?, updated_at = NOW() WHERE captain_id = ?"); + $ok = $stmt->execute([$tokenPlain, $fingerPrint, $captainId]); + + if ($ok && $stmt->rowCount() > 0) { + echo json_encode([ + "status" => "success", + "message" => "Driver token updated successfully" + ]); + } else { + echo json_encode([ + "status" => "failure", + "message" => "Captain not found or no update performed" + ]); + } +} catch (PDOException $e) { + echo json_encode([ + "status" => "failure", + "message" => "Database error: " . $e->getMessage() + ]); +} \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/token/update_passenger_token.php b/walletintaleq.intaleq.xyz/v2/main/auth/token/update_passenger_token.php new file mode 100755 index 0000000..44de069 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/token/update_passenger_token.php @@ -0,0 +1,46 @@ + "failure", + "message" => "Missing required fields" + ]); + exit; +} + +try { + // تشفير التوكن قبل التخزين + // $tokenEncrypted = $encryptionHelper->encryptData($newToken); + + // تحديث سجل الراكب + $stmt = $con->prepare(" + UPDATE tokens + SET token = ?, fingerPrint = ? + WHERE passengerID = ? + "); + $ok = $stmt->execute([$newToken, $fingerPrint, $passengerId]); + + if ($ok && $stmt->rowCount() > 0) { + echo json_encode([ + "status" => "success", + "message" => "Passenger token updated successfully" + ]); + } else { + echo json_encode([ + "status" => "failure", + "message" => "Passenger not found or no update performed" + ]); + } +} catch (PDOException $e) { + echo json_encode([ + "status" => "failure", + "message" => "Database error: " . $e->getMessage() + ]); +} \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/verifyEmail.php b/walletintaleq.intaleq.xyz/v2/main/auth/verifyEmail.php new file mode 100644 index 0000000..d59a414 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/verifyEmail.php @@ -0,0 +1,39 @@ +prepare($sql); +$stmt->execute(); +$result = $stmt->fetch(); + +if ($result) { + $id = $result["id"]; + $sql = "UPDATE `email_verifications` SET `verified` = 1 WHERE `id` = $id"; + $stmt = $con->prepare($sql); + $stmt->execute(); + + $admin='support@sefer.com'; + $headers = "MIME-Version: 1.0" . "\r\n"; + $headers .= "Content-type: text/html; charset=UTF-8" . "\r\n"; + $headers .= "From: $admin" . "\r\n"; + + $subject = " Verify your email address"; + $bodyEmail="Subject: Verify your email address + +Hi [$email], + +Your email address has been verified. + +Thank you, +SEFER Team"; + + mail($email, $subject, $bodyEmail, $headers); + + printSuccess($message = "Your email address has been verified."); +} else { + printFailure($message ="Your email address could not be verified. Please try again."); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/auth/verifyOtpMessage.php b/walletintaleq.intaleq.xyz/v2/main/auth/verifyOtpMessage.php new file mode 100644 index 0000000..4ca5836 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/auth/verifyOtpMessage.php @@ -0,0 +1,33 @@ + NOW()"; +$stmt = $con->prepare($sql); +$stmt->execute(); +$result = $stmt->fetch(); + +if ($result) { + // $id = $result["id"]; + $sql = "UPDATE `phone_verification_passenger` SET `verified` = 1 WHERE `phone_number` = $phone_number"; + $stmt = $con->prepare($sql); + $stmt->execute(); + + printSuccess($message = "Your phone number has been verified."); +} else { + printFailure($message = "Your phone number could not be verified. Please try again."); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/.jpg new file mode 100644 index 0000000..e9bc083 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/FrontId-dbb338c62a5f0542807f3df4b6f7d7c92c7974e5143f19f8c1c4f1d165dd6cfe.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/FrontId-dbb338c62a5f0542807f3df4b6f7d7c92c7974e5143f19f8c1c4f1d165dd6cfe.jpg new file mode 100644 index 0000000..2fc0962 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/FrontId-dbb338c62a5f0542807f3df4b6f7d7c92c7974e5143f19f8c1c4f1d165dd6cfe.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-103636732989395685955.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-103636732989395685955.jpg new file mode 100644 index 0000000..56dcc91 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-103636732989395685955.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-105796073393555164903.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-105796073393555164903.jpg new file mode 100644 index 0000000..16b2f6b Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-105796073393555164903.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-106807014360965967789.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-106807014360965967789.jpg new file mode 100644 index 0000000..92e7002 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-106807014360965967789.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-110145232844940167393.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-110145232844940167393.jpg new file mode 100644 index 0000000..ab01dae Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-110145232844940167393.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-111153173075619094972.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-111153173075619094972.jpg new file mode 100644 index 0000000..5a8a74a Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-111153173075619094972.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-111622841750200390472.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-111622841750200390472.jpg new file mode 100644 index 0000000..7e5bd58 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-111622841750200390472.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-112094777489552396128.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-112094777489552396128.jpg new file mode 100644 index 0000000..ef1f9fa Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-112094777489552396128.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-113172279072358305645.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-113172279072358305645.jpg new file mode 100644 index 0000000..51854b4 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-113172279072358305645.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-114243034311436865474.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-114243034311436865474.jpg new file mode 100644 index 0000000..f368ba5 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-114243034311436865474.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-115586550860574261102.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-115586550860574261102.jpg new file mode 100644 index 0000000..ae89566 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/car_back-115586550860574261102.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-103636732989395685955.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-103636732989395685955.jpg new file mode 100644 index 0000000..f698feb Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-103636732989395685955.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-105796073393555164903.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-105796073393555164903.jpg new file mode 100644 index 0000000..1bc2675 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-105796073393555164903.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-106807014360965967789.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-106807014360965967789.jpg new file mode 100644 index 0000000..6acdb4a Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-106807014360965967789.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-110145232844940167393.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-110145232844940167393.jpg new file mode 100644 index 0000000..93664ec Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-110145232844940167393.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-111153173075619094972.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-111153173075619094972.jpg new file mode 100644 index 0000000..3ed7b98 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-111153173075619094972.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-111622841750200390472.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-111622841750200390472.jpg new file mode 100644 index 0000000..7b687fb Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-111622841750200390472.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-112094777489552396128.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-112094777489552396128.jpg new file mode 100644 index 0000000..b1fdb4c Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-112094777489552396128.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-113172279072358305645.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-113172279072358305645.jpg new file mode 100644 index 0000000..2edff75 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-113172279072358305645.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-114243034311436865474.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-114243034311436865474.jpg new file mode 100644 index 0000000..c085da3 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-114243034311436865474.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-115586550860574261102.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-115586550860574261102.jpg new file mode 100644 index 0000000..93a72c0 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/car_front-115586550860574261102.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/criminalRecord-113172279072358305645.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/criminalRecord-113172279072358305645.jpg new file mode 100644 index 0000000..2e4679a Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/criminalRecord-113172279072358305645.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/criminalRecord-114243034311436865474.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/criminalRecord-114243034311436865474.jpg new file mode 100644 index 0000000..e78fd8f Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/criminalRecord-114243034311436865474.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/dbb338c62a5f0542807f3df4b6f7d7c92c7974e5143f19f8c1c4f1d165dd6cfe.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/dbb338c62a5f0542807f3df4b6f7d7c92c7974e5143f19f8c1c4f1d165dd6cfe.jpg new file mode 100644 index 0000000..2fc0962 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/dbb338c62a5f0542807f3df4b6f7d7c92c7974e5143f19f8c1c4f1d165dd6cfe.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-100393163265770158312.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-100393163265770158312.jpg new file mode 100644 index 0000000..c61b4c2 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-100393163265770158312.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-100967353904608230043.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-100967353904608230043.jpg new file mode 100644 index 0000000..04d2d48 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-100967353904608230043.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-102179124404514879816.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-102179124404514879816.jpg new file mode 100644 index 0000000..34401c2 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-102179124404514879816.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-103636732989395685955.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-103636732989395685955.jpg new file mode 100644 index 0000000..5c66074 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-103636732989395685955.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-105796073393555164903.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-105796073393555164903.jpg new file mode 100644 index 0000000..71ff638 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-105796073393555164903.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-106807014360965967789.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-106807014360965967789.jpg new file mode 100644 index 0000000..f45f399 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-106807014360965967789.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-110145232844940167393.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-110145232844940167393.jpg new file mode 100644 index 0000000..65556c2 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-110145232844940167393.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-111153173075619094972.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-111153173075619094972.jpg new file mode 100644 index 0000000..eb9d050 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-111153173075619094972.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-111622841750200390472.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-111622841750200390472.jpg new file mode 100644 index 0000000..a0e3649 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-111622841750200390472.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-112094777489552396128.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-112094777489552396128.jpg new file mode 100644 index 0000000..a7e78be Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-112094777489552396128.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-113172279072358305645.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-113172279072358305645.jpg new file mode 100644 index 0000000..eb227fb Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-113172279072358305645.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-114243034311436865474.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-114243034311436865474.jpg new file mode 100644 index 0000000..7196e72 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-114243034311436865474.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-115586550860574261102.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-115586550860574261102.jpg new file mode 100644 index 0000000..6c780f1 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/driver_license-115586550860574261102.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/idFront-103920024153704554418.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/idFront-103920024153704554418.jpg new file mode 100644 index 0000000..1cd6781 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/idFront-103920024153704554418.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/idFront-110605074695183976275.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/idFront-110605074695183976275.jpg new file mode 100644 index 0000000..770dbe7 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/idFront-110605074695183976275.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/idFront-114243034311436865474.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/idFront-114243034311436865474.jpg new file mode 100644 index 0000000..16fd57e Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/idFront-114243034311436865474.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/idFront-dbb338c62a5f0542807f3df4b6f7d7c92c7974e5143f19f8c1c4f1d165dd6cfe.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/idFront-dbb338c62a5f0542807f3df4b6f7d7c92c7974e5143f19f8c1c4f1d165dd6cfe.jpg new file mode 100644 index 0000000..3efb110 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/idFront-dbb338c62a5f0542807f3df4b6f7d7c92c7974e5143f19f8c1c4f1d165dd6cfe.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/id_back-103636732989395685955.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/id_back-103636732989395685955.jpg new file mode 100644 index 0000000..046aced Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/id_back-103636732989395685955.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/id_back-106807014360965967789.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/id_back-106807014360965967789.jpg new file mode 100644 index 0000000..ab9dec9 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/id_back-106807014360965967789.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/id_back-110145232844940167393.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/id_back-110145232844940167393.jpg new file mode 100644 index 0000000..b4d88a3 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/id_back-110145232844940167393.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/id_back-111153173075619094972.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/id_back-111153173075619094972.jpg new file mode 100644 index 0000000..b66aac6 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/id_back-111153173075619094972.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/id_back-111622841750200390472.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/id_back-111622841750200390472.jpg new file mode 100644 index 0000000..06fe69d Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/id_back-111622841750200390472.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/id_back-112094777489552396128.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/id_back-112094777489552396128.jpg new file mode 100644 index 0000000..a60935d Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/id_back-112094777489552396128.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/id_back-113172279072358305645.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/id_back-113172279072358305645.jpg new file mode 100644 index 0000000..8cbd8d5 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/id_back-113172279072358305645.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/id_back-114243034311436865474.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/id_back-114243034311436865474.jpg new file mode 100644 index 0000000..1f13d76 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/id_back-114243034311436865474.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/id_back-115586550860574261102.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/id_back-115586550860574261102.jpg new file mode 100644 index 0000000..956e60b Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/id_back-115586550860574261102.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/id_front-103636732989395685955.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/id_front-103636732989395685955.jpg new file mode 100644 index 0000000..2ce4ad0 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/id_front-103636732989395685955.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/id_front-106807014360965967789.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/id_front-106807014360965967789.jpg new file mode 100644 index 0000000..611d7a3 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/id_front-106807014360965967789.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/id_front-110145232844940167393.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/id_front-110145232844940167393.jpg new file mode 100644 index 0000000..d081407 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/id_front-110145232844940167393.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/id_front-111153173075619094972.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/id_front-111153173075619094972.jpg new file mode 100644 index 0000000..ccb85c6 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/id_front-111153173075619094972.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/id_front-111622841750200390472.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/id_front-111622841750200390472.jpg new file mode 100644 index 0000000..1b4d70f Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/id_front-111622841750200390472.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/id_front-112094777489552396128.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/id_front-112094777489552396128.jpg new file mode 100644 index 0000000..300b0c1 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/id_front-112094777489552396128.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/id_front-113172279072358305645.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/id_front-113172279072358305645.jpg new file mode 100644 index 0000000..853a645 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/id_front-113172279072358305645.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/id_front-114243034311436865474.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/id_front-114243034311436865474.jpg new file mode 100644 index 0000000..4a3dc9d Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/id_front-114243034311436865474.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/card_image/id_front-115586550860574261102.jpg b/walletintaleq.intaleq.xyz/v2/main/card_image/id_front-115586550860574261102.jpg new file mode 100644 index 0000000..b6a2122 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/card_image/id_front-115586550860574261102.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/cccc.php b/walletintaleq.intaleq.xyz/v2/main/cccc.php new file mode 100755 index 0000000..af5d10f --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/cccc.php @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/composer.json b/walletintaleq.intaleq.xyz/v2/main/composer.json new file mode 100755 index 0000000..d7c6bb7 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "vlucas/phpdotenv": "^5.6" + } +} diff --git a/walletintaleq.intaleq.xyz/v2/main/composer.lock b/walletintaleq.intaleq.xyz/v2/main/composer.lock new file mode 100755 index 0000000..0b8b027 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/composer.lock @@ -0,0 +1,479 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "108be68e4e2b97fed51d36a10eed0849", + "packages": [ + { + "name": "graham-campbell/result-type", + "version": "v1.1.2", + "source": { + "type": "git", + "url": "https://github.com/GrahamCampbell/Result-Type.git", + "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/fbd48bce38f73f8a4ec8583362e732e4095e5862", + "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "GrahamCampbell\\ResultType\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "An Implementation Of The Result Type", + "keywords": [ + "Graham Campbell", + "GrahamCampbell", + "Result Type", + "Result-Type", + "result" + ], + "support": { + "issues": "https://github.com/GrahamCampbell/Result-Type/issues", + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.2" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", + "type": "tidelift" + } + ], + "time": "2023-11-12T22:16:48+00:00" + }, + { + "name": "phpoption/phpoption", + "version": "1.9.2", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/php-option.git", + "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/80735db690fe4fc5c76dfa7f9b770634285fa820", + "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": true + }, + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpOption\\": "src/PhpOption/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh" + }, + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "Option Type for PHP", + "keywords": [ + "language", + "option", + "php", + "type" + ], + "support": { + "issues": "https://github.com/schmittjoh/php-option/issues", + "source": "https://github.com/schmittjoh/php-option/tree/1.9.2" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", + "type": "tidelift" + } + ], + "time": "2023-11-12T21:59:55+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.29.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-01-29T20:11:03+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.29.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-01-29T20:11:03+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.29.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-01-29T20:11:03+00:00" + }, + { + "name": "vlucas/phpdotenv", + "version": "v5.6.0", + "source": { + "type": "git", + "url": "https://github.com/vlucas/phpdotenv.git", + "reference": "2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4", + "reference": "2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "graham-campbell/result-type": "^1.1.2", + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.2", + "symfony/polyfill-ctype": "^1.24", + "symfony/polyfill-mbstring": "^1.24", + "symfony/polyfill-php80": "^1.24" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "ext-filter": "*", + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + }, + "suggest": { + "ext-filter": "Required to use the boolean validator." + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": true + }, + "branch-alias": { + "dev-master": "5.6-dev" + } + }, + "autoload": { + "psr-4": { + "Dotenv\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Vance Lucas", + "email": "vance@vancelucas.com", + "homepage": "https://github.com/vlucas" + } + ], + "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "keywords": [ + "dotenv", + "env", + "environment" + ], + "support": { + "issues": "https://github.com/vlucas/phpdotenv/issues", + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", + "type": "tidelift" + } + ], + "time": "2023-11-12T22:43:29+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "2.6.0" +} diff --git a/walletintaleq.intaleq.xyz/v2/main/config.ini b/walletintaleq.intaleq.xyz/v2/main/config.ini new file mode 100755 index 0000000..84882f7 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/config.ini @@ -0,0 +1,4 @@ +username = ddd +password = ddd +user = ddd +pass = ddd \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/config.ini.enc b/walletintaleq.intaleq.xyz/v2/main/config.ini.enc new file mode 100755 index 0000000..05240d4 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/config.ini.enc @@ -0,0 +1 @@ +RETNde5YRYJBhCigSLK3/UpuMzgrZkh3WkpvT1FRNWNKdkxJR3J6VlgxV0twWFhMMVNOWDVjWWowL1lqZU8vQmtOWlJLVVM3WW9RbHlPNFg2OEhvbHk1VFRqQmF2Y2E0TDNtOVBRNkdxSlh5Znc1Q0VFZll5Ym5ETnFJUi9PUXRKVXkvZGRNQlpXR0xKWWJ0 \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/connect.php b/walletintaleq.intaleq.xyz/v2/main/connect.php new file mode 100755 index 0000000..ed96d9a --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/connect.php @@ -0,0 +1,52 @@ + false, + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES UTF8" + ]; + $user = getenv('USER'); // Still used for DB connection + $pass = getenv('PASS'); // Still used for DB connection + $con = new PDO($dsn, $user, $pass, $options); + +// echo $con; + // --- JWT Authentication --- + include "functions.php"; // Include the functions file + + $decodedToken = authenticateJWT(); // Call the authentication function + + +} catch (PDOException $e) { + error_log($e->getMessage()); + http_response_code(500); // Internal Server Error + echo json_encode(['error' => 'A database error occurred.']); + exit; +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/egypt/.DS_Store b/walletintaleq.intaleq.xyz/v2/main/egypt/.DS_Store new file mode 100644 index 0000000..a25d83d Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/egypt/.DS_Store differ diff --git a/walletintaleq.intaleq.xyz/v2/main/en.php b/walletintaleq.intaleq.xyz/v2/main/en.php new file mode 100755 index 0000000..ada54b8 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/en.php @@ -0,0 +1,97 @@ +key = $key; + $this->iv = $iv; + } + + private function addPadding($data, $blockSize = 16) { + $pad = $blockSize - (strlen($data) % $blockSize); + return $data . str_repeat(chr($pad), $pad); + } + + private function removePadding($data) { + $pad = ord($data[strlen($data) - 1]); + return substr($data, 0, -$pad); + } + + public function encryptData($plainText) { + $plainText = mb_convert_encoding($plainText, 'UTF-8'); + $paddedText = $this->addPadding($plainText); + $encrypted = openssl_encrypt($paddedText, 'AES-256-CBC', $this->key, OPENSSL_RAW_DATA, $this->iv); + return base64_encode($encrypted); + } + + public function decryptData($encryptedText) { + $decoded = base64_decode($encryptedText); + $decrypted = openssl_decrypt($decoded, 'AES-256-CBC', $this->key, OPENSSL_RAW_DATA, $this->iv); + return $this->removePadding($decrypted); + } +} + +$key = getenv('keyOfApp'); +$iv = getenv('initializationVector'); + +echo "Key Length: " . strlen($key) . PHP_EOL; +echo "IV Length: " . strlen($iv) . PHP_EOL; + +$encryptionHelper = new EncryptionHelper($key, $iv); +$storedHash = '$2y$10$cM9AJ.EJyX1zj8zReTw8CO.Rcr6XW.8njmHeezEqsv4OlEWyHHA4S'; +$userProvidedPassword = 'unknown'; // This would come from the user input + +if (password_verify($userProvidedPassword, $storedHash)) { + echo "🔹 password_verify: Password is correct." . PHP_EOL; +} else { + echo "🔹 password_verify: Incorrect password." . PHP_EOL; +} + +$plainText = "unknown"; +$encryptedText = $encryptionHelper->encryptData($plainText); +$decryptedText = $encryptionHelper->decryptData($encryptedText); + +echo "🔹 Original Text: $plainText" . PHP_EOL; +echo "🔹 Encrypted Text: $encryptedText" . PHP_EOL; +echo "🔹 Decrypted Text: $decryptedText" . PHP_EOL; \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/encrypt_decrypt.php b/walletintaleq.intaleq.xyz/v2/main/encrypt_decrypt.php new file mode 100755 index 0000000..b34e96f --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/encrypt_decrypt.php @@ -0,0 +1,116 @@ +key = $key; + $this->iv = $iv; + } + + // --------- النصوص ---------- + private function addPadding($data, $blockSize = 16) { + $pad = $blockSize - (strlen($data) % $blockSize); + return $data . str_repeat(chr($pad), $pad); + } + + private function removePadding($data) { + $pad = ord($data[strlen($data) - 1]); + return substr($data, 0, -$pad); + } + + public function encryptData($plainText) { + $plainText = mb_convert_encoding($plainText, 'UTF-8'); + $paddedText = $this->addPadding($plainText); + $encrypted = openssl_encrypt($paddedText, 'AES-256-CBC', $this->key, OPENSSL_RAW_DATA, $this->iv); + return base64_encode($encrypted); + } + + public function decryptData($encryptedText) { + $decoded = base64_decode($encryptedText, true); + + if ($decoded === false) { + error_log("[ERROR] base64_decode failed for input: $encryptedText"); + return false; + } + + $decrypted = openssl_decrypt($decoded, 'AES-256-CBC', $this->key, OPENSSL_RAW_DATA, $this->iv); + + if ($decrypted === false) { + error_log("[ERROR] openssl_decrypt failed for input: $encryptedText"); + return false; + } + + // Verify padding is valid before removal + $pad = ord($decrypted[strlen($decrypted) - 1]); + if ($pad < 1 || $pad > 16) { + error_log("[ERROR] Invalid padding value ($pad) for decrypted input: $encryptedText"); + return false; + } + + return substr($decrypted, 0, -$pad); +} + + public function decryptFile($encryptedFilePath, $destinationPath) { + if (!file_exists($encryptedFilePath)) { + throw new Exception("❌ الملف المشفر غير موجود: $encryptedFilePath"); + } + + $encryptedData = file_get_contents($encryptedFilePath); + $decryptedData = openssl_decrypt($encryptedData, 'AES-256-CBC', $this->key, OPENSSL_RAW_DATA, $this->iv); + + file_put_contents($destinationPath, $decryptedData); + return true; + } + public function encryptBinary($data) { + $encrypted = openssl_encrypt($data, 'AES-256-CBC', $this->key, OPENSSL_RAW_DATA, $this->iv); + return $encrypted; + } + + public function decryptBinary($data) { + $decrypted = openssl_decrypt($data, 'AES-256-CBC', $this->key, OPENSSL_RAW_DATA, $this->iv); + return $decrypted; + } +} +// ✅ Load the key and IV from .env or use default values + +// ✅ Ensure the lengths are correct + //echo "Key Length: " . $key . PHP_EOL; + //echo "IV Length: " . $iv . PHP_EOL; + +try { + $encryptionHelper = new EncryptionHelper($key, $iv); + + // ✅ Test encryption and decryption with padding matching Flutter + $plainText = "https://sefer.click/"; // Example plaintext + $encryptedText = $encryptionHelper->encryptData($plainText); + $decryptedText = $encryptionHelper->decryptData($encryptedText); +/* + echo "🔹 Original Text: " . $plainText . PHP_EOL; + echo "🔹 Encrypted Text: " . $encryptedText . PHP_EOL; + echo "🔹 Decrypted Text: " . $decryptedText . PHP_EOL; +*/ +} catch (Exception $e) { + echo "Error: " . $e->getMessage() . PHP_EOL; +} + +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/error_log b/walletintaleq.intaleq.xyz/v2/main/error_log new file mode 100755 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/functions.php b/walletintaleq.intaleq.xyz/v2/main/functions.php new file mode 100755 index 0000000..0c38723 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/functions.php @@ -0,0 +1,276 @@ + 'Internal server configuration error.']); + exit; + } + + // ── 1. استخراج الـ JWT ────────────────────────────────────── + $authHeader = $_SERVER['HTTP_AUTHORIZATION'] ?? ''; + $token = null; + + if (preg_match('/Bearer\s(\S+)/', $authHeader, $matches)) { + $token = $matches[1]; + } + + error_log('[JWT_DEBUG] Authorization header present: ' . (!empty($authHeader) ? 'YES' : 'NO ❌')); + error_log('[JWT_DEBUG] Token extracted: ' . ($token ? 'YES (len=' . strlen($token) . ')' : 'NO ❌')); + + if (!$token) { + http_response_code(401); + echo json_encode(['error' => 'Authorization token required']); + exit; + } + + // ── 2. فك التشفير والتحقق ─────────────────────────────────── + try { + $decoded = JWT::decode($token, new Key($secretKey, 'HS256')); + error_log('[JWT_DEBUG] JWT decode: SUCCESS ✅'); + error_log('[JWT_DEBUG] JWT payload: ' . json_encode((array)$decoded)); + + } catch (ExpiredException $e) { + error_log('[JWT_DEBUG] JWT decode FAILED: ExpiredException ❌ | ' . $e->getMessage()); + http_response_code(401); + echo json_encode(['error' => 'Token expired']); + exit; + + } catch (SignatureInvalidException $e) { + error_log('[JWT_DEBUG] JWT decode FAILED: SignatureInvalidException ❌ | ' . $e->getMessage()); + http_response_code(401); + echo json_encode(['error' => 'Invalid token signature']); + exit; + + } catch (BeforeValidException $e) { + error_log('[JWT_DEBUG] JWT decode FAILED: BeforeValidException ❌ | ' . $e->getMessage()); + http_response_code(401); + echo json_encode(['error' => 'Token not yet valid']); + exit; + + } catch (Exception $e) { + error_log('[JWT_DEBUG] JWT decode FAILED: Exception ❌ | ' . $e->getMessage()); + http_response_code(401); + echo json_encode(['error' => 'Invalid token']); + exit; + } + + // ── 3. التحقق من الـ Issuer ───────────────────────────────── + $expectedIssuer = 'Tripz-Wallet'; + $actualIssuer = $decoded->iss ?? '(missing)'; + error_log('[JWT_DEBUG] Issuer check | expected=' . $expectedIssuer . ' | actual=' . $actualIssuer); + + if ($actualIssuer !== $expectedIssuer) { + error_log('[JWT_DEBUG] Issuer MISMATCH ❌'); + http_response_code(401); + echo json_encode(['error' => 'Invalid token issuer']); + exit; + } + error_log('[JWT_DEBUG] Issuer: OK ✅'); + + // ── user_id ───────────────────────────────────────────────── + $userId = $decoded->user_id ?? $decoded->sub ?? null; + error_log('[JWT_DEBUG] user_id extracted: ' . ($userId ?? '(null) ❌')); + + if (!$userId) { + http_response_code(401); + echo json_encode(['error' => 'Invalid JWT payload']); + exit; + } + + // ── 4. بصمة الجهاز ────────────────────────────────────────── + if (!$isReg && $fpPepper) { + $fpInToken = $decoded->fingerPrint ?? null; + $fpHeader = $_SERVER['HTTP_X_DEVICE_FP'] ?? null; + + error_log('[JWT_DEBUG] FP check | fpInToken=' . ($fpInToken ?? '(null)')); + error_log('[JWT_DEBUG] FP check | X-Device-FP header=' . ($fpHeader ?? '(null)')); + + if ($fpInToken !== null && $fpHeader !== null) { + $expectedFp = hash('sha256', $fpHeader . $fpPepper); + $fpMatch = hash_equals($expectedFp, $fpInToken); + + error_log('[JWT_DEBUG] FP check | expectedFp=' . $expectedFp); + error_log('[JWT_DEBUG] FP check | match=' . ($fpMatch ? 'YES ✅' : 'NO ❌')); + + if (!$fpMatch) { + error_log(sprintf( + '⚠️ [SECURITY] Device mismatch | user=%s | IP=%s', + $userId, + $_SERVER['REMOTE_ADDR'] ?? 'unknown' + )); + http_response_code(403); + echo json_encode(['error' => 'Device mismatch']); + exit; + } + } else { + error_log('[JWT_DEBUG] FP check SKIPPED (token or header is null) ⚠️'); + } + } else { + error_log('[JWT_DEBUG] FP check SKIPPED | isReg=' . ($isReg ? 'true' : 'false') . ' | fpPepper=' . (!empty($fpPepper) ? 'set' : 'empty')); + } + + // ── 5. HMAC ───────────────────────────────────────────────── + $hmacHeader = $_SERVER['HTTP_X_HMAC_AUTH'] ?? null; + error_log('[JWT_DEBUG] HMAC header present: ' . ($hmacHeader !== null ? 'YES' : 'NO (skip)')); + + if ($hmacHeader !== null) { + $expectedHmac = hash_hmac('sha256', $userId, $hmacSecret); + $hmacMatch = hash_equals($expectedHmac, $hmacHeader); + + error_log('[JWT_DEBUG] HMAC check | match=' . ($hmacMatch ? 'YES ✅' : 'NO ❌')); + + if (!$hmacMatch) { + error_log(sprintf( + '⚠️ [SECURITY] HMAC mismatch | user=%s | IP=%s', + $userId, + $_SERVER['REMOTE_ADDR'] ?? 'unknown' + )); + http_response_code(403); + echo json_encode(['error' => 'Invalid HMAC']); + exit; + } + } + + error_log('[JWT_DEBUG] ── ALL CHECKS PASSED ✅ ─────────────────────────'); + return $decoded; +} + + + + +function filterRequest($requestname, $type = 'string') { + if (isset($_POST[$requestname]) && !empty($_POST[$requestname])) { + $value = trim($_POST[$requestname]); + // Remove any control characters + $value = preg_replace('/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]/', '', $value); + // Remove any HTML or XML tags + $value = strip_tags($value); + // Escape any special characters + $value = htmlspecialchars($value, ENT_QUOTES | ENT_HTML5, 'UTF-8'); + + if ($type === 'numeric') { + if (filter_var($value, FILTER_VALIDATE_FLOAT) !== false) { + return $value; + } + } else { + return $value; + } + } + return null; +} + + +function sendWhatsAppFromServer($to, $message) +{ + // 1) قائمة السيرفرات المتاحة + $servers = [ + "https://botmasa.intaleq.xyz/send",//rama tah + "https://botmasa2.intaleq.xyz/send",//shad + // "https://bootride.intaleq.xyz/send",//shahd bus + //"https://bot3.intaleq.xyz/send",//shahd + //"https://whatsapp.tripz-egypt.com/send"//tripz + ]; + + // 2) اختيار عشوائي + $url = $servers[array_rand($servers)]; + + // 3) إعداد البيانات + $payload = [ + "to" => $to, + "message" => $message + ]; + + // 4) تنفيذ الطلب + $curl = curl_init(); + curl_setopt_array($curl, [ + CURLOPT_URL => $url, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_CUSTOMREQUEST => "POST", + CURLOPT_POSTFIELDS => json_encode($payload, JSON_UNESCAPED_UNICODE), + CURLOPT_HTTPHEADER => [ + "Content-Type: application/json" + ], + ]); + + $response = curl_exec($curl); + $err = curl_error($curl); + curl_close($curl); + + // 5) تسجيل النتيجة + if ($err) { + error_log("[sendWhatsAppFromServer] cURL Error on $url: $err"); + return false; + } + + return json_decode($response, true); +} + + + + + + + +////////// + +function printFailure($message = "none") +{ + echo json_encode(array("status" => "failure", "message" => $message)); +} +function printSuccess($message = "none") +{ + echo json_encode(array("status" => "success", "message" => $message)); +} + +function result($count) +{ + if ($count > 0) { + printSuccess(); + } else { + printFailure(); + } +} + +function sendEmail($from,$to, $title, $body) +{ + $header = "From: $from" . "\n" . "CC: $from"; + mail($to, $title, $body, $header); +} diff --git a/walletintaleq.intaleq.xyz/v2/main/imageForUsingApp/order_page.jpg b/walletintaleq.intaleq.xyz/v2/main/imageForUsingApp/order_page.jpg new file mode 100644 index 0000000..c8c6a3d Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/imageForUsingApp/order_page.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/index.php b/walletintaleq.intaleq.xyz/v2/main/index.php new file mode 100755 index 0000000..1cfc57a --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/index.php @@ -0,0 +1,3 @@ + + + + + Delete Account + + + + + + App logo + +

Delete Account

+ + + +

To delete your account, please open the app and go to the Profile page. Then, tap on + the "Delete My Account" button and follow the instructions.

+ + +

+ © + All rights reserved by SEFER +

+ + + + + \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/instructions_web/logo.png b/walletintaleq.intaleq.xyz/v2/main/instructions_web/logo.png new file mode 100644 index 0000000..3e0026b Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/instructions_web/logo.png differ diff --git a/walletintaleq.intaleq.xyz/v2/main/jwtconnect.php b/walletintaleq.intaleq.xyz/v2/main/jwtconnect.php new file mode 100755 index 0000000..0840311 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/jwtconnect.php @@ -0,0 +1,48 @@ + false, + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES UTF8" + ]; + $user = getenv('USER'); // Still used for DB connection + $pass = getenv('PASS'); // Still used for DB connection + $con = new PDO($dsn, $user, $pass, $options); + + // --- JWT Authentication --- + include "functions.php"; // Include the functions file + + + + +} catch (PDOException $e) { + error_log($e->getMessage()); + http_response_code(500); // Internal Server Error + echo json_encode(['error' => 'A database error occurred.']); + exit; +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/load_env.php b/walletintaleq.intaleq.xyz/v2/main/load_env.php new file mode 100755 index 0000000..22c3e15 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/load_env.php @@ -0,0 +1,25 @@ + 'Server configuration error: Missing environment variables.'])); +} + +// CORS Headers +header('Content-Type: application/json'); +header("Access-Control-Allow-Origin: https://walletintaleq.intaleq.xyz"); +header("Access-Control-Allow-Methods: POST, OPTIONS"); +header("Access-Control-Allow-Headers: Content-Type, Authorization"); + +if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') { + http_response_code(200); + exit; +} + +try { + $id = filterRequest('id') ?? ''; + $password = filterRequest('password') ?? ''; + $audience = filterRequest('aud') ?? ''; + $fingerPrint = filterRequest('fingerPrint'); + + // Input validation + if (empty($id) || empty($password) || empty($audience) || empty($fingerPrint)) { + die(json_encode(['error' => 'Missing required parameters.'])); + } + if (!in_array($audience, $allowedAudiences)) { + http_response_code(400); + die(json_encode(['error' => 'Invalid audience'])); + } + /* + // Database connection + $dbuser = getenv('USER'); + $dbpass = getenv('PASS'); + $dbname = getenv('dbname'); + $dsn = "mysql:host=localhost;dbname=$dbname;charset=utf8mb4"; + $options = [ + PDO::ATTR_EMULATE_PREPARES => false, + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC + ]; + $con = new PDO($dsn, $dbuser, $dbpass, $options); + + // Fetch token data from database + $stmt = $con->prepare("SELECT `id`, `token`, `captain_id`, `fingerPrint` FROM `driverToken` WHERE `captain_id` = :captain_id"); + $stmt->bindParam(':captain_id', $id, PDO::PARAM_STR); + $stmt->execute(); + $tokenData = $stmt->fetch(PDO::FETCH_ASSOC); + + +// 1) يجب وجود سجل + if (!$tokenData) { + http_response_code(403); + die(json_encode(['error' => 'No token record found for this user.'])); + } + + if (empty($tokenData['fingerPrint']) || !hash_equals($tokenData['fingerPrint'], $fingerPrint)) { + http_response_code(403); + die(json_encode(['error' => 'Device fingerprint verification failed'])); +} + + */ + + // JWT Payload + $payload = [ + 'user_id' => $id, + 'fingerPrint' => $fingerPrint, + 'exp' => time() + 60, + 'iat' => time(), + 'iss' => $issuer, + 'aud' => $audience + ]; + + + // Ensure secret key is valid before encoding + if (empty($secretKey)) { + throw new Exception("SECRET_KEY is empty."); + } + + // Encode JWT + $jwt = JWT::encode($payload, $secretKey, 'HS256'); + $hmac = hash_hmac('sha256', $id, getenv('SECRET_KEY_HMAC')); + echo json_encode([ + 'status' => 'success', + 'jwt' => $jwt, + 'hmac' => $hmac, + 'expires_in' => 60 + ]); + http_response_code(200); + +} catch (Exception $e) { + http_response_code(500); + echo "🔥 Server error: " . $e->getMessage() . "\n"; + echo json_encode(['error' => 'An unexpected error occurred.']); +} \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/loginWallet.php b/walletintaleq.intaleq.xyz/v2/main/loginWallet.php new file mode 100755 index 0000000..e365a95 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/loginWallet.php @@ -0,0 +1,135 @@ + 'Server configuration error: Missing environment variables.'])); +} + +// CORS Headers - Be specific in production +header('Content-Type: application/json'); +header("Access-Control-Allow-Origin: https://wallet.sefer.live"); // Replace * with your Flutter app's origin +header("Access-Control-Allow-Methods: POST, OPTIONS"); +header("Access-Control-Allow-Headers: Content-Type, Authorization"); + +// Handle preflight OPTIONS requests +if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') { + http_response_code(200); + exit; +} + +try { + $id = filterRequest('id') ?? ''; + $password = filterRequest('password') ?? ''; + $audience = filterRequest('aud') ?? ''; + $dbname = getenv('dbname'); + // Input validation - More specific + if (empty($id)) { + throw new InvalidArgumentException("ID is required."); + } + if (empty($password)) { + throw new InvalidArgumentException("Password is required."); + } + if (empty($audience)) { + throw new InvalidArgumentException("Audience is required."); + } + if (!in_array($audience, $allowedAudiences)) { + http_response_code(400); // Bad Request + exit(json_encode(['error' => 'Invalid audience'])); + } + +$fingerPrint = filterRequest('fingerPrint') ?? ''; + +if (empty($fingerPrint)) { + throw new InvalidArgumentException("Device fingerprint is required."); +} +$dbuser = getenv('USER'); // Get DB user here, consistent naming +$dbpass = getenv('PASS'); // Get DB password here + if (password_verify($password, $passwordnewpassenger)) { +// Fetch token data from the database +$dsn = "mysql:host=localhost;dbname=$dbname;charset=utf8mb4"; + $options = [ + PDO::ATTR_EMULATE_PREPARES => false, + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES UTF8" + ]; + $con = new PDO($dsn, $dbuser, $dbpass, $options); + $sql = "SELECT `id`, `token`, `passengerID`, `fingerPrint` FROM `tokens` WHERE `passengerID` = :passengerID"; + $stmt = $con->prepare($sql); + $stmt->bindParam(':passengerID', $id, PDO::PARAM_STR); + $stmt->execute(); + $tokenData = $stmt->fetch(PDO::FETCH_ASSOC); + + + + /* + + // Verify fingerprint + if (!$tokenData) { //|| !hash_equals($tokenData['fingerPrint'], $fingerPrint)) { + http_response_code(403); // Forbidden + exit(json_encode(['error' => 'Device fingerprint verification failed'])); + } + + */ + $payload = [ + 'user_id' => $id, + 'fingerPrint' => $fingerPrint, + 'exp' => time() + 60, + 'iat' => time(), + 'iss' => $issuer, + 'aud' => $audience +]; + +$jwt = JWT::encode($payload, $secretKey, 'HS256'); +$hmac = hash_hmac('sha256', $id, getenv('SECRET_KEY_HMAC')); + + echo json_encode([ + 'status' => 'success', + 'jwt' => $jwt, + 'hmac' => $hmac, + // 'refresh_token' => $refreshToken, + 'expires_in' => 300 + ]); + http_response_code(200); + + }else{ + echo 'fffff'; + } + +} catch (InvalidArgumentException $e) { + // Handle input validation errors + http_response_code(400); // Bad Request - Client-side error + // error_log("Input validation error: " . $e->getMessage()); // Log for debugging + echo json_encode(['error' => $e->getMessage()]); // Specific error message +} catch (Exception $e) { + // Handle other exceptions (e.g., JWT encoding errors) + http_response_code(500); // Internal Server Error + // error_log("Server error: " . $e->getMessage()); // Log for debugging + echo json_encode(['error' => 'An unexpected error occurred.']); // Generic message +} \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/loginWalletAdmin.php b/walletintaleq.intaleq.xyz/v2/main/loginWalletAdmin.php new file mode 100755 index 0000000..8f5adcd --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/loginWalletAdmin.php @@ -0,0 +1,107 @@ + 'Server configuration error'])); +} + +try { + $id = filterRequest('id') ?? ''; + $password = filterRequest('password') ?? ''; + $audience = filterRequest('aud') ?? ''; + $fingerPrint = filterRequest('fingerPrint'); + + if (empty($id) || empty($password) || empty($audience) || empty($fingerPrint)) { + http_response_code(400); + die(json_encode(['error' => 'Missing required parameters.'])); + } + + if (!in_array($audience, $allowedAudiences)) { + http_response_code(403); + die(json_encode(['error' => 'Invalid audience'])); + } + + // --- الاتصال بقاعدة البيانات --- + $dbuser = getenv('USER'); + $dbpass = getenv('PASS'); + $dbname = getenv('dbname'); + $dsn = "mysql:host=localhost;dbname=$dbname;charset=utf8mb4"; + + $con = new PDO($dsn, $dbuser, $dbpass, [ + PDO::ATTR_EMULATE_PREPARES => false, + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC + ]); + + // --- التحقق من الهوية --- + // تعديل: البحث باستخدام المعرف (id) أو البصمة (fingerprint) + $stmt = $con->prepare("SELECT * FROM `adminUser` WHERE `username` = ? OR `device_number` = ? LIMIT 1"); + $stmt->execute([$id, $fingerPrint]); + $user = $stmt->fetch(); + + if (!$user) { + // إذا لم يكن موجوداً، نتحقق من كلمة السر العامة للأدمن كخيار أخير + if ($id === 'admin' && $password === $passwordnewpassenger) { + // السماح بالدخول كأدمن عام + } else { + http_response_code(403); + echo json_encode(['error' => 'User not found']); + exit; + } + } + + // --- إنشاء JWT --- + $payload = [ + 'user_id' => $id, + 'fingerPrint' => $fingerPrint, + 'exp' => time() + 3600, // زيادة وقت الصلاحية لـ ساعة + 'iat' => time(), + 'iss' => $issuer, + 'aud' => $audience + ]; + + $jwt = JWT::encode($payload, $secretKey, 'HS256'); + $hmac = hash_hmac('sha256', $id, getenv('SECRET_KEY_HMAC')); + + echo json_encode([ + 'status' => 'success', + 'jwt' => $jwt, + 'hmac' => $hmac, + 'expires_in' => 3600 + ]); + http_response_code(200); + +} catch (Exception $e) { + http_response_code(500); + echo json_encode(['error' => 'Unexpected error occurred: ' . $e->getMessage()]); +} diff --git a/walletintaleq.intaleq.xyz/v2/main/logs/mtn_payment.log b/walletintaleq.intaleq.xyz/v2/main/logs/mtn_payment.log new file mode 100644 index 0000000..0e954e4 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/logs/mtn_payment.log @@ -0,0 +1,17 @@ +🚀 MTN Payment Log Started +[23-Jul-2025 01:12:38] 🚦 START | passengerId: ba2d55d383eca49e4e11a1c2723bf3f2 | phone: 0999999999 | amount: 100000 +[23-Jul-2025 01:12:38] 🧾 Generated Invoice: MTN_ba2d55d383eca49e4e11a1c2723bf3f2_1753222358 +[23-Jul-2025 01:12:38] 🧭 Generated GUID: mtn_68800cd65385e +[23-Jul-2025 01:12:38] 📦 Create Invoice Body: {"Amount":10000000,"Invoice":"MTN_ba2d55d383eca49e4e11a1c2723bf3f2_1753222358","Session":0,"TTL":15} +[23-Jul-2025 01:12:38] 🔐 Signature for pos_web/invoice/create: +[23-Jul-2025 01:12:38] 📤 Sent JSON: {"Amount":10000000,"Invoice":"MTN_ba2d55d383eca49e4e11a1c2723bf3f2_1753222358","Session":0,"TTL":15} +[23-Jul-2025 01:12:38] 📥 Create Invoice Response: {"Errno":500,"Error":"Internal error"} +[23-Jul-2025 01:12:38] ❌ Failed to create invoice. Error: {"Errno":500,"Error":"Internal error"} +[23-Jul-2025 01:14:23] 🚦 START | passengerId: ba2d55d383eca49e4e11a1c2723bf3f2 | phone: 0999999999 | amount: 100000 +[23-Jul-2025 01:14:23] 🧾 Generated Invoice: MTN_ba2d55d383eca49e4e11a1c2723bf3f2_1753222463 +[23-Jul-2025 01:14:23] 🧭 Generated GUID: mtn_68800d3f5211b +[23-Jul-2025 01:14:23] 📦 Create Invoice Body: {"Amount":10000000,"Invoice":"MTN_ba2d55d383eca49e4e11a1c2723bf3f2_1753222463","Session":0,"TTL":15} +[23-Jul-2025 01:14:23] 🔐 Signature for pos_web/invoice/create: wUNJWaIJicn/qIQdvRV2vXLhs15JUuj3tGmPi9xInfQl+PqqF+j808aVj4UXJio+c2GqouMd2xiR8mJRo73uZ77nzf4Kr1skcXxtRwKDD0sCJBc7l1xHrvawEejkYL+J4Y2sJqXxCUQiC7aFc8I7deMHTLFUi2NcsnWg4w1HVnA= +[23-Jul-2025 01:14:23] 📤 Sent JSON: {"Amount":10000000,"Invoice":"MTN_ba2d55d383eca49e4e11a1c2723bf3f2_1753222463","Session":0,"TTL":15} +[23-Jul-2025 01:14:23] 📥 Create Invoice Response: {"Reply":"pos_web\/invoice\/create","Subject":"9001000000060863","ReqId":"d8c850eb-90e5-432b-923f-7f146a85ee2f","Errno":401,"Error":"Incorrect request signature"} +[23-Jul-2025 01:14:23] ❌ Failed to create invoice. Error: {"Reply":"pos_web\/invoice\/create","Subject":"9001000000060863","ReqId":"d8c850eb-90e5-432b-923f-7f146a85ee2f","Errno":401,"Error":"Incorrect request signature"} diff --git a/walletintaleq.intaleq.xyz/v2/main/otpmessage.php b/walletintaleq.intaleq.xyz/v2/main/otpmessage.php new file mode 100755 index 0000000..065b11e --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/otpmessage.php @@ -0,0 +1,18 @@ +verify->v2->services + ->create("My Verify Service"); + +print($service->sid); \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/paymob.php b/walletintaleq.intaleq.xyz/v2/main/paymob.php new file mode 100755 index 0000000..4e45898 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/paymob.php @@ -0,0 +1,28 @@ + 'Pipedream is the fastest way to connect APIs. Build and run workflows with code-level control when you need it — and no code when you don\'t.', + 'event_id' => $_GET['event_id'], + 'workflow_id' => $_GET['workflow_id'], + 'owner_id' => $_GET['owner_id'], + 'deployment_id' => $_GET['deployment_id'], + 'timestamp' => $_GET['timestamp'], + 'inspect' => 'https://pipedream.com/@/' . $_GET['workflow_id'], + 'quickstart' => 'https://pipedream.com/quickstart/', +]; + +// Send the response +http_response_code(200); + +foreach ($headers as $key => $value) { + header("$key: $value"); +} + +echo json_encode($body); +echo json_decode($body); + +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/.jpeg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/.jpeg new file mode 100644 index 0000000..8d71b98 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/.jpeg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/.jpg new file mode 100644 index 0000000..6dd008f Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/09ea0050dcd9624b984bd415c5e1d4711527232f.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/09ea0050dcd9624b984bd415c5e1d4711527232f.jpg new file mode 100644 index 0000000..532d871 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/09ea0050dcd9624b984bd415c5e1d4711527232f.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/0be40911b805c7ead3d90d11037c25b4bbb5167f.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/0be40911b805c7ead3d90d11037c25b4bbb5167f.jpg new file mode 100644 index 0000000..62129d8 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/0be40911b805c7ead3d90d11037c25b4bbb5167f.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/100640451635187114399.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/100640451635187114399.jpg new file mode 100644 index 0000000..2764aca Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/100640451635187114399.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/100709698456521168412.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/100709698456521168412.jpg new file mode 100644 index 0000000..feb6e59 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/100709698456521168412.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/100863856454829613444.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/100863856454829613444.jpg new file mode 100644 index 0000000..561e7c8 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/100863856454829613444.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/101801548636069777753.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/101801548636069777753.jpg new file mode 100644 index 0000000..0f4549a Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/101801548636069777753.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/101889020480896624794.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/101889020480896624794.jpg new file mode 100644 index 0000000..4de3dec Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/101889020480896624794.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/102125246521055808022.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/102125246521055808022.jpg new file mode 100644 index 0000000..ef99141 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/102125246521055808022.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/102522864607223898218.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/102522864607223898218.jpg new file mode 100644 index 0000000..5a79256 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/102522864607223898218.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/102529380798796762788.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/102529380798796762788.jpg new file mode 100644 index 0000000..194143f Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/102529380798796762788.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/102879069039926260064.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/102879069039926260064.jpg new file mode 100644 index 0000000..679a953 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/102879069039926260064.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/103189680831826460789.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/103189680831826460789.jpg new file mode 100644 index 0000000..8b63769 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/103189680831826460789.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/103624573245566437609.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/103624573245566437609.jpg new file mode 100644 index 0000000..2c8bb05 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/103624573245566437609.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/103826557563952759324.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/103826557563952759324.jpg new file mode 100644 index 0000000..1056ebd Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/103826557563952759324.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/103900675080620462886.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/103900675080620462886.jpg new file mode 100644 index 0000000..3f9dc9c Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/103900675080620462886.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/104564626474544059670.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/104564626474544059670.jpg new file mode 100644 index 0000000..dc378b0 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/104564626474544059670.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/104618005199546155267.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/104618005199546155267.jpg new file mode 100644 index 0000000..d0c75fc Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/104618005199546155267.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/104830497380358979291.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/104830497380358979291.jpg new file mode 100644 index 0000000..a8eb612 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/104830497380358979291.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/105216412271230904068.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/105216412271230904068.jpg new file mode 100644 index 0000000..ad21c39 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/105216412271230904068.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/105290325813346300822.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/105290325813346300822.jpg new file mode 100644 index 0000000..b10baae Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/105290325813346300822.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/105543283537757397531.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/105543283537757397531.jpg new file mode 100644 index 0000000..a4b511f Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/105543283537757397531.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/105692687966420771965.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/105692687966420771965.jpg new file mode 100644 index 0000000..13a1ede Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/105692687966420771965.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/105723478348494770717.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/105723478348494770717.jpg new file mode 100644 index 0000000..09c287a Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/105723478348494770717.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/105782765640070783647.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/105782765640070783647.jpg new file mode 100644 index 0000000..fbc2413 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/105782765640070783647.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/105967173309588012199.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/105967173309588012199.jpg new file mode 100644 index 0000000..d256bdf Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/105967173309588012199.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/106111169026592926063.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/106111169026592926063.jpg new file mode 100644 index 0000000..c4b855a Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/106111169026592926063.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/106198683972987021838.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/106198683972987021838.jpg new file mode 100644 index 0000000..a1c1d5b Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/106198683972987021838.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/106257242807178778033.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/106257242807178778033.jpg new file mode 100644 index 0000000..7487186 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/106257242807178778033.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/106461731648120198140.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/106461731648120198140.jpg new file mode 100644 index 0000000..6085ab7 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/106461731648120198140.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/106475888047535730912.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/106475888047535730912.jpg new file mode 100644 index 0000000..8ccee07 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/106475888047535730912.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/106577903237157200001.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/106577903237157200001.jpg new file mode 100644 index 0000000..8a6d0a9 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/106577903237157200001.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/106748548377954265141.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/106748548377954265141.jpg new file mode 100644 index 0000000..07e0d6d Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/106748548377954265141.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/107266209587634662826.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/107266209587634662826.jpg new file mode 100644 index 0000000..5741978 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/107266209587634662826.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/107553147426555427650.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/107553147426555427650.jpg new file mode 100644 index 0000000..e86f8b2 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/107553147426555427650.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/107759815919208956625.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/107759815919208956625.jpg new file mode 100644 index 0000000..355d1ba Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/107759815919208956625.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/107759856930007751532.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/107759856930007751532.jpg new file mode 100644 index 0000000..b707938 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/107759856930007751532.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/107799830903247121409.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/107799830903247121409.jpg new file mode 100644 index 0000000..6bc9113 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/107799830903247121409.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/107906993541141391497.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/107906993541141391497.jpg new file mode 100644 index 0000000..50d8037 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/107906993541141391497.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/108097044067900621866.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/108097044067900621866.jpg new file mode 100644 index 0000000..1830310 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/108097044067900621866.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/108273415769505130902.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/108273415769505130902.jpg new file mode 100644 index 0000000..09202b0 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/108273415769505130902.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/108515276700373718313.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/108515276700373718313.jpg new file mode 100644 index 0000000..8372059 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/108515276700373718313.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/108584555851561644050.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/108584555851561644050.jpg new file mode 100644 index 0000000..6d07dd8 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/108584555851561644050.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/108663582199261664667.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/108663582199261664667.jpg new file mode 100644 index 0000000..e41eeef Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/108663582199261664667.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/108708708585533568694.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/108708708585533568694.jpg new file mode 100644 index 0000000..f6428a6 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/108708708585533568694.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/109053960515045947611.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/109053960515045947611.jpg new file mode 100644 index 0000000..4d157ce Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/109053960515045947611.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/109271510704360623699.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/109271510704360623699.jpg new file mode 100644 index 0000000..eb5fe67 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/109271510704360623699.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/109905590760990573566.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/109905590760990573566.jpg new file mode 100644 index 0000000..e4f3513 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/109905590760990573566.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/109957052549748306756.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/109957052549748306756.jpg new file mode 100644 index 0000000..fbc7dff Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/109957052549748306756.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/110150066383672287382.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/110150066383672287382.jpg new file mode 100644 index 0000000..edbfa7c Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/110150066383672287382.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/110605074695183976275.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/110605074695183976275.jpg new file mode 100644 index 0000000..945fa6c Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/110605074695183976275.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/110964111936155642289.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/110964111936155642289.jpg new file mode 100644 index 0000000..1a67285 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/110964111936155642289.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/111960639186747286079.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/111960639186747286079.jpg new file mode 100644 index 0000000..1504a7c Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/111960639186747286079.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/111976894569752691383.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/111976894569752691383.jpg new file mode 100644 index 0000000..5378929 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/111976894569752691383.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/112526642579117146751.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/112526642579117146751.jpg new file mode 100644 index 0000000..cd873f4 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/112526642579117146751.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/112765263168949450880.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/112765263168949450880.jpg new file mode 100644 index 0000000..2742909 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/112765263168949450880.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/112991014353953989940.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/112991014353953989940.jpg new file mode 100644 index 0000000..b90a059 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/112991014353953989940.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/113132572949319796386.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/113132572949319796386.jpg new file mode 100644 index 0000000..e10d797 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/113132572949319796386.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/113172279072358305645.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/113172279072358305645.jpg new file mode 100644 index 0000000..f26135e Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/113172279072358305645.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/113386724468603821666.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/113386724468603821666.jpg new file mode 100644 index 0000000..2332317 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/113386724468603821666.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/113691677403170451168.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/113691677403170451168.jpg new file mode 100644 index 0000000..fd18cbd Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/113691677403170451168.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/114007097502103968011.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/114007097502103968011.jpg new file mode 100644 index 0000000..1b77d2b Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/114007097502103968011.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/114243034311436865474.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/114243034311436865474.jpg new file mode 100644 index 0000000..35b2991 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/114243034311436865474.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/114250903363463998871.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/114250903363463998871.jpg new file mode 100644 index 0000000..55b7be0 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/114250903363463998871.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/115405648336253331829.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/115405648336253331829.jpg new file mode 100644 index 0000000..7533c36 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/115405648336253331829.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/115437547204749173370.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/115437547204749173370.jpg new file mode 100644 index 0000000..e971ba7 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/115437547204749173370.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/115683640435899067251.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/115683640435899067251.jpg new file mode 100644 index 0000000..bd2e660 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/115683640435899067251.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/116497803852388207272.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/116497803852388207272.jpg new file mode 100644 index 0000000..f20e0aa Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/116497803852388207272.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/116996152991737817437.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/116996152991737817437.jpg new file mode 100644 index 0000000..9503857 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/116996152991737817437.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/117714284189065236931.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/117714284189065236931.jpg new file mode 100644 index 0000000..b72d78e Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/117714284189065236931.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/117717190217675884772.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/117717190217675884772.jpg new file mode 100644 index 0000000..b5a7310 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/117717190217675884772.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/117799226761624300570.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/117799226761624300570.jpg new file mode 100644 index 0000000..b55ce27 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/117799226761624300570.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/117987020727914246593.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/117987020727914246593.jpg new file mode 100644 index 0000000..0fc9f94 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/117987020727914246593.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/117988195341881264057.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/117988195341881264057.jpg new file mode 100644 index 0000000..ee4eafc Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/117988195341881264057.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/118426682305752856096.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/118426682305752856096.jpg new file mode 100644 index 0000000..ba64f65 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/118426682305752856096.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/164220be26cc303991f591a2f2c00f2a3b94a36f.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/164220be26cc303991f591a2f2c00f2a3b94a36f.jpg new file mode 100644 index 0000000..cd602ea Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/164220be26cc303991f591a2f2c00f2a3b94a36f.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/5fa87bcf5d98dafaada4cdbc4812cf6f788600a6.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/5fa87bcf5d98dafaada4cdbc4812cf6f788600a6.jpg new file mode 100644 index 0000000..f160de1 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/5fa87bcf5d98dafaada4cdbc4812cf6f788600a6.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/ba94ef0df65fd90a122ac13c96090661b19d80e6.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/ba94ef0df65fd90a122ac13c96090661b19d80e6.jpg new file mode 100644 index 0000000..a2926ce Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/ba94ef0df65fd90a122ac13c96090661b19d80e6.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/dbb338c62a5f0542807f3df4b6f7d7c92c7974e5143f19f8c1c4f1d165dd6cfe.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/dbb338c62a5f0542807f3df4b6f7d7c92c7974e5143f19f8c1c4f1d165dd6cfe.jpg new file mode 100644 index 0000000..5003bd0 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/dbb338c62a5f0542807f3df4b6f7d7c92c7974e5143f19f8c1c4f1d165dd6cfe.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/ffc1cda68f1763e0e1604f58db16741e52ed005e.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/ffc1cda68f1763e0e1604f58db16741e52ed005e.jpg new file mode 100644 index 0000000..28e99e4 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/ffc1cda68f1763e0e1604f58db16741e52ed005e.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/j6p0SxoUmiY5NDhZa79inYhIW6f2.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/j6p0SxoUmiY5NDhZa79inYhIW6f2.jpg new file mode 100644 index 0000000..57a14d8 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/j6p0SxoUmiY5NDhZa79inYhIW6f2.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/oUtCcLEmpUbJA8e34EB3ZPA0qH23.jpg b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/oUtCcLEmpUbJA8e34EB3ZPA0qH23.jpg new file mode 100644 index 0000000..deaa0b7 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/portrate_captain_image/oUtCcLEmpUbJA8e34EB3ZPA0qH23.jpg differ diff --git a/walletintaleq.intaleq.xyz/v2/main/privacy_policy.php b/walletintaleq.intaleq.xyz/v2/main/privacy_policy.php new file mode 100755 index 0000000..863ce19 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/privacy_policy.php @@ -0,0 +1,56 @@ + + +
+
PRIVACY POLICY

Last updated December 06, 2023



This privacy notice for Mobile-App ("we," "us," or "our"), describes how and why we might collect, store, use, and/or share ("process") your information when you use our services ("Services"), such as when you:
  • Download and use our mobile application (Intaleq), or any other application of ours that links to this privacy notice
  • Engage with us in other related ways, including any sales, marketing, or events
Questions or concerns? Reading this privacy notice will help you understand your privacy rights and choices. If you do not agree with our policies and practices, please do not use our Services. If you still have any questions or concerns, please contact us at hamzaayed@mobile-app.store.


SUMMARY OF KEY POINTS

This summary provides key points from our privacy notice, but you can find out more details about any of these topics by clicking the link following each key point or by using our table of contents below to find the section you are looking for.

What personal information do we process? When you visit, use, or navigate our Services, we may process personal information depending on how you interact with us and the Services, the choices you make, and the products and features you use. Learn more about personal information you disclose to us.

Do we process any sensitive personal information? We may process sensitive personal information when necessary with your consent or as otherwise permitted by applicable law. Learn more about sensitive information we process.

Do we receive any information from third parties? We do not receive any information from third parties.

How do we process your information? We process your information to provide, improve, and administer our Services, communicate with you, for security and fraud prevention, and to comply with law. We may also process your information for other purposes with your consent. We process your information only when we have a valid legal reason to do so. Learn more about how we process your information.

In what situations and with which parties do we share personal information? We may share information in specific situations and with specific third parties. Learn more about when and with whom we share your personal information.

How do we keep your information safe? We have organizational and technical processes and procedures in place to protect your personal information. However, no electronic transmission over the internet or information storage technology can be guaranteed to be 100% secure, so we cannot promise or guarantee that hackers, cybercriminals, or other unauthorized third parties will not be able to defeat our security and improperly collect, access, steal, or modify your information. Learn more about how we keep your information safe.

What are your rights? Depending on where you are located geographically, the applicable privacy law may mean you have certain rights regarding your personal information. Learn more about your privacy rights.

How do you exercise your rights? The easiest way to exercise your rights is by visiting __________, or by contacting us. We will consider and act upon any request in accordance with applicable data protection laws.

Want to learn more about what we do with any information we collect? Review the privacy notice in full.


TABLE OF CONTENTS



1. WHAT INFORMATION DO WE COLLECT?

Personal information you disclose to us

In Short: We collect personal information that you provide to us.

We collect personal information that you voluntarily provide to us when you register on the Services, express an interest in obtaining information about us or our products and Services, when you participate in activities on the Services, or otherwise when you contact us.

Personal Information Provided by You. The personal information that we collect depends on the context of your interactions with us and the Services, the choices you make, and the products and features you use. The personal information we collect may include the following:
  • names
  • phone numbers
  • email addresses
  • mailing addresses
  • usernames
  • passwords
  • contact or authentication data
  • billing addresses
  • debit/credit card numbers
  • driver license
  • user image
Sensitive Information. When necessary, with your consent or as otherwise permitted by applicable law, we process the following categories of sensitive information:
  • data about a person's sex life or sexual orientation
  • date of birth
  • registration car license for captain
Payment Data. We may collect data necessary to process your payment if you make purchases, such as your payment instrument number, and the security code associated with your payment instrument. All payment data is stored by __________. You may find their privacy notice link(s) here: __________.

Social Media Login Data. We may provide you with the option to register with us using your existing social media account details, like your Facebook, Twitter, or other social media account. If you choose to register in this way, we will collect the information described in the section called "HOW DO WE HANDLE YOUR SOCIAL LOGINS?" below.

Application Data. If you use our application(s), we also may collect the following information if you choose to provide us with access or permission:
  • Geolocation Information. We may request access or permission to track location-based information from your mobile device, either continuously or while you are using our mobile application(s), to provide certain location-based services. If you wish to change our access or permissions, you may do so in your device's settings.
  • Mobile Device Data. We automatically collect device information (such as your mobile device ID, model, and manufacturer), operating system, version information and system configuration information, device and application identification numbers, browser type and version, hardware model Internet service provider and/or mobile carrier, and Internet Protocol (IP) address (or proxy server). If you are using our application(s), we may also collect information about the phone network associated with your mobile device, your mobile device’s operating system or platform, the type of mobile device you use, your mobile device’s unique device ID, and information about the features of our application(s) you accessed.
This information is primarily needed to maintain the security and operation of our application(s), for troubleshooting, and for our internal analytics and reporting purposes.

All personal information that you provide to us must be true, complete, and accurate, and you must notify us of any changes to such personal information.

Information automatically collected

In Short: Some information — such as your Internet Protocol (IP) address and/or browser and device characteristics — is collected automatically when you visit our Services.

We automatically collect certain information when you visit, use, or navigate the Services. This information does not reveal your specific identity (like your name or contact information) but may include device and usage information, such as your IP address, browser and device characteristics, operating system, language preferences, referring URLs, device name, country, location, information about how and when you use our Services, and other technical information. This information is primarily needed to maintain the security and operation of our Services, and for our internal analytics and reporting purposes.

The information we collect includes:
  • Device Data. We collect device data such as information about your computer, phone, tablet, or other device you use to access the Services. Depending on the device used, this device data may include information such as your IP address (or proxy server), device and application identification numbers, location, browser type, hardware model, Internet service provider and/or mobile carrier, operating system, and system configuration information.
  • Location Data. We collect location data such as information about your device's location, which can be either precise or imprecise. How much information we collect depends on the type and settings of the device you use to access the Services. For example, we may use GPS and other technologies to collect geolocation data that tells us your current location (based on your IP address). You can opt out of allowing us to collect this information either by refusing access to the information or by disabling your Location setting on your device. However, if you choose to opt out, you may not be able to use certain aspects of the Services.
  • __________. __________
2. HOW DO WE PROCESS YOUR INFORMATION?

In Short: We process your information to provide, improve, and administer our Services, communicate with you, for security and fraud prevention, and to comply with law. We may also process your information for other purposes with your consent.

We process your personal information for a variety of reasons, depending on how you interact with our Services, including:
  • To facilitate account creation and authentication and otherwise manage user accounts. We may process your information so you can create and log in to your account, as well as keep your account in working order.
  • To deliver and facilitate delivery of services to the user. We may process your information to provide you with the requested service.
  • To respond to user inquiries/offer support to users. We may process your information to respond to your inquiries and solve any potential issues you might have with the requested service.
  • To send administrative information to you. We may process your information to send you details about our products and services, changes to our terms and policies, and other similar information.
  • To fulfill and manage your orders. We may process your information to fulfill and manage your orders, payments, returns, and exchanges made through the Services.

  • To enable user-to-user communications. We may process your information if you choose to use any of our offerings that allow for communication with another user.

  • To request feedback. We may process your information when necessary to request feedback and to contact you about your use of our Services.

  • To send you marketing and promotional communications. We may process the personal information you send to us for our marketing purposes, if this is in accordance with your marketing preferences. You can opt out of our marketing emails at any time. For more information, see "WHAT ARE YOUR PRIVACY RIGHTS?" below.
  • To protect our Services. We may process your information as part of our efforts to keep our Services safe and secure, including fraud monitoring and prevention.
  • To administer prize draws and competitions. We may process your information to administer prize draws and competitions.
  • To identify usage trends. We may process information about how you use our Services to better understand how they are being used so we can improve them.
  • To comply with our legal obligations. We may process your information to comply with our legal obligations, respond to legal requests, and exercise, establish, or defend our legal rights.

3. WHEN AND WITH WHOM DO WE SHARE YOUR PERSONAL INFORMATION?

In Short: We may share information in specific situations described in this section and/or with the following third parties.

We may need to share your personal information in the following situations:
  • Business Transfers. We may share or transfer your information in connection with, or during negotiations of, any merger, sale of company assets, financing, or acquisition of all or a portion of our business to another company.

4. HOW DO WE HANDLE YOUR SOCIAL LOGINS?

In Short: If you choose to register or log in to our Services using a social media account, we may have access to certain information about you.

Our Services offer you the ability to register and log in using your third-party social media account details (like your Facebook or Twitter logins). Where you choose to do this, we will receive certain profile information about you from your social media provider. The profile information we receive may vary depending on the social media provider concerned, but will often include your name, email address, friends list, and profile picture, as well as other information you choose to make public on such a social media platform.

We will use the information we receive only for the purposes that are described in this privacy notice or that are otherwise made clear to you on the relevant Services. Please note that we do not control, and are not responsible for, other uses of your personal information by your third-party social media provider. We recommend that you review their privacy notice to understand how they collect, use, and share your personal information, and how you can set your privacy preferences on their sites and apps.

5. HOW LONG DO WE KEEP YOUR INFORMATION?

In Short: We keep your information for as long as necessary to fulfill the purposes outlined in this privacy notice unless otherwise required by law.

We will only keep your personal information for as long as it is necessary for the purposes set out in this privacy notice, unless a longer retention period is required or permitted by law (such as tax, accounting, or other legal requirements). No purpose in this notice will require us keeping your personal information for longer than   one (1) months past the termination of the user's account.

When we have no ongoing legitimate business need to process your personal information, we will either delete or anonymize such information, or, if this is not possible (for example, because your personal information has been stored in backup archives), then we will securely store your personal information and isolate it from any further processing until deletion is possible.

6. HOW DO WE KEEP YOUR INFORMATION SAFE?

In Short: We aim to protect your personal information through a system of organizational and technical security measures.

We have implemented appropriate and reasonable technical and organizational security measures designed to protect the security of any personal information we process. However, despite our safeguards and efforts to secure your information, no electronic transmission over the Internet or information storage technology can be guaranteed to be 100% secure, so we cannot promise or guarantee that hackers, cybercriminals, or other unauthorized third parties will not be able to defeat our security and improperly collect, access, steal, or modify your information. Although we will do our best to protect your personal information, transmission of personal information to and from our Services is at your own risk. You should only access the Services within a secure environment.

7. DO WE COLLECT INFORMATION FROM MINORS?

In Short: We do not knowingly collect data from or market to children under 18 years of age.

We do not knowingly solicit data from or market to children under 18 years of age. By using the Services, you represent that you are at least 18 or that you are the parent or guardian of such a minor and consent to such minor dependent’s use of the Services. If we learn that personal information from users less than 18 years of age has been collected, we will deactivate the account and take reasonable measures to promptly delete such data from our records. If you become aware of any data we may have collected from children under age 18, please contact us at support@mobile-app.store.

8. WHAT ARE YOUR PRIVACY RIGHTS?

In Short:  You may review, change, or terminate your account at any time.

Withdrawing your consent: If we are relying on your consent to process your personal information, which may be express and/or implied consent depending on the applicable law, you have the right to withdraw your consent at any time. You can withdraw your consent at any time by contacting us by using the contact details provided in the section "HOW CAN YOU CONTACT US ABOUT THIS NOTICE?" below.

However, please note that this will not affect the lawfulness of the processing before its withdrawal nor, when applicable law allows, will it affect the processing of your personal information conducted in reliance on lawful processing grounds other than consent.

Account Information

If you would at any time like to review or change the information in your account or terminate your account, you can:
  • Log in to your account settings and update your user account.
  • Contact us using the contact information provided.
  • support@mobile-app.store
Upon your request to terminate your account, we will deactivate or delete your account and information from our active databases. However, we may retain some information in our files to prevent fraud, troubleshoot problems, assist with any investigations, enforce our legal terms and/or comply with applicable legal requirements.

If you have questions or comments about your privacy rights, you may email us at hamzaayed@mobile-app.store.

9. CONTROLS FOR DO-NOT-TRACK FEATURES

Most web browsers and some mobile operating systems and mobile applications include a Do-Not-Track ("DNT") feature or setting you can activate to signal your privacy preference not to have data about your online browsing activities monitored and collected. At this stage no uniform technology standard for recognizing and implementing DNT signals has been finalized. As such, we do not currently respond to DNT browser signals or any other mechanism that automatically communicates your choice not to be tracked online. If a standard for online tracking is adopted that we must follow in the future, we will inform you about that practice in a revised version of this privacy notice.

10. DO UNITED STATES RESIDENTS HAVE SPECIFIC PRIVACY RIGHTS?

In Short: If you are a resident of California, Colorado, Utah, Virginia or Connecticut, you are granted specific rights regarding access to your personal information.

What categories of personal information do we collect?

We have collected the following categories of personal information in the past twelve (12) months:

CategoryExamplesCollected
A. Identifiers
Contact details, such as real name, alias, postal address, telephone or mobile contact number, unique personal identifier, online identifier, Internet Protocol address, email address, and account name

NO

B. Personal information as defined in the California Customer Records statute
Name, contact information, education, employment, employment history, and financial information

NO

C. Protected classification characteristics under state or federal law
Gender and date of birth

YES

D. Commercial information
Transaction information, purchase history, financial details, and payment information

NO

E. Biometric information
Fingerprints and voiceprints

NO

F. Internet or other similar network activity
Browsing history, search history, online behavior, interest data, and interactions with our and other websites, applications, systems, and advertisements

NO

G. Geolocation data
Device location

YES

H. Audio, electronic, visual, thermal, olfactory, or similar information
Images and audio, video or call recordings created in connection with our business activities

NO

I. Professional or employment-related information
Business contact details in order to provide you our Services at a business level or job title, work history, and professional qualifications if you apply for a job with us

NO

J. Education Information
Student records and directory information

YES

K. Inferences drawn from collected personal information
Inferences drawn from any of the collected personal information listed above to create a profile or summary about, for example, an individual’s preferences and characteristics

NO

L. Sensitive personal InformationAccount login information, contents of email or text messages, precise geolocation, sex life or sexual orientation and state id card numbers

YES


We will use and retain the collected personal information as needed to provide the Services or for:
  • Category B - As long as the user has an account with us
  • Category C - As long as the user has an account with us
  • Category G - As long as the user has an account with us
  • Category J - As long as the user has an account with us
  • Category L - As long as the user has an account with us
Category L information may be used, or disclosed to a service provider or contractor, for additional, specified purposes. You have the right to limit the use or disclosure of your sensitive personal information.

We may also collect other personal information outside of these categories through instances where you interact with us in person, online, or by phone or mail in the context of:
  • Receiving help through our customer support channels;
  • Participation in customer surveys or contests; and
  • Facilitation in the delivery of our Services and to respond to your inquiries.
How do we use and share your personal information?

Learn about how we use your personal information in the section, "HOW DO WE PROCESS YOUR INFORMATION?"

Will your information be shared with anyone else?

We may disclose your personal information with our service providers pursuant to a written contract between us and each service provider. Learn more about how we disclose personal information to in the section, "WHEN AND WITH WHOM DO WE SHARE YOUR PERSONAL INFORMATION?"

We may use your personal information for our own business purposes, such as for undertaking internal research for technological development and demonstration. This is not considered to be "selling" of your personal information.

We have not disclosed, sold, or shared any personal information to third parties for a business or commercial purpose in the preceding twelve (12) months. We will not sell or share personal information in the future belonging to website visitors, users, and other consumers.

California Residents

California Civil Code Section 1798.83, also known as the "Shine The Light" law permits our users who are California residents to request and obtain from us, once a year and free of charge, information about categories of personal information (if any) we disclosed to third parties for direct marketing purposes and the names and addresses of all third parties with which we shared personal information in the immediately preceding calendar year. If you are a California resident and would like to make such a request, please submit your request in writing to us using the contact information provided below.

If you are under 18 years of age, reside in California, and have a registered account with the Services, you have the right to request removal of unwanted data that you publicly post on the Services. To request removal of such data, please contact us using the contact information provided below and include the email address associated with your account and a statement that you reside in California. We will make sure the data is not publicly displayed on the Services, but please be aware that the data may not be completely or comprehensively removed from all our systems (e.g., backups, etc.).

CCPA Privacy Notice

This section applies only to California residents. Under the California Consumer Privacy Act (CCPA), you have the rights listed below.

The California Code of Regulations defines a "residents" as:

(1) every individual who is in the State of California for other than a temporary or transitory purpose and
(2) every individual who is domiciled in the State of California who is outside the State of California for a temporary or transitory purpose

All other individuals are defined as "non-residents."

If this definition of "resident" applies to you, we must adhere to certain rights and obligations regarding your personal information.

Your rights with respect to your personal data

Right to request deletion of the data — Request to delete

You can ask for the deletion of your personal information. If you ask us to delete your personal information, we will respect your request and delete your personal information, subject to certain exceptions provided by law, such as (but not limited to) the exercise by another consumer of his or her right to free speech, our compliance requirements resulting from a legal obligation, or any processing that may be required to protect against illegal activities.

Right to be informed — Request to know

Depending on the circumstances, you have a right to know:
  • whether we collect and use your personal information;
  • the categories of personal information that we collect;
  • the purposes for which the collected personal information is used;
  • whether we sell or share personal information to third parties;
  • the categories of personal information that we sold, shared, or disclosed for a business purpose;
  • the categories of third parties to whom the personal information was sold, shared, or disclosed for a business purpose;
  • the business or commercial purpose for collecting, selling, or sharing personal information; and
  • the specific pieces of personal information we collected about you.
In accordance with applicable law, we are not obligated to provide or delete consumer information that is de-identified in response to a consumer request or to re-identify individual data to verify a consumer request.

Right to Non-Discrimination for the Exercise of a Consumer’s Privacy Rights

We will not discriminate against you if you exercise your privacy rights.

Right to Limit Use and Disclosure of Sensitive Personal Information

If the business collects any of the following:
  • social security information, drivers' licenses, state ID cards, passport numbers
  • account login information
  • credit card numbers, financial account information, or credentials allowing access to such accounts
  • precise geolocation
  • racial or ethnic origin, religious or philosophical beliefs, union membership
  • the contents of email and text, unless the business is the intended recipient of the communication
  • genetic data, biometric data, and health data
  • data concerning sexual orientation and sex life
you have the right to direct that business to limit its use of your sensitive personal information to that use which is necessary to perform the Services.

Once a business receives your request, they are no longer allowed to use or disclose your sensitive personal information for any other purpose unless you provide consent for the use or disclosure of sensitive personal information for additional purposes.

Please note that sensitive personal information that is collected or processed without the purpose of inferring characteristics about a consumer is not covered by this right, as well as the publicly available information.

To exercise your right to limit use and disclosure of sensitive personal information, please email hamzaayed@mobile-app.store or visit: __________.

Verification process

Upon receiving your request, we will need to verify your identity to determine you are the same person about whom we have the information in our system. These verification efforts require us to ask you to provide information so that we can match it with information you have previously provided us. For instance, depending on the type of request you submit, we may ask you to provide certain information so that we can match the information you provide with the information we already have on file, or we may contact you through a communication method (e.g., phone or email) that you have previously provided to us. We may also use other verification methods as the circumstances dictate.

We will only use personal information provided in your request to verify your identity or authority to make the request. To the extent possible, we will avoid requesting additional information from you for the purposes of verification. However, if we cannot verify your identity from the information already maintained by us, we may request that you provide additional information for the purposes of verifying your identity and for security or fraud-prevention purposes. We will delete such additionally provided information as soon as we finish verifying you.

Other privacy rights
  • You may object to the processing of your personal information.
  • You may request correction of your personal data if it is incorrect or no longer relevant, or ask to restrict the processing of the information.
  • You can designate an authorized agent to make a request under the CCPA on your behalf. We may deny a request from an authorized agent that does not submit proof that they have been validly authorized to act on your behalf in accordance with the CCPA.
  • You may request to opt out from future selling or sharing of your personal information to third parties. Upon receiving an opt-out request, we will act upon the request as soon as feasibly possible, but no later than fifteen (15) days from the date of the request submission.
To exercise these rights, you can contact us by visiting __________, by email at support@mobile-app.store, or by referring to the contact details at the bottom of this document. If you have a complaint about how we handle your data, we would like to hear from you.

Colorado Residents

This section applies only to Colorado residents. Under the Colorado Privacy Act (CPA), you have the rights listed below. However, these rights are not absolute, and in certain cases, we may decline your request as permitted by law.
  • Right to be informed whether or not we are processing your personal data
  • Right to access your personal data
  • Right to correct inaccuracies in your personal data
  • Right to request deletion of your personal data
  • Right to obtain a copy of the personal data you previously shared with us
  • Right to opt out of the processing of your personal data if it is used for targeted advertising, the sale of personal data, or profiling in furtherance of decisions that produce legal or similarly significant effects ("profiling")
To submit a request to exercise these rights described above, please email hamzaayed@mobile-app.store or visit __________.

If we decline to take action regarding your request and you wish to appeal our decision, please email us at support@mobile-app.store. Within forty-five (45) days of receipt of an appeal, we will inform you in writing of any action taken or not taken in response to the appeal, including a written explanation of the reasons for the decisions.

Connecticut Residents

This section applies only to Connecticut residents. Under the Connecticut Data Privacy Act (CTDPA), you have the rights listed below. However, these rights are not absolute, and in certain cases, we may decline your request as permitted by law.
  • Right to be informed whether or not we are processing your personal data
  • Right to access your personal data
  • Right to correct inaccuracies in your personal data
  • Right to request deletion of your personal data
  • Right to obtain a copy of the personal data you previously shared with us
  • Right to opt out of the processing of your personal data if it is used for targeted advertising, the sale of personal data, or profiling in furtherance of decisions that produce legal or similarly significant effects ("profiling")
To submit a request to exercise these rights described above, please email hamzaayed@mobile-app.store or visit __________.

If we decline to take action regarding your request and you wish to appeal our decision, please email us at support@mobile-app.store. Within sixty (60) days of receipt of an appeal, we will inform you in writing of any action taken or not taken in response to the appeal, including a written explanation of the reasons for the decisions.

Utah Residents

This section applies only to Utah residents. Under the Utah Consumer Privacy Act (UCPA), you have the rights listed below. However, these rights are not absolute, and in certain cases, we may decline your request as permitted by law.
  • Right to be informed whether or not we are processing your personal data
  • Right to access your personal data
  • Right to request deletion of your personal data
  • Right to obtain a copy of the personal data you previously shared with us
  • Right to opt out of the processing of your personal data if it is used for targeted advertising or the sale of personal data
To submit a request to exercise these rights described above, please email hamzaayed@mobile-app.store or visit __________.

Virginia Residents

Under the Virginia Consumer Data Protection Act (VCDPA):

"Consumer" means a natural person who is a resident of the Commonwealth acting only in an individual or household context. It does not include a natural person acting in a commercial or employment context.

"Personal data" means any information that is linked or reasonably linkable to an identified or identifiable natural person. "Personal data" does not include de-identified data or publicly available information.

"Sale of personal data" means the exchange of personal data for monetary consideration.

If this definition of "consumer" applies to you, we must adhere to certain rights and obligations regarding your personal data.

Your rights with respect to your personal data
  • Right to be informed whether or not we are processing your personal data
  • Right to access your personal data
  • Right to correct inaccuracies in your personal data
  • Right to request deletion of your personal data
  • Right to obtain a copy of the personal data you previously shared with us
  • Right to opt out of the processing of your personal data if it is used for targeted advertising, the sale of personal data, or profiling in furtherance of decisions that produce legal or similarly significant effects ("profiling")
Exercise your rights provided under the Virginia VCDPA

You may contact us by email at hamzaayed@mobile-app.store or visit __________.

If you are using an authorized agent to exercise your rights, we may deny a request if the authorized agent does not submit proof that they have been validly authorized to act on your behalf.

Verification process

We may request that you provide additional information reasonably necessary to verify you and your consumer's request. If you submit the request through an authorized agent, we may need to collect additional information to verify your identity before processing your request.

Upon receiving your request, we will respond without undue delay, but in all cases, within forty-five (45) days of receipt. The response period may be extended once by forty-five (45) additional days when reasonably necessary. We will inform you of any such extension within the initial 45-day response period, together with the reason for the extension.

Right to appeal

If we decline to take action regarding your request, we will inform you of our decision and reasoning behind it. If you wish to appeal our decision, please email us at support@mobile-app.store. Within sixty (60) days of receipt of an appeal, we will inform you in writing of any action taken or not taken in response to the appeal, including a written explanation of the reasons for the decisions. If your appeal is denied, you may contact the Attorney General to submit a complaint.

11. DO WE MAKE UPDATES TO THIS NOTICE?

In Short: Yes, we will update this notice as necessary to stay compliant with relevant laws.

We may update this privacy notice from time to time. The updated version will be indicated by an updated "Revised" date and the updated version will be effective as soon as it is accessible. If we make material changes to this privacy notice, we may notify you either by prominently posting a notice of such changes or by directly sending you a notification. We encourage you to review this privacy notice frequently to be informed of how we are protecting your information.

12. HOW CAN YOU CONTACT US ABOUT THIS NOTICE?

If you have questions or comments about this notice, you may email us at support@mobile-app.store or contact us by post at:

Mobile-App
__________
__________, MA
United States

13. HOW CAN YOU REVIEW, UPDATE, OR DELETE THE DATA WE COLLECT FROM YOU?

Based on the applicable laws of your country, you may have the right to request access to the personal information we collect from you, change that information, or delete it. To request to review, update, or delete your personal information, please visit: __________.
+
+ + + \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/.DS_Store b/walletintaleq.intaleq.xyz/v2/main/ride/.DS_Store new file mode 100644 index 0000000..d6c510d Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/ride/.DS_Store differ diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/GeminiAi.php b/walletintaleq.intaleq.xyz/v2/main/ride/GeminiAi.php new file mode 100644 index 0000000..16fb776 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/GeminiAi.php @@ -0,0 +1,72 @@ +apiKey = $apiKey; + } + + public function verifyPayment($invoiceNumber, $amount, $paymentMethod, $proofText, $proofImageBase64 = '') { + $prompt = "You are a financial verifier. The user claims they transferred $amount via $paymentMethod for invoice $invoiceNumber. "; + if (!empty($proofText)) { + $prompt .= "Here is their proof text: '$proofText'. "; + } + $prompt .= "Does the provided proof clearly indicate a successful transfer of $amount? Respond ONLY with a valid JSON object: {\"verified\": true/false, \"reason\": \"your reasoning\"}."; + + $parts = [["text" => $prompt]]; + + if (!empty($proofImageBase64)) { + $parts[] = [ + "inline_data" => [ + "mime_type" => "image/jpeg", + "data" => $proofImageBase64 + ] + ]; + } + + $reqData = [ + "contents" => [ + [ + "parts" => $parts + ] + ] + ]; + + $url = $this->baseUrl . $this->model . ":generateContent?key=" . $this->apiKey; + + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']); + curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($reqData)); + + $response = curl_exec($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + + if ($httpCode !== 200) { + error_log("Gemini API Error: " . $response); + throw new Exception("AI Verification service unavailable. Details: " . $response); + } + + $resData = json_decode($response, true); + $aiText = $resData['candidates'][0]['content']['parts'][0]['text'] ?? ''; + + // Clean AI Text (remove markdown json block if exists) + $aiText = preg_replace('/```json|```/', '', $aiText); + $aiResult = json_decode(trim($aiText), true); + + if ($aiResult && isset($aiResult['verified'])) { + return $aiResult; + } + + throw new Exception("Invalid response format from Gemini: " . $aiText); + } +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/apiKey/add.php b/walletintaleq.intaleq.xyz/v2/main/ride/apiKey/add.php new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/apiKey/delete.php b/walletintaleq.intaleq.xyz/v2/main/ride/apiKey/delete.php new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/apiKey/error_log b/walletintaleq.intaleq.xyz/v2/main/ride/apiKey/error_log new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/apiKey/get.php b/walletintaleq.intaleq.xyz/v2/main/ride/apiKey/get.php new file mode 100644 index 0000000..0485bf5 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/apiKey/get.php @@ -0,0 +1,48 @@ +prepare($sql); + $stmt->execute(); + $result = $stmt->fetchAll(PDO::FETCH_ASSOC); + + return $result; +} + + +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/apiKey/update.php b/walletintaleq.intaleq.xyz/v2/main/ride/apiKey/update.php new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/cliq/check_status.php b/walletintaleq.intaleq.xyz/v2/main/ride/cliq/check_status.php new file mode 100644 index 0000000..17dd1b1 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/cliq/check_status.php @@ -0,0 +1,32 @@ + "failure", "message" => "Invoice number is required."]); + exit; + } + + $stmt = $con->prepare("SELECT status FROM click_invoices WHERE invoice_number = :invoice_number LIMIT 1"); + $stmt->execute([':invoice_number' => $invoiceNumber]); + $invoice = $stmt->fetch(PDO::FETCH_ASSOC); + + if ($invoice) { + echo json_encode([ + "status" => "success", + "invoice_status" => $invoice['status'] + ]); + } else { + echo json_encode(["status" => "failure", "message" => "Invoice not found."]); + } + +} catch (Exception $e) { + error_log("Error in check_status.php: " . $e->getMessage()); + echo json_encode(["status" => "error", "message" => "Server error."]); +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/cliq/cliq_invoices.sql b/walletintaleq.intaleq.xyz/v2/main/ride/cliq/cliq_invoices.sql new file mode 100644 index 0000000..47e2f3e --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/cliq/cliq_invoices.sql @@ -0,0 +1,11 @@ +CREATE TABLE IF NOT EXISTS cliq_invoices ( + id INT AUTO_INCREMENT PRIMARY KEY, + invoice_number VARCHAR(50) NOT NULL UNIQUE, + user_id VARCHAR(50) NOT NULL, + user_type VARCHAR(20) NOT NULL, + amount DECIMAL(10, 2) NOT NULL, + cliq_phone VARCHAR(50) NOT NULL, + status VARCHAR(20) DEFAULT 'pending', + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP +); diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/cliq/cliq_webhook_handler.php b/walletintaleq.intaleq.xyz/v2/main/ride/cliq/cliq_webhook_handler.php new file mode 100755 index 0000000..4198855 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/cliq/cliq_webhook_handler.php @@ -0,0 +1,86 @@ + "error", "message" => "Authentication failed."]); + exit; +} + +// قراءة البيانات القادمة من Click (عادة تكون بصيغة JSON في الـ body) +$json_data = file_get_contents('php://input'); +$data = json_decode($json_data, true); + +$invoiceNumber = $data['invoice_number'] ?? null; +$transactionId = $data['transaction_id'] ?? null; +$paymentStatus = $data['status'] ?? null; + +if (empty($invoiceNumber) || empty($transactionId) || $paymentStatus !== 'success') { + http_response_code(400); // Bad Request + echo json_encode(["status" => "error", "message" => "Missing or invalid payment data."]); + exit; +} + +try { + $con->beginTransaction(); + + // 1. البحث عن الفاتورة وتحديث حالتها + $stmt = $con->prepare( + "UPDATE `click_invoices` + SET `status` = 'completed', `click_transaction_id` = :transaction_id + WHERE `invoice_number` = :invoice_number AND `status` = 'pending'" + ); + $stmt->execute([ + ':transaction_id' => $transactionId, + ':invoice_number' => $invoiceNumber + ]); + + if ($stmt->rowCount() > 0) { + // تم تحديث الفاتورة بنجاح، الآن نقوم بإتمام العملية + $invoiceId = $con->lastInsertId(); // ملاحظة: هذا قد لا يعمل دائماً مع UPDATE، الأفضل جلب الـ ID + + // جلب ID الفاتورة بعد التأكد من وجودها + $idStmt = $con->prepare("SELECT id FROM `click_invoices` WHERE `invoice_number` = :invoice_number"); + $idStmt->execute([':invoice_number' => $invoiceNumber]); + $invoiceRecord = $idStmt->fetch(); + $invoiceId = $invoiceRecord['id']; + + $finalizationResult = finalizeClickPayment($con, $invoiceId); + + if ($finalizationResult['success']) { + $con->commit(); + echo json_encode(["status" => "success", "message" => "Transaction finalized."]); + } else { + $con->rollBack(); + // يجب هنا التعامل مع الحالة التي فشل فيها الإيداع رغم نجاح الدفع + error_log("CRITICAL: Payment received for invoice {$invoiceNumber} but finalization failed."); + http_response_code(500); + echo json_encode(["status" => "error", "message" => "Finalization failed."]); + } + } else { + // لم يتم العثور على فاتورة معلقة بهذا الرقم (ربما تمت معالجتها سابقاً) + $con->rollBack(); + http_response_code(404); + echo json_encode(["status" => "error", "message" => "Invoice not found or already processed."]); + } + +} catch (Exception $e) { + $con->rollBack(); + error_log("Error in click_webhook_handler.php: " . $e->getMessage()); + http_response_code(500); + echo json_encode(["status" => "error", "message" => "An internal server error occurred."]); +} + +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/cliq/create_cliq_invoice.php b/walletintaleq.intaleq.xyz/v2/main/ride/cliq/create_cliq_invoice.php new file mode 100755 index 0000000..90abc18 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/cliq/create_cliq_invoice.php @@ -0,0 +1,92 @@ + "failure", "message" => "Invalid input provided."]); + exit; + } + + $con->beginTransaction(); + + $sel = $con->prepare(" + SELECT id, invoice_number + FROM cliq_invoices + WHERE user_id = :uid + AND user_type = :utype + AND status = 'pending' + AND DATE(created_at) = CURRENT_DATE + ORDER BY id DESC + LIMIT 1 + "); + $sel->execute([ + ':uid' => $userId, + ':utype' => $userType, + ]); + $existing = $sel->fetch(PDO::FETCH_ASSOC); + + if ($existing) { + $upd = $con->prepare(" + UPDATE cliq_invoices + SET amount = :amount, + cliq_phone = :cliq_phone, + updated_at = NOW() + WHERE id = :id + "); + $upd->execute([ + ':amount' => $amount, + ':cliq_phone' => $cliqPhone, + ':id' => $existing['id'], + ]); + + $con->commit(); + + echo json_encode([ + "status" => "success", + "message" => "Invoice updated.", + "invoice_number" => $existing['invoice_number'], + "mode" => "updated" + ]); + } else { + $invoiceNumber = "CLIQ-" . time() . mt_rand(100, 999); + + $ins = $con->prepare(" + INSERT INTO cliq_invoices + (invoice_number, user_id, user_type, amount, cliq_phone, status, created_at, updated_at) + VALUES + (:invoice_number, :user_id, :user_type, :amount, :cliq_phone, 'pending', NOW(), NOW()) + "); + $ins->execute([ + ':invoice_number' => $invoiceNumber, + ':user_id' => $userId, + ':user_type' => $userType, + ':amount' => $amount, + ':cliq_phone' => $cliqPhone + ]); + + $con->commit(); + + $cliqAlias = $_ENV['CLIQ_ALIAS'] ?? getenv('CLIQ_ALIAS') ?: 'siro_cliq'; + + echo json_encode([ + "status" => "success", + "message" => "Invoice created successfully.", + "invoice_number" => $invoiceNumber, + "cliq_alias" => $cliqAlias, + "mode" => "inserted" + ]); + } + +} catch (Throwable $e) { + if ($con && $con->inTransaction()) { $con->rollBack(); } + error_log("Error in create_cliq_invoice.php: " . $e->getMessage()); + echo json_encode(["status" => "failure", "message" => "An internal server error occurred."]); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/cliq/finalize_payment.php b/walletintaleq.intaleq.xyz/v2/main/ride/cliq/finalize_payment.php new file mode 100755 index 0000000..b1a7f5c --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/cliq/finalize_payment.php @@ -0,0 +1,106 @@ +prepare("SELECT * FROM `click_invoices` WHERE id = :id AND status = 'completed' LIMIT 1"); + $stmt->execute([':id' => $invoiceId]); + $invoice = $stmt->fetch(PDO::FETCH_ASSOC); + + if (!$invoice) { + return ['success' => false, 'message' => 'Invoice not found or not completed.']; + } + + $userType = $invoice['user_type']; + $userId = $invoice['user_id']; + $amount = (float) $invoice['amount']; + $paymentMethod = 'click_cash'; // تحديد طريقة الدفع + + // تحديد ما إذا كان المستخدم سائقاً أم راكباً + if ($userType === 'driver') { + return finalizeForDriver($con, $userId, $amount, $paymentMethod); + } elseif ($userType === 'passenger') { + return finalizeForPassenger($con, $userId, $amount, $paymentMethod); + } else { + return ['success' => false, 'message' => 'Unknown user type.']; + } + + } catch (Exception $e) { + error_log("Finalization Exception: " . $e->getMessage()); + return ['success' => false, 'message' => $e->getMessage()]; + } +} + +// --- دوال مساعدة خاصة بالسائق --- +function finalizeForDriver(PDO $con, int $driverId, float $amount, string $paymentMethod): array +{ + // حساب قيمة البونص كما في الكود الأصلي + $bonusAmount = match ((int)$amount) { + 10000 => 10000.0, + 20000 => 21000.0, + 40000 => 45000.0, + 100000 => 110000.0, + default => $amount, + }; + + // إنشاء سجل دفع جديد والحصول على ID + $paymentID = generatePaymentID($con, $driverId, $bonusAmount, $paymentMethod); + if (!$paymentID) throw new Exception('Failed to generate payment ID for driver.'); + + // إضافة الرصيد لمحفظة السائق + $stmtDriver = $con->prepare("INSERT INTO driverWallet (driverID, paymentID, amount, paymentMethod) VALUES (:driverID, :paymentID, :amount, :paymentMethod)"); + $stmtDriver->execute([':driverID' => $driverId, ':paymentID' => $paymentID, ':amount' => $bonusAmount, ':paymentMethod' => $paymentMethod]); + if ($stmtDriver->rowCount() === 0) throw new Exception('Insert to driverWallet failed.'); + + // إضافة سجل محاسبي لمحفظة سفر + $stmtSefer = $con->prepare("INSERT INTO seferWallet (driverId, passengerId, amount, paymentMethod) VALUES (:driverId, 'driver', :amount, :paymentMethod)"); + $stmtSefer->execute([':driverId' => $driverId, ':amount' => $amount, ':paymentMethod' => $paymentMethod]); + if ($stmtSefer->rowCount() === 0) throw new Exception('Insert to seferWallet failed.'); + + return ['success' => true, 'message' => 'Driver wallets updated.']; +} + +function generatePaymentID(PDO $con, string $driverId, float $amount, string $method): ?string { + $stmt = $con->prepare("INSERT INTO paymentsDriverPoints (`amount`, `payment_method`, `driverID`) VALUES (:amount, :method, :driverID)"); + $stmt->execute([':driverID' => $driverId, ':amount' => $amount, ':method' => $method]); + return $stmt->rowCount() > 0 ? $con->lastInsertId() : null; +} + + +// --- دوال مساعدة خاصة بالراكب --- +function finalizeForPassenger(PDO $con, string $passengerId, float $amount, string $paymentMethod): array +{ + // حساب البونص للراكب + $finalAmount = calculatePassengerBonus($amount); + + // إضافة الرصيد لمحفظة الراكب + $stmtPassenger = $con->prepare("INSERT INTO passengerWallet (passenger_id, balance) VALUES (:id, :amount) ON DUPLICATE KEY UPDATE balance = balance + :amount"); + $stmtPassenger->execute([':id' => $passengerId, ':amount' => $finalAmount]); + if ($stmtPassenger->rowCount() === 0) throw new Exception('Update passengerWallet failed.'); + + // إضافة سجل محاسبي لمحفظة سفر + $stmtSefer = $con->prepare("INSERT INTO seferWallet (passengerId, driverId, amount, paymentMethod) VALUES (:passengerId, 'passenger', :amount, :paymentMethod)"); + $stmtSefer->execute([':passengerId' => $passengerId, ':amount' => $amount, ':paymentMethod' => $paymentMethod]); + if ($stmtSefer->rowCount() === 0) throw new Exception('Insert to seferWallet for passenger failed.'); + + return ['success' => true, 'message' => 'Passenger wallets updated.']; +} + +function calculatePassengerBonus(float $amount): float { + if ($amount == 20000) return 20500; + if ($amount == 40000) return 42500; + if ($amount == 100000) return 104000; + return $amount; +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/cliq/query_click_invoice.php b/walletintaleq.intaleq.xyz/v2/main/ride/cliq/query_click_invoice.php new file mode 100755 index 0000000..aae75ba --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/cliq/query_click_invoice.php @@ -0,0 +1,64 @@ + 'error', 'message' => 'Authentication failed. Invalid or missing token.']); + exit; +} +try { + // يفترض أن Click سترسل رقم هاتف المستخدم للاستعلام عنه + //$clickPhone = filterRequest("click_phone"); + $clickPhone = $_GET['phone_number'] ?? null; + + if (empty($clickPhone)) { + echo json_encode(["status" => "error", "message" => "Phone number is required."]); + http_response_code(400); + exit; + } + + // البحث عن فاتورة معلقة لهذا الرقم + $stmt = $con->prepare( + "SELECT invoice_number, amount, user_id, user_type + FROM `click_invoices` + WHERE `click_phone` = :click_phone AND `status` = 'pending' + ORDER BY `created_at` DESC LIMIT 1" + ); + $stmt->execute([':click_phone' => $clickPhone]); + $invoice = $stmt->fetch(PDO::FETCH_ASSOC); + + if ($invoice) { + // تم العثور على فاتورة، يتم إرجاع تفاصيلها لنظام Click + echo json_encode([ + "status" => "success", + "statusInvoice" => "pending", + "invoice_number" => $invoice['invoice_number'], + "amount" => (float) $invoice['amount'], + "description" => "شحن نقاط في تطبيق انطلق", // وصف يظهر للمستخدم في تطبيق Click + "biller_name" => "Intaleq App" + + ]); + } else { + // لا توجد فاتورة معلقة + echo json_encode(["status" => "error", "message" => "No pending invoice found for this number."]); + http_response_code(404); + } + +} catch (Exception $e) { + error_log("Error in query_click_invoice.php: " . $e->getMessage()); + echo json_encode(["status" => "error", "message" => "Internal server error."]); + http_response_code(500); +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/cliq/verify_payment_ai.php b/walletintaleq.intaleq.xyz/v2/main/ride/cliq/verify_payment_ai.php new file mode 100644 index 0000000..6381727 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/cliq/verify_payment_ai.php @@ -0,0 +1,75 @@ + "failure", "message" => "Invoice number is required."]); + exit; + } + + if (empty($proofText) && empty($proofImageBase64)) { + echo json_encode(["status" => "failure", "message" => "Proof text or image is required."]); + exit; + } + + $stmt = $con->prepare("SELECT id, amount FROM cliq_invoices WHERE invoice_number = :inv AND status = 'pending'"); + $stmt->execute([':inv' => $invoiceNumber]); + $invoice = $stmt->fetch(PDO::FETCH_ASSOC); + + if (!$invoice) { + echo json_encode(["status" => "failure", "message" => "Invoice not found or already processed."]); + exit; + } + + $amount = $invoice['amount']; + + $geminiKey = $_ENV['GEMINI_API_KEY'] ?? getenv('GEMINI_API_KEY') ?: ''; + + if (empty($geminiKey)) { + echo json_encode(["status" => "error", "message" => "Gemini API key not configured."]); + exit; + } + + $gemini = new GeminiAi($geminiKey); + $aiResult = $gemini->verifyPayment($invoiceNumber, $amount, "Cliq", $proofText, $proofImageBase64); + + if (isset($aiResult['verified']) && $aiResult['verified'] === true) { + $con->beginTransaction(); + $upd = $con->prepare("UPDATE cliq_invoices SET status = 'completed', updated_at = NOW() WHERE id = :id AND status = 'pending'"); + $upd->execute([':id' => $invoice['id']]); + + if ($upd->rowCount() > 0) { + $finalizationResult = finalizeClickPayment($con, $invoice['id']); // assume finalizeClickPayment exists in finalize_payment.php or rename it + if ($finalizationResult['success']) { + $con->commit(); + echo json_encode(["status" => "success", "message" => "Payment verified and finalized."]); + } else { + $con->rollBack(); + echo json_encode(["status" => "error", "message" => "Verification succeeded but finalization failed."]); + } + } else { + $con->rollBack(); + echo json_encode(["status" => "error", "message" => "Invoice already processed."]); + } + } else { + $reason = $aiResult['reason'] ?? "AI rejected the proof."; + echo json_encode(["status" => "failure", "message" => "Verification failed: $reason"]); + } + +} catch (Exception $e) { + error_log("Error in cliq verify: " . $e->getMessage()); + echo json_encode(["status" => "error", "message" => "Server error: " . $e->getMessage()]); +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/driverPayment/add.php b/walletintaleq.intaleq.xyz/v2/main/ride/driverPayment/add.php new file mode 100644 index 0000000..484bcff --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/driverPayment/add.php @@ -0,0 +1,25 @@ +prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + + $insertedID = $con->lastInsertId(); // Get the last inserted ID + printSuccess($message = $insertedID); +} else { + $response = array( + "success" => false, + "message" => "Failed to save payment data" + ); + echo json_encode($response); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/driverPayment/delete.php b/walletintaleq.intaleq.xyz/v2/main/ride/driverPayment/delete.php new file mode 100644 index 0000000..121ff2a --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/driverPayment/delete.php @@ -0,0 +1,18 @@ +prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Print a success message + echo "Record deleted successfully"; +} else { + // Print a failure message + echo "Failed to delete the record"; +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/driverPayment/error_log b/walletintaleq.intaleq.xyz/v2/main/ride/driverPayment/error_log new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/driverPayment/get.php b/walletintaleq.intaleq.xyz/v2/main/ride/driverPayment/get.php new file mode 100644 index 0000000..45373ec --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/driverPayment/get.php @@ -0,0 +1,20 @@ +prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Fetch the record + $row = $stmt->fetchAll(PDO::FETCH_ASSOC); + + printSuccess( $row); + +} else { + // No records found + echo "No records found."; +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/driverPayment/update.php b/walletintaleq.intaleq.xyz/v2/main/ride/driverPayment/update.php new file mode 100644 index 0000000..01e4c45 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/driverPayment/update.php @@ -0,0 +1,22 @@ +prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Print a success message + echo "Record updated successfully"; +} else { + // Print a failure message + echo "Failed to update the record"; +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/add.php b/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/add.php new file mode 100644 index 0000000..90a31a3 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/add.php @@ -0,0 +1,58 @@ +prepare("SELECT * FROM payment_tokens WHERE token = :token AND isUsed = FALSE"); +$stmt->execute(array( + ':token' => $token +)); + +$tokenData = $stmt->fetch(); + +if ($tokenData) { + // Add payment to the driver's wallet table + $sql = "INSERT INTO `driverWallet` ( + `driverID`, + `paymentID`, + `amount`, + `paymentMethod` + ) VALUES ( + :driverID, + :paymentID, + :amount, + :paymentMethod + );"; + + $stmt = $con->prepare($sql); + $stmt->execute(array( + ':driverID' => $driverID, + ':paymentID' => $paymentID, + ':amount' => $amount, + ':paymentMethod' => $paymentMethod + )); + + if ($stmt->rowCount() > 0) { + // Print a success message + printSuccess("Record saved successfully"); + + // Mark the token as used in the database + $stmt = $con->prepare("UPDATE payment_tokens SET isUsed = TRUE WHERE id = :tokenID"); + $stmt->execute(array( + ':tokenID' => $tokenData['id'] + )); + } else { + // Print a failure message + printFailure("Failed to save record"); + } +} else { + printFailure("Invalid or already used token"); +} diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/add300ToDriver.php b/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/add300ToDriver.php new file mode 100755 index 0000000..38cb1d3 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/add300ToDriver.php @@ -0,0 +1,84 @@ +prepare(" + SELECT id + FROM driverWallet + WHERE driverID = :driverID AND paymentMethod = :paymentMethod + LIMIT 1 +"); + +$check->execute([ + ':driverID' => $driverID, + ':paymentMethod' => $paymentMethod +]); + +if ($check->rowCount() > 0) { + // Driver already received this "New Driver" payment + printFailure("لقد تم منح هذا الدفع للسائق مسبقاً — لا يمكن تكراره."); + exit; +} + + +// ------------------------------------------------------------- +// 2) INSERT INTO driverWallet +// ------------------------------------------------------------- +$sql = "INSERT INTO `driverWallet` ( + `driverID`, + `paymentID`, + `amount`, + `paymentMethod` + ) VALUES ( + :driverID, + :paymentID, + :amount, + :paymentMethod + );"; + +$stmt = $con->prepare($sql); +$stmt->execute(array( + ':driverID' => $driverID, + ':paymentID' => $paymentID, + ':amount' => $amount, + ':paymentMethod' => $paymentMethod +)); + +if ($stmt->rowCount() > 0) { + + printSuccess("Record saved successfully"); + + // Notify driver + $messageBody = "تم إضافة رصيد بقيمة $amount إلى محفظتك بنجاح."; + // sendWhatsAppFromServer($phone, $messageBody); + + // ------------------------------------------------------------- + // 3) INSERT 30,000 POINTS FOR NEW DRIVER + // ------------------------------------------------------------- + $sqlPoints = "INSERT INTO `paymentsDriverPoints` + (`amount`, `payment_method`, `driverID`, `created_at`, `updated_at`) + VALUES (:amount, :method, :driverID, NOW(), NOW())"; + + $stmtPoints = $con->prepare($sqlPoints); + $stmtPoints->execute(array( + ':amount' => 300, + ':method' => $paymentMethod, + ':driverID' => $driverID + )); + +} else { + printFailure("Failed to save record"); +} diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/addFromAdmin.php b/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/addFromAdmin.php new file mode 100755 index 0000000..94bf50b --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/addFromAdmin.php @@ -0,0 +1,51 @@ +prepare($sql); + $stmt->execute(array( + ':driverID' => $driverID, + ':paymentID' => $paymentID, + ':amount' => $amount, + ':paymentMethod' => $paymentMethod + )); + + if ($stmt->rowCount() > 0) { + // Print a success message + printSuccess("Record saved successfully"); + $messageBody = "تم إضافة رصيد بقيمة $amount إلى محفظتك بنجاح."; // "Balance of $amount added successfully." + + sendWhatsAppFromServer($phone, $messageBody); + + // Mark the token as used in the database + /* $stmt = $con->prepare("UPDATE payment_tokens SET isUsed = TRUE WHERE id = :tokenID"); + $stmt->execute(array( + ':tokenID' => $tokenData['id'] + ));*/ + } else { + // Print a failure message + printFailure("Failed to save record"); + } + diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/addPaymentToken.php b/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/addPaymentToken.php new file mode 100644 index 0000000..bc4b983 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/addPaymentToken.php @@ -0,0 +1,49 @@ +prepare("INSERT INTO payment_tokens (token, driverID, dateCreated, amount) VALUES (?, ?, NOW(), ?)"); + +try { + $stmt->execute([$token, $driverID, $amount]); + if ($stmt->rowCount() > 0) { + printSuccess($token); + } else { + printFailure("Failed to save record"); + } +} catch (PDOException $e) { + printFailure("Database error: " . $e->getMessage()); +} + +function generateSecureToken($driverID, $amount) { + global $secretKey; + // Concatenate the parameters + $data = $driverID . $amount . time(); + + // Add the secret key from the environment variable + $data .= $secretKey; + + // Generate a hash + $hash = hash('sha256', $data); + + // Add some randomness + $randomBytes = bin2hex(random_bytes(16)); + + // Combine hash and random bytes + $token = $hash . $randomBytes; + + // Truncate to a reasonable length (e.g., 64 characters) + return substr($token, 0, 64); +} \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/delete.php b/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/delete.php new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/deleteNewDriverGiftCronJob.php b/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/deleteNewDriverGiftCronJob.php new file mode 100755 index 0000000..8598ca7 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/deleteNewDriverGiftCronJob.php @@ -0,0 +1,62 @@ +prepare($deleteQuery); + $stmt->execute(); + + echo "Cleanup completed for table: $tableName\n"; + echo "Rows affected: " . $stmt->rowCount() . "\n\n"; + } catch (Exception $e) { + echo "Error cleaning $tableName: " . $e->getMessage() . "\n\n"; + } +} + +// ========================================== +// DELETE DUPLICATES FOR driverWallet +// ========================================== + +$deleteDriverWallet = " +DELETE FROM driverWallet +WHERE id NOT IN ( + SELECT id FROM ( + SELECT + id, + ROW_NUMBER() OVER(PARTITION BY driverID ORDER BY dateCreated DESC) AS rn + FROM driverWallet + ) AS subquery + WHERE rn = 1 +);"; + +runCleanup($con, $deleteDriverWallet, "driverWallet"); + + +// ========================================== +// DELETE DUPLICATES FOR paymentsDriverPoints +// ========================================== + +$deletePaymentsPoints = " +DELETE FROM paymentsDriverPoints +WHERE id NOT IN ( + SELECT id FROM ( + SELECT + id, + ROW_NUMBER() OVER(PARTITION BY driverID ORDER BY created_at DESC) AS rn + FROM paymentsDriverPoints + ) AS subquery + WHERE rn = 1 +);"; + +runCleanup($con, $deletePaymentsPoints, "paymentsDriverPoints"); + +echo "Cron job completed successfully.\n"; + +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/driverStatistic.php b/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/driverStatistic.php new file mode 100644 index 0000000..3ed653c --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/driverStatistic.php @@ -0,0 +1,46 @@ +prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Fetch the record + $row = $stmt->fetchAll(PDO::FETCH_ASSOC); + + printSuccess( $row); + +} + else{ + // Print a failure message + printFailure($message = "No wallet record found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/error_log b/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/error_log new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/get.php b/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/get.php new file mode 100644 index 0000000..7c8ce9b --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/get.php @@ -0,0 +1,42 @@ +prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Fetch the record + $row = $stmt->fetchAll(PDO::FETCH_ASSOC); + + printSuccess( $row); + +} + else{ + // Print a failure message + printFailure($message = "No wallet record found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/getDriverDetails.php b/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/getDriverDetails.php new file mode 100644 index 0000000..f5a6c72 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/getDriverDetails.php @@ -0,0 +1,34 @@ +prepare($sql); +$stmt->execute(); +$data = $stmt->fetchAll(PDO::FETCH_ASSOC); + +if ($data) { + // Print the car location data as JSON + echo json_encode([ + 'status' => 'success', + + 'data' => $data + ]); +} else { + // Print a failure message + printFailure($message = "No car locations found"); +} + +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/getDriverWeekPaymentMove.php b/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/getDriverWeekPaymentMove.php new file mode 100644 index 0000000..ffa2d53 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/getDriverWeekPaymentMove.php @@ -0,0 +1,37 @@ += DATE_SUB(NOW(), INTERVAL 1 WEEK) + ) AS totalAmount +FROM `driverWallet` +WHERE `driverID` = '$driverID' +AND `dateCreated` >= DATE_SUB(NOW(), INTERVAL 1 WEEK) +ORDER BY `dateCreated` DESC; +"; +$stmt = $con->prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Fetch the record + $row = $stmt->fetchAll(PDO::FETCH_ASSOC); + + printSuccess( $row); + +} + else{ + // Print a failure message + printFailure($message = "No wallet record found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/getWalletByDriver.php b/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/getWalletByDriver.php new file mode 100755 index 0000000..409aee1 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/getWalletByDriver.php @@ -0,0 +1,30 @@ += DATE_SUB(NOW(), INTERVAL 1 MONTH) +ORDER BY + `driverWallet`.`id` +DESC"; +$stmt = $con->prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Fetch the record + $row = $stmt->fetchAll(PDO::FETCH_ASSOC); + + printSuccess( $row); + +} + else{ + // Print a failure message + printFailure($message = "No wallet record found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/promotionDriver.php b/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/promotionDriver.php new file mode 100755 index 0000000..a6ad0c0 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/promotionDriver.php @@ -0,0 +1,60 @@ +prepare($sqlCheck); +$stmtCheck->execute(array( + ':driver_id' => $driver_id, + ':current_date' => $currentDate + ':timePromo' =>$timePromo +)); + +$count = $stmtCheck->fetchColumn(); + +if ($count > 0) { + // A record exists for today, so prevent the insertion + printFailure("A promotion record for this driver already exists for today."); +} else { + // No record exists for today, so insert the new promotion + $sqlInsert = "INSERT INTO `driver_promotions` ( + `driver_id`, + `payment_amount`, + `timePromo` + ) VALUES ( + :driver_id, + :payment_amount, + :timePromo + );"; + + // Prepare the insert statement + $stmtInsert = $con->prepare($sqlInsert); + $stmtInsert->execute(array( + ':driver_id' => $driver_id, + ':payment_amount' => $payment_amount, + ':timePromo' => $timePromo, + ':createdAt' => $createdAt + )); + + // Check if the query was successful + if ($stmtInsert->rowCount() > 0) { + // Print a success message + printSuccess("Promotion record saved successfully"); + } else { + // Print a failure message + printFailure("Failed to save promotion record"); + } +} + +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/sendEmailTransfer.php b/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/sendEmailTransfer.php new file mode 100644 index 0000000..acbe062 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/sendEmailTransfer.php @@ -0,0 +1,122 @@ + + + + + +
+

تفاصيل نقلك على سفر

+

شكراً لاستخدام خدمتنا. نتمنى لك يوماً رائعاً!

+

نريد إعلامك أن مبلغ $amount تم نقله من حسابك إلى السائق الجديد، $newDriverName (هاتف: $driverPhone).

+

مع خالص التحية،
فريق سفر

+
+ + "; +} else { + $bodyEmail = " + + + + +
+ SEFER App Logo + +

Your SEFER Transfer Details

+

Thank you for using our service. We hope you have a great day!

+

We want to inform you that an amount of $amount has been transferred from your account to the new driver: $newDriverName (Phone: $driverPhone).

+

Regards,
SEFER Team

+
+ + "; +} + +// Email headers +$supportEmail = 'seferteam@sefer.live'; +$headers = "MIME-Version: 1.0\r\n"; +$headers .= "Content-Type: text/html; charset=UTF-8\r\n"; +$headers .= "From: $supportEmail\r\n"; + +// Send email +if (!empty($driverEmail)) { + if (mail($driverEmail, "Your SEFER Transfer Details", $bodyEmail, $headers)) { + + mail($newEmail, "Your SEFER Transfer Details", $bodyEmail, $headers); + echo "Email sent successfully."; + } else { + echo "Email sending failed."; + } +} else { + echo "Invalid email address: $driverEmail"; +} diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/update.php b/walletintaleq.intaleq.xyz/v2/main/ride/driverWallet/update.php new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/ecash/driver/ecash_verify.php b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/driver/ecash_verify.php new file mode 100755 index 0000000..ffd76b2 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/driver/ecash_verify.php @@ -0,0 +1,148 @@ +prepare("INSERT INTO payment_tokens (token, driverID, dateCreated, amount) VALUES (:token, :driverID, NOW(), :amount)"); + $stmt->execute([':token' => $token, ':driverID' => $driverId, ':amount' => $amount]); + return $stmt->rowCount() > 0 ? $token : null; +} + +/** + * تسجيل دفعة في جدول النقاط وإعادة المعرف الخاص بها + * Logs a payment in the points table and returns its ID. + */ +function generatePaymentID($con, $driverId, $amount, $method): ?string +{ + $stmt = $con->prepare("INSERT INTO paymentsDriverPoints (`amount`, `payment_method`, `driverID`) VALUES (:amount, :method, :driverID)"); + $stmt->execute([':driverID' => $driverId, ':amount' => $amount, ':method' => $method]); + return $stmt->rowCount() > 0 ? $con->lastInsertId() : null; +} + + +// ------------------------------------------------- +// المنطق الرئيسي للمعالجة +// Main processing logic +// ------------------------------------------------- + +// 1. استقبال الرقم المرجعي من الرابط +// 1. Receive the order reference from the URL. +$orderRef = $_GET['orderRef'] ?? null; +if (empty($orderRef)) { + echo "

خطأ: الرقم المرجعي للطلب مفقود.

"; + exit; +} + +// 2. الانتظار والتأكد من وصول الـ Webhook +// 2. Wait and verify that the webhook has updated the status. +$payment = null; +$max_attempts = 5; // محاولة لمدة 10 ثوانٍ - Poll for 10 seconds +for ($attempts = 0; $attempts < $max_attempts; $attempts++) { + // تأكد من أن اسم الجدول صحيح + // Make sure the table name is correct. + $stmt = $con->prepare("SELECT * FROM `paymentsLogSyriaDriver` WHERE order_ref = :order_ref AND status = 1 LIMIT 1"); + $stmt->execute([':order_ref' => $orderRef]); + $payment = $stmt->fetch(PDO::FETCH_ASSOC); + + if ($payment) { + break; // تم العثور على الدفعة الناجحة - Successful payment found + } + sleep(2); // الانتظار لمدة ثانيتين قبل المحاولة التالية - Wait 2 seconds before retrying +} + +// 3. التحقق من نتيجة البحث +// 3. Check the polling result. +if (!$payment) { + echo "

خطأ في تأكيد الدفع

لم نتمكن من تأكيد دفعتك. قد تستغرق العملية بضع لحظات. يرجى التحقق من رصيدك في التطبيق لاحقاً أو التواصل مع الدعم الفني.

"; + exit; +} + +// 4. تمت عملية الدفع بنجاح، لنقم بإضافة الرصيد +// 4. Payment successful, proceed to add balance. +try { + $driverId = $payment['user_id']; + // eCash لا تحتاج للقسمة على 100 + // eCash amount does not need division by 100. + $originalAmount = floatval($payment['amount']); + $paymentMethod = $payment['payment_method'] ?? 'ecash'; + + // حساب المكافأة + // Calculate the bonus. + $bonusAmount = match ((int)$originalAmount) { + 80 => 80.0, + 200 => 215.0, + 400 => 450.0, + 1000 => 1140.0, + default => $originalAmount, + }; + + // --- تنفيذ منطق تحديث المحافظ --- + // --- Execute wallet update logic --- + + $tokenDriver = generateToken($con, $driverId, $bonusAmount); + if (!$tokenDriver) throw new Exception('Failed to generate token for driver wallet.'); + + $tokenSefer = generateToken($con, $driverId, $originalAmount); + if (!$tokenSefer) throw new Exception('Failed to generate token for sefer wallet.'); + + $paymentID = generatePaymentID($con, $driverId, $bonusAmount, $paymentMethod); + if (!$paymentID) throw new Exception('Failed to generate payment ID.'); + + // إضافة الرصيد إلى driverWallet + // Add balance to driverWallet + $insertDriver = $con->prepare("INSERT INTO driverWallet (driverID, paymentID, amount, paymentMethod) VALUES (:driverID, :paymentID, :amount, :paymentMethod)"); + $insertDriver->execute([':driverID' => $driverId, ':paymentID' => $paymentID, ':amount' => $bonusAmount, ':paymentMethod' => $paymentMethod]); + if ($insertDriver->rowCount() === 0) throw new Exception('Failed to insert into driverWallet.'); + + $markTokenDriver = $con->prepare("UPDATE payment_tokens SET isUsed = TRUE WHERE token = :token"); + $markTokenDriver->execute([':token' => $tokenDriver]); + + // إضافة الرصيد إلى seferWallet + // Add balance to seferWallet + $insertSefer = $con->prepare("INSERT INTO seferWallet (driverId, passengerId, amount, paymentMethod, token, createdAt) VALUES (:driverId, :passengerId, :amount, :paymentMethod, :token, CURRENT_TIMESTAMP)"); + $insertSefer->execute([':driverId' => $driverId, ':passengerId' => 'driver', ':amount' => $originalAmount, ':paymentMethod' => $paymentMethod, ':token' => $tokenSefer]); + + $markTokenSefer = $con->prepare("UPDATE payment_tokens SET isUsed = TRUE WHERE token = :token"); + $markTokenSefer->execute([':token' => $tokenSefer]); + + // 5. عرض صفحة النجاح النهائية + // 5. Display final success page. + echo "

تمت العملية بنجاح

تمت إضافة الرصيد إلى محفظتك. يمكنك الآن العودة إلى التطبيق.

"; + +} catch (Throwable $e) { + // في حال حدوث خطأ، يتم تسجيله وعرض رسالة للمستخدم + // In case of an error, log it and display a message to the user. + error_log("VERIFY_ERROR: " . $e->getMessage() . " | OrderRef: " . $orderRef); + echo "

حدث خطأ

لقد تم استلام دفعتك بنجاح، ولكن حدث خطأ أثناء تحديث رصيدك. يرجى التواصل مع الدعم الفني وتزويدهم بالرقم المرجعي: " . htmlspecialchars($orderRef) . "

"; +} + +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/ecash/driver/ecash_webhook.php b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/driver/ecash_webhook.php new file mode 100755 index 0000000..72e30de --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/driver/ecash_webhook.php @@ -0,0 +1,91 @@ +prepare( + "UPDATE `paymentsLogSyriaDriver` SET status = :status, updated_at = NOW() WHERE order_ref = :order_ref AND status = 2" + ); + $stmt->execute([ + ':status' => $payment_status, + + ':order_ref' => $orderRef + ]); + + if ($stmt->rowCount() > 0) { + http_response_code(200); + file_put_contents($log_file, "SUCCESS: Database updated." . PHP_EOL, FILE_APPEND); + } else { + http_response_code(200); + file_put_contents($log_file, "INFO: Order not found or already processed." . PHP_EOL, FILE_APPEND); + } + +} catch (PDOException $e) { + http_response_code(500); + file_put_contents($log_file, "FATAL: Database update failed: " . $e->getMessage() . PHP_EOL, FILE_APPEND); +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/ecash/driver/finalize_payment.php b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/driver/finalize_payment.php new file mode 100755 index 0000000..8507840 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/driver/finalize_payment.php @@ -0,0 +1,79 @@ +prepare( + "SELECT * FROM `paymentsLogSyria` + WHERE user_id = :user_id + AND status = 1 + AND updated_at >= DATE_SUB(NOW(), INTERVAL 5 MINUTE) + ORDER BY updated_at DESC + LIMIT 1" + ); + $stmt->bindParam(':user_id', $userId, PDO::PARAM_STR); + $stmt->execute(); + $payment = $stmt->fetch(PDO::FETCH_ASSOC); + + if (!$payment) { + printFailure("لم يتم العثور على دفعة ناجحة حديثة."); + exit; + } + + // خطوة 2: الحصول على المبلغ (لا يحتاج للقسمة على 100) + $amount = $payment['amount']; + + // خطوة 3: حساب المكافأة + $finalAmount = calculateBonus($amount); // استخدم دالة حساب المكافآت الخاصة بك + + $passengerId = $userId; // نفترض أن معرّف المستخدم هو نفسه معرّف الراكب + + // --- هنا تضع نفس منطق إضافة الرصيد الذي كان في ملف payment_verify.php القديم --- + // (مثال) + // $token = generatePaymentToken($passengerId, $finalAmount); + // addToPassengerWallet($passengerId, $finalAmount, $token); + // ... إلخ + + // --- النجاح النهائي --- + printSuccess("تمت معالجة الدفع وتحديث الرصيد بنجاح."); + +} catch (PDOException $e) { + error_log("Finalize Payment Error: " . $e->getMessage()); + printFailure("حدث خطأ في قاعدة البيانات أثناء إتمام العملية."); +} + +// --- يمكنك وضع دوال المساعدة هنا (calculateBonus, etc.) --- +function calculateBonus($amount) { + $result = $amount; + if ($amount == 200) $result = 215; + else if ($amount == 400) $result = 450; + else if ($amount == 100) $result = 100.0; + else if ($amount == 1000) $result = 1140; + return $result; +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/ecash/driver/payWithEcash.php b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/driver/payWithEcash.php new file mode 100755 index 0000000..c059bce --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/driver/payWithEcash.php @@ -0,0 +1,88 @@ +prepare( + "INSERT INTO `paymentsLogSyriaDriver`( `user_id`, `amount`, `status`, `order_ref`, `payment_method`, `created_at`) + VALUES (:user_id, :amount, 2, :order_ref,'ecash-driver', NOW())" + ); + $stmt->execute([ + ':user_id' => $driverId, + ':amount' => $amount, + ':order_ref' => $orderRef + ]); +} catch (PDOException $e) { + error_log("eCash - فشل تسجيل الدفعة المبدئية: " . $e->getMessage()); + printFailure("حدث خطأ أثناء بدء عملية الدفع. يرجى المحاولة مرة أخرى."); + exit; +} + +// --- إعادة رابط الدفع إلى تطبيق فلاتر --- +// التطبيق سيستقبل هذا الرابط ويفتحه في WebView +// نرسل الرابط داخل حقل 'message' كما يتوقع كود فلاتر +printSuccess($paymentUrl); + +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/ecash/driver/webhook_connect.php b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/driver/webhook_connect.php new file mode 100755 index 0000000..2615948 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/driver/webhook_connect.php @@ -0,0 +1,42 @@ + false, + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES UTF8" + ]; + $user = getenv('USER'); + $pass = getenv('PASS'); + $con = new PDO($dsn, $user, $pass, $options); + +} catch (PDOException $e) { + error_log("Webhook DB Connection Error: " . $e->getMessage()); + http_response_code(500); + echo json_encode(['error' => 'Internal Server Error']); + exit; +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/ecash/ecash_config.php b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/ecash_config.php new file mode 100755 index 0000000..f81532b --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/ecash_config.php @@ -0,0 +1,44 @@ + 'error', 'message' => 'Payment gateway not configured correctly.']); + exit; +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/ecash/logs/ecash_production.log b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/logs/ecash_production.log new file mode 100644 index 0000000..9ef6d7a --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/logs/ecash_production.log @@ -0,0 +1,264 @@ +--- NEW WEBHOOK --- +2025-07-21 17:33:55 - RAW BODY: {"IsSuccess":true,"Message":null,"OrderRef":"tripz_109270481246447459618_1753108408","TransactionNo":"2515118257","Amount":"10000.00","Token":"386BBEDFFA3FBCEFCCF7F546FB4BC622"} +VERIFICATION STRING: UOMACVPA8BQ8U99BRDDONSLAKW2IDSLBTCQFR776E8L55C0DLBYFB6NJJOWJ7FOLWEYQE2251511825710000.00tripz_109270481246447459618_1753108408 + - Merchant ID Used: UOMACV + - TransactionNo Used: 2515118257 + - Amount Used: 10000.00 + - OrderRef Used: tripz_109270481246447459618_1753108408 +CALCULATED TOKEN: 386BBEDFFA3FBCEFCCF7F546FB4BC622 +RECEIVED TOKEN: 386BBEDFFA3FBCEFCCF7F546FB4BC622 +TOKEN MATCH! Proceeding to update database. +FATAL: Database update failed: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'payment_id' in 'field list' +--- NEW WEBHOOK --- +2025-07-21 17:34:00 - RAW BODY: {"IsSuccess":true,"Message":null,"OrderRef":"tripz_109270481246447459618_1753108408","TransactionNo":"2515118257","Amount":"10000.00","Token":"386BBEDFFA3FBCEFCCF7F546FB4BC622"} +VERIFICATION STRING: UOMACVPA8BQ8U99BRDDONSLAKW2IDSLBTCQFR776E8L55C0DLBYFB6NJJOWJ7FOLWEYQE2251511825710000.00tripz_109270481246447459618_1753108408 + - Merchant ID Used: UOMACV + - TransactionNo Used: 2515118257 + - Amount Used: 10000.00 + - OrderRef Used: tripz_109270481246447459618_1753108408 +CALCULATED TOKEN: 386BBEDFFA3FBCEFCCF7F546FB4BC622 +RECEIVED TOKEN: 386BBEDFFA3FBCEFCCF7F546FB4BC622 +TOKEN MATCH! Proceeding to update database. +FATAL: Database update failed: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'payment_id' in 'field list' +--- NEW WEBHOOK --- +2025-07-21 17:34:05 - RAW BODY: {"IsSuccess":true,"Message":null,"OrderRef":"tripz_109270481246447459618_1753108408","TransactionNo":"2515118257","Amount":"10000.00","Token":"386BBEDFFA3FBCEFCCF7F546FB4BC622"} +VERIFICATION STRING: UOMACVPA8BQ8U99BRDDONSLAKW2IDSLBTCQFR776E8L55C0DLBYFB6NJJOWJ7FOLWEYQE2251511825710000.00tripz_109270481246447459618_1753108408 + - Merchant ID Used: UOMACV + - TransactionNo Used: 2515118257 + - Amount Used: 10000.00 + - OrderRef Used: tripz_109270481246447459618_1753108408 +CALCULATED TOKEN: 386BBEDFFA3FBCEFCCF7F546FB4BC622 +RECEIVED TOKEN: 386BBEDFFA3FBCEFCCF7F546FB4BC622 +TOKEN MATCH! Proceeding to update database. +FATAL: Database update failed: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'payment_id' in 'field list' +--- NEW WEBHOOK --- +2025-07-21 17:34:11 - RAW BODY: {"IsSuccess":true,"Message":null,"OrderRef":"tripz_109270481246447459618_1753108408","TransactionNo":"2515118257","Amount":"10000.00","Token":"386BBEDFFA3FBCEFCCF7F546FB4BC622"} +VERIFICATION STRING: UOMACVPA8BQ8U99BRDDONSLAKW2IDSLBTCQFR776E8L55C0DLBYFB6NJJOWJ7FOLWEYQE2251511825710000.00tripz_109270481246447459618_1753108408 + - Merchant ID Used: UOMACV + - TransactionNo Used: 2515118257 + - Amount Used: 10000.00 + - OrderRef Used: tripz_109270481246447459618_1753108408 +CALCULATED TOKEN: 386BBEDFFA3FBCEFCCF7F546FB4BC622 +RECEIVED TOKEN: 386BBEDFFA3FBCEFCCF7F546FB4BC622 +TOKEN MATCH! Proceeding to update database. +FATAL: Database update failed: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'payment_id' in 'field list' +--- NEW WEBHOOK --- +2025-07-21 17:34:16 - RAW BODY: {"IsSuccess":true,"Message":null,"OrderRef":"tripz_109270481246447459618_1753108408","TransactionNo":"2515118257","Amount":"10000.00","Token":"386BBEDFFA3FBCEFCCF7F546FB4BC622"} +VERIFICATION STRING: UOMACVPA8BQ8U99BRDDONSLAKW2IDSLBTCQFR776E8L55C0DLBYFB6NJJOWJ7FOLWEYQE2251511825710000.00tripz_109270481246447459618_1753108408 + - Merchant ID Used: UOMACV + - TransactionNo Used: 2515118257 + - Amount Used: 10000.00 + - OrderRef Used: tripz_109270481246447459618_1753108408 +CALCULATED TOKEN: 386BBEDFFA3FBCEFCCF7F546FB4BC622 +RECEIVED TOKEN: 386BBEDFFA3FBCEFCCF7F546FB4BC622 +TOKEN MATCH! Proceeding to update database. +FATAL: Database update failed: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'payment_id' in 'field list' +--- NEW WEBHOOK --- +2025-07-21 17:38:33 - RAW BODY: {"IsSuccess":true,"Message":null,"OrderRef":"tripz_109270481246447459618_1753108680","TransactionNo":"3434918048","Amount":"2000.00","Token":"5E397F3BCFC8DBC277E67BBE909A4C25"} +VERIFICATION STRING: UOMACVPA8BQ8U99BRDDONSLAKW2IDSLBTCQFR776E8L55C0DLBYFB6NJJOWJ7FOLWEYQE234349180482000.00tripz_109270481246447459618_1753108680 + - Merchant ID Used: UOMACV + - TransactionNo Used: 3434918048 + - Amount Used: 2000.00 + - OrderRef Used: tripz_109270481246447459618_1753108680 +CALCULATED TOKEN: 5E397F3BCFC8DBC277E67BBE909A4C25 +RECEIVED TOKEN: 5E397F3BCFC8DBC277E67BBE909A4C25 +TOKEN MATCH! Proceeding to update database. +FATAL: Database update failed: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'payment_id' in 'field list' +--- NEW WEBHOOK --- +2025-07-21 17:38:38 - RAW BODY: {"IsSuccess":true,"Message":null,"OrderRef":"tripz_109270481246447459618_1753108680","TransactionNo":"3434918048","Amount":"2000.00","Token":"5E397F3BCFC8DBC277E67BBE909A4C25"} +VERIFICATION STRING: UOMACVPA8BQ8U99BRDDONSLAKW2IDSLBTCQFR776E8L55C0DLBYFB6NJJOWJ7FOLWEYQE234349180482000.00tripz_109270481246447459618_1753108680 + - Merchant ID Used: UOMACV + - TransactionNo Used: 3434918048 + - Amount Used: 2000.00 + - OrderRef Used: tripz_109270481246447459618_1753108680 +CALCULATED TOKEN: 5E397F3BCFC8DBC277E67BBE909A4C25 +RECEIVED TOKEN: 5E397F3BCFC8DBC277E67BBE909A4C25 +TOKEN MATCH! Proceeding to update database. +FATAL: Database update failed: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'payment_id' in 'field list' +--- NEW WEBHOOK --- +2025-07-21 17:38:44 - RAW BODY: {"IsSuccess":true,"Message":null,"OrderRef":"tripz_109270481246447459618_1753108680","TransactionNo":"3434918048","Amount":"2000.00","Token":"5E397F3BCFC8DBC277E67BBE909A4C25"} +VERIFICATION STRING: UOMACVPA8BQ8U99BRDDONSLAKW2IDSLBTCQFR776E8L55C0DLBYFB6NJJOWJ7FOLWEYQE234349180482000.00tripz_109270481246447459618_1753108680 + - Merchant ID Used: UOMACV + - TransactionNo Used: 3434918048 + - Amount Used: 2000.00 + - OrderRef Used: tripz_109270481246447459618_1753108680 +CALCULATED TOKEN: 5E397F3BCFC8DBC277E67BBE909A4C25 +RECEIVED TOKEN: 5E397F3BCFC8DBC277E67BBE909A4C25 +TOKEN MATCH! Proceeding to update database. +FATAL: Database update failed: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'payment_id' in 'field list' +--- NEW WEBHOOK --- +2025-07-21 17:38:49 - RAW BODY: {"IsSuccess":true,"Message":null,"OrderRef":"tripz_109270481246447459618_1753108680","TransactionNo":"3434918048","Amount":"2000.00","Token":"5E397F3BCFC8DBC277E67BBE909A4C25"} +VERIFICATION STRING: UOMACVPA8BQ8U99BRDDONSLAKW2IDSLBTCQFR776E8L55C0DLBYFB6NJJOWJ7FOLWEYQE234349180482000.00tripz_109270481246447459618_1753108680 + - Merchant ID Used: UOMACV + - TransactionNo Used: 3434918048 + - Amount Used: 2000.00 + - OrderRef Used: tripz_109270481246447459618_1753108680 +CALCULATED TOKEN: 5E397F3BCFC8DBC277E67BBE909A4C25 +RECEIVED TOKEN: 5E397F3BCFC8DBC277E67BBE909A4C25 +TOKEN MATCH! Proceeding to update database. +FATAL: Database update failed: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'payment_id' in 'field list' +--- NEW WEBHOOK --- +2025-07-21 17:38:54 - RAW BODY: {"IsSuccess":true,"Message":null,"OrderRef":"tripz_109270481246447459618_1753108680","TransactionNo":"3434918048","Amount":"2000.00","Token":"5E397F3BCFC8DBC277E67BBE909A4C25"} +VERIFICATION STRING: UOMACVPA8BQ8U99BRDDONSLAKW2IDSLBTCQFR776E8L55C0DLBYFB6NJJOWJ7FOLWEYQE234349180482000.00tripz_109270481246447459618_1753108680 + - Merchant ID Used: UOMACV + - TransactionNo Used: 3434918048 + - Amount Used: 2000.00 + - OrderRef Used: tripz_109270481246447459618_1753108680 +CALCULATED TOKEN: 5E397F3BCFC8DBC277E67BBE909A4C25 +RECEIVED TOKEN: 5E397F3BCFC8DBC277E67BBE909A4C25 +TOKEN MATCH! Proceeding to update database. +FATAL: Database update failed: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'payment_id' in 'field list' +--- NEW WEBHOOK --- +2025-07-21 17:43:55 - RAW BODY: {"IsSuccess":true,"Message":null,"OrderRef":"tripz_109270481246447459618_1753109008","TransactionNo":"2925347460","Amount":"2000.00","Token":"16EC668D7C9A4105D464BC925D0F35B3"} +VERIFICATION STRING: UOMACVPA8BQ8U99BRDDONSLAKW2IDSLBTCQFR776E8L55C0DLBYFB6NJJOWJ7FOLWEYQE229253474602000.00tripz_109270481246447459618_1753109008 + - Merchant ID Used: UOMACV + - TransactionNo Used: 2925347460 + - Amount Used: 2000.00 + - OrderRef Used: tripz_109270481246447459618_1753109008 +CALCULATED TOKEN: 16EC668D7C9A4105D464BC925D0F35B3 +RECEIVED TOKEN: 16EC668D7C9A4105D464BC925D0F35B3 +TOKEN MATCH! Proceeding to update database. +FATAL: Database update failed: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'updated_at' in 'field list' +--- NEW WEBHOOK --- +2025-07-21 17:44:00 - RAW BODY: {"IsSuccess":true,"Message":null,"OrderRef":"tripz_109270481246447459618_1753109008","TransactionNo":"2925347460","Amount":"2000.00","Token":"16EC668D7C9A4105D464BC925D0F35B3"} +VERIFICATION STRING: UOMACVPA8BQ8U99BRDDONSLAKW2IDSLBTCQFR776E8L55C0DLBYFB6NJJOWJ7FOLWEYQE229253474602000.00tripz_109270481246447459618_1753109008 + - Merchant ID Used: UOMACV + - TransactionNo Used: 2925347460 + - Amount Used: 2000.00 + - OrderRef Used: tripz_109270481246447459618_1753109008 +CALCULATED TOKEN: 16EC668D7C9A4105D464BC925D0F35B3 +RECEIVED TOKEN: 16EC668D7C9A4105D464BC925D0F35B3 +TOKEN MATCH! Proceeding to update database. +FATAL: Database update failed: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'updated_at' in 'field list' +--- NEW WEBHOOK --- +2025-07-21 17:44:06 - RAW BODY: {"IsSuccess":true,"Message":null,"OrderRef":"tripz_109270481246447459618_1753109008","TransactionNo":"2925347460","Amount":"2000.00","Token":"16EC668D7C9A4105D464BC925D0F35B3"} +VERIFICATION STRING: UOMACVPA8BQ8U99BRDDONSLAKW2IDSLBTCQFR776E8L55C0DLBYFB6NJJOWJ7FOLWEYQE229253474602000.00tripz_109270481246447459618_1753109008 + - Merchant ID Used: UOMACV + - TransactionNo Used: 2925347460 + - Amount Used: 2000.00 + - OrderRef Used: tripz_109270481246447459618_1753109008 +CALCULATED TOKEN: 16EC668D7C9A4105D464BC925D0F35B3 +RECEIVED TOKEN: 16EC668D7C9A4105D464BC925D0F35B3 +TOKEN MATCH! Proceeding to update database. +FATAL: Database update failed: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'updated_at' in 'field list' +--- NEW WEBHOOK --- +2025-07-21 17:44:11 - RAW BODY: {"IsSuccess":true,"Message":null,"OrderRef":"tripz_109270481246447459618_1753109008","TransactionNo":"2925347460","Amount":"2000.00","Token":"16EC668D7C9A4105D464BC925D0F35B3"} +VERIFICATION STRING: UOMACVPA8BQ8U99BRDDONSLAKW2IDSLBTCQFR776E8L55C0DLBYFB6NJJOWJ7FOLWEYQE229253474602000.00tripz_109270481246447459618_1753109008 + - Merchant ID Used: UOMACV + - TransactionNo Used: 2925347460 + - Amount Used: 2000.00 + - OrderRef Used: tripz_109270481246447459618_1753109008 +CALCULATED TOKEN: 16EC668D7C9A4105D464BC925D0F35B3 +RECEIVED TOKEN: 16EC668D7C9A4105D464BC925D0F35B3 +TOKEN MATCH! Proceeding to update database. +FATAL: Database update failed: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'updated_at' in 'field list' +--- NEW WEBHOOK --- +2025-07-21 17:44:16 - RAW BODY: {"IsSuccess":true,"Message":null,"OrderRef":"tripz_109270481246447459618_1753109008","TransactionNo":"2925347460","Amount":"2000.00","Token":"16EC668D7C9A4105D464BC925D0F35B3"} +VERIFICATION STRING: UOMACVPA8BQ8U99BRDDONSLAKW2IDSLBTCQFR776E8L55C0DLBYFB6NJJOWJ7FOLWEYQE229253474602000.00tripz_109270481246447459618_1753109008 + - Merchant ID Used: UOMACV + - TransactionNo Used: 2925347460 + - Amount Used: 2000.00 + - OrderRef Used: tripz_109270481246447459618_1753109008 +CALCULATED TOKEN: 16EC668D7C9A4105D464BC925D0F35B3 +RECEIVED TOKEN: 16EC668D7C9A4105D464BC925D0F35B3 +TOKEN MATCH! Proceeding to update database. +FATAL: Database update failed: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'updated_at' in 'field list' +--- NEW WEBHOOK --- +2025-07-21 17:51:29 - RAW BODY: {"IsSuccess":true,"Message":null,"OrderRef":"tripz_109270481246447459618_1753109456","TransactionNo":"2487921821","Amount":"2000.00","Token":"1EA870532F15308A41780C06AC852C33"} +VERIFICATION STRING: UOMACVPA8BQ8U99BRDDONSLAKW2IDSLBTCQFR776E8L55C0DLBYFB6NJJOWJ7FOLWEYQE224879218212000.00tripz_109270481246447459618_1753109456 + - Merchant ID Used: UOMACV + - TransactionNo Used: 2487921821 + - Amount Used: 2000.00 + - OrderRef Used: tripz_109270481246447459618_1753109456 +CALCULATED TOKEN: 1EA870532F15308A41780C06AC852C33 +RECEIVED TOKEN: 1EA870532F15308A41780C06AC852C33 +TOKEN MATCH! Proceeding to update database. +SUCCESS: Database updated. +--- NEW WEBHOOK --- +2025-07-21 18:54:15 - RAW BODY: {"IsSuccess":true,"Message":null,"OrderRef":"tripz_109270481246447459618_1753113200","TransactionNo":"1725092256","Amount":"2000.00","Token":"983B8B9FDA5947CEE1D16D6ECC29FAF9"} +VERIFICATION STRING: UOMACVPA8BQ8U99BRDDONSLAKW2IDSLBTCQFR776E8L55C0DLBYFB6NJJOWJ7FOLWEYQE217250922562000.00tripz_109270481246447459618_1753113200 + - Merchant ID Used: UOMACV + - TransactionNo Used: 1725092256 + - Amount Used: 2000.00 + - OrderRef Used: tripz_109270481246447459618_1753113200 +CALCULATED TOKEN: 983B8B9FDA5947CEE1D16D6ECC29FAF9 +RECEIVED TOKEN: 983B8B9FDA5947CEE1D16D6ECC29FAF9 +TOKEN MATCH! Proceeding to update database. +SUCCESS: Database updated. +--- NEW WEBHOOK --- +2025-07-21 19:06:34 - RAW BODY: {"IsSuccess":true,"Message":null,"OrderRef":"tripz_109270481246447459618_1753113966","TransactionNo":"1477094275","Amount":"2000.00","Token":"01AF3E8E7C921FF72ADB09300971F2D2"} +VERIFICATION STRING: UOMACVPA8BQ8U99BRDDONSLAKW2IDSLBTCQFR776E8L55C0DLBYFB6NJJOWJ7FOLWEYQE214770942752000.00tripz_109270481246447459618_1753113966 + - Merchant ID Used: UOMACV + - TransactionNo Used: 1477094275 + - Amount Used: 2000.00 + - OrderRef Used: tripz_109270481246447459618_1753113966 +CALCULATED TOKEN: 01AF3E8E7C921FF72ADB09300971F2D2 +RECEIVED TOKEN: 01AF3E8E7C921FF72ADB09300971F2D2 +TOKEN MATCH! Proceeding to update database. +SUCCESS: Database updated. +--- NEW WEBHOOK --- +2025-07-21 19:15:57 - RAW BODY: {"IsSuccess":true,"Message":null,"OrderRef":"tripz_109270481246447459618_1753114529","TransactionNo":"746605967","Amount":"2000.00","Token":"7102931A8851540F14F4E259751EA776"} +VERIFICATION STRING: UOMACVPA8BQ8U99BRDDONSLAKW2IDSLBTCQFR776E8L55C0DLBYFB6NJJOWJ7FOLWEYQE27466059672000.00tripz_109270481246447459618_1753114529 + - Merchant ID Used: UOMACV + - TransactionNo Used: 746605967 + - Amount Used: 2000.00 + - OrderRef Used: tripz_109270481246447459618_1753114529 +CALCULATED TOKEN: 7102931A8851540F14F4E259751EA776 +RECEIVED TOKEN: 7102931A8851540F14F4E259751EA776 +TOKEN MATCH! Proceeding to update database. +SUCCESS: Database updated. +--- NEW WEBHOOK --- +2025-07-21 19:20:54 - RAW BODY: {"IsSuccess":true,"Message":null,"OrderRef":"tripz_109270481246447459618_1753114829","TransactionNo":"10119078","Amount":"2000.00","Token":"11DEB7F0AA5121F048E94CF385D5FC3D"} +VERIFICATION STRING: UOMACVPA8BQ8U99BRDDONSLAKW2IDSLBTCQFR776E8L55C0DLBYFB6NJJOWJ7FOLWEYQE2101190782000.00tripz_109270481246447459618_1753114829 + - Merchant ID Used: UOMACV + - TransactionNo Used: 10119078 + - Amount Used: 2000.00 + - OrderRef Used: tripz_109270481246447459618_1753114829 +CALCULATED TOKEN: 11DEB7F0AA5121F048E94CF385D5FC3D +RECEIVED TOKEN: 11DEB7F0AA5121F048E94CF385D5FC3D +TOKEN MATCH! Proceeding to update database. +SUCCESS: Database updated. +--- NEW WEBHOOK --- +2025-07-21 19:23:26 - RAW BODY: {"IsSuccess":true,"Message":null,"OrderRef":"tripz_109270481246447459618_1753114985","TransactionNo":"532601241","Amount":"2000.00","Token":"18DCD7E952332EB655B036B0C76EEDC7"} +VERIFICATION STRING: UOMACVPA8BQ8U99BRDDONSLAKW2IDSLBTCQFR776E8L55C0DLBYFB6NJJOWJ7FOLWEYQE25326012412000.00tripz_109270481246447459618_1753114985 + - Merchant ID Used: UOMACV + - TransactionNo Used: 532601241 + - Amount Used: 2000.00 + - OrderRef Used: tripz_109270481246447459618_1753114985 +CALCULATED TOKEN: 18DCD7E952332EB655B036B0C76EEDC7 +RECEIVED TOKEN: 18DCD7E952332EB655B036B0C76EEDC7 +TOKEN MATCH! Proceeding to update database. +SUCCESS: Database updated. +--- NEW WEBHOOK --- +2025-07-22 00:11:03 - RAW BODY: {"IsSuccess":true,"Message":null,"OrderRef":"tripz_14a51b422c9972299e109c7db5f65a2c_1753132198","TransactionNo":"947634072","Amount":"200000.00","Token":"E6811EE374F921257C45DC84CCCF48DC"} +VERIFICATION STRING: UOMACVPA8BQ8U99BRDDONSLAKW2IDSLBTCQFR776E8L55C0DLBYFB6NJJOWJ7FOLWEYQE2947634072200000.00tripz_14a51b422c9972299e109c7db5f65a2c_1753132198 + - Merchant ID Used: UOMACV + - TransactionNo Used: 947634072 + - Amount Used: 200000.00 + - OrderRef Used: tripz_14a51b422c9972299e109c7db5f65a2c_1753132198 +CALCULATED TOKEN: E6811EE374F921257C45DC84CCCF48DC +RECEIVED TOKEN: E6811EE374F921257C45DC84CCCF48DC +TOKEN MATCH! Proceeding to update database. +SUCCESS: Database updated. +--- NEW WEBHOOK --- +2025-07-22 00:17:06 - RAW BODY: {"IsSuccess":false,"Message":"OTP is not valid!","OrderRef":"tripz_14a51b422c9972299e109c7db5f65a2c_1753132598","TransactionNo":"1773754242","Amount":"200000.00","Token":"2654D3390FF25082FF5A8A1BA59D6CDA"} +VERIFICATION STRING: UOMACVPA8BQ8U99BRDDONSLAKW2IDSLBTCQFR776E8L55C0DLBYFB6NJJOWJ7FOLWEYQE21773754242200000.00tripz_14a51b422c9972299e109c7db5f65a2c_1753132598 + - Merchant ID Used: UOMACV + - TransactionNo Used: 1773754242 + - Amount Used: 200000.00 + - OrderRef Used: tripz_14a51b422c9972299e109c7db5f65a2c_1753132598 +CALCULATED TOKEN: 2654D3390FF25082FF5A8A1BA59D6CDA +RECEIVED TOKEN: 2654D3390FF25082FF5A8A1BA59D6CDA +TOKEN MATCH! Proceeding to update database. +SUCCESS: Database updated. +--- NEW WEBHOOK --- +2025-07-22 00:19:54 - RAW BODY: {"IsSuccess":true,"Message":null,"OrderRef":"tripz_14a51b422c9972299e109c7db5f65a2c_1753132768","TransactionNo":"1048082327","Amount":"100000.00","Token":"DCF7C2AEE0A81DB6C5F40C086E396928"} +VERIFICATION STRING: UOMACVPA8BQ8U99BRDDONSLAKW2IDSLBTCQFR776E8L55C0DLBYFB6NJJOWJ7FOLWEYQE21048082327100000.00tripz_14a51b422c9972299e109c7db5f65a2c_1753132768 + - Merchant ID Used: UOMACV + - TransactionNo Used: 1048082327 + - Amount Used: 100000.00 + - OrderRef Used: tripz_14a51b422c9972299e109c7db5f65a2c_1753132768 +CALCULATED TOKEN: DCF7C2AEE0A81DB6C5F40C086E396928 +RECEIVED TOKEN: DCF7C2AEE0A81DB6C5F40C086E396928 +TOKEN MATCH! Proceeding to update database. +SUCCESS: Database updated. diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/ecash/logs/payment_verification.log b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/logs/payment_verification.log new file mode 100644 index 0000000..95bc263 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/logs/payment_verification.log @@ -0,0 +1,9 @@ +[2025-07-21 17:38:50] STEP VERIFY: لم يتم تأكيد الدفع بعد عدة محاولات | Data: {"orderRef":"tripz_109270481246447459618_1753108680"} +[2025-07-21 17:38:56] STEP VERIFY: لم يتم تأكيد الدفع بعد عدة محاولات | Data: {"orderRef":"tripz_109270481246447459618_1753108680"} +[2025-07-21 17:44:13] STEP VERIFY: لم يتم تأكيد الدفع بعد عدة محاولات | Data: {"orderRef":"tripz_109270481246447459618_1753109008"} +[2025-07-21 17:51:41] STEP VERIFY: اكتملت العملية بنجاح | Data: {"orderRef":"tripz_109270481246447459618_1753109456","userId":"109270481246447459618"} +[2025-07-21 19:06:39] STEP VERIFY: اكتملت العملية بنجاح | Data: {"orderRef":"tripz_109270481246447459618_1753113966","userId":"109270481246447459618"} +[2025-07-21 19:20:58] STEP VERIFY: اكتملت العملية بنجاح | Data: {"orderRef":"tripz_109270481246447459618_1753114829","userId":"109270481246447459618"} +[2025-07-21 19:23:30] STEP VERIFY: اكتملت العملية بنجاح | Data: {"orderRef":"tripz_109270481246447459618_1753114985","userId":"109270481246447459618"} +[2025-07-22 00:11:08] STEP VERIFY: اكتملت العملية بنجاح | Data: {"orderRef":"tripz_14a51b422c9972299e109c7db5f65a2c_1753132198","userId":"14a51b422c9972299e109c7db5f65a2c"} +[2025-07-22 00:20:01] STEP VERIFY: اكتملت العملية بنجاح | Data: {"orderRef":"tripz_14a51b422c9972299e109c7db5f65a2c_1753132768","userId":"14a51b422c9972299e109c7db5f65a2c"} diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/ecash/passenger/ecash_verify.php b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/passenger/ecash_verify.php new file mode 100755 index 0000000..be249f5 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/passenger/ecash_verify.php @@ -0,0 +1,181 @@ + + + + + + <?= htmlspecialchars($title) ?> + + + +
+
+

+

+
+ + + prepare("SELECT * FROM `paymentsLogSyria` WHERE order_ref = :order_ref AND status = 1 LIMIT 1"); + $stmt->execute([':order_ref' => $orderRef]); + $payment = $stmt->fetch(PDO::FETCH_ASSOC); + if ($payment) break; + sleep(2); +} + +if (!$payment) { + logError("VERIFY", "لم يتم تأكيد الدفع بعد عدة محاولات", ["orderRef" => $orderRef]); + showHTMLPage("error", "لم يتم تأكيد الدفع", "لم نتمكن من تأكيد دفعتك بعد. قد تستغرق العملية بضع لحظات. يرجى التحقق من رصيدك في التطبيق لاحقاً أو التواصل مع الدعم الفني."); +} + +try { + $userId = $payment['user_id']; + $amount = $payment['amount']; + $paymentMethod = $payment['payment_method'] ?? 'ecash'; + + $finalAmount = calculateBonus($amount); + + $token = generatePaymentToken($userId, $finalAmount); + if (!$token) throw new Exception("فشل إنشاء توكن محفظة الراكب"); + + $walletResult = addToPassengerWallet($userId, $finalAmount, $token); + if (!$walletResult || ($walletResult['status'] ?? 'fail') != "success") { + throw new Exception("فشل إضافة الرصيد لمحفظة الراكب"); + } + + $seferToken = generatePaymentToken($userId, $amount); + if (!$seferToken) throw new Exception("فشل إنشاء توكن محفظة سفر"); + + $seferWalletResult = addToSeferWallet($userId, $amount, $paymentMethod, $seferToken); + if (!$seferWalletResult || ($seferWalletResult['status'] ?? 'fail') != "success") { + throw new Exception("فشل إضافة الرصيد لمحفظة سفر"); + } + + logError("VERIFY", "اكتملت العملية بنجاح", ["orderRef" => $orderRef, "userId" => $userId]); + showHTMLPage("success", "تم الدفع بنجاح", "تمت إضافة الرصيد إلى محفظتك. شكرًا لاستخدامك Intaleq."); +} catch (Exception $e) { + logError("VERIFY_ERROR", $e->getMessage(), ["orderRef" => $orderRef]); + showHTMLPage("error", "حدث خطأ", "لقد تم استلام دفعتك بنجاح، ولكن حدث خطأ أثناء تحديث رصيدك. يرجى التواصل مع الدعم الفني وتزويدهم بالرقم المرجعي: " . htmlspecialchars($orderRef)); +} + +// --- دوال مساعدة --- + +function calculateBonus($amount) { + if ($amount == 200000) return 205000; + if ($amount == 400000) return 425000; + if ($amount == 1000000) return 1040000; + return $amount; +} + +function generatePaymentToken($passengerId, $amount) { + $url = BASE_URL . "/passengerWallet/addPaymentTokenPassenger.php"; + $postData = ['passengerId' => $passengerId, 'amount' => $amount]; + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData)); + $response = curl_exec($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + if ($httpCode != 200) return null; + $data = json_decode($response, true); + return $data['message'] ?? null; +} + +function addToPassengerWallet($passengerId, $amount, $token) { + $url = BASE_URL . "/passengerWallet/add.php"; + $postData = ['passenger_id' => $passengerId, 'balance' => $amount, 'token' => $token]; + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData)); + $response = curl_exec($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + if ($httpCode != 200) return null; + return json_decode($response, true); +} + +function addToSeferWallet($passengerId, $amount, $paymentMethod, $token) { + $url = BASE_URL . "/seferWallet/add.php"; + $postData = [ + 'amount' => $amount, + 'paymentMethod' => $paymentMethod, + 'passengerId' => $passengerId, + 'token' => $token, + 'driverId' => 'passenger' + ]; + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData)); + $response = curl_exec($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + if ($httpCode != 200) return null; + return json_decode($response, true); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/ecash/passenger/ecash_webhook.php b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/passenger/ecash_webhook.php new file mode 100755 index 0000000..00646b0 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/passenger/ecash_webhook.php @@ -0,0 +1,91 @@ +prepare( + "UPDATE `paymentsLogSyria` SET status = :status, updated_at = NOW() WHERE order_ref = :order_ref AND status = 2" + ); + $stmt->execute([ + ':status' => $payment_status, + + ':order_ref' => $orderRef + ]); + + if ($stmt->rowCount() > 0) { + http_response_code(200); + file_put_contents($log_file, "SUCCESS: Database updated." . PHP_EOL, FILE_APPEND); + } else { + http_response_code(200); + file_put_contents($log_file, "INFO: Order not found or already processed." . PHP_EOL, FILE_APPEND); + } + +} catch (PDOException $e) { + http_response_code(500); + file_put_contents($log_file, "FATAL: Database update failed: " . $e->getMessage() . PHP_EOL, FILE_APPEND); +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/ecash/passenger/finalize_payment.php b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/passenger/finalize_payment.php new file mode 100755 index 0000000..58e7d12 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/passenger/finalize_payment.php @@ -0,0 +1,79 @@ +prepare( + "SELECT * FROM `paymentsLogSyria` + WHERE user_id = :user_id + AND status = 1 + AND updated_at >= DATE_SUB(NOW(), INTERVAL 5 MINUTE) + ORDER BY updated_at DESC + LIMIT 1" + ); + $stmt->bindParam(':user_id', $userId, PDO::PARAM_STR); + $stmt->execute(); + $payment = $stmt->fetch(PDO::FETCH_ASSOC); + + if (!$payment) { + printFailure("لم يتم العثور على دفعة ناجحة حديثة."); + exit; + } + + // خطوة 2: الحصول على المبلغ (لا يحتاج للقسمة على 100) + $amount = $payment['amount']; + + // خطوة 3: حساب المكافأة + $finalAmount = calculateBonus($amount); // استخدم دالة حساب المكافآت الخاصة بك + + $passengerId = $userId; // نفترض أن معرّف المستخدم هو نفسه معرّف الراكب + + // --- هنا تضع نفس منطق إضافة الرصيد الذي كان في ملف payment_verify.php القديم --- + // (مثال) + // $token = generatePaymentToken($passengerId, $finalAmount); + // addToPassengerWallet($passengerId, $finalAmount, $token); + // ... إلخ + + // --- النجاح النهائي --- + printSuccess("تمت معالجة الدفع وتحديث الرصيد بنجاح."); + +} catch (PDOException $e) { + error_log("Finalize Payment Error: " . $e->getMessage()); + printFailure("حدث خطأ في قاعدة البيانات أثناء إتمام العملية."); +} + +// --- يمكنك وضع دوال المساعدة هنا (calculateBonus, etc.) --- +function calculateBonus($amount) { + $result = $amount; + if ($amount == 500) return 530; + if ($amount == 1000) return 1070; + if ($amount == 2000) return 2180; + if ($amount == 5000) return 5700; + return $result; +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/ecash/passenger/payWithEcash.php b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/passenger/payWithEcash.php new file mode 100755 index 0000000..25c07cd --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/passenger/payWithEcash.php @@ -0,0 +1,88 @@ +prepare( + "INSERT INTO `paymentsLogSyria`( `user_id`, `amount`, `status`, `order_ref`, `payment_method`, `created_at`) + VALUES (:user_id, :amount, 2, :order_ref,'ecash-passenger', NOW())" + ); + $stmt->execute([ + ':user_id' => $passengerId, + ':amount' => $amount, + ':order_ref' => $orderRef + ]); +} catch (PDOException $e) { + error_log("eCash - فشل تسجيل الدفعة المبدئية: " . $e->getMessage()); + printFailure("حدث خطأ أثناء بدء عملية الدفع. يرجى المحاولة مرة أخرى."); + exit; +} + +// --- إعادة رابط الدفع إلى تطبيق فلاتر --- +// التطبيق سيستقبل هذا الرابط ويفتحه في WebView +// نرسل الرابط داخل حقل 'message' كما يتوقع كود فلاتر +printSuccess($paymentUrl); + +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/ecash/passenger/webhook_connect.php b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/passenger/webhook_connect.php new file mode 100755 index 0000000..2615948 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/passenger/webhook_connect.php @@ -0,0 +1,42 @@ + false, + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES UTF8" + ]; + $user = getenv('USER'); + $pass = getenv('PASS'); + $con = new PDO($dsn, $user, $pass, $options); + +} catch (PDOException $e) { + error_log("Webhook DB Connection Error: " . $e->getMessage()); + http_response_code(500); + echo json_encode(['error' => 'Internal Server Error']); + exit; +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/ecash/payWithEcash.php b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/payWithEcash.php new file mode 100755 index 0000000..06ea112 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/payWithEcash.php @@ -0,0 +1,73 @@ +user_id ?? null; +if (!$userId) { + printFailure("Authentication failed."); + exit; +} + +// 1. --- Create a unique order reference --- +$orderRef = 'INTALEQ_' . $userId . '_' . time(); + +// 2. --- Save the initial transaction to your database --- +// This step is CRITICAL for the webhook to work correctly. +// Create a table named 'ecash_transactions' with columns like: +// id, order_ref, user_id, passenger_id, amount, status, created_at, updated_at +try { + $stmt = $con->prepare( + "INSERT INTO ecash_transactions (order_ref, user_id, passenger_id, amount, status) VALUES (?, ?, ?, ?, 'pending')" + ); + $stmt->execute([$orderRef, $userId, $passengerId, $amount]); +} catch (PDOException $e) { + // Log the database error + error_log("ecash_initiate DB Error: " . $e->getMessage()); + printFailure("Failed to initiate payment transaction."); + exit; +} + +// 3. --- Generate the Verification Code (VC) --- +$stringToHash = ECASH_MERCHANT_ID . ECASH_MERCHANT_SECRET . $amount . $orderRef; +$verificationCode = strtoupper(md5($stringToHash)); + +// 4. --- Construct URLs --- +$redirectUrl = urlencode(APP_REDIRECT_URL_SUCCESS); +$callbackUrl = urlencode(APP_CALLBACK_URL); + +// 5. --- Build the Final Checkout URL --- +$checkoutUrl = sprintf( + "%s/Checkout/CardCheckout?tk=%s&mid=%s&vc=%s&c=%s&a=%s&lang=%s&or=%s&ru=%s&cu=%s", + ECASH_CHECKOUT_URL, + ECASH_TERMINAL_KEY, + ECASH_MERCHANT_ID, + $verificationCode, + ECASH_CURRENCY, + $amount, + ECASH_LANG, + $orderRef, + $redirectUrl, + $callbackUrl +); + +// 6. --- Return the URL to Flutter --- +printSuccess($checkoutUrl); + +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/ecash/webhook_ecash.php b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/webhook_ecash.php new file mode 100755 index 0000000..148e8b7 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/ecash/webhook_ecash.php @@ -0,0 +1,310 @@ + + $raw_post_data]); + +$data = json_decode($raw_post_data, true); +if (!$data) { + logError("0.1", "Invalid JSON payload."); + http_response_code(400); + exit; +} + +// 2. Extract data and verify the token from ecash +$isSuccess = $data['isSuccess'] ?? null; +$orderRef = $data['orderRef'] ?? null; +$transactionNo = $data['transactionNo'] ?? null; +$amount = $data['amount'] ?? null; +$receivedToken = $data['token'] ?? ''; + +$string_to_hash = ECASH_MERCHANT_ID . ECASH_MERCHANT_SECRET . $transactionNo . $amount . $orderRef; +$expected_token = md5($string_to_hash); + +if (strcasecmp($expected_token, $receivedToken) !== 0) { + logError("1", "Token Mismatch", [ + "expected" => $expected_token, + "received" => $receivedToken, + "string" => $string_to_hash + ]); + http_response_code(401); // Unauthorized + exit; +} +logError("1", "Token Verified Successfully."); + +// 3. Check if payment was successful +if ($isSuccess !== true) { + logError("2", "Payment was not successful according to ecash.", $data); + // Optionally, update your database to mark the order as 'failed' + updateTransactionStatus($orderRef, 'failed', $transactionNo); + http_response_code(200); // Respond OK to ecash, but do nothing else + exit; +} +logError("2", "Payment reported as SUCCESS by ecash."); + +// 4. Find the original transaction in your database using the Order Reference +try { + $stmt = $con->prepare("SELECT * FROM ecash_transactions WHERE order_ref = ? LIMIT 1"); + $stmt->execute([$orderRef]); + $transaction = $stmt->fetch(PDO::FETCH_ASSOC); + + if (!$transaction) { + logError("3", "OrderRef not found in our database.", ["orderRef" => $orderRef]); + http_response_code(404); // Not Found + exit; + } + + // Security Check: Ensure this transaction hasn't already been processed + if ($transaction['status'] !== 'pending') { + logError("3.1", "Transaction already processed.", ["orderRef" => $orderRef, "status" => $transaction['status']]); + http_response_code(200); // Acknowledge receipt, but prevent double-spending + exit; + } + + $passengerId = $transaction['passenger_id']; + $paidAmount = $transaction['amount']; // Use the amount from your DB as the source of truth + logError("3", "Transaction found in DB.", ["passengerId" => $passengerId, "amount" => $paidAmount]); + + // 5. --- Start Wallet Update Logic (from your paymet_verfy.php) --- + + // Calculate bonus + $finalAmount = calculateBonus($paidAmount); + logError("4", "Bonus calculated.", ["original" => $paidAmount, "final" => $finalAmount]); + + // Add to Passenger Wallet + $passengerToken = generatePaymentToken($passengerId, $finalAmount); + if ($passengerToken) { + addToPassengerWallet($passengerId, $finalAmount, $passengerToken); + } + + // Add to Sefer Wallet + $paymentMethod = 'ecash'; // Or another identifier + addToSeferWallet($passengerId, $paidAmount, $paymentMethod); + + // 6. Mark the transaction as 'success' in your database to prevent reprocessing + updateTransactionStatus($orderRef, 'success', $transactionNo); + logError("7", "Process completed successfully."); + +} catch (PDOException $e) { + logError("DB_ERROR", "Database error: " . $e->getMessage()); + http_response_code(500); + exit; +} catch (Exception $e) { + logError("GENERAL_ERROR", "General error: " . $e->getMessage()); + http_response_code(500); + exit; +} + +// 7. Respond to ecash server +http_response_code(200); +echo "Webhook processed."; + + +// --- ALL HELPER FUNCTIONS FROM paymet_verfy.php --- + +function updateTransactionStatus($orderRef, $status, $transactionNo) { + global $con; + try { + $stmt = $con->prepare( + "UPDATE ecash_transactions SET status = ?, ecash_transaction_no = ?, updated_at = NOW() WHERE order_ref = ?" + ); + $stmt->execute([$status, $transactionNo, $orderRef]); + } catch (PDOException $e) { + logError("DB_UPDATE_ERROR", "Failed to update transaction status", ["error" => $e->getMessage()]); + } +} + + + + +function generatePaymentToken($passengerId, $amount) { + $url = BASE_URL . "/passengerWallet/addPaymentTokenPassenger.php"; + + $postData = [ + 'passengerId' => $passengerId, + 'amount' => $amount + ]; + + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData)); + + $response = curl_exec($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + $curlError = curl_error($ch); + curl_close($ch); + + if ($curlError) { + logError("4.1", "cURL error in token generation", [ + "error" => $curlError, + "url" => $url + ]); + return null; + } + + if ($httpCode != 200) { + logError("4.2", "HTTP error in token generation", [ + "http_code" => $httpCode, + "response" => $response + ]); + return null; + } + + $data = json_decode($response, true); + + if (!$data || !isset($data['message'])) { + logError("4.3", "Invalid response format in token generation", [ + "response" => $response + ]); + return null; + } + + return $data['message']; // ✅ Return token +} + +// 🎯 Function to add balance to passenger's wallet with error logging +function addToPassengerWallet($passengerId, $amount, $token) { + $url = BASE_URL . "/passengerWallet/add.php"; + + $postData = [ + 'passenger_id' => $passengerId, + 'balance' => $amount, + 'token' => $token + ]; + + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData)); + + $response = curl_exec($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + $curlError = curl_error($ch); + curl_close($ch); + + if ($curlError) { + logError("5.1", "cURL error in passenger wallet update", [ + "error" => $curlError, + "url" => $url + ]); + return null; + } + + if ($httpCode != 200) { + logError("5.2", "HTTP error in passenger wallet update", [ + "http_code" => $httpCode, + "response" => $response + ]); + return null; + } + + $data = json_decode($response, true); + + if (!$data) { + logError("5.3", "Invalid response format in passenger wallet update", [ + "response" => $response + ]); + return null; + } + + return $data; // ✅ Return result +} + +// 🎯 Function to add balance to Sefer wallet with error logging + + +function addToSeferWallet($passengerId, $amount, $paymentMethod) { + + + // Generate a new token specifically for the Sefer wallet + $seferToken = generatePaymentToken($passengerId, $amount); + + if (!$seferToken) { + logError("6.0.1", "Failed to generate Sefer token"); + return null; + } + + logError("6.0.2", "Generated new Sefer token", [ + "token_length" => ($seferToken) + ]); + + $url = BASE_URL . "/seferWallet/add.php"; + + $postData = [ + 'amount' => $amount, + 'paymentMethod' => $paymentMethod, + 'passengerId' => $passengerId, + 'token' => $seferToken, // Use the new Sefer-specific token + 'driverId' => 'passenger' + ]; + + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData)); + + $response = curl_exec($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + $curlError = curl_error($ch); + curl_close($ch); + + if ($curlError) { + logError("6.1", "cURL error in Sefer wallet update", [ + "error" => $curlError, + "url" => $url + ]); + return null; + } + + if ($httpCode != 200) { + logError("6.2", "HTTP error in Sefer wallet update", [ + "http_code" => $httpCode, + "response" => $response + ]); + return null; + } + + $data = json_decode($response, true); + + if (!$data) { + logError("6.3", "Invalid response format in Sefer wallet update", [ + "response" => $response + ]); + return null; + } + + return $data; // ✅ Return result +} + + +// 🎯 Function to calculate bonus +function calculateBonus($amount) { + logError("3.1", "Bonus calculation input", ["amount" => $amount]); + + $result = 0; + if ($amount == 100) $result = 100; + else if ($amount == 200) $result = 215; + else if ($amount == 400) $result = 450; + else if ($amount == 1000) $result = 1140; + + logError("3.2", "Bonus calculation result", [ + "input" => $amount, + "output" => $result + ]); + + return $result; +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/kazan/add.php b/walletintaleq.intaleq.xyz/v2/main/ride/kazan/add.php new file mode 100755 index 0000000..ce926dc --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/kazan/add.php @@ -0,0 +1,45 @@ +prepare($sql); + +// Bind the parameters to the SQL query +$stmt->bindParam(':kazan', $kazan); +$stmt->bindParam(':comfortPrice', $comfortPrice); +$stmt->bindParam(':speedPrice', $speedPrice); +$stmt->bindParam(':deliveryPrice', $deliveryPrice); +$stmt->bindParam(':freePrice', $freePrice); +$stmt->bindParam(':latePrice', $latePrice); +$stmt->bindParam(':heavyPrice', $heavyPrice); +$stmt->bindParam(':adminId', $adminId); +$stmt->bindParam(':naturePrice', $naturePrice); +$stmt->bindParam(':country', $country); +$stmt->bindParam(':fuelPrice', $fuelPrice); + +// Execute the statement +if ($stmt->execute()) { + // Print a success message + printSuccess("Kazan saved successfully"); +} else { + // Print a failure message + printFailure("Failed to save Kazan"); +} + +// Close the statement +$stmt->close(); +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/kazan/delete.php b/walletintaleq.intaleq.xyz/v2/main/ride/kazan/delete.php new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/kazan/error_log b/walletintaleq.intaleq.xyz/v2/main/ride/kazan/error_log new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/kazan/get.php b/walletintaleq.intaleq.xyz/v2/main/ride/kazan/get.php new file mode 100644 index 0000000..24e2069 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/kazan/get.php @@ -0,0 +1,27 @@ +prepare($sql); +$stmt->execute(); + +$row = $stmt->fetchAll(PDO::FETCH_ASSOC); + +if ($row){ + // Fetch the record + // $row = $stmt->fetchAll(PDO::FETCH_ASSOC); + + + printSuccess( $row); + +} + else{ + // Print a failure message + + printFailure($message = "No Kazan record found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/kazan/update.php b/walletintaleq.intaleq.xyz/v2/main/ride/kazan/update.php new file mode 100644 index 0000000..2e50a15 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/kazan/update.php @@ -0,0 +1,72 @@ +prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Print a success message + printSuccess($message = "Kazan data updated successfully"); +} else { + // Print a failure message + printFailure($message = "Failed to update kazan data"); +} \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/logs/payment_verification.log b/walletintaleq.intaleq.xyz/v2/main/ride/logs/payment_verification.log new file mode 100644 index 0000000..08c1039 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/logs/payment_verification.log @@ -0,0 +1,385 @@ +[2025-03-20 21:01:11] STEP 0: Request received | Data: {"user_id":"+201010101010","passengerId":"113172279072358305645"} +[2025-03-20 21:01:11] STEP 1: Querying latest payment | Data: {"user_id":"+201010101010"} +[2025-03-20 21:01:11] STEP 1: Payment found | Data: {"payment_id":"13","status":"1","amount":"2800.00"} +[2025-03-20 21:01:11] STEP 2: Payment status verified | Data: {"status":"1"} +[2025-03-20 21:01:11] STEP 3: Calculating bonus | Data: {"amount":"2800.00"} +[2025-03-20 21:01:11] STEP 3.1: Bonus calculation input | Data: {"amount":"2800.00"} +[2025-03-20 21:01:11] STEP 3.2: Bonus calculation result | Data: {"input":"2800.00","output":0} +[2025-03-20 21:01:11] STEP 3: Bonus calculation failed | Data: {"original_amount":"2800.00","calculated_amount":0} +[2025-03-20 21:07:36] STEP 0: Request received | Data: {"user_id":"+201010101010","passengerId":"113172279072358305645"} +[2025-03-20 21:07:36] STEP 1: Querying latest payment | Data: {"user_id":"+201010101010"} +[2025-03-20 21:07:36] STEP 1: Payment found | Data: {"payment_id":"14","status":"1","amount":28} +[2025-03-20 21:07:36] STEP 2: Payment status verified | Data: {"status":"1"} +[2025-03-20 21:07:36] STEP 3: Calculating bonus | Data: {"amount":"2800.00"} +[2025-03-20 21:07:36] STEP 3.1: Bonus calculation input | Data: {"amount":"2800.00"} +[2025-03-20 21:07:36] STEP 3.2: Bonus calculation result | Data: {"input":"2800.00","output":0} +[2025-03-20 21:07:36] STEP 3: Bonus calculation failed | Data: {"original_amount":"2800.00","calculated_amount":0} +[2025-03-20 21:10:41] STEP 0: Request received | Data: {"user_id":"+201010101010","passengerId":"113172279072358305645"} +[2025-03-20 21:10:41] STEP 1: Querying latest payment | Data: {"user_id":"+201010101010"} +[2025-03-20 21:10:41] STEP 1: Payment found | Data: {"payment_id":"15","status":"1","amount":80} +[2025-03-20 21:10:41] STEP 2: Payment status verified | Data: {"status":"1"} +[2025-03-20 21:10:41] STEP 3: Calculating bonus | Data: {"amount":80} +[2025-03-20 21:10:41] STEP 3.1: Bonus calculation input | Data: {"amount":80} +[2025-03-20 21:10:41] STEP 3.2: Bonus calculation result | Data: {"input":80,"output":0} +[2025-03-20 21:10:41] STEP 3: Bonus calculation failed | Data: {"original_amount":80,"calculated_amount":0} +[2025-03-20 21:11:51] STEP 0: Request received | Data: {"user_id":"+201010101010","passengerId":"113172279072358305645"} +[2025-03-20 21:11:51] STEP 1: Querying latest payment | Data: {"user_id":"+201010101010"} +[2025-03-20 21:11:51] STEP 1: Payment found | Data: {"payment_id":"16","status":"1","amount":100} +[2025-03-20 21:11:51] STEP 2: Payment status verified | Data: {"status":"1"} +[2025-03-20 21:11:51] STEP 3: Calculating bonus | Data: {"amount":100} +[2025-03-20 21:11:51] STEP 3.1: Bonus calculation input | Data: {"amount":100} +[2025-03-20 21:11:51] STEP 3.2: Bonus calculation result | Data: {"input":100,"output":100} +[2025-03-20 21:11:51] STEP 3: Bonus calculated | Data: {"original_amount":100,"final_amount":100} +[2025-03-20 21:11:51] STEP 4: Generating payment token | Data: {"passengerId":"113172279072358305645","amount":100} +[2025-03-20 21:11:51] STEP 4.2: HTTP error in token generation | Data: {"http_code":404,"response":"\n\n404 Not Found<\/title>\n<\/head><body>\n<h1>Not Found<\/h1>\n<p>The requested URL was not found on this server.<\/p>\n<p>Additionally, a 404 Not Found\nerror was encountered while trying to use an ErrorDocument to handle the request.<\/p>\n<\/body><\/html>\n"} +[2025-03-20 21:11:51] STEP 4: Token generation failed +[2025-03-20 21:15:42] STEP 0: Request received | Data: {"user_id":"+201010101010","passengerId":"113172279072358305645"} +[2025-03-20 21:15:42] STEP 1: Querying latest payment | Data: {"user_id":"+201010101010"} +[2025-03-20 21:15:42] STEP 1: Payment found | Data: {"payment_id":"17","status":"1","amount":100} +[2025-03-20 21:15:42] STEP 2: Payment status verified | Data: {"status":"1"} +[2025-03-20 21:15:42] STEP 3: Calculating bonus | Data: {"amount":100} +[2025-03-20 21:15:42] STEP 3.1: Bonus calculation input | Data: {"amount":100} +[2025-03-20 21:15:42] STEP 3.2: Bonus calculation result | Data: {"input":100,"output":100} +[2025-03-20 21:15:42] STEP 3: Bonus calculated | Data: {"original_amount":100,"final_amount":100} +[2025-03-20 21:15:42] STEP 4: Generating payment token | Data: {"passengerId":"113172279072358305645","amount":100} +[2025-03-20 21:15:42] STEP 4.2: HTTP error in token generation | Data: {"http_code":401,"response":"{\"error\":\"Authorization token required\"}"} +[2025-03-20 21:15:42] STEP 4: Token generation failed +[2025-03-20 21:27:10] STEP 0: Request received | Data: {"user_id":"+201010101010","passengerId":"113172279072358305645"} +[2025-03-20 21:27:10] STEP 1: Querying latest payment | Data: {"user_id":"+201010101010"} +[2025-03-20 21:27:10] STEP 1: Payment found | Data: {"payment_id":"18","status":"1","amount":100} +[2025-03-20 21:27:10] STEP 2: Payment status verified | Data: {"status":"1"} +[2025-03-20 21:27:10] STEP 3: Calculating bonus | Data: {"amount":100} +[2025-03-20 21:27:10] STEP 3.1: Bonus calculation input | Data: {"amount":100} +[2025-03-20 21:27:10] STEP 3.2: Bonus calculation result | Data: {"input":100,"output":100} +[2025-03-20 21:27:10] STEP 3: Bonus calculated | Data: {"original_amount":100,"final_amount":100} +[2025-03-20 21:27:10] STEP 4: Generating payment token | Data: {"passengerId":"113172279072358305645","amount":100} +[2025-03-20 21:27:10] STEP 4: Token generated successfully | Data: {"token_length":64} +[2025-03-20 21:27:10] STEP 5: Adding balance to passenger wallet | Data: {"passengerId":"113172279072358305645","amount":100} +[2025-03-20 21:27:10] STEP 5: Balance added to passenger wallet | Data: {"status":"success","message":"Wallet record created successfully"} +[2025-03-20 21:27:10] STEP 6: Adding balance to Sefer wallet | Data: {"passengerId":"113172279072358305645","amount":100,"paymentMethod":"unknown"} +[2025-03-20 21:27:10] STEP 6.1: cURL error in Sefer wallet update | Data: {"error":"Could not resolve host: wallet.sefer.live","url":"https:\/\/wallet.sefer.live\/seferpw.shop\/sefer\/ride\/seferWallet\/add.php"} +[2025-03-20 21:27:10] STEP 6: Failed to add balance to Sefer wallet +[2025-03-20 21:31:51] STEP 0: Request received | Data: {"user_id":"+201010101010","passengerId":"113172279072358305645"} +[2025-03-20 21:31:51] STEP 1: Querying latest payment | Data: {"user_id":"+201010101010"} +[2025-03-20 21:31:51] STEP 1: Payment found | Data: {"payment_id":"19","status":"1","amount":100} +[2025-03-20 21:31:51] STEP 2: Payment status verified | Data: {"status":"1"} +[2025-03-20 21:31:51] STEP 3: Calculating bonus | Data: {"amount":100} +[2025-03-20 21:31:51] STEP 3.1: Bonus calculation input | Data: {"amount":100} +[2025-03-20 21:31:51] STEP 3.2: Bonus calculation result | Data: {"input":100,"output":100} +[2025-03-20 21:31:51] STEP 3: Bonus calculated | Data: {"original_amount":100,"final_amount":100} +[2025-03-20 21:31:51] STEP 4: Generating payment token | Data: {"passengerId":"113172279072358305645","amount":100} +[2025-03-20 21:31:51] STEP 4: Token generated successfully | Data: {"token_length":64} +[2025-03-20 21:31:51] STEP 5: Adding balance to passenger wallet | Data: {"passengerId":"113172279072358305645","amount":100} +[2025-03-20 21:31:51] STEP 5: Balance added to passenger wallet | Data: {"status":"success","message":"Wallet record created successfully"} +[2025-03-20 21:31:51] STEP 6: Adding balance to Sefer wallet | Data: {"passengerId":"113172279072358305645","amount":100,"paymentMethod":"unknown"} +[2025-03-20 21:31:51] STEP 6: Failed to add balance to Sefer wallet | Data: {"status":"failure","message":"Invalid or already used token"} +[2025-03-20 21:35:58] STEP 0: Request received | Data: {"user_id":"+201010101010","passengerId":"113172279072358305645"} +[2025-03-20 21:35:58] STEP 1: Querying latest payment | Data: {"user_id":"+201010101010"} +[2025-03-20 21:35:58] STEP 1: Payment found | Data: {"payment_id":"20","status":"1","amount":100} +[2025-03-20 21:35:58] STEP 2: Payment status verified | Data: {"status":"1"} +[2025-03-20 21:35:58] STEP 3: Calculating bonus | Data: {"amount":100} +[2025-03-20 21:35:58] STEP 3.1: Bonus calculation input | Data: {"amount":100} +[2025-03-20 21:35:58] STEP 3.2: Bonus calculation result | Data: {"input":100,"output":100} +[2025-03-20 21:35:58] STEP 3: Bonus calculated | Data: {"original_amount":100,"final_amount":100} +[2025-03-20 21:35:58] STEP 4: Generating payment token | Data: {"passengerId":"113172279072358305645","amount":100} +[2025-03-20 21:35:58] STEP 4: Token generated successfully | Data: {"token_length":64} +[2025-03-20 21:35:58] STEP 5: Adding balance to passenger wallet | Data: {"passengerId":"113172279072358305645","amount":100} +[2025-03-20 21:35:58] STEP 5: Balance added to passenger wallet | Data: {"status":"success","message":"Wallet record created successfully"} +[2025-03-20 21:35:58] STEP 6: Adding balance to Sefer wallet | Data: {"passengerId":"113172279072358305645","amount":100,"paymentMethod":"unknown"} +[2025-03-20 21:35:58] STEP 4: tokenSefer generated successfully | Data: {"token_length":64} +[2025-03-20 21:35:58] STEP 6: Failed to add balance to Sefer wallet | Data: {"status":"failure","message":"Invalid or already used token"} +[2025-03-20 21:52:30] STEP 0: Request received | Data: {"user_id":"+201010101010","passengerId":"113172279072358305645"} +[2025-03-20 21:52:30] STEP 1: Querying latest payment | Data: {"user_id":"+201010101010"} +[2025-03-20 21:52:30] STEP 1: Payment found | Data: {"payment_id":"21","status":"1","amount":100} +[2025-03-20 21:52:30] STEP 2: Payment status verified | Data: {"status":"1"} +[2025-03-20 21:52:30] STEP 3: Calculating bonus | Data: {"amount":100} +[2025-03-20 21:52:30] STEP 3.1: Bonus calculation input | Data: {"amount":100} +[2025-03-20 21:52:30] STEP 3.2: Bonus calculation result | Data: {"input":100,"output":100} +[2025-03-20 21:52:30] STEP 3: Bonus calculated | Data: {"original_amount":100,"final_amount":100} +[2025-03-20 21:52:30] STEP 4: Generating payment token | Data: {"passengerId":"113172279072358305645","amount":100} +[2025-03-20 21:52:30] STEP 4: Token generated successfully | Data: {"token_length":64} +[2025-03-20 21:52:30] STEP 5: Adding balance to passenger wallet | Data: {"passengerId":"113172279072358305645","amount":100} +[2025-03-20 21:52:30] STEP 5: Balance added to passenger wallet | Data: {"status":"success","message":"Wallet record created successfully"} +[2025-03-20 21:52:30] STEP 6: Adding balance to Sefer wallet | Data: {"passengerId":"113172279072358305645","amount":100,"paymentMethod":"unknown"} +[2025-03-20 21:52:30] STEP 4: tokenSefer generated successfully | Data: {"token_length":64} +[2025-03-20 21:52:30] STEP 6: Failed to add balance to Sefer wallet | Data: {"status":"failure","message":"Invalid or already used token"} +[2025-03-20 22:09:36] STEP 0: Request received | Data: {"user_id":"+201010101010","passengerId":"113172279072358305645"} +[2025-03-20 22:09:36] STEP 1: Querying latest payment | Data: {"user_id":"+201010101010"} +[2025-03-20 22:09:36] STEP 1: Payment found | Data: {"payment_id":"22","status":"1","amount":200} +[2025-03-20 22:09:36] STEP 2: Payment status verified | Data: {"status":"1"} +[2025-03-20 22:09:36] STEP 3: Calculating bonus | Data: {"amount":200} +[2025-03-20 22:09:36] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-20 22:09:36] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-20 22:09:36] STEP 3: Bonus calculated | Data: {"original_amount":200,"final_amount":215} +[2025-03-20 22:09:36] STEP 4: Generating payment token | Data: {"passengerId":"113172279072358305645","amount":215} +[2025-03-20 22:09:36] STEP 4: Token generated successfully | Data: {"token_length":64} +[2025-03-20 22:09:36] STEP 5: Adding balance to passenger wallet | Data: {"passengerId":"113172279072358305645","amount":215} +[2025-03-20 22:09:36] STEP 5: Balance added to passenger wallet | Data: {"status":"success","message":"Wallet record created successfully"} +[2025-03-20 22:09:36] STEP 6: Adding balance to Sefer wallet | Data: {"passengerId":"113172279072358305645","amount":215,"paymentMethod":null} +[2025-03-20 22:09:36] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":64} +[2025-03-20 22:09:36] STEP 6: Failed to add balance to Sefer wallet | Data: {"status":"failure","message":"Invalid or already used token"} +[2025-03-20 22:19:03] STEP 0: Request received | Data: {"user_id":"+201010101010","passengerId":"113172279072358305645"} +[2025-03-20 22:19:03] STEP 1: Querying latest payment | Data: {"user_id":"+201010101010"} +[2025-03-20 22:19:03] STEP 1: Payment found | Data: {"payment_id":"23","status":"1","amount":200} +[2025-03-20 22:19:03] STEP 2: Payment status verified | Data: {"status":"1"} +[2025-03-20 22:19:03] STEP 3: Calculating bonus | Data: {"amount":200} +[2025-03-20 22:19:03] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-20 22:19:03] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-20 22:19:03] STEP 3: Bonus calculated | Data: {"original_amount":200,"final_amount":215} +[2025-03-20 22:19:03] STEP 4: Generating payment token | Data: {"passengerId":"113172279072358305645","amount":215} +[2025-03-20 22:19:03] STEP 4: Token generated successfully | Data: {"token_length":64} +[2025-03-20 22:19:03] STEP 5: Adding balance to passenger wallet | Data: {"passengerId":"113172279072358305645","amount":215} +[2025-03-20 22:19:03] STEP 5: Balance added to passenger wallet | Data: {"status":"success","message":"Wallet record created successfully"} +[2025-03-20 22:19:03] STEP 6: Adding balance to Sefer wallet | Data: {"passengerId":"113172279072358305645","amount":215,"paymentMethod":null} +[2025-03-20 22:19:03] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"e8131e30ba2ccef8c2f15cd03fa15d6151ca6e3fbc60778b9ad6fb5e105f383d"} +[2025-03-20 22:19:03] STEP 6.2: HTTP error in Sefer wallet update | Data: {"http_code":401,"response":"{\"error\":\"Authorization token required\"}"} +[2025-03-20 22:19:03] STEP 6: Failed to add balance to Sefer wallet +[2025-03-20 22:24:40] STEP 0: Request received | Data: {"user_id":"+201010101010","passengerId":"113172279072358305645"} +[2025-03-20 22:24:40] STEP 1: Querying latest payment | Data: {"user_id":"+201010101010"} +[2025-03-20 22:24:40] STEP 1: Payment found | Data: {"payment_id":"24","status":"1","amount":200} +[2025-03-20 22:24:40] STEP 2: Payment status verified | Data: {"status":"1"} +[2025-03-20 22:24:40] STEP 3: Calculating bonus | Data: {"amount":200} +[2025-03-20 22:24:40] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-20 22:24:40] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-20 22:24:40] STEP 3: Bonus calculated | Data: {"original_amount":200,"final_amount":215} +[2025-03-20 22:24:40] STEP 4: Generating payment token | Data: {"passengerId":"113172279072358305645","amount":215} +[2025-03-20 22:24:40] STEP 4: Token generated successfully | Data: {"token_length":64} +[2025-03-20 22:24:40] STEP 5: Adding balance to passenger wallet | Data: {"passengerId":"113172279072358305645","amount":215} +[2025-03-20 22:24:40] STEP 5: Balance added to passenger wallet | Data: {"status":"success","message":"Wallet record created successfully"} +[2025-03-20 22:24:40] STEP 6: Adding balance to Sefer wallet | Data: {"passengerId":"113172279072358305645","amount":215,"paymentMethod":"visa-in"} +[2025-03-20 22:24:40] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"9d924a59964a75c672502e0a961e79bcdb23d62f6fadfe2aa6b5cac145022015"} +[2025-03-20 22:24:40] STEP 6: Failed to add balance to Sefer wallet | Data: {"status":"failure","message":"Invalid or already used token"} +[2025-03-20 22:38:27] STEP 0: Request received | Data: {"user_id":"+201010101010","passengerId":"113172279072358305645"} +[2025-03-20 22:38:27] STEP 1: Querying latest payment | Data: {"user_id":"+201010101010"} +[2025-03-20 22:38:27] STEP 1: Payment found | Data: {"payment_id":"25","status":"1","amount":200} +[2025-03-20 22:38:27] STEP 2: Payment status verified | Data: {"status":"1"} +[2025-03-20 22:38:27] STEP 3: Calculating bonus | Data: {"amount":200} +[2025-03-20 22:38:27] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-20 22:38:27] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-20 22:38:27] STEP 3: Bonus calculated | Data: {"original_amount":200,"final_amount":215} +[2025-03-20 22:38:27] STEP 4: Generating payment token | Data: {"passengerId":"113172279072358305645","amount":215} +[2025-03-20 22:38:27] STEP 4: Token generated successfully | Data: {"token_length":64} +[2025-03-20 22:38:27] STEP 5: Adding balance to passenger wallet | Data: {"passengerId":"113172279072358305645","amount":215} +[2025-03-20 22:38:27] STEP 5: Balance added to passenger wallet | Data: {"status":"success","message":"Wallet record created successfully"} +[2025-03-20 22:38:27] STEP 6: Adding balance to Sefer wallet | Data: {"passengerId":"113172279072358305645","amount":215,"paymentMethod":"visa-in"} +[2025-03-20 22:38:27] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"d0b8b5d6e25d74038ff96d9bb61533213536049fc99484df751cbff86f354058"} +[2025-03-20 22:38:27] STEP 6: Failed to add balance to Sefer wallet | Data: {"status":"failure","message":"Invalid or already used token"} +[2025-03-20 22:45:51] STEP 0: Request received | Data: {"user_id":"+201010101010","passengerId":"113172279072358305645"} +[2025-03-20 22:45:51] STEP 1: Querying latest payment | Data: {"user_id":"+201010101010"} +[2025-03-20 22:45:51] STEP 1: Payment found | Data: {"payment_id":"26","status":"1","amount":200} +[2025-03-20 22:45:51] STEP 2: Payment status verified | Data: {"status":"1"} +[2025-03-20 22:45:51] STEP 3: Calculating bonus | Data: {"amount":200} +[2025-03-20 22:45:51] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-20 22:45:51] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-20 22:45:51] STEP 3: Bonus calculated | Data: {"original_amount":200,"final_amount":215} +[2025-03-20 22:45:51] STEP 4: Generating payment token | Data: {"passengerId":"113172279072358305645","amount":215} +[2025-03-20 22:45:51] STEP 4: Token generated successfully | Data: {"token_length":64} +[2025-03-20 22:45:51] STEP 5: Adding balance to passenger wallet | Data: {"passengerId":"113172279072358305645","amount":215} +[2025-03-20 22:45:51] STEP 5: Balance added to passenger wallet | Data: {"status":"success","message":"Wallet record created successfully"} +[2025-03-20 22:45:51] STEP 6: Adding balance to Sefer wallet | Data: {"passengerId":"113172279072358305645","amount":215,"paymentMethod":"visa-in"} +[2025-03-20 22:45:51] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"698f6808c38e9075e74513a21a2b8255c9b04c1473be5fb9bc559488e3a29c1f"} +[2025-03-20 22:45:51] STEP 6: Failed to add balance to Sefer wallet | Data: {"status":"failure","message":"Invalid or already used token"} +[2025-03-20 22:48:56] STEP 0: Request received | Data: {"user_id":"+201010101010","passengerId":"113172279072358305645"} +[2025-03-20 22:48:56] STEP 1: Querying latest payment | Data: {"user_id":"+201010101010"} +[2025-03-20 22:48:56] STEP 1: Payment found | Data: {"payment_id":"27","status":"1","amount":200} +[2025-03-20 22:48:56] STEP 2: Payment status verified | Data: {"status":"1"} +[2025-03-20 22:48:56] STEP 3: Calculating bonus | Data: {"amount":200} +[2025-03-20 22:48:56] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-20 22:48:56] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-20 22:48:56] STEP 3: Bonus calculated | Data: {"original_amount":200,"final_amount":215} +[2025-03-20 22:48:56] STEP 4: Generating payment token | Data: {"passengerId":"113172279072358305645","amount":215} +[2025-03-20 22:48:56] STEP 4: Token generated successfully | Data: {"token_length":64} +[2025-03-20 22:48:56] STEP 5: Adding balance to passenger wallet | Data: {"passengerId":"113172279072358305645","amount":215} +[2025-03-20 22:48:56] STEP 5: Balance added to passenger wallet | Data: {"status":"success","message":"Wallet record created successfully"} +[2025-03-20 22:48:56] STEP 6: Adding balance to Sefer wallet | Data: {"passengerId":"113172279072358305645","amount":215,"paymentMethod":"visa-in"} +[2025-03-20 22:48:56] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"86128c316f4f275e543fc07b7a171c39a1c92b81fcadd1548f6c150a1651d1f4"} +[2025-03-20 22:48:56] STEP 6.2: HTTP error in Sefer wallet update | Data: {"http_code":500,"response":""} +[2025-03-20 22:48:56] STEP 6: Failed to add balance to Sefer wallet +[2025-03-20 22:51:43] STEP 0: Request received | Data: {"user_id":"+201010101010","passengerId":"113172279072358305645"} +[2025-03-20 22:51:43] STEP 1: Querying latest payment | Data: {"user_id":"+201010101010"} +[2025-03-20 22:51:43] STEP 1: Payment found | Data: {"payment_id":"28","status":"1","amount":200} +[2025-03-20 22:51:43] STEP 2: Payment status verified | Data: {"status":"1"} +[2025-03-20 22:51:43] STEP 3: Calculating bonus | Data: {"amount":200} +[2025-03-20 22:51:43] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-20 22:51:43] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-20 22:51:43] STEP 3: Bonus calculated | Data: {"original_amount":200,"final_amount":215} +[2025-03-20 22:51:43] STEP 4: Generating payment token | Data: {"passengerId":"113172279072358305645","amount":215} +[2025-03-20 22:51:43] STEP 4: Token generated successfully | Data: {"token_length":64} +[2025-03-20 22:51:43] STEP 5: Adding balance to passenger wallet | Data: {"passengerId":"113172279072358305645","amount":215} +[2025-03-20 22:51:43] STEP 5: Balance added to passenger wallet | Data: {"status":"success","message":"Wallet record created successfully"} +[2025-03-20 22:51:43] STEP 6: Adding balance to Sefer wallet | Data: {"passengerId":"113172279072358305645","amount":215,"paymentMethod":"visa-in"} +[2025-03-20 22:51:43] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"9a7626a1c58f54e0181a059a9ce4758af2c75998941cc6c00947377b4fc5bacf"} +[2025-03-20 22:51:43] STEP 6.2: HTTP error in Sefer wallet update | Data: {"http_code":500,"response":""} +[2025-03-20 22:51:43] STEP 6: Failed to add balance to Sefer wallet +[2025-03-20 22:54:12] STEP 0: Request received | Data: {"user_id":"+201010101010","passengerId":"113172279072358305645"} +[2025-03-20 22:54:12] STEP 1: Querying latest payment | Data: {"user_id":"+201010101010"} +[2025-03-20 22:54:12] STEP 1: Payment found | Data: {"payment_id":"29","status":"1","amount":200} +[2025-03-20 22:54:12] STEP 2: Payment status verified | Data: {"status":"1"} +[2025-03-20 22:54:12] STEP 3: Calculating bonus | Data: {"amount":200} +[2025-03-20 22:54:12] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-20 22:54:12] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-20 22:54:12] STEP 3: Bonus calculated | Data: {"original_amount":200,"final_amount":215} +[2025-03-20 22:54:12] STEP 4: Generating payment token | Data: {"passengerId":"113172279072358305645","amount":215} +[2025-03-20 22:54:12] STEP 4: Token generated successfully | Data: {"token_length":64} +[2025-03-20 22:54:12] STEP 5: Adding balance to passenger wallet | Data: {"passengerId":"113172279072358305645","amount":215} +[2025-03-20 22:54:12] STEP 5: Balance added to passenger wallet | Data: {"status":"success","message":"Wallet record created successfully"} +[2025-03-20 22:54:12] STEP 6: Adding balance to Sefer wallet | Data: {"passengerId":"113172279072358305645","amount":215,"paymentMethod":"visa-in"} +[2025-03-20 22:54:12] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"7f955f629d5da0ec127b6c0b32de0fa44aeaad9c9ec8231418905c8031c94316"} +[2025-03-20 22:54:12] STEP 6: Balance added to Sefer wallet | Data: {"status":"success","message":"Wallet data saved successfully"} +[2025-03-20 22:54:12] STEP 7: Process completed successfully | Data: {"payment_id":"29","amount":215,"passengerId":"113172279072358305645"} +[2025-03-20 23:00:11] STEP 0: Request received | Data: {"user_id":"+201010101010","passengerId":"113172279072358305645"} +[2025-03-20 23:00:11] STEP 1: Querying latest payment | Data: {"user_id":"+201010101010"} +[2025-03-20 23:00:11] STEP 1: Payment found | Data: {"payment_id":"30","status":"1","amount":200} +[2025-03-20 23:00:11] STEP 2: Payment status verified | Data: {"status":"1"} +[2025-03-20 23:00:11] STEP 3: Calculating bonus | Data: {"amount":200} +[2025-03-20 23:00:11] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-20 23:00:11] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-20 23:00:11] STEP 3: Bonus calculated | Data: {"original_amount":200,"final_amount":215} +[2025-03-20 23:00:11] STEP 4: Generating payment token | Data: {"passengerId":"113172279072358305645","amount":215} +[2025-03-20 23:00:11] STEP 4: Token generated successfully | Data: {"token_length":64} +[2025-03-20 23:00:11] STEP 5: Adding balance to passenger wallet | Data: {"passengerId":"113172279072358305645","amount":215} +[2025-03-20 23:00:11] STEP 5: Balance added to passenger wallet | Data: {"status":"success","message":"Wallet record created successfully"} +[2025-03-20 23:00:11] STEP 6: Adding balance to Sefer wallet | Data: {"passengerId":"113172279072358305645","amount":215,"paymentMethod":"visa-in"} +[2025-03-20 23:00:11] STEP 4: Token generated successfully | Data: {"token_length":64} +[2025-03-20 23:00:11] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"5c6d19041cfab3851040212ccf045f21be41c84c5d736dfc58b2da7eb3c8854a"} +[2025-03-20 23:00:11] STEP 6: Balance added to Sefer wallet | Data: {"status":"success","message":"Wallet data saved successfully"} +[2025-03-20 23:00:11] STEP 7: Process completed successfully | Data: {"payment_id":"30","amount":215,"passengerId":"113172279072358305645"} +[2025-03-20 23:07:14] STEP 0: Request received | Data: {"user_id":"+201010101010","passengerId":"113172279072358305645"} +[2025-03-20 23:07:14] STEP 1: Querying latest payment | Data: {"user_id":"+201010101010"} +[2025-03-20 23:07:14] STEP 1: Payment found | Data: {"payment_id":"31","status":"1","amount":200} +[2025-03-20 23:07:14] STEP 2: Payment status verified | Data: {"status":"1"} +[2025-03-20 23:07:14] STEP 3: Calculating bonus | Data: {"amount":200} +[2025-03-20 23:07:14] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-20 23:07:14] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-20 23:07:14] STEP 3: Bonus calculated | Data: {"original_amount":200,"final_amount":215} +[2025-03-20 23:07:14] STEP 4: Generating payment token | Data: {"passengerId":"113172279072358305645","amount":215} +[2025-03-20 23:07:14] STEP 4: Token generated successfully | Data: {"token_length":64} +[2025-03-20 23:07:14] STEP 5: Adding balance to passenger wallet | Data: {"passengerId":"113172279072358305645","amount":215} +[2025-03-20 23:07:14] STEP 5: Balance added to passenger wallet | Data: {"status":"success","message":"Wallet record created successfully"} +[2025-03-20 23:07:14] STEP 6: Adding balance to Sefer wallet | Data: {"passengerId":"113172279072358305645","amount":215,"paymentMethod":"visa-in"} +[2025-03-20 23:07:14] STEP 4: Token generated successfully | Data: {"token_length":64} +[2025-03-20 23:07:14] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"b912396d32c1b398d65e4459ac945079025840776db6feb34a9cc4f06b60191a"} +[2025-03-20 23:07:14] STEP 6: Balance added to Sefer wallet | Data: {"status":"success","message":"Wallet data saved successfully"} +[2025-03-20 23:07:14] STEP 7: Process completed successfully | Data: {"payment_id":"31","amount":215,"passengerId":"113172279072358305645"} +[2025-03-20 23:13:05] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-20 23:13:05] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-20 23:13:05] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"3b68024312f568ea264d279280d9a6164a4a272531b21678d6a5e556816a7592"} +[2025-03-20 23:28:20] STEP 0: Request received | Data: {"user_id":"+201010101010","passengerId":"113172279072358305645"} +[2025-03-20 23:28:20] STEP 1: Querying latest payment | Data: {"user_id":"+201010101010"} +[2025-03-20 23:28:20] STEP 1: Payment found | Data: {"payment_id":"36","status":"1","amount":200} +[2025-03-20 23:28:20] STEP 2: Payment status verified | Data: {"status":"1"} +[2025-03-20 23:28:20] STEP 3: Calculating bonus | Data: {"amount":200} +[2025-03-20 23:28:20] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-20 23:28:20] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-20 23:28:20] STEP 3: Bonus calculated | Data: {"original_amount":200,"final_amount":215} +[2025-03-20 23:28:20] STEP 4: Generating payment token | Data: {"passengerId":"113172279072358305645","amount":215} +[2025-03-20 23:28:20] STEP 4: Token generated successfully | Data: {"token_length":64} +[2025-03-20 23:28:20] STEP 5: Adding balance to passenger wallet | Data: {"passengerId":"113172279072358305645","amount":215} +[2025-03-20 23:28:20] STEP 5: Balance added to passenger wallet | Data: {"status":"success","message":"Wallet record created successfully"} +[2025-03-20 23:28:20] STEP 6: Adding balance to Sefer wallet | Data: {"passengerId":"113172279072358305645","amount":215,"paymentMethod":"visa-in"} +[2025-03-20 23:28:20] STEP 4: Token generated successfully | Data: {"token_length":64} +[2025-03-20 23:28:20] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"b0f64da4cfca1bf153c523a03cd692b8f1a44c09674683df5406dcd6c874f00d"} +[2025-03-20 23:28:20] STEP 6: Balance added to Sefer wallet | Data: {"status":"success","message":"Wallet data saved successfully"} +[2025-03-20 23:28:20] STEP 7: Process completed successfully | Data: {"payment_id":"36","amount":215,"passengerId":"113172279072358305645"} +[2025-03-20 23:31:52] STEP 0: Request received | Data: {"user_id":"+201010101010","passengerId":"113172279072358305645"} +[2025-03-20 23:31:52] STEP 1: Querying latest payment | Data: {"user_id":"+201010101010"} +[2025-03-20 23:31:52] STEP 1: Payment found | Data: {"payment_id":"37","status":"1","amount":200} +[2025-03-20 23:31:52] STEP 2: Payment status verified | Data: {"status":"1"} +[2025-03-20 23:31:52] STEP 3: Calculating bonus | Data: {"amount":200} +[2025-03-20 23:31:52] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-20 23:31:52] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-20 23:31:52] STEP 3: Bonus calculated | Data: {"original_amount":200,"final_amount":215} +[2025-03-20 23:31:52] STEP 4: Generating payment token | Data: {"passengerId":"113172279072358305645","amount":215} +[2025-03-20 23:31:52] STEP 4: Token generated successfully | Data: {"token_length":64} +[2025-03-20 23:31:52] STEP 5: Adding balance to passenger wallet | Data: {"passengerId":"113172279072358305645","amount":215} +[2025-03-20 23:31:52] STEP 5: Balance added to passenger wallet | Data: {"status":"success","message":"Wallet record created successfully"} +[2025-03-20 23:31:52] STEP 6: Adding balance to Sefer wallet | Data: {"passengerId":"113172279072358305645","amount":215,"paymentMethod":"visa-in"} +[2025-03-20 23:31:52] STEP 4: Token generated successfully | Data: {"token_length":64} +[2025-03-20 23:31:52] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"dc156df7310f9ce998bf0fae3a325a716ec7806ff037021c4b12b3b800f37bf2"} +[2025-03-20 23:31:52] STEP 6: Balance added to Sefer wallet | Data: {"status":"success","message":"Wallet data saved successfully"} +[2025-03-20 23:31:52] STEP 7: Process completed successfully | Data: {"payment_id":"37","amount":215,"passengerId":"113172279072358305645"} +[2025-03-20 23:49:27] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-20 23:49:27] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-20 23:49:27] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"172ea88c6fc36188b435508f8f434736cc58f2b75feb54e6b8fa1674d4a9910a"} +[2025-03-21 09:32:00] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-21 09:32:00] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-21 09:32:00] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"6ad135e7b01bf9c1ab99f68d0dead8f91bc93588c173d837a8f3ce77e96c6eee"} +[2025-03-21 09:33:06] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-21 09:33:06] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-21 09:33:06] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"4ebb300836e9cb522a0afd422e818c2603fda11ef52e050a78624f728b994f01"} +[2025-03-21 09:41:54] STEP 1: No payment found | Data: {"user_id":"+201010101010"} +[2025-03-21 09:45:44] STEP 1: No payment found | Data: {"user_id":"+201010101010"} +[2025-03-21 09:48:54] STEP 1: No payment found | Data: {"user_id":"+201010101010"} +[2025-03-21 11:30:48] STEP 1: No payment found | Data: {"user_id":"+201010101010"} +[2025-03-21 11:37:18] STEP 1: No payment found | Data: {"user_id":"+201010101010"} +[2025-03-21 12:19:24] STEP 1: No payment found | Data: {"user_id":"+201010101010"} +[2025-03-21 12:20:48] STEP 1: No payment found | Data: {"user_id":"+201010101010"} +[2025-03-21 12:22:09] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-21 12:22:09] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-21 12:22:09] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"a5589a7714ea56acd72341a0c14079d3b8d548dbef885a2f71ea19cd20325c91"} +[2025-03-21 12:37:16] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-21 12:37:16] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-21 12:37:17] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"d6f2e4bc82d052bcba3d287e5c4f3465ad8f3707ee739692e2832a5b9dc131c6"} +[2025-03-21 12:49:11] STEP 1: No payment found | Data: {"user_id":"+201010101010"} +[2025-03-21 12:51:03] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-21 12:51:03] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-21 12:51:04] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"3081636c569695289e5484b738d6cf63bd015505490b3c94841538767ff2f058"} +[2025-03-21 14:04:09] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-21 14:04:09] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-21 14:04:10] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"67e48b2025ea10823d2c37eb9f821963efff9fa26b5e41d5b1d391376a31b59a"} +[2025-03-21 14:07:48] STEP 1: No payment found | Data: {"user_id":"+201010101010"} +[2025-03-21 14:17:03] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-21 14:17:03] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-21 14:17:03] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"e952b7b4417a71eaff2b348e8241c4a63d97b12d4ad1d79acfb5cce1992a2acd"} +[2025-03-21 14:24:19] STEP 1: No payment found | Data: {"user_id":"+201010101010"} +[2025-03-21 14:28:35] STEP 1: No payment found | Data: {"user_id":"+201010101010"} +[2025-03-21 14:32:45] STEP 1: No payment found | Data: {"user_id":"+201010101010"} +[2025-03-21 14:37:37] STEP 1: No payment found | Data: {"user_id":"+201010101010"} +[2025-03-21 14:38:56] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-21 14:38:56] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-21 14:38:56] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"a8aad013fb6332aef78521c6cccff74485c158bbdb3242e51e66ab7f1059e4c9"} +[2025-03-21 14:42:15] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-21 14:42:15] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-21 14:42:15] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"2803a235094afa54c82ad250292f15a121f524bf4c109df32342068a03c9c212"} +[2025-03-21 14:45:52] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-21 14:45:52] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-21 14:45:52] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"1e6a84b59f5580fb4fe52248222620c7cb3c44f8edfeb0db0003192a90403aa3"} +[2025-03-21 14:54:41] STEP 1: No payment found | Data: {"user_id":"+201010101010"} +[2025-03-21 14:59:31] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-21 14:59:31] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-21 14:59:31] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"7dee4184aa286693ef8e3a2c4fe03b103d6ff8348198f5faa6bfc91c4ed6ae21"} +[2025-03-21 15:19:15] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-21 15:19:15] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-21 15:19:15] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"0ebad59f5b4b439fae5e5e8f6fa65e816ac5943e724ef1758dc714bdea39bdb8"} +[2025-03-21 15:21:45] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-21 15:21:45] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-21 15:21:45] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"abfb981f8fbfba8cf3591c502d27a9b03066d909c95f44b3adfee6b01523e4df"} +[2025-03-21 15:23:37] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-21 15:23:37] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-21 15:23:37] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"c0775be365dbad9fc99ee84786b7101d4bbd51bf4d8b29475e7407b350a5873f"} +[2025-03-21 15:28:30] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-21 15:28:30] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-21 15:28:31] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"51181d3015c2756d256569e96ec7221b34aba737483a3f8e92858840c50441ae"} +[2025-03-21 15:28:55] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-21 15:28:55] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-21 15:28:55] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"6a3c946d98dbc3ed66e8e30b80c56fc8925073fce70105260c64bc86c1e5cd6c"} +[2025-03-21 15:35:16] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-21 15:35:16] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-21 15:35:16] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"b4f3b175044981388b0ecd6cf9f7f9713f591f20c58e55a977c9be9029a45fb4"} +[2025-03-21 15:38:43] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-21 15:38:43] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-21 15:38:43] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"de17e4d8db68e3e0649d6515937fa1ef8464a47bef52a8178a751e54d1fde4e3"} +[2025-03-21 15:39:48] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-21 15:39:48] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-21 15:39:48] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"cf0b6242a0c25023b69dfdfa17ee4ff5c4e265e0b1ae43276891347f08f6d648"} +[2025-03-21 15:43:53] STEP 1: No payment found | Data: {"user_id":"+201010101010"} +[2025-03-21 15:44:58] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-21 15:44:58] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-21 15:44:59] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"fc66691cf53e4f559b3ff957a13384a84052ca52b191de3c5a76ed5572827e2e"} +[2025-03-21 15:47:30] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-21 15:47:30] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-21 15:47:30] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"c16c271306018e5791ba0e0ca8012ba4c3674837bec30164c39a61e0715f7124"} +[2025-03-21 15:49:41] STEP 3.1: Bonus calculation input | Data: {"amount":200} +[2025-03-21 15:49:41] STEP 3.2: Bonus calculation result | Data: {"input":200,"output":215} +[2025-03-21 15:49:41] STEP 6.0.2: Generated new Sefer token | Data: {"token_length":"2d2024c3b3954388a45dc40ec0ac8a62af917975def467636a26ee14ca97c8b9"} +[2025-03-21 16:36:27] STEP 1: No payment found | Data: {"user_id":"+201010101010"} diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/logs/payment_verification_driver.log b/walletintaleq.intaleq.xyz/v2/main/ride/logs/payment_verification_driver.log new file mode 100755 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/mtn/driver/confirm_payment.php b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/driver/confirm_payment.php new file mode 100755 index 0000000..429ac56 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/driver/confirm_payment.php @@ -0,0 +1,125 @@ +<?php +// /v1/main/ride/mtn/driver/confirm_payment.php +include "../../../connect.php"; + +// It's better to use __DIR__ for reliable file path resolution. +// Assuming your private_key.pem is in the same directory as this script. +$privateKeyPath = __DIR__ . "/private_key.pem"; + +$baseUrl = rtrim(getenv('MTN_API_BASE_URL'), '/'); +$terminalId = getenv('MTN_TERMINAL_ID'); +$privateKey = openssl_pkey_get_private(file_get_contents($privateKeyPath)); + +$invoice = filterRequest('invoiceNumber'); +$phone = filterRequest('phone'); +$guid = filterRequest('guid'); +$operationNumber = filterRequest('operationNumber'); +$code = filterRequest('otp'); // The OTP + +error_log("MTN Confirm (Driver): Start request for invoice={$invoice}, phone={$phone}, guid={$guid}, opNum={$operationNumber}"); + +if (!$invoice || !$phone || !$guid || !$operationNumber || !$code) { + error_log("MTN Confirm (Driver): Missing parameters"); + printFailure("Missing parameters."); + exit; +} + +// Encrypt the code +$hashBin = hash('sha256', $code, true); +$codeB64 = base64_encode($hashBin); + +$body = [ + 'Invoice' => intval($invoice), + 'Phone' => $phone, + 'Guid' => $guid, + 'OperationNumber' => intval($operationNumber), + 'Code' => $codeB64 +]; +$bodyJson = json_encode($body, JSON_UNESCAPED_UNICODE); + +error_log("MTN Confirm (Driver): Prepared body JSON: " . $bodyJson); + +// Generate signature +$signResult = openssl_sign($bodyJson, $sig, $privateKey, OPENSSL_ALGO_SHA256); +if (!$signResult) { + error_log("MTN Confirm (Driver): Failed to generate signature"); + printFailure("Signature error."); + exit; +} +$xSignature = base64_encode($sig); +error_log("MTN Confirm (Driver): Generated signature"); + +// Send the request +$ch = curl_init("{$baseUrl}/pos_web/payment_phone/confirm"); +curl_setopt_array($ch, [ + CURLOPT_POST => true, + CURLOPT_POSTFIELDS => $bodyJson, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_HTTPHEADER => [ + "Content-Type: application/json", + "Request-Name: pos_web/payment_phone/confirm", + "Subject: {$terminalId}", + "X-Signature: {$xSignature}" + ] +]); + +$response = curl_exec($ch); +$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); +$curlError = curl_error($ch); +curl_close($ch); + +error_log("MTN Confirm (Driver): HTTP $httpCode - Response: $response"); +if ($curlError) { + error_log("MTN Confirm (Driver): cURL error - $curlError"); +} + +// --- SOLUTION IMPLEMENTED HERE --- +// 1. Decode the response from MTN to check its contents. +$responseData = json_decode($response, true) ?: []; + +// 2. First, check for network/gateway level failure. +if ($httpCode !== 200) { + error_log("MTN Confirm (Driver): HTTP failure for invoice {$invoice}. Code: {$httpCode}"); + // Use printFailure to send a structured error to Flutter + printFailure(['message' => 'MTN Gateway Error', 'http' => $httpCode, 'details' => $responseData]); + exit; +} + +// 3. Now, check for business-logic failure (like "Balance not enough"). +$errno = $responseData['Errno'] ?? -1; // Default to an error state if Errno is missing +if ($errno !== 0) { + $apiError = $responseData['Error'] ?? 'Unknown MTN API Error'; + error_log("MTN Confirm (Driver): Business failure for invoice {$invoice}. Errno: {$errno}, Reason: {$apiError}"); + // This now sends the specific error message in the format Flutter expects! + printFailure(['message' => $apiError, 'errno' => $errno, 'details' => $responseData]); + exit; +} + +// --- ONLY PROCEED TO DATABASE ON FULL SUCCESS (HTTP 200 AND Errno 0) --- +try { + $stmt = $con->prepare( + "UPDATE `paymentsLogSyriaDriver` SET status = 1, updated_at = NOW() + WHERE order_ref = :inv" + ); + $stmt->execute([':inv' => $invoice]); + error_log("MTN Confirm (Driver): Payment updated successfully in DB for invoice={$invoice}"); + + // The file path correction from before remains important. + include_once __DIR__ . '/finalize_wallet_payment.php'; + + // Call the wallet finalization logic + if (function_exists('finalizeWalletPayment')) { + $_GET['orderRef'] = $invoice; + finalizeWalletPayment($con); + } else { + error_log("MTN Confirm (Driver): FATAL - finalizeWalletPayment() function does not exist after include."); + } + + // On success, send a success response to Flutter + printSuccess(['message' => 'Payment confirmed successfully', 'details' => $responseData]); + +} catch (PDOException $e) { + error_log("MTN Confirm (Driver): DB update error - " . $e->getMessage()); + printFailure("Database processing error."); +} + diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/mtn/driver/finalize_wallet_payment.php b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/driver/finalize_wallet_payment.php new file mode 100755 index 0000000..1c37d73 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/driver/finalize_wallet_payment.php @@ -0,0 +1,103 @@ +<?php +// wallet/finalize_wallet_payment.php +include_once "../../../jwtconnect.php"; + +define("LOG_FILE", "../logs/payment_verification.log"); + +function logError($step, $message, $data = null) { + $logDir = dirname(LOG_FILE); + if (!is_dir($logDir)) { mkdir($logDir, 0755, true); } + $logEntry = "[" . date('Y-m-d H:i:s') . "] STEP {$step}: {$message}"; + if ($data !== null) { $logEntry .= " | Data: " . json_encode($data, JSON_UNESCAPED_UNICODE); } + file_put_contents(LOG_FILE, $logEntry . PHP_EOL, FILE_APPEND); +} + +function generateToken($con, $driverId, $amount): ?string { + global $secretKey; + $data = $driverId . $amount . time() . ($secretKey ?? 'default_secret'); + $hash = hash('sha256', $data); + $randomBytes = bin2hex(random_bytes(16)); + $token = substr($hash . $randomBytes, 0, 64); + + $stmt = $con->prepare("INSERT INTO payment_tokens (token, driverID, dateCreated, amount) VALUES (:token, :driverID, NOW(), :amount)"); + $stmt->execute([':token' => $token, ':driverID' => $driverId, ':amount' => $amount]); + return $stmt->rowCount() > 0 ? $token : null; +} + +function generatePaymentID($con, $driverId, $amount, $method): ?string { + $stmt = $con->prepare("INSERT INTO paymentsDriverPoints (`amount`, `payment_method`, `driverID`) VALUES (:amount, :method, :driverID)"); + $stmt->execute([':driverID' => $driverId, ':amount' => $amount, ':method' => $method]); + return $stmt->rowCount() > 0 ? $con->lastInsertId() : null; +} + +function finalizeWalletPayment($con) { + $orderRef = $_GET['orderRef'] ?? null; + if (empty($orderRef)) { + logError("FINALIZE", "Missing orderRef"); + return; + } + + // 1. تحقق من الدفع + $stmt = $con->prepare("SELECT * FROM `paymentsLogSyriaDriver` WHERE order_ref = :order_ref AND status = 1 LIMIT 1"); + $stmt->execute([':order_ref' => $orderRef]); + $payment = $stmt->fetch(PDO::FETCH_ASSOC); + + if (!$payment) { + logError("FINALIZE", "Payment not found or not completed", ['orderRef' => $orderRef]); + return; + } + + try { + $driverId = $payment['user_id']; + $originalAmount = floatval($payment['amount']); + $paymentMethod = $payment['payment_method'] ?? 'ecash'; + + // حساب المكافأة + $bonusAmount = match ((int)$originalAmount) { + 10000 => 10000.0, + 20000 => 21000.0, + 40000 => 45000.0, + 100000 => 110000.0, + default => $originalAmount, + }; + + // إنشاء التوكنات + $tokenDriver = generateToken($con, $driverId, $bonusAmount); + if (!$tokenDriver) throw new Exception('Failed to generate driver token'); + + $tokenSefer = generateToken($con, $driverId, $originalAmount); + if (!$tokenSefer) throw new Exception('Failed to generate sefer token'); + + $paymentID = generatePaymentID($con, $driverId, $bonusAmount, $paymentMethod); + if (!$paymentID) throw new Exception('Failed to generate payment ID'); + + // driverWallet + $insertDriver = $con->prepare("INSERT INTO driverWallet (driverID, paymentID, amount, paymentMethod) VALUES (:driverID, :paymentID, :amount, :paymentMethod)"); + $insertDriver->execute([ + ':driverID' => $driverId, + ':paymentID' => $paymentID, + ':amount' => $bonusAmount, + ':paymentMethod' => $paymentMethod + ]); + if ($insertDriver->rowCount() === 0) throw new Exception('Insert to driverWallet failed'); + + $con->prepare("UPDATE payment_tokens SET isUsed = TRUE WHERE token = :token")->execute([':token' => $tokenDriver]); + + // seferWallet + $insertSefer = $con->prepare("INSERT INTO seferWallet (driverId, passengerId, amount, paymentMethod, token, createdAt) + VALUES (:driverId, :passengerId, :amount, :paymentMethod, :token, CURRENT_TIMESTAMP)"); + $insertSefer->execute([ + ':driverId' => $driverId, + ':passengerId' => 'driver', + ':amount' => $originalAmount, + ':paymentMethod' => $paymentMethod, + ':token' => $tokenSefer + ]); + $con->prepare("UPDATE payment_tokens SET isUsed = TRUE WHERE token = :token")->execute([':token' => $tokenSefer]); + + logError("FINALIZE", "Wallets updated successfully", ['orderRef' => $orderRef]); + printSuccess("FINALIZE", "Wallets updated successfully"); + } catch (Throwable $e) { + logError("FINALIZE", "Exception during finalization: " . $e->getMessage(), ['orderRef' => $orderRef]); + } +} \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/mtn/driver/generate_keys.php b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/driver/generate_keys.php new file mode 100755 index 0000000..05d1fe4 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/driver/generate_keys.php @@ -0,0 +1,47 @@ +<?php +// File: generate_keys.php +// الوظيفة: إنشاء زوج المفاتيح (العام والخاص) لمرة واحدة فقط + +// إعدادات لتوليد المفتاح +$config = [ + "digest_alg" => "sha256", + "private_key_bits" => 1024, + "private_key_type" => OPENSSL_KEYTYPE_RSA, +]; + +// إنشاء زوج المفاتيح +$res = openssl_pkey_new($config); + +if (!$res) { + die('Failed to generate new private key. Error: ' . openssl_error_string()); +} + +// استخراج المفتاح الخاص +openssl_pkey_export($res, $private_key); + +// استخراج المفتاح العام +$public_key_details = openssl_pkey_get_details($res); +$public_key = $public_key_details["key"]; + +// حفظ المفاتيح في ملفات +file_put_contents('private_key.pem', $private_key); +file_put_contents('public_key.pem', $public_key); + +echo "<h1>Keys Generated Successfully!</h1>"; +echo "<h2>Private Key (saved to private_key.pem):</h2>"; +echo "<pre>" . htmlspecialchars($private_key) . "</pre>"; +echo "<h2>Public Key (saved to public_key.pem):</h2>"; +echo "<pre>" . htmlspecialchars($public_key) . "</pre>"; + +// --- تحضير المفتاح العام لعملية التفعيل --- +// إزالة الهيدر والفوتر والأسطر الجديدة كما هو مطلوب +$formatted_public_key = str_replace("-----BEGIN PUBLIC KEY-----", "", $public_key); +$formatted_public_key = str_replace("-----END PUBLIC KEY-----", "", $formatted_public_key); +$formatted_public_key = preg_replace("/\s+/", "", $formatted_public_key); + + +echo "<h2>Formatted Public Key (for Terminal Activation):</h2>"; +echo "<p><strong>انسخ هذا المفتاح لاستخدامه في خطوة تفعيل الجهاز (activate_terminal.php)</strong></p>"; +echo "<textarea rows='5' cols='80' readonly>" . htmlspecialchars($formatted_public_key) . "</textarea>"; + +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/mtn/driver/initiate_payment.php b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/driver/initiate_payment.php new file mode 100755 index 0000000..47bffea --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/driver/initiate_payment.php @@ -0,0 +1,54 @@ +<?php +// /v1/main/ride/mtn/passenger/initiate_payment.php +include "../../../connect.php"; + +$baseUrl = rtrim(getenv('MTN_API_BASE_URL'), '/'); +$terminalId = getenv('MTN_TERMINAL_ID'); +$privateKeyPem = getenv('MTN_PRIVATE_KEY'); + +$invoice = filterRequest('invoice'); // رقم الفاتورة +$phone = filterRequest('phone'); // رقم الزبون +$guid = uniqid('mtn_'); + +if (!$invoice || !$phone) { + printFailure("Missing invoice or phone."); + exit; +} + +$body = json_encode([ + 'Invoice' => intval($invoice), + 'Phone' => $phone, + 'Guid' => $guid +], JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE); + +$hash = hash('sha256', $body, true); +openssl_sign($hash, $sig, $privateKeyPem, OPENSSL_ALGO_SHA256); +$xSignature = base64_encode($sig); + +$ch = curl_init("{$baseUrl}/pos_web/payment_phone/initiate"); +curl_setopt_array($ch, [ + CURLOPT_POST => true, + CURLOPT_POSTFIELDS => $body, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_HTTPHEADER => [ + "Content-Type: application/json", + "Request-Name: pos_web/payment_phone/initiate", + "Subject: {$terminalId}", + "X-Signature: {$xSignature}" + ] +]); +$response = curl_exec($ch); +$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); +curl_close($ch); + +// سجل المحاولة مع Guid +$stmt = $con->prepare( + "UPDATE `mtn_payments` + SET guid = :guid, status = 3, updated_at = NOW() + WHERE invoice = :inv" +); +$stmt->execute([':guid'=>$guid, ':inv'=>$invoice]); + +header('Content-Type: application/json'); +http_response_code($httpCode); +echo $response; \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/mtn/driver/key.php b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/driver/key.php new file mode 100755 index 0000000..eaf9c08 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/driver/key.php @@ -0,0 +1,56 @@ +<?php +// بيانات التفعيل +$terminalId = "9001000000060863"; +$activationCode = "26164711"; +$serialNumber = "INTALEQ-001"; // يمكنك تغييره + +// المفتاح العام على سطر واحد — بدون BEGIN/END وبدون أسطر جديدة +//$publicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDNxFbepx2OrpyrNG4+/aAaH3Rjc8dGw6B6vMAfsZzzm4wzoSkrtsr6jfuaMTZRLwxS5h8k1ztLG1HrOmL/NDsiE/7yxaKLAIZyWB/rR9byvPeOCC8QnCd/08kmxNl/l7Akn6qlPwsVpKUUNsr0SkU9lShMAw4OBgQq399jsbkFSwIDAQAB"; +$publicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDOhVAdUyxFpVNSyjRndMWEPAN9vJEetMzLbjF9DTn2lPVuRj/Mkwq9wCNhy+tdeX2lIn4K3EkONBvYJubBhxnYOoQuMchPW5vG7VnmpLjZ7TkpM2n9fcMu8u1GkLatLblDI4LTfvn3851+nhpnYlUVkjw5GAhH4XnEpveIjqDhzQIDAQAB"; +// جسم الطلب +$body = [ + "Key" => $publicKey, + "Secret" => $activationCode, + "Serial" => $serialNumber +]; +//$bodyJson = json_encode($body, JSON_UNESCAPED_SLASHES); +$bodyJson = trim(stripslashes(json_encode($body, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_LINE_TERMINATORS)),'"'); +//$bodyJson = json_encode($body, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); +// 1. توليد هاش SHA256 للـ JSON +//$bodyHash = hash('sha256', $bodyJson, true); + +// 2. تحميل المفتاح الخاص للتوقيع +$privateKey = openssl_pkey_get_private(file_get_contents("private_key.pem")); // تأكد من وجود هذا الملف بجانب السكربت + +// 3. توقيع الهاش +openssl_sign($bodyJson, $signature, $privateKey, OPENSSL_ALGO_SHA256); + +// 4. تحويل التوقيع إلى Base64 +$xSignature = base64_encode($signature); + +// 5. إرسال الطلب +$headers = [ + "Content-Type: application/json", + "Accept-Language: en", + "Request-Name: pos_web/pos/activate", + "Subject: $terminalId", + "X-Signature: $xSignature" +]; + +$ch = curl_init("https://cashmobile.mtnsyr.com:9000"); +curl_setopt($ch, CURLOPT_POST, true); +curl_setopt($ch, CURLOPT_POSTFIELDS, $bodyJson); +curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); +curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + +$response = curl_exec($ch); +$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); +curl_close($ch); + +// ✅ النتيجة +header('Content-Type: application/json'); +echo json_encode([ + "httpCode" => $httpCode, + "response" => json_decode($response, true), + "sentBody" => $body, +]); \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/mtn/driver/mtn_start.php b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/driver/mtn_start.php new file mode 100755 index 0000000..10e5b49 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/driver/mtn_start.php @@ -0,0 +1,129 @@ +<?php +include "../../../connect.php"; +date_default_timezone_set("Asia/Damascus"); + +// ========== إعدادات MTN ========== +$terminalId = "9001000000060863"; +$currencyCode = 760; +$sessionNumber = 0; +$ttl = 15; + +// ====== استقبال البيانات من فلاتر ====== +$amount = filterRequest("amount"); +$passengerId = filterRequest("passengerId"); +$phone = filterRequest("phone"); + +// ✅ Log مبدئي +error_log("🚦 START | passengerId: $passengerId | phone: $phone | amount: $amount"); + +// تحقق من المدخلات +if (empty($amount) || empty($passengerId) || empty($phone) || $amount <= 0) { + error_log("❌ Invalid input: amount=$amount, passengerId=$passengerId, phone=$phone"); + printFailure("بيانات الدفع غير كاملة أو غير صالحة."); + exit; +} + +// ====== توليد invoiceNumber و GUID ====== +$invoiceNumber = mt_rand(10000000000, 99999999999); +//$invoiceNumber = "MTN_" . $passengerId . "_" . time(); +$guid = uniqid("mtn_"); +error_log("🧾 Generated Invoice: $invoiceNumber"); +error_log("🧭 Generated GUID: $guid"); + +// ====== 1. إنشاء الفاتورة ====== +$createInvoiceBody = [ + "Amount" => intval($amount * 100), + "Invoice" => $invoiceNumber, + "Session" => $sessionNumber, + "TTL" => $ttl +]; +error_log("📦 Create Invoice Body: " . json_encode($createInvoiceBody, JSON_UNESCAPED_UNICODE)); +$invoiceResponse = sendMtnApiRequest("pos_web/invoice/create", $terminalId, $createInvoiceBody); +error_log("📥 Create Invoice Response: " . json_encode($invoiceResponse, JSON_UNESCAPED_UNICODE)); + +if (!$invoiceResponse || isset($invoiceResponse['Errno']) && $invoiceResponse['Errno'] != 0) { + error_log("❌ Failed to create invoice. Error: " . json_encode($invoiceResponse)); + printFailure("فشل إنشاء الفاتورة عبر MTN."); + exit; +} + +// ====== 2. بدء الدفع ====== +$initiateBody = [ + "Invoice" => $invoiceNumber, + "Phone" => $phone, + "Guid" => $guid +]; +error_log("📤 body initiateBody: $initiateBody"); +error_log("📦 Initiate Payment Body: " . json_encode($initiateBody, JSON_UNESCAPED_UNICODE)); +$initiateResponse = sendMtnApiRequest("pos_web/payment_phone/initiate", $terminalId, $initiateBody); +error_log("📥 Initiate Response: " . json_encode($initiateResponse, JSON_UNESCAPED_UNICODE)); + +if (!$initiateResponse || !isset($initiateResponse['OperationNumber'])) { + error_log("❌ Failed to initiate payment."); + printFailure($initiateResponse); + exit; +} + +$operationNumber = $initiateResponse['OperationNumber']; + +// ====== 3. تسجيل العملية ====== +try { + $stmt = $con->prepare("INSERT INTO `paymentsLogSyriaDriver` + (`user_id`, `amount`, `status`, `order_ref`, `payment_method`, `created_at`) + VALUES (?, ?, 2, ?, 'mtn', NOW())"); + $stmt->execute([$passengerId, $amount, $invoiceNumber]); + error_log("✅ DB Log Inserted."); +} catch (PDOException $e) { + error_log("❌ DB ERROR: " . $e->getMessage()); + printFailure("فشل في تسجيل العملية."); + exit; +} + +// ====== 4. نجاح +error_log("✅ Payment initiation successful."); +printSuccess([ + "invoiceNumber" => $invoiceNumber, + "operationNumber" => $operationNumber, + "guid" => $guid +]); + + +// ====== دالة إرسال الطلب ===================== +function sendMtnApiRequest($requestName, $terminalId, $body) +{ + $apiUrl = "https://cashmobile.mtnsyr.com:9000"; + $privateKey = openssl_pkey_get_private(file_get_contents("private_key.pem")); + + // ✅ تحويل الـ body إلى JSON بدون فراغات أو أسطر + $bodyJson = trim(stripslashes(json_encode($body, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_LINE_TERMINATORS)), '"'); +//$bodyJson = json_encode($body, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); + // ✅ توليد التوقيع + // $bodyHash = hash('sha256', $bodyJson, true); + error_log("📤 body before JSON: $bodyJson"); + openssl_sign($bodyJson, $signature, $privateKey, OPENSSL_ALGO_SHA256); + $xSignature = base64_encode($signature); +error_log("📤 body xSignature: $xSignature"); + // ✅ رؤوس الطلب + $headers = [ + "Content-Type: application/json", + "Accept-Language: en", + "Request-Name: $requestName", + "Subject: $terminalId", + "X-Signature: $xSignature" + ]; + + $ch = curl_init($apiUrl); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, $bodyJson); + curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + + $response = curl_exec($ch); + + // ✅ لوق داخلي + error_log("🔐 Signature for $requestName: $xSignature"); + error_log("📤 Sent JSON: $bodyJson"); + + curl_close($ch); + return json_decode($response, true); +} \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/mtn/driver/private_key.pem b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/driver/private_key.pem new file mode 100644 index 0000000..fead7a6 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/driver/private_key.pem @@ -0,0 +1,15 @@ +-----BEGIN RSA PRIVATE KEY----- +MIICXwIBAAKBgQDOhVAdUyxFpVNSyjRndMWEPAN9vJEetMzLbjF9DTn2lPVuRj/M +kwq9wCNhy+tdeX2lIn4K3EkONBvYJubBhxnYOoQuMchPW5vG7VnmpLjZ7TkpM2n9 +fcMu8u1GkLatLblDI4LTfvn3851+nhpnYlUVkjw5GAhH4XnEpveIjqDhzQIDAQAB +AoGBALRcAvqJT8nHN7y+8QNFHNZ+XwIpc4egmJY1Ny0iJvPtZWaYHVG5PRE4Qu4+ +29+3oX5dYDx146tu4L5mQvLS3ULBsvxaUZt2lT/vxkQzI9pNfXw584WvIrbtxQod +ILvBcnamwQa9hEOIFZVyZ/hzkzUcMO6cAXqvsfqqPgJhm7PBAkEA+xgE9CUOLDFl +vLePQKGcHIUOsPLr16qNEgGhTW7Km3OMMqoB2f7t67xOHGqK6tnANRM4Sk6IModI +wbZuVh4jMQJBANKOVmIdDLNffZVHp90SDRG7/YdK2R5ob361CIkcUzjh927Wfs5W +A/WroB7eJ7pWiq2BMaj/xq65nYaCOldvaV0CQQDm12c+eY61DFjnDa6ykaEvCxi9 +jydJp+93vW3o/VFhZvJeZbO8EcX0MrNxJnY+gSBW6yuWDOrj4UH/bVO08pIRAkEA +lH3TiBAqo9nlTEEjrnILi4VD0IVFx/8pGnf71A6I1qXuBVn6RfQ9iKWIIBzWccCU +vrZNWn1AFntLD9CJ6p3k9QJBAMbSQ9CoXWlOLJRduV15ER1ZyE/inVd4jIvtjAgz +b7QaM62Ecxl3D8EI/LTSZV9Oa8D/62cJeMsflVa7gpavL70= +-----END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/mtn/driver/public_key.pem b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/driver/public_key.pem new file mode 100644 index 0000000..63a3519 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/driver/public_key.pem @@ -0,0 +1,6 @@ +-----BEGIN PUBLIC KEY----- +MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDqBQZEJXWCQwPsPzBM70M3TjyU +5vwCZWoEtUomR9Qu+dEQaa0Hniz6JY8+goCxfMYuZQw6+kimctA2KqzT2pCsJufN +b92pSAMZgb0RSTl2y62oJkJd2WY7dj36AvPEyw6DxCFItvFOu7HGl3LlHQBriiw3 +jwtuS6DO7gbmAJPU8wIDAQAB +-----END PUBLIC KEY----- diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/mtn/driver_payout_syria.php b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/driver_payout_syria.php new file mode 100755 index 0000000..0c86897 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/driver_payout_syria.php @@ -0,0 +1,115 @@ +<?php + +include "../../connect.php"; + +// --- 2. استقبال البيانات من الطلب --- +$driver_id = filterRequest("driver_id"); +$driver_name = filterRequest("driver_name"); +$amount = filterRequest("amount"); +$wallet_type = filterRequest("wallet_type"); +$wallet_number = filterRequest("wallet_number"); + +// التحقق من أن البيانات الأساسية موجودة +if (empty($driver_id) || empty($driver_name) || empty($amount) || empty($wallet_type) || empty($wallet_number)) { + printFailure('Missing required fields.'); + exit(); +} + +// --- 3. إدراج الطلب في قاعدة البيانات --- +try { + $sql = "INSERT INTO driver_withdrawal_requests (driver_id, driver_name, amount, wallet_type, wallet_number) VALUES (?, ?, ?, ?, ?)"; + $stmt = $con->prepare($sql); + + // تنفيذ الاستعلام مع تمرير البيانات + $success = $stmt->execute([ + $driver_id, + $driver_name, + $amount, + $wallet_type, + $wallet_number + ]); + + if ($success) { + // --- 4. الحصول على رقم الطلب وإرسال إشعار واتساب --- + $transaction_id = $con->lastInsertId(); // الحصول على رقم التعريف الخاص بالطلب الجديد + sendWhatsAppNotification($transaction_id, $driver_name, $amount, $wallet_type, $wallet_number); + + // إرسال استجابة نجاح إلى التطبيق + printSuccess("Withdrawal request saved and notification sent."); + + } else { + printFailure('Failed to save withdrawal request.'); + } + +} catch (PDOException $e) { + // التعامل مع أخطاء قاعدة البيانات + error_log("Database Error in request_withdrawal.php: " . $e->getMessage()); + printFailure('A database error occurred.'); +} + + +/** + * دالة لإرسال إشعار إلى خدمة العملاء عبر RaseelPlus API + */ +function sendWhatsAppNotification($transaction_id, $driver_name, $amount, $wallet_type, $wallet_number) { + + // استخدام متغيرات البيئة (Environment Variables) هو الطريقة الأكثر أماناً لإدارة المعلومات الحساسة + // بدلاً من كتابتها مباشرة في الكود. + $customer_service_number = getenv('CUSTOMER_SERVICE_WHATSAPP'); + // $customer_service_number = "9639XXXXXXXX"; // كرقم احتياطي مؤقت + + // نص الرسالة مع إضافة رقم الطلب + $messageBody = "طلب سحب جديد (رقم الطلب: #$transaction_id):\n\n" . + "اسم السائق: " . $driver_name . "\n" . + "المبلغ: " . $amount . " ل.س\n" . + "نوع المحفظة: " . $wallet_type . "\n" . + "رقم المحفظة: " . $wallet_number; + + // بيانات الطلب (Payload) للـ API + $payload = [ + "number" => $customer_service_number, + "type" => "text", + "message" => $messageBody, + "instance_id" => getenv('instance_idWhatsApp'); + "access_token" => getenv('access_tokenWhatsApp'); + ]; + + // استدعاء الـ API + // ملاحظة: لا نتحقق من استجابة الـ API هنا لأن العملية الرئيسية (حفظ الطلب) قد نجحت بالفعل. + // يمكن إضافة تسجيل للأخطاء إذا لزم الأمر. + callAPI_Withdrawal("POST", "https://raseelplus.com/api/send", json_encode($payload)); +} + + +/** + * دالة لإجراء استدعاءات API باستخدام cURL + */ +function callAPI_Withdrawal($method, $url, $data) { + $curl = curl_init(); + curl_setopt_array($curl, [ + CURLOPT_URL => $url, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_ENCODING => "", + CURLOPT_MAXREDIRS => 10, + CURLOPT_TIMEOUT => 30, + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, + CURLOPT_CUSTOMREQUEST => $method, + CURLOPT_POSTFIELDS => $data, + CURLOPT_HTTPHEADER => [ + "Content-Type: application/json", + "Accept: application/json" + ], + ]); + $response = curl_exec($curl); + $err = curl_error($curl); + curl_close($curl); + + if ($err) { + // تسجيل الخطأ في سجلات الخادم للمراجعة لاحقًا + error_log("[callAPI_Withdrawal] cURL Error #: " . $err); + return null; + } else { + return json_decode($response); + } +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/mtn/passenger/confirm_payment.php b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/passenger/confirm_payment.php new file mode 100755 index 0000000..6de8265 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/passenger/confirm_payment.php @@ -0,0 +1,169 @@ +<?php +// /v1/main/ride/mtn/passenger/confirm_payment.php +include "../../../connect.php"; + +$baseUrl = rtrim(getenv('MTN_API_BASE_URL'), '/'); +$terminalId = getenv('MTN_TERMINAL_ID'); +$privateKeyPem = getenv('MTN_PRIVATE_KEY'); +$privateKey = openssl_pkey_get_private(file_get_contents("private_key.pem")); +$invoice = filterRequest('invoiceNumber'); +$phone = filterRequest('phone'); +$guid = filterRequest('guid'); +$operationNumber = filterRequest('operationNumber'); +$code = filterRequest('otp'); // الـ OTP + +error_log("MTN Confirm: Start request for invoice={$invoice}, phone={$phone}, guid={$guid}, opNum={$operationNumber}"); + +if (!$invoice || !$phone || !$guid || !$operationNumber || !$code) { + error_log("MTN Confirm: Missing parameters"); + printFailure("Missing parameters."); + exit; +} + +// تشفير الكود +$hashBin = hash('sha256', $code, true); +$codeB64 = base64_encode($hashBin); + +$body = [ + 'Invoice' => intval($invoice), + 'Phone' => $phone, + 'Guid' => $guid, + 'OperationNumber' => intval($operationNumber), + 'Code' => $codeB64 +]; +$bodyJson = trim(stripslashes(json_encode($body, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_LINE_TERMINATORS)), '"'); + +error_log("MTN Confirm: Prepared body JSON: " . $bodyJson); + +// توليد التوقيع +$signResult = openssl_sign($bodyJson, $sig, $privateKey, OPENSSL_ALGO_SHA256); +if (!$signResult) { + error_log("MTN Confirm: Failed to generate signature"); + printFailure("Signature error."); + exit; +} +$xSignature = base64_encode($sig); +error_log("MTN Confirm: Generated signature"); + +// إرسال الطلب +$ch = curl_init("{$baseUrl}/pos_web/payment_phone/confirm"); +curl_setopt_array($ch, [ + CURLOPT_POST => true, + CURLOPT_POSTFIELDS => $bodyJson, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_HTTPHEADER => [ + "Content-Type: application/json", + "Request-Name: pos_web/payment_phone/confirm", + "Subject: {$terminalId}", + "X-Signature: {$xSignature}" + ] +]); + +$response = curl_exec($ch); +$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); +$curlError = curl_error($ch); +curl_close($ch); + +error_log("MTN Confirm: HTTP $httpCode - Response: $response"); +if ($curlError) { + error_log("MTN Confirm: cURL error - $curlError"); +} + +// تحديث قاعدة البيانات في حال نجاح +if ($httpCode === 200) { + try { + $stmt = $con->prepare( + "UPDATE `paymentsLogSyria` SET status = 1, updated_at = NOW() + WHERE order_ref = :inv" + ); + $stmt->execute([':inv' => $invoice]); + error_log("MTN Confirm: Payment updated successfully in DB for invoice={$invoice}"); + + $stmt = $con->prepare("SELECT * FROM paymentsLogSyria WHERE order_ref = :order_ref LIMIT 1"); + $stmt->execute([':order_ref' => $invoice]); + $payment = $stmt->fetch(PDO::FETCH_ASSOC); + + if ($payment) { + $userId = $payment['user_id']; + $amount = $payment['amount']; + $paymentMethod = $payment['payment_method'] ?? 'mtn'; + + $finalAmount = calculateBonus($amount); + $token = generatePaymentToken($userId, $finalAmount); + $walletResult = addToPassengerWallet($userId, $finalAmount, $token); + + $seferToken = generatePaymentToken($userId, $amount); + $seferWalletResult = addToSeferWallet($userId, $amount, $paymentMethod, $seferToken); + + printSuccess('MTN Confirm'); + + exit; + } + + + } catch (PDOException $e) { + error_log("MTN Confirm: DB update error - " . $e->getMessage()); + } +} else { + error_log("MTN Confirm: Payment failed with HTTP code $httpCode"); +} + +header('Content-Type: application/json'); +http_response_code($httpCode); +echo $response; + +function calculateBonus($amount) { + if ($amount == 200000) return 205000; + if ($amount == 400000) return 425000; + if ($amount == 1000000) return 1040000; + return $amount; +} + +function generatePaymentToken($passengerId, $amount) { + $url = BASE_URL . "/passengerWallet/addPaymentTokenPassenger.php"; + $postData = ['passengerId' => $passengerId, 'amount' => $amount]; + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData)); + $response = curl_exec($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + if ($httpCode != 200) return null; + $data = json_decode($response, true); + return $data['message'] ?? null; +} +function addToPassengerWallet($passengerId, $amount, $token) { + $url = BASE_URL . "/passengerWallet/add.php"; + $postData = ['passenger_id' => $passengerId, 'balance' => $amount, 'token' => $token]; + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData)); + $response = curl_exec($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + if ($httpCode != 200) return null; + return json_decode($response, true); +} + +function addToSeferWallet($passengerId, $amount, $paymentMethod, $token) { + $url = BASE_URL . "/seferWallet/add.php"; + $postData = [ + 'amount' => $amount, + 'paymentMethod' => $paymentMethod, + 'passengerId' => $passengerId, + 'token' => $token, + 'driverId' => 'passenger' + ]; + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData)); + $response = curl_exec($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + if ($httpCode != 200) return null; + return json_decode($response, true); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/mtn/passenger/finalize_wallet_payment.php b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/passenger/finalize_wallet_payment.php new file mode 100755 index 0000000..1c37d73 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/passenger/finalize_wallet_payment.php @@ -0,0 +1,103 @@ +<?php +// wallet/finalize_wallet_payment.php +include_once "../../../jwtconnect.php"; + +define("LOG_FILE", "../logs/payment_verification.log"); + +function logError($step, $message, $data = null) { + $logDir = dirname(LOG_FILE); + if (!is_dir($logDir)) { mkdir($logDir, 0755, true); } + $logEntry = "[" . date('Y-m-d H:i:s') . "] STEP {$step}: {$message}"; + if ($data !== null) { $logEntry .= " | Data: " . json_encode($data, JSON_UNESCAPED_UNICODE); } + file_put_contents(LOG_FILE, $logEntry . PHP_EOL, FILE_APPEND); +} + +function generateToken($con, $driverId, $amount): ?string { + global $secretKey; + $data = $driverId . $amount . time() . ($secretKey ?? 'default_secret'); + $hash = hash('sha256', $data); + $randomBytes = bin2hex(random_bytes(16)); + $token = substr($hash . $randomBytes, 0, 64); + + $stmt = $con->prepare("INSERT INTO payment_tokens (token, driverID, dateCreated, amount) VALUES (:token, :driverID, NOW(), :amount)"); + $stmt->execute([':token' => $token, ':driverID' => $driverId, ':amount' => $amount]); + return $stmt->rowCount() > 0 ? $token : null; +} + +function generatePaymentID($con, $driverId, $amount, $method): ?string { + $stmt = $con->prepare("INSERT INTO paymentsDriverPoints (`amount`, `payment_method`, `driverID`) VALUES (:amount, :method, :driverID)"); + $stmt->execute([':driverID' => $driverId, ':amount' => $amount, ':method' => $method]); + return $stmt->rowCount() > 0 ? $con->lastInsertId() : null; +} + +function finalizeWalletPayment($con) { + $orderRef = $_GET['orderRef'] ?? null; + if (empty($orderRef)) { + logError("FINALIZE", "Missing orderRef"); + return; + } + + // 1. تحقق من الدفع + $stmt = $con->prepare("SELECT * FROM `paymentsLogSyriaDriver` WHERE order_ref = :order_ref AND status = 1 LIMIT 1"); + $stmt->execute([':order_ref' => $orderRef]); + $payment = $stmt->fetch(PDO::FETCH_ASSOC); + + if (!$payment) { + logError("FINALIZE", "Payment not found or not completed", ['orderRef' => $orderRef]); + return; + } + + try { + $driverId = $payment['user_id']; + $originalAmount = floatval($payment['amount']); + $paymentMethod = $payment['payment_method'] ?? 'ecash'; + + // حساب المكافأة + $bonusAmount = match ((int)$originalAmount) { + 10000 => 10000.0, + 20000 => 21000.0, + 40000 => 45000.0, + 100000 => 110000.0, + default => $originalAmount, + }; + + // إنشاء التوكنات + $tokenDriver = generateToken($con, $driverId, $bonusAmount); + if (!$tokenDriver) throw new Exception('Failed to generate driver token'); + + $tokenSefer = generateToken($con, $driverId, $originalAmount); + if (!$tokenSefer) throw new Exception('Failed to generate sefer token'); + + $paymentID = generatePaymentID($con, $driverId, $bonusAmount, $paymentMethod); + if (!$paymentID) throw new Exception('Failed to generate payment ID'); + + // driverWallet + $insertDriver = $con->prepare("INSERT INTO driverWallet (driverID, paymentID, amount, paymentMethod) VALUES (:driverID, :paymentID, :amount, :paymentMethod)"); + $insertDriver->execute([ + ':driverID' => $driverId, + ':paymentID' => $paymentID, + ':amount' => $bonusAmount, + ':paymentMethod' => $paymentMethod + ]); + if ($insertDriver->rowCount() === 0) throw new Exception('Insert to driverWallet failed'); + + $con->prepare("UPDATE payment_tokens SET isUsed = TRUE WHERE token = :token")->execute([':token' => $tokenDriver]); + + // seferWallet + $insertSefer = $con->prepare("INSERT INTO seferWallet (driverId, passengerId, amount, paymentMethod, token, createdAt) + VALUES (:driverId, :passengerId, :amount, :paymentMethod, :token, CURRENT_TIMESTAMP)"); + $insertSefer->execute([ + ':driverId' => $driverId, + ':passengerId' => 'driver', + ':amount' => $originalAmount, + ':paymentMethod' => $paymentMethod, + ':token' => $tokenSefer + ]); + $con->prepare("UPDATE payment_tokens SET isUsed = TRUE WHERE token = :token")->execute([':token' => $tokenSefer]); + + logError("FINALIZE", "Wallets updated successfully", ['orderRef' => $orderRef]); + printSuccess("FINALIZE", "Wallets updated successfully"); + } catch (Throwable $e) { + logError("FINALIZE", "Exception during finalization: " . $e->getMessage(), ['orderRef' => $orderRef]); + } +} \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/mtn/passenger/generate_keys.php b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/passenger/generate_keys.php new file mode 100755 index 0000000..05d1fe4 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/passenger/generate_keys.php @@ -0,0 +1,47 @@ +<?php +// File: generate_keys.php +// الوظيفة: إنشاء زوج المفاتيح (العام والخاص) لمرة واحدة فقط + +// إعدادات لتوليد المفتاح +$config = [ + "digest_alg" => "sha256", + "private_key_bits" => 1024, + "private_key_type" => OPENSSL_KEYTYPE_RSA, +]; + +// إنشاء زوج المفاتيح +$res = openssl_pkey_new($config); + +if (!$res) { + die('Failed to generate new private key. Error: ' . openssl_error_string()); +} + +// استخراج المفتاح الخاص +openssl_pkey_export($res, $private_key); + +// استخراج المفتاح العام +$public_key_details = openssl_pkey_get_details($res); +$public_key = $public_key_details["key"]; + +// حفظ المفاتيح في ملفات +file_put_contents('private_key.pem', $private_key); +file_put_contents('public_key.pem', $public_key); + +echo "<h1>Keys Generated Successfully!</h1>"; +echo "<h2>Private Key (saved to private_key.pem):</h2>"; +echo "<pre>" . htmlspecialchars($private_key) . "</pre>"; +echo "<h2>Public Key (saved to public_key.pem):</h2>"; +echo "<pre>" . htmlspecialchars($public_key) . "</pre>"; + +// --- تحضير المفتاح العام لعملية التفعيل --- +// إزالة الهيدر والفوتر والأسطر الجديدة كما هو مطلوب +$formatted_public_key = str_replace("-----BEGIN PUBLIC KEY-----", "", $public_key); +$formatted_public_key = str_replace("-----END PUBLIC KEY-----", "", $formatted_public_key); +$formatted_public_key = preg_replace("/\s+/", "", $formatted_public_key); + + +echo "<h2>Formatted Public Key (for Terminal Activation):</h2>"; +echo "<p><strong>انسخ هذا المفتاح لاستخدامه في خطوة تفعيل الجهاز (activate_terminal.php)</strong></p>"; +echo "<textarea rows='5' cols='80' readonly>" . htmlspecialchars($formatted_public_key) . "</textarea>"; + +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/mtn/passenger/initiate_payment.php b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/passenger/initiate_payment.php new file mode 100755 index 0000000..47bffea --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/passenger/initiate_payment.php @@ -0,0 +1,54 @@ +<?php +// /v1/main/ride/mtn/passenger/initiate_payment.php +include "../../../connect.php"; + +$baseUrl = rtrim(getenv('MTN_API_BASE_URL'), '/'); +$terminalId = getenv('MTN_TERMINAL_ID'); +$privateKeyPem = getenv('MTN_PRIVATE_KEY'); + +$invoice = filterRequest('invoice'); // رقم الفاتورة +$phone = filterRequest('phone'); // رقم الزبون +$guid = uniqid('mtn_'); + +if (!$invoice || !$phone) { + printFailure("Missing invoice or phone."); + exit; +} + +$body = json_encode([ + 'Invoice' => intval($invoice), + 'Phone' => $phone, + 'Guid' => $guid +], JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE); + +$hash = hash('sha256', $body, true); +openssl_sign($hash, $sig, $privateKeyPem, OPENSSL_ALGO_SHA256); +$xSignature = base64_encode($sig); + +$ch = curl_init("{$baseUrl}/pos_web/payment_phone/initiate"); +curl_setopt_array($ch, [ + CURLOPT_POST => true, + CURLOPT_POSTFIELDS => $body, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_HTTPHEADER => [ + "Content-Type: application/json", + "Request-Name: pos_web/payment_phone/initiate", + "Subject: {$terminalId}", + "X-Signature: {$xSignature}" + ] +]); +$response = curl_exec($ch); +$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); +curl_close($ch); + +// سجل المحاولة مع Guid +$stmt = $con->prepare( + "UPDATE `mtn_payments` + SET guid = :guid, status = 3, updated_at = NOW() + WHERE invoice = :inv" +); +$stmt->execute([':guid'=>$guid, ':inv'=>$invoice]); + +header('Content-Type: application/json'); +http_response_code($httpCode); +echo $response; \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/mtn/passenger/key.php b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/passenger/key.php new file mode 100755 index 0000000..eaf9c08 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/passenger/key.php @@ -0,0 +1,56 @@ +<?php +// بيانات التفعيل +$terminalId = "9001000000060863"; +$activationCode = "26164711"; +$serialNumber = "INTALEQ-001"; // يمكنك تغييره + +// المفتاح العام على سطر واحد — بدون BEGIN/END وبدون أسطر جديدة +//$publicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDNxFbepx2OrpyrNG4+/aAaH3Rjc8dGw6B6vMAfsZzzm4wzoSkrtsr6jfuaMTZRLwxS5h8k1ztLG1HrOmL/NDsiE/7yxaKLAIZyWB/rR9byvPeOCC8QnCd/08kmxNl/l7Akn6qlPwsVpKUUNsr0SkU9lShMAw4OBgQq399jsbkFSwIDAQAB"; +$publicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDOhVAdUyxFpVNSyjRndMWEPAN9vJEetMzLbjF9DTn2lPVuRj/Mkwq9wCNhy+tdeX2lIn4K3EkONBvYJubBhxnYOoQuMchPW5vG7VnmpLjZ7TkpM2n9fcMu8u1GkLatLblDI4LTfvn3851+nhpnYlUVkjw5GAhH4XnEpveIjqDhzQIDAQAB"; +// جسم الطلب +$body = [ + "Key" => $publicKey, + "Secret" => $activationCode, + "Serial" => $serialNumber +]; +//$bodyJson = json_encode($body, JSON_UNESCAPED_SLASHES); +$bodyJson = trim(stripslashes(json_encode($body, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_LINE_TERMINATORS)),'"'); +//$bodyJson = json_encode($body, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); +// 1. توليد هاش SHA256 للـ JSON +//$bodyHash = hash('sha256', $bodyJson, true); + +// 2. تحميل المفتاح الخاص للتوقيع +$privateKey = openssl_pkey_get_private(file_get_contents("private_key.pem")); // تأكد من وجود هذا الملف بجانب السكربت + +// 3. توقيع الهاش +openssl_sign($bodyJson, $signature, $privateKey, OPENSSL_ALGO_SHA256); + +// 4. تحويل التوقيع إلى Base64 +$xSignature = base64_encode($signature); + +// 5. إرسال الطلب +$headers = [ + "Content-Type: application/json", + "Accept-Language: en", + "Request-Name: pos_web/pos/activate", + "Subject: $terminalId", + "X-Signature: $xSignature" +]; + +$ch = curl_init("https://cashmobile.mtnsyr.com:9000"); +curl_setopt($ch, CURLOPT_POST, true); +curl_setopt($ch, CURLOPT_POSTFIELDS, $bodyJson); +curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); +curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + +$response = curl_exec($ch); +$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); +curl_close($ch); + +// ✅ النتيجة +header('Content-Type: application/json'); +echo json_encode([ + "httpCode" => $httpCode, + "response" => json_decode($response, true), + "sentBody" => $body, +]); \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/mtn/passenger/mtn_confirm.php b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/passenger/mtn_confirm.php new file mode 100755 index 0000000..2e6d32b --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/passenger/mtn_confirm.php @@ -0,0 +1,247 @@ +<?php +// /v1/main/ride/mtn/passenger/confirm_payment.php +include "../../../connect.php"; +header('Content-Type: application/json; charset=utf-8'); + +/** + * Helpers + */ +function mlog(string $msg) { error_log($msg); } // timestamp يضاف تلقائياً من PHP + +// قاعدة URL للتطبيق (لمعالجة BASE_URL غير المعروفة) +if (!defined('BASE_URL')) { + $APP_BASE_URL = rtrim(getenv('APP_BASE_URL') ?: '', '/'); + if ($APP_BASE_URL === '') { + $scheme = isset($_SERVER['REQUEST_SCHEME']) ? $_SERVER['REQUEST_SCHEME'] : 'https'; + $host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost'; + define('BASE_URL', $scheme . '://' . $host); + } else { + define('BASE_URL', $APP_BASE_URL); + } +} + +try { + +$baseUrl = rtrim(getenv('MTN_API_BASE_URL'), '/'); +$terminalId = getenv('MTN_TERMINAL_ID'); +$privateKeyPem = getenv('MTN_PRIVATE_KEY'); +$privateKey = openssl_pkey_get_private(file_get_contents("private_key.pem")); +$invoice = filterRequest('invoiceNumber'); +$phone = filterRequest('phone'); +$guid = filterRequest('guid'); +$operationNumber = filterRequest('operationNumber'); +$code = filterRequest('otp'); // الـ OTP +$lang = filterRequest("lang"); + + mlog("MTN Confirm: Start request for invoice={$invoice}, phone={$phone}, guid={$guid}, opNum={$operationNumber}"); + + if (!$invoice || !$phone || !$guid || !$operationNumber || !$code) { + mlog("MTN Confirm: Missing parameters"); + printFailure("Missing parameters."); + exit; + } + + // تشفير الكود (SHA256 ثم Base64) + $hashBin = hash('sha256', $code, true); + $codeB64 = base64_encode($hashBin); + + // جسم الطلب نحو MTN + $body = [ + 'Invoice' => (int)$invoice, + 'Phone' => $phone, + 'Guid' => $guid, + 'OperationNumber' => (int)$operationNumber, + 'Code' => $codeB64, + 'Accept-Language' => $lang + ]; + $bodyJson = json_encode($body, JSON_UNESCAPED_UNICODE); + mlog("MTN Confirm: Prepared body JSON: " . $bodyJson); + + // توقيع الجسم + $sig = null; + $signResult = openssl_sign($bodyJson, $sig, $privateKey, OPENSSL_ALGO_SHA256); + if (!$signResult || !$sig) { + mlog("MTN Confirm: Failed to generate signature"); + printFailure("Signature error."); + exit; + } + $xSignature = base64_encode($sig); + mlog("MTN Confirm: Generated signature"); + + // إرسال الطلب إلى MTN + $ch = curl_init("{$baseUrl}/pos_web/payment_phone/confirm"); + curl_setopt_array($ch, [ + CURLOPT_POST => true, + CURLOPT_POSTFIELDS => $bodyJson, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_HTTPHEADER => [ + "Content-Type: application/json", + "Request-Name: pos_web/payment_phone/confirm", + "Subject: {$terminalId}", + "X-Signature: {$xSignature}" + ], + CURLOPT_TIMEOUT => 25, + ]); + + $response = curl_exec($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + $curlError = curl_error($ch); + curl_close($ch); + + mlog("MTN Confirm: HTTP {$httpCode} - Response: " . ($response ?? '')); + if ($curlError) { + mlog("MTN Confirm: cURL error - {$curlError}"); + } + + // فك JSON لرد MTN (حتى لو خطأ) لعرض سبب واضح + $mtn = json_decode($response ?: '{}', true); + if (!is_array($mtn)) { + $mtn = []; + } + + // 🧠 سياسة القرار: + // - إذا HTTP≠200 → فشل شبكة/بوابة + // - إذا HTTP=200 لكن Errno≠0 → خطأ من MTN (مثل Incorrect sms code) + // - فقط إذا HTTP=200 && Errno=0 → نجاح، نحدّث DB ونضيف للمحافظ + if ($httpCode !== 200) { + // لا تحدّث DB + printFailure([ + 'message' => 'MTN confirm HTTP failure', + 'http' => $httpCode, + 'mtn' => $mtn + ]); + exit; + } + + // HTTP 200 — افحص Errno + $errno = isset($mtn['Errno']) ? (int)$mtn['Errno'] : null; + if ($errno !== 0) { + // لا تحدّث DB في هذه الحالة + $errText = isset($mtn['Error']) ? $mtn['Error'] : 'Unknown MTN error'; + // اطبع لوج مشابه للمثال المطلوب + // مثال: {"Errno":662,"Error":"Incorrect sms code","Abuse":2,"Transaction":""} + mlog("MTN Confirm: Business failure from MTN - Errno={$errno}, Error=" . json_encode($mtn, JSON_UNESCAPED_UNICODE)); + printFailure([ + 'message' => $errText, + 'errno' => $errno, + 'mtn' => $mtn + ]); + exit; + } + + // ✅ نجاح كامل من MTN — تحديث DB ثم المحافظ + try { + global $con; + + $stmt = $con->prepare( + "UPDATE `paymentsLogSyria` SET status = 1, updated_at = NOW() + WHERE order_ref = :inv" + ); + $stmt->execute([':inv' => $invoice]); + mlog("MTN Confirm: Payment updated successfully in DB for invoice={$invoice}"); + + $stmt = $con->prepare("SELECT * FROM paymentsLogSyria WHERE order_ref = :order_ref LIMIT 1"); + $stmt->execute([':order_ref' => $invoice]); + $payment = $stmt->fetch(PDO::FETCH_ASSOC); + + if (!$payment) { + mlog("MTN Confirm: Payment row not found after update"); + printFailure("Payment row not found"); + exit; + } + + $userId = $payment['user_id']; + $amount = $payment['amount']; + $paymentMethod = $payment['payment_method'] ?? 'mtn'; + + $finalAmount = calculateBonus($amount); + + $token = generatePaymentToken($userId, $finalAmount); + $walletResult = addToPassengerWallet($userId, $finalAmount, $token); + + $seferToken = generatePaymentToken($userId, $amount); + $seferWalletResult = addToSeferWallet($userId, $amount, $paymentMethod, $seferToken); + + // رجّع رد موحّد + ضمّن رد MTN + printSuccess([ + 'message' => 'MTN Confirm', + 'data' => [ + 'invoice' => $invoice, + 'finalAmount' => $finalAmount, + 'wallet' => $walletResult, + 'seferWallet' => $seferWalletResult, + 'mtn' => $mtn + ] + ]); + exit; + + } catch (PDOException $e) { + mlog("MTN Confirm: DB update error - " . $e->getMessage()); + printFailure("DB error"); + exit; + } + +} catch (Throwable $e) { + mlog("MTN Confirm: Exception - " . $e->getMessage()); + printFailure("Server error"); + exit; +} + +/** + * نفس دوال المساعدة، لكن باستعمال BASE_URL المؤمّنة أعلاه + */ +function calculateBonus($amount) { + if ($amount == 20000) return 20500; + if ($amount == 40000) return 42500; + if ($amount == 100000) return 104000; + return $amount; +} + +function generatePaymentToken($passengerId, $amount) { + $url = rtrim(BASE_URL, '/') . "/passengerWallet/addPaymentTokenPassenger.php"; + $postData = ['passengerId' => $passengerId, 'amount' => $amount]; + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData)); + $response = curl_exec($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + if ($httpCode != 200 || !$response) return null; + $data = json_decode($response, true); + return $data['message'] ?? null; +} + +function addToPassengerWallet($passengerId, $amount, $token) { + $url = rtrim(BASE_URL, '/') . "/passengerWallet/add.php"; + $postData = ['passenger_id' => $passengerId, 'balance' => $amount, 'token' => $token]; + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData)); + $response = curl_exec($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + if ($httpCode != 200 || !$response) return null; + return json_decode($response, true); +} + +function addToSeferWallet($passengerId, $amount, $paymentMethod, $token) { + $url = rtrim(BASE_URL, '/') . "/seferWallet/add.php"; + $postData = [ + 'amount' => $amount, + 'paymentMethod' => $paymentMethod, + 'passengerId' => $passengerId, + 'token' => $token, + 'driverId' => 'passenger' + ]; + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData)); + $response = curl_exec($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + if ($httpCode != 200 || !$response) return null; + return json_decode($response, true); +} \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/mtn/passenger/mtn_start.php b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/passenger/mtn_start.php new file mode 100755 index 0000000..c87b65e --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/passenger/mtn_start.php @@ -0,0 +1,130 @@ +<?php +include "../../../connect.php"; +date_default_timezone_set("Asia/Damascus"); + +// ========== إعدادات MTN ========== +$terminalId = "9001000000060863"; +$currencyCode = 760; +$sessionNumber = 0; +$ttl = 15; + +// ====== استقبال البيانات من فلاتر ====== +$amount = filterRequest("amount"); +$passengerId = filterRequest("passengerId"); +$phone = filterRequest("phone"); +$lang = filterRequest("lang"); + +// ✅ Log مبدئي +error_log("🚦 START | passengerId: $passengerId | phone: $phone | amount: $amount"); + +// تحقق من المدخلات +if (empty($amount) || empty($passengerId) || empty($phone) || $amount <= 0) { + error_log("❌ Invalid input: amount=$amount, passengerId=$passengerId, phone=$phone"); + printFailure("بيانات الدفع غير كاملة أو غير صالحة."); + exit; +} + +// ====== توليد invoiceNumber و GUID ====== +$invoiceNumber = mt_rand(10000000000, 99999999999); +//$invoiceNumber = "MTN_" . $passengerId . "_" . time(); +$guid = uniqid("mtn_"); +error_log("🧾 Generated Invoice: $invoiceNumber"); +error_log("🧭 Generated GUID: $guid"); + +// ====== 1. إنشاء الفاتورة ====== +$createInvoiceBody = [ + "Amount" => intval($amount * 100), + "Invoice" => $invoiceNumber, + "Session" => $sessionNumber, + "TTL" => $ttl +]; +error_log("📦 Create Invoice Body: " . json_encode($createInvoiceBody, JSON_UNESCAPED_UNICODE)); +$invoiceResponse = sendMtnApiRequest("pos_web/invoice/create", $terminalId, $createInvoiceBody); +error_log("📥 Create Invoice Response: " . json_encode($invoiceResponse, JSON_UNESCAPED_UNICODE)); + +if (!$invoiceResponse || isset($invoiceResponse['Errno']) && $invoiceResponse['Errno'] != 0) { + error_log("❌ Failed to create invoice. Error: " . json_encode($invoiceResponse)); + printFailure("فشل إنشاء الفاتورة عبر MTN."); + exit; +} + +// ====== 2. بدء الدفع ====== +$initiateBody = [ + "Invoice" => $invoiceNumber, + "Phone" => $phone, + "Guid" => $guid +]; +error_log("📤 body initiateBody: $initiateBody"); +error_log("📦 Initiate Payment Body: " . json_encode($initiateBody, JSON_UNESCAPED_UNICODE)); +$initiateResponse = sendMtnApiRequest("pos_web/payment_phone/initiate", $terminalId, $initiateBody); +error_log("📥 Initiate Response: " . json_encode($initiateResponse, JSON_UNESCAPED_UNICODE)); + +if (!$initiateResponse || !isset($initiateResponse['OperationNumber'])) { + error_log("❌ Failed to initiate payment."); + printFailure($initiateResponse); + exit; +} + +$operationNumber = $initiateResponse['OperationNumber']; + +// ====== 3. تسجيل العملية ====== +try { + $stmt = $con->prepare("INSERT INTO `paymentsLogSyria` + (`user_id`, `amount`, `status`, `order_ref`, `payment_method`, `created_at`) + VALUES (?, ?, 2, ?, 'mtn', NOW())"); + $stmt->execute([$passengerId, $amount, $invoiceNumber]); + error_log("✅ DB Log Inserted."); +} catch (PDOException $e) { + error_log("❌ DB ERROR: " . $e->getMessage()); + printFailure("فشل في تسجيل العملية."); + exit; +} + +// ====== 4. نجاح +error_log("✅ Payment initiation successful."); +printSuccess([ + "invoiceNumber" => $invoiceNumber, + "operationNumber" => $operationNumber, + "guid" => $guid +]); + + +// ====== دالة إرسال الطلب ===================== +function sendMtnApiRequest($requestName, $terminalId, $body) +{ + $apiUrl = "https://cashmobile.mtnsyr.com:9000"; + $privateKey = openssl_pkey_get_private(file_get_contents("private_key.pem")); + + // ✅ تحويل الـ body إلى JSON بدون فراغات أو أسطر + $bodyJson = trim(stripslashes(json_encode($body, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_LINE_TERMINATORS)), '"'); +//$bodyJson = json_encode($body, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); + // ✅ توليد التوقيع + // $bodyHash = hash('sha256', $bodyJson, true); + error_log("📤 body before JSON: $bodyJson"); + openssl_sign($bodyJson, $signature, $privateKey, OPENSSL_ALGO_SHA256); + $xSignature = base64_encode($signature); +error_log("📤 body xSignature: $xSignature"); + // ✅ رؤوس الطلب + $headers = [ + "Content-Type: application/json", + "Accept-Language: $lang", + "Request-Name: $requestName", + "Subject: $terminalId", + "X-Signature: $xSignature" + ]; + + $ch = curl_init($apiUrl); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, $bodyJson); + curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + + $response = curl_exec($ch); + + // ✅ لوق داخلي + error_log("🔐 Signature for $requestName: $xSignature"); + error_log("📤 Sent JSON: $bodyJson"); + + curl_close($ch); + return json_decode($response, true); +} \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/mtn/passenger/private_key.pem b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/passenger/private_key.pem new file mode 100644 index 0000000..fead7a6 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/passenger/private_key.pem @@ -0,0 +1,15 @@ +-----BEGIN RSA PRIVATE KEY----- +MIICXwIBAAKBgQDOhVAdUyxFpVNSyjRndMWEPAN9vJEetMzLbjF9DTn2lPVuRj/M +kwq9wCNhy+tdeX2lIn4K3EkONBvYJubBhxnYOoQuMchPW5vG7VnmpLjZ7TkpM2n9 +fcMu8u1GkLatLblDI4LTfvn3851+nhpnYlUVkjw5GAhH4XnEpveIjqDhzQIDAQAB +AoGBALRcAvqJT8nHN7y+8QNFHNZ+XwIpc4egmJY1Ny0iJvPtZWaYHVG5PRE4Qu4+ +29+3oX5dYDx146tu4L5mQvLS3ULBsvxaUZt2lT/vxkQzI9pNfXw584WvIrbtxQod +ILvBcnamwQa9hEOIFZVyZ/hzkzUcMO6cAXqvsfqqPgJhm7PBAkEA+xgE9CUOLDFl +vLePQKGcHIUOsPLr16qNEgGhTW7Km3OMMqoB2f7t67xOHGqK6tnANRM4Sk6IModI +wbZuVh4jMQJBANKOVmIdDLNffZVHp90SDRG7/YdK2R5ob361CIkcUzjh927Wfs5W +A/WroB7eJ7pWiq2BMaj/xq65nYaCOldvaV0CQQDm12c+eY61DFjnDa6ykaEvCxi9 +jydJp+93vW3o/VFhZvJeZbO8EcX0MrNxJnY+gSBW6yuWDOrj4UH/bVO08pIRAkEA +lH3TiBAqo9nlTEEjrnILi4VD0IVFx/8pGnf71A6I1qXuBVn6RfQ9iKWIIBzWccCU +vrZNWn1AFntLD9CJ6p3k9QJBAMbSQ9CoXWlOLJRduV15ER1ZyE/inVd4jIvtjAgz +b7QaM62Ecxl3D8EI/LTSZV9Oa8D/62cJeMsflVa7gpavL70= +-----END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/mtn/passenger/public_key.pem b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/passenger/public_key.pem new file mode 100644 index 0000000..63a3519 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/mtn/passenger/public_key.pem @@ -0,0 +1,6 @@ +-----BEGIN PUBLIC KEY----- +MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDqBQZEJXWCQwPsPzBM70M3TjyU +5vwCZWoEtUomR9Qu+dEQaa0Hniz6JY8+goCxfMYuZQw6+kimctA2KqzT2pCsJufN +b92pSAMZgb0RSTl2y62oJkJd2WY7dj36AvPEyw6DxCFItvFOu7HGl3LlHQBriiw3 +jwtuS6DO7gbmAJPU8wIDAQAB +-----END PUBLIC KEY----- diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/mtn_new/check_status.php b/walletintaleq.intaleq.xyz/v2/main/ride/mtn_new/check_status.php new file mode 100644 index 0000000..3f231ea --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/mtn_new/check_status.php @@ -0,0 +1,32 @@ +<?php +// --- check_status.php --- +include "../../connect.php"; + +header('Content-Type: application/json'); + +try { + $invoiceNumber = filterRequest("invoice_number"); + + if (empty($invoiceNumber)) { + echo json_encode(["status" => "failure", "message" => "Invoice number is required."]); + exit; + } + + $stmt = $con->prepare("SELECT status FROM mtn_invoices WHERE invoice_number = :invoice_number LIMIT 1"); + $stmt->execute([':invoice_number' => $invoiceNumber]); + $invoice = $stmt->fetch(PDO::FETCH_ASSOC); + + if ($invoice) { + echo json_encode([ + "status" => "success", + "invoice_status" => $invoice['status'] + ]); + } else { + echo json_encode(["status" => "failure", "message" => "Invoice not found."]); + } + +} catch (Exception $e) { + error_log("Error in check_status.php: " . $e->getMessage()); + echo json_encode(["status" => "error", "message" => "Server error."]); +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/mtn_new/create_mtn_invoice.php b/walletintaleq.intaleq.xyz/v2/main/ride/mtn_new/create_mtn_invoice.php new file mode 100755 index 0000000..ed7acd3 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/mtn_new/create_mtn_invoice.php @@ -0,0 +1,100 @@ +<?php +// --- create_mtn_invoice.php --- +// إذا كانت هناك فاتورة Pending لليوم نفسه لنفس المستخدم: نُحدّثها +// غير ذلك: نُنشئ فاتورة جديدة + +include "../../connect.php"; +header('Content-Type: application/json'); + +try { + $userId = filterRequest("user_id"); // driverID أو passengerID + $userType = filterRequest("user_type"); // 'driver' أو 'passenger' + $amount = filterRequest("amount"); + $mtnPhone = filterRequest("mtn_phone"); + + if (empty($userId) || empty($userType) || !is_numeric($amount) || $amount <= 0 || empty($mtnPhone)) { + echo json_encode(["status" => "failure", "message" => "Invalid input provided."]); + exit; + } + + // نضمن اتساق العمليات + $con->beginTransaction(); + + // ابحث عن فاتورة PENDING لنفس المستخدم، منشأة "اليوم" + // ملاحظة: يتطلب وجود عمود created_at (TIMESTAMP) في الجدول + $sel = $con->prepare(" + SELECT id, invoice_number + FROM mtn_invoices + WHERE user_id = :uid + AND user_type = :utype + AND status = 'pending' + AND DATE(created_at) = CURRENT_DATE + ORDER BY id DESC + LIMIT 1 + "); + $sel->execute([ + ':uid' => $userId, + ':utype' => $userType, + ]); + $existing = $sel->fetch(PDO::FETCH_ASSOC); + + if ($existing) { + // يوجد سجل لليوم: نحدّث على نفس الفاتورة + $upd = $con->prepare(" + UPDATE mtn_invoices + SET amount = :amount, + mtn_phone = :mtn_phone, + updated_at = NOW() + WHERE id = :id + "); + $upd->execute([ + ':amount' => $amount, + ':mtn_phone'=> $mtnPhone, + ':id' => $existing['id'], + ]); + + $con->commit(); + + echo json_encode([ + "status" => "success", + "message" => "Invoice updated (pending, same day).", + "invoice_number" => $existing['invoice_number'], + "mode" => "updated" + ]); + } else { + // لا يوجد سجل لليوم: ننشئ فاتورة جديدة + $invoiceNumber = "MTN-" . time() . mt_rand(100, 999); + + $ins = $con->prepare(" + INSERT INTO mtn_invoices + (invoice_number, user_id, user_type, amount, mtn_phone, status, created_at, updated_at) + VALUES + (:invoice_number, :user_id, :user_type, :amount, :mtn_phone, 'pending', NOW(), NOW()) + "); + $ins->execute([ + ':invoice_number' => $invoiceNumber, + ':user_id' => $userId, + ':user_type' => $userType, + ':amount' => $amount, + ':mtn_phone' => $mtnPhone + ]); + + $con->commit(); + + // تحديد الرقم أو الاسم المستعار للدفع + $mtnPaymentNumber = $_ENV['MTN_PAYMENT_NUMBER'] ?? getenv('MTN_PAYMENT_NUMBER') ?: '0930000000'; + + echo json_encode([ + "status" => "success", + "message" => "Invoice created successfully.", + "invoice_number" => $invoiceNumber, + "mtn_payment_number" => $mtnPaymentNumber, + "mode" => "inserted" + ]); + } + +} catch (Throwable $e) { + if ($con && $con->inTransaction()) { $con->rollBack(); } + error_log("Error in create_mtn_invoice.php: " . $e->getMessage()); + echo json_encode(["status" => "failure", "message" => "An internal server error occurred."]); +} \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/mtn_new/finalize_payment.php b/walletintaleq.intaleq.xyz/v2/main/ride/mtn_new/finalize_payment.php new file mode 100755 index 0000000..b6825f4 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/mtn_new/finalize_payment.php @@ -0,0 +1,106 @@ +<?php +// --- finalize_payment.php --- +// يحتوي على الدوال المنطقية لإضافة الرصيد للمستخدمين بعد تأكيد الدفع + +// ملاحظة: هذا الملف لا يتم استدعاؤه مباشرة، بل يتم تضمينه في mtn_webhook_handler.php + +/** + * دالة مركزية لإتمام الدفع بعد التحقق منه + * @param PDO $con اتصال قاعدة البيانات + * @param int $invoiceId معرّف الفاتورة في جدول mtn_invoices + * @return array نتيجة العملية + */ +function finalizeMtnPayment(PDO $con, int $invoiceId): array +{ + try { + // جلب تفاصيل الفاتورة + $stmt = $con->prepare("SELECT * FROM `mtn_invoices` WHERE id = :id AND status = 'completed' LIMIT 1"); + $stmt->execute([':id' => $invoiceId]); + $invoice = $stmt->fetch(PDO::FETCH_ASSOC); + + if (!$invoice) { + return ['success' => false, 'message' => 'Invoice not found or not completed.']; + } + + $userType = $invoice['user_type']; + $userId = $invoice['user_id']; + $amount = (float) $invoice['amount']; + $paymentMethod = 'mtn_cash'; // تحديد طريقة الدفع + + // تحديد ما إذا كان المستخدم سائقاً أم راكباً + if ($userType === 'driver') { + return finalizeForDriver($con, $userId, $amount, $paymentMethod); + } elseif ($userType === 'passenger') { + return finalizeForPassenger($con, $userId, $amount, $paymentMethod); + } else { + return ['success' => false, 'message' => 'Unknown user type.']; + } + + } catch (Exception $e) { + error_log("Finalization Exception: " . $e->getMessage()); + return ['success' => false, 'message' => $e->getMessage()]; + } +} + +// --- دوال مساعدة خاصة بالسائق --- +function finalizeForDriver(PDO $con, int $driverId, float $amount, string $paymentMethod): array +{ + // حساب قيمة البونص كما في الكود الأصلي + $bonusAmount = match ((int)$amount) { + 10000 => 10000.0, + 20000 => 21000.0, + 40000 => 45000.0, + 100000 => 110000.0, + default => $amount, + }; + + // إنشاء سجل دفع جديد والحصول على ID + $paymentID = generatePaymentID($con, $driverId, $bonusAmount, $paymentMethod); + if (!$paymentID) throw new Exception('Failed to generate payment ID for driver.'); + + // إضافة الرصيد لمحفظة السائق + $stmtDriver = $con->prepare("INSERT INTO driverWallet (driverID, paymentID, amount, paymentMethod) VALUES (:driverID, :paymentID, :amount, :paymentMethod)"); + $stmtDriver->execute([':driverID' => $driverId, ':paymentID' => $paymentID, ':amount' => $bonusAmount, ':paymentMethod' => $paymentMethod]); + if ($stmtDriver->rowCount() === 0) throw new Exception('Insert to driverWallet failed.'); + + // إضافة سجل محاسبي لمحفظة سفر + $stmtSefer = $con->prepare("INSERT INTO seferWallet (driverId, passengerId, amount, paymentMethod) VALUES (:driverId, 'driver', :amount, :paymentMethod)"); + $stmtSefer->execute([':driverId' => $driverId, ':amount' => $amount, ':paymentMethod' => $paymentMethod]); + if ($stmtSefer->rowCount() === 0) throw new Exception('Insert to seferWallet failed.'); + + return ['success' => true, 'message' => 'Driver wallets updated.']; +} + +function generatePaymentID(PDO $con, string $driverId, float $amount, string $method): ?string { + $stmt = $con->prepare("INSERT INTO paymentsDriverPoints (`amount`, `payment_method`, `driverID`) VALUES (:amount, :method, :driverID)"); + $stmt->execute([':driverID' => $driverId, ':amount' => $amount, ':method' => $method]); + return $stmt->rowCount() > 0 ? $con->lastInsertId() : null; +} + + +// --- دوال مساعدة خاصة بالراكب --- +function finalizeForPassenger(PDO $con, string $passengerId, float $amount, string $paymentMethod): array +{ + // حساب البونص للراكب + $finalAmount = calculatePassengerBonus($amount); + + // إضافة الرصيد لمحفظة الراكب + $stmtPassenger = $con->prepare("INSERT INTO passengerWallet (passenger_id, balance) VALUES (:id, :amount) ON DUPLICATE KEY UPDATE balance = balance + :amount"); + $stmtPassenger->execute([':id' => $passengerId, ':amount' => $finalAmount]); + if ($stmtPassenger->rowCount() === 0) throw new Exception('Update passengerWallet failed.'); + + // إضافة سجل محاسبي لمحفظة سفر + $stmtSefer = $con->prepare("INSERT INTO seferWallet (passengerId, driverId, amount, paymentMethod) VALUES (:passengerId, 'passenger', :amount, :paymentMethod)"); + $stmtSefer->execute([':passengerId' => $passengerId, ':amount' => $amount, ':paymentMethod' => $paymentMethod]); + if ($stmtSefer->rowCount() === 0) throw new Exception('Insert to seferWallet for passenger failed.'); + + return ['success' => true, 'message' => 'Passenger wallets updated.']; +} + +function calculatePassengerBonus(float $amount): float { + if ($amount == 20000) return 20500; + if ($amount == 40000) return 42500; + if ($amount == 100000) return 104000; + return $amount; +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/mtn_new/mtn_webhook_handler.php b/walletintaleq.intaleq.xyz/v2/main/ride/mtn_new/mtn_webhook_handler.php new file mode 100755 index 0000000..3b0c546 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/mtn_new/mtn_webhook_handler.php @@ -0,0 +1,86 @@ +<?php +// --- mtn_webhook_handler.php --- +// هذا هو الـ Webhook الرئيسي الذي يستقبل إشعار تأكيد الدفع من MTN + +include "../../jwtconnect.php"; +include "./finalize_payment.php"; // تضمين ملف إتمام العملية + +header('Content-Type: application/json'); + +// **مهم جداً: التحقق من مصدر الطلب** +// يجب التحقق من أن هذا الطلب قادم فعلاً من MTN وليس من أي طرف آخر +// المثال التالي يستخدم مفتاح سري مشترك (Shared Secret) +$expectedToken = trim(file_get_contents('/home/intaleq-wallet/.mtnKey')); // يجب استبداله بتوكن حقيقي +$receivedToken = $_SERVER['HTTP_X_AUTH_TOKEN'] ?? ''; + +if ($receivedToken !== $expectedToken) { + http_response_code(401); // Unauthorized + echo json_encode(["status" => "error", "message" => "Authentication failed."]); + exit; +} + +// قراءة البيانات القادمة من MTN (عادة تكون بصيغة JSON في الـ body) +$json_data = file_get_contents('php://input'); +$data = json_decode($json_data, true); + +$invoiceNumber = $data['invoice_number'] ?? null; +$transactionId = $data['transaction_id'] ?? null; +$paymentStatus = $data['status'] ?? null; + +if (empty($invoiceNumber) || empty($transactionId) || $paymentStatus !== 'success') { + http_response_code(400); // Bad Request + echo json_encode(["status" => "error", "message" => "Missing or invalid payment data."]); + exit; +} + +try { + $con->beginTransaction(); + + // 1. البحث عن الفاتورة وتحديث حالتها + $stmt = $con->prepare( + "UPDATE `mtn_invoices` + SET `status` = 'completed', `mtn_transaction_id` = :transaction_id + WHERE `invoice_number` = :invoice_number AND `status` = 'pending'" + ); + $stmt->execute([ + ':transaction_id' => $transactionId, + ':invoice_number' => $invoiceNumber + ]); + + if ($stmt->rowCount() > 0) { + // تم تحديث الفاتورة بنجاح، الآن نقوم بإتمام العملية + $invoiceId = $con->lastInsertId(); // ملاحظة: هذا قد لا يعمل دائماً مع UPDATE، الأفضل جلب الـ ID + + // جلب ID الفاتورة بعد التأكد من وجودها + $idStmt = $con->prepare("SELECT id FROM `mtn_invoices` WHERE `invoice_number` = :invoice_number"); + $idStmt->execute([':invoice_number' => $invoiceNumber]); + $invoiceRecord = $idStmt->fetch(); + $invoiceId = $invoiceRecord['id']; + + $finalizationResult = finalizeMtnPayment($con, $invoiceId); + + if ($finalizationResult['success']) { + $con->commit(); + echo json_encode(["status" => "success", "message" => "Transaction finalized."]); + } else { + $con->rollBack(); + // يجب هنا التعامل مع الحالة التي فشل فيها الإيداع رغم نجاح الدفع + error_log("CRITICAL: Payment received for invoice {$invoiceNumber} but finalization failed."); + http_response_code(500); + echo json_encode(["status" => "error", "message" => "Finalization failed."]); + } + } else { + // لم يتم العثور على فاتورة معلقة بهذا الرقم (ربما تمت معالجتها سابقاً) + $con->rollBack(); + http_response_code(404); + echo json_encode(["status" => "error", "message" => "Invoice not found or already processed."]); + } + +} catch (Exception $e) { + $con->rollBack(); + error_log("Error in mtn_webhook_handler.php: " . $e->getMessage()); + http_response_code(500); + echo json_encode(["status" => "error", "message" => "An internal server error occurred."]); +} + +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/mtn_new/query_mtn_invoice.php b/walletintaleq.intaleq.xyz/v2/main/ride/mtn_new/query_mtn_invoice.php new file mode 100755 index 0000000..7f0f28b --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/mtn_new/query_mtn_invoice.php @@ -0,0 +1,64 @@ +<?php +// --- query_mtn_invoice.php --- +// هذا السكربت هو نقطة الـ Webhook التي سيستدعيها نظام MTN +// للاستعلام عن وجود فاتورة دفع معلقة للمستخدم قبل أن يدفع + +include "../../jwtconnect.php"; // تأكد من أن هذا المسار صحيح + +header('Content-Type: application/json'); + +// يمكن إضافة طبقة حماية هنا للتحقق من أن الطلب قادم من سيرفرات MTN +// مثلاً عبر التحقق من IP أو من وجود Secret Key في الـ Headers +// --- آلية الحماية --- +$shared_secret_key = trim(file_get_contents('/home/intaleq-wallet/.mtnKey')); +$receivedToken = $_SERVER['HTTP_X_AUTH_TOKEN'] ?? ''; + +if ($receivedToken !== $shared_secret_key) { + http_response_code(401); // Unauthorized + echo json_encode(['status' => 'error', 'message' => 'Authentication failed. Invalid or missing token.']); + exit; +} +try { + // يفترض أن MTN سترسل رقم هاتف المستخدم للاستعلام عنه + //$mtnPhone = filterRequest("mtn_phone"); + $mtnPhone = $_GET['phone_number'] ?? null; + + if (empty($mtnPhone)) { + echo json_encode(["status" => "error", "message" => "Phone number is required."]); + http_response_code(400); + exit; + } + + // البحث عن فاتورة معلقة لهذا الرقم + $stmt = $con->prepare( + "SELECT invoice_number, amount, user_id, user_type + FROM `mtn_invoices` + WHERE `mtn_phone` = :mtn_phone AND `status` = 'pending' + ORDER BY `created_at` DESC LIMIT 1" + ); + $stmt->execute([':mtn_phone' => $mtnPhone]); + $invoice = $stmt->fetch(PDO::FETCH_ASSOC); + + if ($invoice) { + // تم العثور على فاتورة، يتم إرجاع تفاصيلها لنظام MTN + echo json_encode([ + "status" => "success", + "statusInvoice" => "pending", + "invoice_number" => $invoice['invoice_number'], + "amount" => (float) $invoice['amount'], + "description" => "شحن نقاط في تطبيق انطلق", // وصف يظهر للمستخدم في تطبيق MTN + "biller_name" => "Intaleq App" + + ]); + } else { + // لا توجد فاتورة معلقة + echo json_encode(["status" => "error", "message" => "No pending invoice found for this number."]); + http_response_code(404); + } + +} catch (Exception $e) { + error_log("Error in query_mtn_invoice.php: " . $e->getMessage()); + echo json_encode(["status" => "error", "message" => "Internal server error."]); + http_response_code(500); +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/mtn_new/verify_payment_ai.php b/walletintaleq.intaleq.xyz/v2/main/ride/mtn_new/verify_payment_ai.php new file mode 100644 index 0000000..2f139c2 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/mtn_new/verify_payment_ai.php @@ -0,0 +1,75 @@ +<?php +// --- verify_payment_ai.php --- +include "../../connect.php"; +include "./finalize_payment.php"; +include "../GeminiAi.php"; + +header('Content-Type: application/json'); + +try { + $json_data = file_get_contents('php://input'); + $data = json_decode($json_data, true) ?: $_POST; + + $invoiceNumber = $data['invoice_number'] ?? ''; + $proofText = $data['proof_text'] ?? ''; + $proofImageBase64 = $data['proof_image_base64'] ?? ''; + + if (empty($invoiceNumber)) { + echo json_encode(["status" => "failure", "message" => "Invoice number is required."]); + exit; + } + + if (empty($proofText) && empty($proofImageBase64)) { + echo json_encode(["status" => "failure", "message" => "Proof text or image is required."]); + exit; + } + + $stmt = $con->prepare("SELECT id, amount FROM mtn_invoices WHERE invoice_number = :inv AND status = 'pending'"); + $stmt->execute([':inv' => $invoiceNumber]); + $invoice = $stmt->fetch(PDO::FETCH_ASSOC); + + if (!$invoice) { + echo json_encode(["status" => "failure", "message" => "Invoice not found or already processed."]); + exit; + } + + $amount = $invoice['amount']; + + $geminiKey = $_ENV['GEMINI_API_KEY'] ?? getenv('GEMINI_API_KEY') ?: ''; + + if (empty($geminiKey)) { + echo json_encode(["status" => "error", "message" => "Gemini API key not configured."]); + exit; + } + + $gemini = new GeminiAi($geminiKey); + $aiResult = $gemini->verifyPayment($invoiceNumber, $amount, "MTN", $proofText, $proofImageBase64); + + if (isset($aiResult['verified']) && $aiResult['verified'] === true) { + $con->beginTransaction(); + $upd = $con->prepare("UPDATE mtn_invoices SET status = 'completed', updated_at = NOW() WHERE id = :id AND status = 'pending'"); + $upd->execute([':id' => $invoice['id']]); + + if ($upd->rowCount() > 0) { + $finalizationResult = finalizeMtnPayment($con, $invoice['id']); + if ($finalizationResult['success']) { + $con->commit(); + echo json_encode(["status" => "success", "message" => "Payment verified and finalized."]); + } else { + $con->rollBack(); + echo json_encode(["status" => "error", "message" => "Verification succeeded but finalization failed."]); + } + } else { + $con->rollBack(); + echo json_encode(["status" => "error", "message" => "Invoice already processed."]); + } + } else { + $reason = $aiResult['reason'] ?? "AI rejected the proof."; + echo json_encode(["status" => "failure", "message" => "Verification failed: $reason"]); + } + +} catch (Exception $e) { + error_log("Error in MTN verify: " . $e->getMessage()); + echo json_encode(["status" => "error", "message" => "Server error."]); +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/passengerWallet/add.php b/walletintaleq.intaleq.xyz/v2/main/ride/passengerWallet/add.php new file mode 100644 index 0000000..70e359f --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/passengerWallet/add.php @@ -0,0 +1,33 @@ +<?php +include "../../jwtconnect.php"; +//addPassengersWallet.php +$passenger_id = filterRequest("passenger_id"); +$balance = filterRequest("balance"); +$token = filterRequest("token"); + + +// Retrieve token details from the database +$stmt = $con->prepare("SELECT * FROM payment_tokens_passenger WHERE token = :token AND isUsed = FALSE"); +$stmt->execute([':token' => $token]); + +$tokenData = $stmt->fetch(); + +if ($tokenData) { + // Insert into passengerWallet securely using prepared statements + $sql = "INSERT INTO `passengerWallet` (`passenger_id`, `balance`) VALUES (:passenger_id, :balance)"; + $stmt = $con->prepare($sql); + $stmt->execute([':passenger_id' => $passenger_id, ':balance' => $balance]); + + if ($stmt->rowCount() > 0) { + // Mark the token as used + $updateTokenStmt = $con->prepare("UPDATE payment_tokens_passenger SET isUsed = TRUE WHERE token = :token"); + $updateTokenStmt->execute([':token' => $token]); + + printSuccess("Wallet record created successfully"); + } else { + printFailure("Failed to create wallet record"); + } +} else { + printFailure("Invalid or already used token"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/passengerWallet/addPaymentTokenPassenger.php b/walletintaleq.intaleq.xyz/v2/main/ride/passengerWallet/addPaymentTokenPassenger.php new file mode 100644 index 0000000..c807c40 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/passengerWallet/addPaymentTokenPassenger.php @@ -0,0 +1,53 @@ +<?php +include "../../jwtconnect.php"; +//addPaymentTokenPassenger.php +$passengerId = filterRequest("passengerId"); +$amount = filterRequest("amount"); + +// Check if required fields are present +if ($passengerId === null || $amount === null) { + printFailure("Missing required fields: passengerId and amount must be provided"); + exit; +} + +// Generate the token using current time +$token = generateSecureToken($passengerId, $amount, date('Y-m-d H:i:s', time())); + +// Store the token in the database, using NOW() for dateCreated +$stmt = $con->prepare("INSERT INTO payment_tokens_passenger (token, passengerId, dateCreated, amount) VALUES (?, ?, NOW(), ?)"); + +try { + $stmt->execute([$token, $passengerId, $amount]); + if ($stmt->rowCount() > 0) { + printSuccess($token); + } else { + printFailure("Failed to save record"); + } +} catch (PDOException $e) { + printFailure("Database error: " . $e->getMessage()); +} + +// Rest of your code including the generateSecureToken function... + +// Rest of your code including the generateSecureToken function... + +function generateSecureToken($passengerId, $amount, $dateCreated) { + global $secretKey; + // Concatenate the parameters + $data = $passengerId . $amount . $dateCreated; + + // Add the secret key from the environment variable + $data .= $secretKey; + + // Generate a hash + $hash = hash('sha256', $data); + + // Add some randomness + $randomBytes = bin2hex(random_bytes(16)); + + // Combine hash and random bytes + $token = $hash . $randomBytes; + + // Truncate to a reasonable length (e.g., 64 characters) + return substr($token, 0, 64); +} \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/passengerWallet/delete.php b/walletintaleq.intaleq.xyz/v2/main/ride/passengerWallet/delete.php new file mode 100644 index 0000000..8452130 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/passengerWallet/delete.php @@ -0,0 +1,17 @@ +<?php +include "../../connect.php"; + +$id = filterRequest("id"); + +$sql = "DELETE FROM `passengerWallet` WHERE `id` = '$id'"; +$stmt = $con->prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Print a success message + printSuccess($message = "Wallet record deleted successfully"); +} else { + // Print a failure message + printFailure($message = "Failed to delete wallet record"); +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/passengerWallet/error_log b/walletintaleq.intaleq.xyz/v2/main/ride/passengerWallet/error_log new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/passengerWallet/get.php b/walletintaleq.intaleq.xyz/v2/main/ride/passengerWallet/get.php new file mode 100644 index 0000000..0b146b9 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/passengerWallet/get.php @@ -0,0 +1,32 @@ +<?php +include "../../connect.php"; +$passenger_id = filterRequest("passenger_id"); + +$sql = "SELECT + passengerWallet.`id`, + passengerWallet.`passenger_id`, + SUM(passengerWallet.balance) AS total, + passengers.first_name, + passengers.last_name, + passengers.phone, + passengers.email +FROM + `passengerWallet` +LEFT JOIN passengers ON passengers.id = passengerWallet.passenger_id +GROUP BY + passenger_id"; +$stmt = $con->prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Fetch the record + $row = $stmt->fetchAll(PDO::FETCH_ASSOC); + + printSuccess( $row); + +} + else{ + // Print a failure message + printFailure($message = "No wallet record found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/passengerWallet/getAllPassengerTransaction.php b/walletintaleq.intaleq.xyz/v2/main/ride/passengerWallet/getAllPassengerTransaction.php new file mode 100644 index 0000000..eaa8db1 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/passengerWallet/getAllPassengerTransaction.php @@ -0,0 +1,40 @@ +<?php +include "../../connect.php"; +$passenger_id = filterRequest("passenger_id"); + +$sql = "SELECT + `id`, + `passenger_id`, + `balance`, + `created_at`, + `updated_at`, + ( + SELECT + SUM(balance) + FROM + passengerWallet + WHERE + passenger_id = '$passenger_id' +) AS total +FROM + `passengerWallet` +WHERE + passenger_id = '$passenger_id' +GROUP BY + `passenger_id`, + `id`;"; +$stmt = $con->prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Fetch the record + $row = $stmt->fetchAll(PDO::FETCH_ASSOC); + + printSuccess( $row); + +} + else{ + // Print a failure message + printFailure($message = "No wallet record found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/passengerWallet/getPassengerWalletArchive.php b/walletintaleq.intaleq.xyz/v2/main/ride/passengerWallet/getPassengerWalletArchive.php new file mode 100644 index 0000000..ea49392 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/passengerWallet/getPassengerWalletArchive.php @@ -0,0 +1,30 @@ +<?php +include "../../connect.php"; +$passenger_id = filterRequest("passenger_id"); + +$sql = "SELECT + passengerWallet.`id`, + passengerWallet.balance, + passengerWallet.`created_at` +FROM + `passengerWallet` +WHERE + passenger_id = '$passenger_id'AND created_at >= DATE_SUB(NOW(), INTERVAL 1 MONTH) +ORDER BY + `passengerWallet`.`id` +DESC"; +$stmt = $con->prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Fetch the record + $row = $stmt->fetchAll(PDO::FETCH_ASSOC); + + printSuccess( $row); + +} + else{ + // Print a failure message + printFailure($message = "No wallet record found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/passengerWallet/getWalletByPassenger.php b/walletintaleq.intaleq.xyz/v2/main/ride/passengerWallet/getWalletByPassenger.php new file mode 100755 index 0000000..0a256ea --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/passengerWallet/getWalletByPassenger.php @@ -0,0 +1,33 @@ +<?php +include "../../connect.php"; +$passenger_id = filterRequest("passenger_id"); + +$sql = "SELECT + COALESCE(dummy.passenger_id, '$passenger_id') AS passenger_id, + COALESCE(SUM(pw.balance), 0) AS total, -- Adjust column to represent payments + COALESCE(p.first_name, '') AS first_name, + COALESCE(p.last_name, '') AS last_name, + COALESCE(p.phone, '') AS phone +FROM + (SELECT '$passenger_id' AS passenger_id) AS dummy +LEFT JOIN `passengerWallet` pw ON pw.passenger_id = dummy.passenger_id +LEFT JOIN passengers p ON p.id = dummy.passenger_id +GROUP BY + dummy.passenger_id, p.first_name, p.last_name, p.phone +LIMIT 0, 25; +"; +$stmt = $con->prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Fetch the record + $row = $stmt->fetchAll(PDO::FETCH_ASSOC); + + printSuccess( $row); + +} + else{ + // Print a failure message + printFailure($message = "No wallet record found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/passengerWallet/process_wait_compensation.php b/walletintaleq.intaleq.xyz/v2/main/ride/passengerWallet/process_wait_compensation.php new file mode 100755 index 0000000..a7ef9b2 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/passengerWallet/process_wait_compensation.php @@ -0,0 +1,97 @@ +<?php +// process_wait_compensation.php +// يوضع هذا الملف على سيرفر المدفوعات (Payment Server) + +include "../../connect.php"; // تأكد من مسار الاتصال + +// 1. استقبال البيانات +$rideId = filterRequest("ride_id"); +$driverId = filterRequest("driver_id"); +$passengerId = filterRequest("passenger_id"); +$amount = filterRequest("amount"); // المبلغ الموجب (للسائق) +$amountPassenger= filterRequest("amount_passenger"); // المبلغ السالب (للراكب) +$tokenDriver = filterRequest("token_driver"); +$tokenPassenger = filterRequest("token_passenger"); +$paymentMethod = "wait-cancel"; // أو يمكن استقباله من التطبيق + +if (!$rideId || !$driverId || !$passengerId || !$amount || !$tokenDriver || !$tokenPassenger) { + printFailure("Missing parameters"); + exit; +} + +try { + // 🔥 بدء المعاملة المالية (Transaction) + $con->beginTransaction(); + + // --------------------------------------------------------- + // الخطوة 1: التحقق من التوكنات (Security Check) + // --------------------------------------------------------- + + // أ) فحص توكن السائق + $stmtCheckD = $con->prepare("SELECT id FROM payment_tokens WHERE token = ? AND isUsed = FALSE"); + $stmtCheckD->execute([$tokenDriver]); + $tokenDriverData = $stmtCheckD->fetch(); + + if (!$tokenDriverData) { + throw new Exception("Invalid or used Driver Token"); + } + + // ب) فحص توكن الراكب + $stmtCheckP = $con->prepare("SELECT id FROM payment_tokens_passenger WHERE token = ? AND isUsed = FALSE"); + $stmtCheckP->execute([$tokenPassenger]); + $tokenPassengerData = $stmtCheckP->fetch(); + + if (!$tokenPassengerData) { + throw new Exception("Invalid or used Passenger Token"); + } + + // --------------------------------------------------------- + // الخطوة 2: إضافة سجل النقاط (paymentsDriverPoints) + // --------------------------------------------------------- + // هذا الجدول يبدو أنه "سجل العمليات" الرئيسي + $sqlPoints = "INSERT INTO `paymentsDriverPoints` (`amount`, `payment_method`, `driverID`) VALUES (?, ?, ?)"; + $stmtPoints = $con->prepare($sqlPoints); + $stmtPoints->execute([$amount, $paymentMethod, $driverId]); + + // نحصل على ID العملية لنربطه بالمحفظة + $paymentRecordID = $con->lastInsertId(); + + if ($stmtPoints->rowCount() == 0) { + throw new Exception("Failed to insert into paymentsDriverPoints"); + } + + // --------------------------------------------------------- + // الخطوة 3: إضافة الرصيد لمحفظة السائق (driverWallet) + // --------------------------------------------------------- + // نستخدم $paymentRecordID كمرجع للعملية + $sqlWalletD = "INSERT INTO `driverWallet` (`driverID`, `paymentID`, `amount`, `paymentMethod`) VALUES (?, ?, ?, ?)"; + $stmtWalletD = $con->prepare($sqlWalletD); + $stmtWalletD->execute([$driverId, $paymentRecordID, $amount, $paymentMethod]); + + // حرق توكن السائق + $con->prepare("UPDATE payment_tokens SET isUsed = TRUE WHERE id = ?")->execute([$tokenDriverData['id']]); + + // --------------------------------------------------------- + // الخطوة 4: خصم الرصيد من محفظة الراكب (passengerWallet) + // --------------------------------------------------------- + $sqlWalletP = "INSERT INTO `passengerWallet` (`passenger_id`, `balance`) VALUES (?, ?)"; + $stmtWalletP = $con->prepare($sqlWalletP); + $stmtWalletP->execute([$passengerId, $amountPassenger]); + + // حرق توكن الراكب + $con->prepare("UPDATE payment_tokens_passenger SET isUsed = TRUE WHERE id = ?")->execute([$tokenPassengerData['id']]); + + // --------------------------------------------------------- + // إتمام العملية (Commit) + // --------------------------------------------------------- + $con->commit(); + printSuccess("Compensation processed successfully"); + +} catch (Exception $e) { + // في حال حدوث أي خطأ، يتم التراجع عن كل العمليات السابقة + if ($con->inTransaction()) { + $con->rollBack(); + } + printFailure("Transaction Failed: " . $e->getMessage()); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/passengerWallet/update.php b/walletintaleq.intaleq.xyz/v2/main/ride/passengerWallet/update.php new file mode 100644 index 0000000..750307c --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/passengerWallet/update.php @@ -0,0 +1,18 @@ + +<?php +include "../../connect.php"; +$id = filterRequest("id"); +$balance = filterRequest("balance"); + +$sql = "UPDATE `passengerWallet` SET `balance` = '$balance' WHERE `id` = '$id'"; +$stmt = $con->prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Print a success message + printSuccess($message = "Wallet record updated successfully"); +} else { + // Print a failure message + printFailure($message = "Failed to update wallet record"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/payMob/error_log b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/error_log new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/payMob/payWithPayMob.php b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/payWithPayMob.php new file mode 100644 index 0000000..371b274 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/payWithPayMob.php @@ -0,0 +1,100 @@ + +<?php +include "../../connect.php"; +// 1. احصل على AUTH TOKEN +$api_key = getenv("payMobApiKey1"); // ضع API Key الخاص بك هنا +$email= filterRequest("amount"); +$first_name= filterRequest("first_name"); +$last_name= filterRequest("last_name"); +$phone_number= filterRequest("phone_number"); +$amount= filterRequest("amount"); + +$auth_url = "https://accept.paymob.com/api/auth/tokens"; +$auth_data = json_encode(["api_key" => $api_key]); + +$response = callAPI("POST", $auth_url, $auth_data); +// printResponse("AUTH TOKEN RESPONSE", $response); + +$auth_token = $response->token ?? null; +if (!$auth_token) { + die("❌ فشل الحصول على AUTH TOKEN!"); +} +// $amount=$amount*100; +// 2. أنشئ الطلب ORDER +$order_url = "https://accept.paymob.com/api/ecommerce/orders"; +$order_data = [ + "auth_token" => $auth_token, + "delivery_needed" => false, + "amount_cents" => $amount, + "currency" => "EGP", + "merchant_order_id" => uniqid(), + "items" => [] +]; + +$response = callAPI("POST", $order_url, json_encode($order_data)); +// printResponse("ORDER RESPONSE", $response); + +$order_id = $response->id ?? null; +if (!$order_id) { + die("❌ فشل إنشاء الطلب!"); +} +$integration_id=getenv("paymobIntegratedIdCard"); +// 3. احصل على Payment Key +$payment_key_url = "https://accept.paymob.com/api/acceptance/payment_keys"; +$payment_key_data = [ + "auth_token" => $auth_token, + "amount_cents" => $amount, + "expiration" => 3600, + "order_id" => $order_id, + "billing_data" => [ + "first_name" =>$first_name, + "last_name" => $last_name, + "email" => $email, + "phone_number" => $phone_number, + "country" => "EG", + "city" => "Cairo", + "state" => "shobra", + "street" => "Test St.", + "building" => "1", + "apartment" => "10", + "floor" => "2", + "postal_code" => "12345", + "shipping_method"=> 'card' + ], + "currency" => "EGP", + "integration_id" => $integration_id, // ضع الـ Integration ID الصحيح +]; + +$response = callAPI("POST", $payment_key_url, json_encode($payment_key_data)); +// printResponse("PAYMENT TOKEN RESPONSE", $response); + +$payment_token = $response->token ?? null; +if (!$payment_token) { + die("❌ فشل الحصول على PAYMENT TOKEN!"); +} + +// 4. إنشاء IFRAME URL +$iframe_id = "837992"; // ضع الـ Iframe ID الصحيح +$iframe_url = "https://accept.paymob.com/api/acceptance/iframes/$iframe_id?payment_token=$payment_token"; +if($payment_token){ + + printSuccess($iframe_url); +} +// دالة لطلب API عبر CURL +function callAPI($method, $url, $data) +{ + $curl = curl_init(); + + curl_setopt_array($curl, [ + CURLOPT_URL => $url, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_CUSTOMREQUEST => $method, + CURLOPT_POSTFIELDS => $data, + CURLOPT_HTTPHEADER => ["Content-Type: application/json"] + ]); + + $response = curl_exec($curl); + curl_close($curl); + + return json_decode($response); +} diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymet_verfy.php b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymet_verfy.php new file mode 100644 index 0000000..a9513df --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymet_verfy.php @@ -0,0 +1,358 @@ +<?php +include "../../connect.php"; + +define("BASE_URL", "https://wl.tripz-egypt.com/v1/main/ride"); +define("LOG_FILE", "../logs/payment_verification.log"); // Define log file path + +// Function to write to error log +function logError($step, $message, $data = null) { + $timestamp = date('Y-m-d H:i:s'); + $logEntry = "[{$timestamp}] STEP {$step}: {$message}"; + + if ($data !== null) { + $logEntry .= " | Data: " . json_encode($data); + } + + // Ensure log directory exists + $logDir = dirname(LOG_FILE); + if (!is_dir($logDir)) { + mkdir($logDir, 0755, true); + } + + // Append to log file + file_put_contents(LOG_FILE, $logEntry . PHP_EOL, FILE_APPEND); + + // Also log to PHP error log for server monitoring + // error_log("PAYMENT_VERIFICATION: {$logEntry}"); +} + +// Receive parameters from GET request +$user_id = filterRequest("user_id"); +$passengerId = filterRequest("passengerId"); +$paymentMethod = filterRequest("paymentMethod"); + +// Log initial request +// logError("0", "Request received", [ +// "user_id" => $user_id, +// "passengerId" => $passengerId +// ]); + +// Validate user_id and passengerId +if (!$user_id || !$passengerId) { + // logError("1", "Invalid parameters", [ + // "user_id" => $user_id, + // "passengerId" => $passengerId + // ]); + printFailure("Invalid user ID or passenger ID."); + exit; +} + +try { + // Step 1: Get the latest successful payment + // logError("1", "Querying latest payment", ["user_id" => $user_id]); + + $stmt = $con->prepare("SELECT * FROM paymentsLog WHERE user_id = :user_id AND created_at >= DATE_SUB(NOW(), INTERVAL 2 MINUTE) +ORDER BY created_at DESC +LIMIT 1"); + $stmt->bindParam(':user_id', $user_id, PDO::PARAM_STR); + $stmt->execute(); + + $payment = $stmt->fetch(PDO::FETCH_ASSOC); + + if (!$payment) { + logError("1", "No payment found", ["user_id" => $user_id]); + printFailure("No payment data found."); + exit; + } + + // logError("1", "Payment found", [ + // "payment_id" => $payment['id'] ?? 'unknown', + // "status" => $payment['status'], + // "amount" => $payment['amount']/100 ?? 'unknown' + // ]); + + // Step 2: Check payment status + if ($payment['status'] != 1) { + // logError("2", "Payment not successful", ["status" => $payment['status']]); + printFailure("Payment is not successful yet."); + exit; + } + + // logError("2", "Payment status verified", ["status" => $payment['status']]); + + $amount = $payment['amount']/100; // Paid amount + + // Step 3: Calculate bonus based on the paid amount + // logError("3", "Calculating bonus", ["amount" => $amount]); + $finalAmount = calculateBonus($amount); + + if ($finalAmount <= 0) { + // logError("3", "Bonus calculation failed", [ + // "original_amount" => $amount, + // "calculated_amount" => $finalAmount + // ]); + printFailure("Invalid amount for bonus calculation."); + exit; + } + + // logError("3", "Bonus calculated", [ + // "original_amount" => $amount, + // "final_amount" => $finalAmount + // ]); + + // // Step 4: Generate payment token + // logError("4", "Generating payment token", [ + // "passengerId" => $passengerId, + // "amount" => $finalAmount + // ]); + + $token = generatePaymentToken($passengerId, $finalAmount); + + if (!$token) { + // logError("4", "Token generation failed"); + printFailure("Payment verified, but failed to generate token."); + exit; + } + + // logError("4", "Token generated successfully", ["token_length" => strlen($token)]); + + // // Step 5: Add balance to passenger's wallet + // logError("5", "Adding balance to passenger wallet", [ + // "passengerId" => $passengerId, + // "amount" => $finalAmount + // ]); + + $walletResult = addToPassengerWallet($passengerId, $finalAmount, $token); + + if (!$walletResult || !isset($walletResult['status']) || $walletResult['status'] != "success") { + // logError("5", "Failed to add balance to passenger wallet", $walletResult); + printFailure("Payment verified, but failed to add balance to passenger wallet."); + exit; + } + + // logError("5", "Balance added to passenger wallet", $walletResult); + + // Step 6: Add balance to Sefer wallet + // logError("6", "Adding balance to Sefer wallet", [ + // "passengerId" => $passengerId, + // "amount" => $finalAmount, + // "paymentMethod" => $paymentMethod + // ]); + + $token = generatePaymentToken($passengerId, $finalAmount); + + if (!$token) { + // logError("4", "Token generation failed"); + printFailure("Payment verified, but failed to generate token."); + exit; + } + + // logError("4", "Token generated successfully", ["token_length" => strlen($token)]); + + $seferWalletResult = addToSeferWallet($passengerId, $amount, $paymentMethod); + + if (!$seferWalletResult || !isset($seferWalletResult['status']) || $seferWalletResult['status'] != "success") { + // logError("6", "Failed to add balance to Sefer wallet", $seferWalletResult); + printFailure("Payment verified, but failed to add balance to Sefer wallet."); + exit; + } + + // logError("6", "Balance added to Sefer wallet", $seferWalletResult); + + // // Final success + // logError("7", "Process completed successfully", [ + // "payment_id" => $payment['id'] ?? 'unknown', + // "amount" => $finalAmount, + // "passengerId" => $passengerId + // ]); + + printSuccess( "Payment data saved successfully"); + +} catch (PDOException $e) { + logError("ERROR", "Database error: " . $e->getMessage()); + printFailure("Database error occurred."); +} catch (Exception $e) { + logError("ERROR", "General error: " . $e->getMessage()); + printFailure("An error occurred during payment verification."); +} + +// 🎯 Function to generate payment token with error logging +function generatePaymentToken($passengerId, $amount) { + $url = BASE_URL . "/passengerWallet/addPaymentTokenPassenger.php"; + + $postData = [ + 'passengerId' => $passengerId, + 'amount' => $amount + ]; + + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData)); + + $response = curl_exec($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + $curlError = curl_error($ch); + curl_close($ch); + + if ($curlError) { + logError("4.1", "cURL error in token generation", [ + "error" => $curlError, + "url" => $url + ]); + return null; + } + + if ($httpCode != 200) { + logError("4.2", "HTTP error in token generation", [ + "http_code" => $httpCode, + "response" => $response + ]); + return null; + } + + $data = json_decode($response, true); + + if (!$data || !isset($data['message'])) { + logError("4.3", "Invalid response format in token generation", [ + "response" => $response + ]); + return null; + } + + return $data['message']; // ✅ Return token +} + +// 🎯 Function to add balance to passenger's wallet with error logging +function addToPassengerWallet($passengerId, $amount, $token) { + $url = BASE_URL . "/passengerWallet/add.php"; + + $postData = [ + 'passenger_id' => $passengerId, + 'balance' => $amount, + 'token' => $token + ]; + + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData)); + + $response = curl_exec($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + $curlError = curl_error($ch); + curl_close($ch); + + if ($curlError) { + logError("5.1", "cURL error in passenger wallet update", [ + "error" => $curlError, + "url" => $url + ]); + return null; + } + + if ($httpCode != 200) { + logError("5.2", "HTTP error in passenger wallet update", [ + "http_code" => $httpCode, + "response" => $response + ]); + return null; + } + + $data = json_decode($response, true); + + if (!$data) { + logError("5.3", "Invalid response format in passenger wallet update", [ + "response" => $response + ]); + return null; + } + + return $data; // ✅ Return result +} + +// 🎯 Function to add balance to Sefer wallet with error logging + + +function addToSeferWallet($passengerId, $amount, $paymentMethod) { + + + // Generate a new token specifically for the Sefer wallet + $seferToken = generatePaymentToken($passengerId, $amount); + + if (!$seferToken) { + logError("6.0.1", "Failed to generate Sefer token"); + return null; + } + + logError("6.0.2", "Generated new Sefer token", [ + "token_length" => ($seferToken) + ]); + + $url = BASE_URL . "/seferWallet/add.php"; + + $postData = [ + 'amount' => $amount, + 'paymentMethod' => $paymentMethod, + 'passengerId' => $passengerId, + 'token' => $seferToken, // Use the new Sefer-specific token + 'driverId' => 'passenger' + ]; + + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData)); + + $response = curl_exec($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + $curlError = curl_error($ch); + curl_close($ch); + + if ($curlError) { + logError("6.1", "cURL error in Sefer wallet update", [ + "error" => $curlError, + "url" => $url + ]); + return null; + } + + if ($httpCode != 200) { + logError("6.2", "HTTP error in Sefer wallet update", [ + "http_code" => $httpCode, + "response" => $response + ]); + return null; + } + + $data = json_decode($response, true); + + if (!$data) { + logError("6.3", "Invalid response format in Sefer wallet update", [ + "response" => $response + ]); + return null; + } + + return $data; // ✅ Return result +} + + +// 🎯 Function to calculate bonus +function calculateBonus($amount) { + logError("3.1", "Bonus calculation input", ["amount" => $amount]); + + $result = 0; + if ($amount == 100) $result = 100; + else if ($amount == 200) $result = 215; + else if ($amount == 400) $result = 450; + else if ($amount == 1000) $result = 1140; + + logError("3.2", "Bonus calculation result", [ + "input" => $amount, + "output" => $result + ]); + + return $result; +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymet_verfy.php.zip b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymet_verfy.php.zip new file mode 100644 index 0000000..b3aa417 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymet_verfy.php.zip differ diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymob_driver/payWithCard.php b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymob_driver/payWithCard.php new file mode 100755 index 0000000..dac9a6f --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymob_driver/payWithCard.php @@ -0,0 +1,100 @@ + +<?php +include "../../../connect.php"; +// 1. احصل على AUTH TOKEN +$api_key = getenv("payMobApiKey1"); // ضع API Key الخاص بك هنا +$email= filterRequest("amount"); +$first_name= filterRequest("first_name"); +$last_name= filterRequest("last_name"); +$phone_number= filterRequest("phone_number"); +$amount= filterRequest("amount"); + +$auth_url = "https://accept.paymob.com/api/auth/tokens"; +$auth_data = json_encode(["api_key" => $api_key]); + +$response = callAPI("POST", $auth_url, $auth_data); +// printResponse("AUTH TOKEN RESPONSE", $response); + +$auth_token = $response->token ?? null; +if (!$auth_token) { + die("❌ فشل الحصول على AUTH TOKEN!"); +} + $amount=$amount*100; +// 2. أنشئ الطلب ORDER +$order_url = "https://accept.paymob.com/api/ecommerce/orders"; +$order_data = [ + "auth_token" => $auth_token, + "delivery_needed" => false, + "amount_cents" => $amount, + "currency" => "EGP", + "merchant_order_id" => uniqid(), + "items" => [] +]; + +$response = callAPI("POST", $order_url, json_encode($order_data)); +// printResponse("ORDER RESPONSE", $response); + +$order_id = $response->id ?? null; +if (!$order_id) { + die("❌ فشل إنشاء الطلب!"); +} +$integration_id=getenv("paymobIntegratedIdCardDriver"); +// 3. احصل على Payment Key +$payment_key_url = "https://accept.paymob.com/api/acceptance/payment_keys"; +$payment_key_data = [ + "auth_token" => $auth_token, + "amount_cents" => $amount, + "expiration" => 3600, + "order_id" => $order_id, + "billing_data" => [ + "first_name" =>$first_name, + "last_name" => $last_name, + "email" => $email, + "phone_number" => $phone_number, + "country" => "EG", + "city" => "Cairo", + "state" => "shobra", + "street" => "Test St.", + "building" => "1", + "apartment" => "10", + "floor" => "2", + "postal_code" => "12345", + "shipping_method"=> 'card' + ], + "currency" => "EGP", + "integration_id" => $integration_id, // ضع الـ Integration ID الصحيح +]; + +$response = callAPI("POST", $payment_key_url, json_encode($payment_key_data)); +// printResponse("PAYMENT TOKEN RESPONSE", $response); + +$payment_token = $response->token ?? null; +if (!$payment_token) { + die("❌ فشل الحصول على PAYMENT TOKEN!"); +} + +// 4. إنشاء IFRAME URL +$iframe_id = "837992"; // ضع الـ Iframe ID الصحيح +$iframe_url = "https://accept.paymob.com/api/acceptance/iframes/$iframe_id?payment_token=$payment_token"; +if($payment_token){ + + printSuccess($iframe_url); +} +// دالة لطلب API عبر CURL +function callAPI($method, $url, $data) +{ + $curl = curl_init(); + + curl_setopt_array($curl, [ + CURLOPT_URL => $url, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_CUSTOMREQUEST => $method, + CURLOPT_POSTFIELDS => $data, + CURLOPT_HTTPHEADER => ["Content-Type: application/json"] + ]); + + $response = curl_exec($curl); + curl_close($curl); + + return json_decode($response); +} diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymob_driver/payWithWallet.php b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymob_driver/payWithWallet.php new file mode 100755 index 0000000..17c12d7 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymob_driver/payWithWallet.php @@ -0,0 +1,118 @@ +<?php +include "../../../connect.php"; + +// 1️⃣ AUTH TOKEN +$api_key = getenv("payMobApiKey1"); +$integration_id = getenv("paymobIntegratedIdDriverWallet"); // 🔁 تأكد أنه خاص بالسائق + +$email = filterRequest("email"); +$first_name = filterRequest("first_name"); +$last_name = filterRequest("last_name"); +$phone_number = filterRequest("phone_number"); // هاتف السائق +$wallet_phone = '+2'.$phone_number; +$amount = filterRequest("amount"); + +$auth_url = "https://accept.paymob.com/api/auth/tokens"; +$auth_data = json_encode(["api_key" => $api_key]); + +$response = callAPI("POST", $auth_url, $auth_data); +$auth_token = $response->token ?? null; + +if (!$auth_token) { + error_log("❌ AUTH TOKEN retrieval failed!"); + die("❌ AUTH TOKEN retrieval failed!"); +} +$amount=$amount*100; +// 2️⃣ ORDER CREATE +$order_url = "https://accept.paymob.com/api/ecommerce/orders"; +$order_data = [ + "auth_token" => $auth_token, + "delivery_needed" => false, + "amount_cents" => $amount, + "currency" => "EGP", + "merchant_order_id" => uniqid("DRV_"), + "items" => [] +]; + +$response = callAPI("POST", $order_url, json_encode($order_data)); +$order_id = $response->id ?? null; + +if (!$order_id) { + error_log("❌ Failed to create order for driver wallet!"); + die("❌ Failed to create order for driver wallet!"); +} + +// 3️⃣ PAYMENT KEY +$payment_key_url = "https://accept.paymob.com/api/acceptance/payment_keys"; +$payment_key_data = [ + "auth_token" => $auth_token, + "amount_cents" => $amount, + "expiration" => 3600, + "order_id" => $order_id, + "billing_data" => [ + "first_name" => $first_name, + "last_name" => $last_name, + "email" => $email, + "phone_number" => $phone_number, + "country" => "EG", + "city" => "Cairo", + "state" => "Nasr City", + "street" => "Driver Zone", + "building" => "5", + "apartment" => "D1", + "floor" => "1", + "postal_code" => "11765", + "shipping_method" => "driver_wallet" + ], + "currency" => "EGP", + "integration_id" => $integration_id +]; + +$response = callAPI("POST", $payment_key_url, json_encode($payment_key_data)); +$payment_token = $response->token ?? null; + +if (!$payment_token) { + error_log("❌ Failed to get PAYMENT TOKEN for driver!"); + die("❌ Failed to get PAYMENT TOKEN for driver!"); +} + +// 4️⃣ Final Step: Pay with Wallet +$redirect_url = payWithWallet($payment_token, $wallet_phone); +if ($redirect_url) { + printSuccess($redirect_url); + error_log("✅ redirect_url (driver): " . $redirect_url); +} else { + error_log("❌ Driver wallet payment failed!"); + printFailure("Payment verified, but failed to redirect."); +} + + +// 🔁 Shared helper functions +function callAPI($method, $url, $data) +{ + $curl = curl_init(); + curl_setopt_array($curl, [ + CURLOPT_URL => $url, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_CUSTOMREQUEST => $method, + CURLOPT_POSTFIELDS => $data, + CURLOPT_HTTPHEADER => ["Content-Type: application/json"] + ]); + $response = curl_exec($curl); + curl_close($curl); + return json_decode($response); +} + +function payWithWallet($paymentToken, $walletPhone) +{ + $url = "https://accept.paymob.com/api/acceptance/payments/pay"; + $data = [ + "source" => [ + "identifier" => $walletPhone, + "subtype" => "WALLET" + ], + "payment_token" => $paymentToken + ]; + $response = callAPI("POST", $url, json_encode($data)); + return $response->redirect_url ?? null; +} \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymob_driver/paymet_verfy.php b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymob_driver/paymet_verfy.php new file mode 100755 index 0000000..b085550 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymob_driver/paymet_verfy.php @@ -0,0 +1,146 @@ +<?php + +include "../../../connect.php"; +define('BASE_URL', 'https://wl.tripz-egypt.com/v1/main/ride'); + +try { + $driverId = filterRequest('driverID'); + $user_id = filterRequest('user_id'); + $paymentMethod = filterRequest('paymentMethod'); + + if (empty($user_id) || empty($driverId)) { + printFailure('Missing user_id or driverID.'); + exit; + } + + // 1️⃣ تحقق من سجل الدفع خلال آخر دقيقتين + $stmt = $con->prepare( + 'SELECT * FROM payment_log_driver + WHERE user_id = :uid + AND created_at >= DATE_SUB(NOW(), INTERVAL 2 MINUTE) + ORDER BY created_at DESC LIMIT 1' + ); + $stmt->execute([':uid' => $user_id]); + $payment = $stmt->fetch(PDO::FETCH_ASSOC); + + if (!$payment || $payment['status'] != 1) { + printFailure('No valid payment found.'); + exit; + } + + $originalAmount = floatval($payment['amount']); + $bonus = match ((int)$originalAmount) { + 80 => 80.0, + 200 => 215.0, + 400 => 450.0, + 1000 => 1140.0, + default => $originalAmount, + }; + + // 2️⃣ توكن لـ DriverWallet + $tokenDriver = generateToken($con, $driverId, $bonus); + if (!$tokenDriver) { + printFailure('Failed to generate token for driver wallet.'); + exit; + } + + // 3️⃣ توكن مستقل لـ SeferWallet + $tokenSefer = generateToken($con, $driverId, $originalAmount); + if (!$tokenSefer) { + printFailure('Failed to generate token for sefer wallet.'); + exit; + } + + // 4️⃣ Payment ID + $paymentID = generatePaymentID($con, $driverId, $bonus, $paymentMethod); + if (!$paymentID) { + printFailure('Failed to generate payment ID.'); + exit; + } + + // 5️⃣ Insert into driverWallet + $insertDriver = $con->prepare("INSERT INTO driverWallet (driverID, paymentID, amount, paymentMethod) VALUES (:driverID, :paymentID, :amount, :paymentMethod)"); + $insertDriver->execute([ + ':driverID' => $driverId, + ':paymentID' => $paymentID, + ':amount' => $bonus, + ':paymentMethod' => $paymentMethod + ]); + + if ($insertDriver->rowCount() === 0) { + printFailure('Failed to insert into driverWallet.'); + exit; + } + + // 6️⃣ Update tokenDriver to isUsed = TRUE + $markTokenDriver = $con->prepare("UPDATE payment_tokens SET isUsed = TRUE WHERE token = :token"); + $markTokenDriver->execute([':token' => $tokenDriver]); + + // 7️⃣ Insert into seferWallet + $insertSefer = $con->prepare("INSERT INTO seferWallet (driverId, passengerId, amount, paymentMethod, token, createdAt) + VALUES (:driverId, :passengerId, :amount, :paymentMethod, :token, CURRENT_TIMESTAMP)"); + $insertSefer->execute([ + ':driverId' => $driverId, + ':passengerId' => 'driver', + ':amount' => $originalAmount, + ':paymentMethod' => $paymentMethod, + ':token' => $tokenSefer + ]); + + // 8️⃣ Update tokenSefer to isUsed = TRUE + $markTokenSefer = $con->prepare("UPDATE payment_tokens SET isUsed = TRUE WHERE token = :token"); + $markTokenSefer->execute([':token' => $tokenSefer]); + + // 🎉 Success response + printSuccess([ + 'message' => 'Payment verified and all wallets updated successfully.', + 'amount' => $originalAmount, + 'bonus' => $bonus, + 'paymentID' => $paymentID, + 'tokenUsed' => [ + 'driverWalletToken' => $tokenDriver, + 'seferWalletToken' => $tokenSefer + ] + ]); + +} catch (Throwable $e) { + printFailure("Server error: " . $e->getMessage()); +} + + +// ─────────────────────────── +// FUNCTIONS +// ─────────────────────────── + +function generateToken($con, $driverId, $amount): ?string { + global $secretKey; + + // نفس المنطق من سكربتك + $data = $driverId . $amount . time(); + $data .= $secretKey; + $hash = hash('sha256', $data); + $randomBytes = bin2hex(random_bytes(16)); + $token = substr($hash . $randomBytes, 0, 64); + // تخزين التوكن في قاعدة البيانات + $stmt = $con->prepare("INSERT INTO payment_tokens (token, driverID, dateCreated, amount) + VALUES (:token, :driverID, NOW(), :amount)"); + $stmt->execute([ + ':token' => $token, + ':driverID' => $driverId, + ':amount' => $amount + ]); + + return $stmt->rowCount() > 0 ? $token : null; +} + +function generatePaymentID($con, $driverId, $amount, $method): ?string { + + $stmt = $con->prepare("INSERT INTO paymentsDriverPoints (`amount`, `payment_method`, `driverID`) + VALUES (:amount, :method, :driverID)"); + $stmt->execute([ + ':driverID' => $driverId, + ':amount' => $amount, + ':method' => $method + ]); + return $stmt->rowCount() > 0 ? $con->lastInsertId() : null; +} diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymob_driver/paymob_payout.php b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymob_driver/paymob_payout.php new file mode 100755 index 0000000..91f9857 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymob_driver/paymob_payout.php @@ -0,0 +1,110 @@ +<?php +// paymob_payout.php +// سكريبت بي ات بي لمعاملات Paymob Payout (محفظة وبنك) بدون تخزين في قاعدة البيانات + +declare(strict_types=1); +include '../../../connect.php'; // يعطيك $con، filterRequest(), printSuccess(), printFailure() + +// 1) جلب باراميترات الطلب عبر filterRequest +$driverId = filterRequest('driverID'); +$amount = filterRequest('amount'); +$method = filterRequest('method'); // 'wallet' أو 'bank' +$msisdn = filterRequest('msisdn'); +$bankCard = filterRequest('bankCard'); // يُستعمل عند method == 'bank' +$bankCode = filterRequest('bankCode'); // يُستعمل عند method == 'bank' + +if (empty($driverId) || empty($amount) || empty($method)) { + printFailure('Missing parameters'); + exit; +} + +// 2) جلب بيانات Paymob من البيئة (Environment Variables) +$pmUser = getenv('payMobOutUserName'); +$pmPass = getenv('payMobOutPassword'); +$pmClientId = getenv('PAYMOBOUTCLIENT_ID'); // من static const pmobid +$pmSecret = getenv('PAYMOBOUTCLIENTSECRET'); // من static const pmobsec + +// 3) دالة للحصول على OAuth Token من Paymob +function fetchPaymobToken(string $user, string $pass, string $cid, string $secret): ?string { + $ch = curl_init('https://payouts.paymobsolutions.com/api/secure/o/token/'); + curl_setopt_array($ch, [ + CURLOPT_POST => true, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_HTTPHEADER => ['Content-Type: application/x-www-form-urlencoded'], + CURLOPT_POSTFIELDS => http_build_query([ + 'grant_type' => 'password', + 'username' => $user, + 'password' => $pass, + 'client_id' => $cid, + 'client_secret' => $secret, + ]), + ]); + $resp = curl_exec($ch); + if (!$resp) return null; + $data = json_decode($resp, true); + return $data['access_token'] ?? null; +} + +$oauthToken = fetchPaymobToken($pmUser, $pmPass, $pmClientId, $pmSecret); +if (!$oauthToken) { + printFailure('Failed to retrieve Paymob token'); + exit; +} + +// 4) دوال صرف الأموال +function disburseWallet(string $token, string $amt, string $msisdn): array { + $ch = curl_init('https://payouts.paymobsolutions.com/api/secure/disburse/'); + curl_setopt_array($ch, [ + CURLOPT_POST => true, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_HTTPHEADER => [ + "Authorization: Bearer $token", + 'Content-Type: application/json', + ], + CURLOPT_POSTFIELDS => json_encode([ + 'amount' => $amt, + 'issuer' => 'wallet', + 'msisdn' => $msisdn, + ]), + ]); + $resp = curl_exec($ch); + return $resp ? json_decode($resp, true) : []; +} + +function disburseBank(string $token, string $amt, string $card, string $code): array { + $ch = curl_init('https://payouts.paymobsolutions.com/api/secure/disburse/'); + curl_setopt_array($ch, [ + CURLOPT_POST => true, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_HTTPHEADER => [ + "Authorization: Bearer $token", + 'Content-Type: application/json', + ], + CURLOPT_POSTFIELDS => json_encode([ + 'amount' => $amt, + 'issuer' => 'bank_card', + 'bank_card_number' => $card, + 'bank_code' => $code, + 'bank_transaction_type' => 'cash_transfer', + ]), + ]); + $resp = curl_exec($ch); + return $resp ? json_decode($resp, true) : []; +} + +// 5) استدعاء الدالة المناسبة وتنفيذ الصرف +if ($method === 'wallet') { + $result = disburseWallet($oauthToken, $amount, $msisdn); +} else { + $result = disburseBank($oauthToken, $amount, $bankCard, $bankCode); +} + +// 6) التحقق من نجاح الصرف وإرجاع النتيجة +if (empty($result) || ($result['disbursement_status'] ?? '') !== 'successful') { + printFailure('Disbursement failed'); + exit; +} + +// 7) إرجاع التوكن والنتيجة للعميل بدون تخزين في DB +printSuccess( $result); +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymob_driver/paymob_webHookWallet.php b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymob_driver/paymob_webHookWallet.php new file mode 100755 index 0000000..583c752 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymob_driver/paymob_webHookWallet.php @@ -0,0 +1,142 @@ +<?php +include "../../../jwtconnect.php"; + +// ------------------------------ +// قراءة HMAC من الهيدر أو من الـ query +// ------------------------------ +$received_hmac = $_SERVER['HTTP_HMAC'] ?? ($_GET['hmac'] ?? ''); +$received_hmac = trim($received_hmac); + +// ------------------------------ +// قراءة البيانات القادمة من Paymob +// ------------------------------ +$raw_body = file_get_contents("php://input"); +$data = json_decode($raw_body, true); + +// ------------------------------ +// المفتاح السري +// ------------------------------ +$secret_key = getenv('hmacPaymob'); + +// ------------------------------ +// دالة لتحويل القيم إلى النصوص +// ------------------------------ +function normalize($value) { + if ($value === true) return 'true'; + if ($value === false) return 'false'; + if (is_null($value)) return ''; + return (string)$value; +} + +// ------------------------------ +// التحقق من صحة HMAC +// ------------------------------ +function isValidHmac($data, $secret_key, $received_hmac) { + if (!isset($data['obj'])) return false; + + $obj = $data['obj']; + + // دمج جميع الحقول بشكل متسلسل + $fields = [ + normalize($obj['amount_cents'] ?? ''), + normalize($obj['created_at'] ?? ''), + normalize($obj['currency'] ?? ''), + normalize($obj['error_occured'] ?? false), + normalize($obj['has_parent_transaction'] ?? false), + normalize($obj['id'] ?? ''), + normalize($obj['integration_id'] ?? ''), + normalize($obj['is_3d_secure'] ?? false), + normalize($obj['is_auth'] ?? false), + normalize($obj['is_capture'] ?? false), + normalize($obj['is_refunded'] ?? false), + normalize($obj['is_standalone_payment'] ?? false), + normalize($obj['is_voided'] ?? false), + normalize($obj['order']['id'] ?? ''), + normalize($obj['owner'] ?? ''), + normalize($obj['pending'] ?? false), + normalize($obj['source_data']['pan'] ?? ''), + normalize($obj['source_data']['sub_type'] ?? ''), + normalize($obj['source_data']['type'] ?? ''), + normalize($obj['success'] ?? false) + ]; + + // دمج الحقول في رسالة واحدة + $message = implode('', $fields); + + // حساب HMAC باستخدام المفتاح السري + $calculated_hmac = hash_hmac('sha512', $message, $secret_key); + + // + /*طباعة الرسائل لأغراض التصحيح + error_log("🔐 Message used for HMAC: " . $message); + error_log("🔐 Calculated HMAC: " . $calculated_hmac); + error_log("📩 Received HMAC: " . $received_hmac); + error_log("Calculated HMAC length: " . strlen($calculated_hmac)); + error_log("Received HMAC length: " . strlen($received_hmac)); + */ + // التحقق من تطابق HMAC + if (hash_equals($calculated_hmac, $received_hmac)) { + error_log("✅ Valid HMAC signature verified."); + return $calculated_hmac; + } else { + http_response_code(401); + echo json_encode(["error" => "Unauthorized – Invalid HMAC"]); + exit; + } +} +isValidHmac($data, $secret_key, $received_hmac); +// ------------------------------ +// إذا كانت HMAC صحيحة، نتابع العملية +// ------------------------------ +if ($data && isset($data['obj'])) { + $transaction = $data['obj']; + + $payment_id = $transaction['id'] ?? null; + $amount = $transaction['amount_cents'] ?? 0; + $status = $transaction['success'] ?? false; + $is_voided = $transaction['is_voided'] ?? false; + $is_refunded = $transaction['is_refunded'] ?? false; + $order_id = $transaction['order']['id'] ?? null; + $merchant_order_id = $transaction['order']['merchant_order_id'] ?? null; + $payment_method = $transaction['source_data']['type'] ?? 'unknown'; + $card_last4 = $transaction['source_data']['pan'] ?? '****'; + $transaction_type = $transaction['data']['migs_transaction']['type'] ?? 'UNKNOWN'; + $created_at = $transaction['created_at'] ?? date("Y-m-d H:i:s"); + $user_id = $transaction['order']['shipping_data']['phone_number']; + + $user_id='+2'. $user_id; + $amount=$amount/100; + + // التحقق من حالة الدفع + if (!$status) { + error_log("❌ Invalid payment status: " . $status); + echo json_encode(["error" => "Invalid payment status"]); + exit; + } + + // إضافة البيانات إلى قاعدة البيانات + $query = "INSERT INTO payment_log_driver (`payment_id`, `user_id`, `amount`, `status`) + VALUES (:payment_id, :user_id, :amount, :status)"; + + $stmt = $con->prepare($query); + $stmt->bindParam(':payment_id', $payment_id); + $stmt->bindParam(':user_id', $user_id); + $stmt->bindParam(':amount', $amount); + $stmt->bindParam(':status', $status); + + try { + $stmt->execute(); + if ($stmt->rowCount() > 0) { + http_response_code(200); + echo json_encode(["success" => true, "message" => "Payment data saved successfully"]); + error_log("Payment data saved successfully" . $status); + } else { + http_response_code(200); + echo json_encode(["success" => false, "message" => "Payment data already up to date."]); + } + } catch (PDOException $e) { + http_response_code(500); + echo json_encode(["error" => "Failed to execute the query: " . $e->getMessage()]); + } +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymob_driver/paymob_webhook.php b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymob_driver/paymob_webhook.php new file mode 100755 index 0000000..acc6d10 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymob_driver/paymob_webhook.php @@ -0,0 +1,142 @@ +<?php +include "../../../jwtconnect.php"; + +// ------------------------------ +// قراءة HMAC من الهيدر أو من الـ query +// ------------------------------ +$received_hmac = $_SERVER['HTTP_HMAC'] ?? ($_GET['hmac'] ?? ''); +$received_hmac = trim($received_hmac); + +// ------------------------------ +// قراءة البيانات القادمة من Paymob +// ------------------------------ +$raw_body = file_get_contents("php://input"); +$data = json_decode($raw_body, true); + +// ------------------------------ +// المفتاح السري +// ------------------------------ +$secret_key = getenv('hmacPaymob'); + +// ------------------------------ +// دالة لتحويل القيم إلى النصوص +// ------------------------------ +function normalize($value) { + if ($value === true) return 'true'; + if ($value === false) return 'false'; + if (is_null($value)) return ''; + return (string)$value; +} + +// ------------------------------ +// التحقق من صحة HMAC +// ------------------------------ +function isValidHmac($data, $secret_key, $received_hmac) { + if (!isset($data['obj'])) return false; + + $obj = $data['obj']; + + // دمج جميع الحقول بشكل متسلسل + $fields = [ + normalize($obj['amount_cents'] ?? ''), + normalize($obj['created_at'] ?? ''), + normalize($obj['currency'] ?? ''), + normalize($obj['error_occured'] ?? false), + normalize($obj['has_parent_transaction'] ?? false), + normalize($obj['id'] ?? ''), + normalize($obj['integration_id'] ?? ''), + normalize($obj['is_3d_secure'] ?? false), + normalize($obj['is_auth'] ?? false), + normalize($obj['is_capture'] ?? false), + normalize($obj['is_refunded'] ?? false), + normalize($obj['is_standalone_payment'] ?? false), + normalize($obj['is_voided'] ?? false), + normalize($obj['order']['id'] ?? ''), + normalize($obj['owner'] ?? ''), + normalize($obj['pending'] ?? false), + normalize($obj['source_data']['pan'] ?? ''), + normalize($obj['source_data']['sub_type'] ?? ''), + normalize($obj['source_data']['type'] ?? ''), + normalize($obj['success'] ?? false) + ]; + + // دمج الحقول في رسالة واحدة + $message = implode('', $fields); + + // حساب HMAC باستخدام المفتاح السري + $calculated_hmac = hash_hmac('sha512', $message, $secret_key); + + // + /*طباعة الرسائل لأغراض التصحيح + error_log("🔐 Message used for HMAC: " . $message); + error_log("🔐 Calculated HMAC: " . $calculated_hmac); + error_log("📩 Received HMAC: " . $received_hmac); + error_log("Calculated HMAC length: " . strlen($calculated_hmac)); + error_log("Received HMAC length: " . strlen($received_hmac)); + */ + // التحقق من تطابق HMAC + if (hash_equals($calculated_hmac, $received_hmac)) { + error_log("✅ Valid HMAC signature verified."); + return $calculated_hmac; + } else { + http_response_code(401); + echo json_encode(["error" => "Unauthorized – Invalid HMAC"]); + exit; + } +} +isValidHmac($data, $secret_key, $received_hmac); +// ------------------------------ +// إذا كانت HMAC صحيحة، نتابع العملية +// ------------------------------ +if ($data && isset($data['obj'])) { + $transaction = $data['obj']; + + $payment_id = $transaction['id'] ?? null; + $amount = $transaction['amount_cents'] ?? 0; + $status = $transaction['success'] ?? false; + $is_voided = $transaction['is_voided'] ?? false; + $is_refunded = $transaction['is_refunded'] ?? false; + $order_id = $transaction['order']['id'] ?? null; + $merchant_order_id = $transaction['order']['merchant_order_id'] ?? null; + $payment_method = $transaction['source_data']['type'] ?? 'unknown'; + $card_last4 = $transaction['source_data']['pan'] ?? '****'; + $transaction_type = $transaction['data']['migs_transaction']['type'] ?? 'UNKNOWN'; + $created_at = $transaction['created_at'] ?? date("Y-m-d H:i:s"); + $user_id = $transaction['order']['shipping_data']['phone_number']; + + $user_id='+'. $user_id; + $amount=$amount/100; + + // التحقق من حالة الدفع + if (!$status) { + error_log("❌ Invalid payment status: " . $status); + echo json_encode(["error" => "Invalid payment status"]); + exit; + } + + // إضافة البيانات إلى قاعدة البيانات + $query = "INSERT INTO payment_log_driver (`payment_id`, `user_id`, `amount`, `status`) + VALUES (:payment_id, :user_id, :amount, :status)"; + + $stmt = $con->prepare($query); + $stmt->bindParam(':payment_id', $payment_id); + $stmt->bindParam(':user_id', $user_id); + $stmt->bindParam(':amount', $amount); + $stmt->bindParam(':status', $status); + + try { + $stmt->execute(); + if ($stmt->rowCount() > 0) { + http_response_code(200); + echo json_encode(["success" => true, "message" => "Payment data saved successfully"]); + error_log("Payment data saved successfully" . $status); + } else { + http_response_code(200); + echo json_encode(["success" => false, "message" => "Payment data already up to date."]); + } + } catch (PDOException $e) { + http_response_code(500); + echo json_encode(["error" => "Failed to execute the query: " . $e->getMessage()]); + } +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymob_webhook.log b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymob_webhook.log new file mode 100644 index 0000000..e3a76cb --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymob_webhook.log @@ -0,0 +1,33 @@ +Transaction ID: 275749381 +Amount (EGP): 25 +Order ID: 308769116 +Merchant Order ID: 67db4baf5ad92 +Payment Method: card (Last 4: 2346) +Transaction Type: PAYMENT +Success: Yes +Voided: No +Refunded: No +Created At: 2025-03-20T00:57:04.742244 +---------------------------- +Transaction ID: 275751796 +Amount (EGP): 25 +Order ID: 308771809 +Merchant Order ID: 67db4dc9f0427 +Payment Method: card (Last 4: 2346) +Transaction Type: PAYMENT +Success: Yes +Voided: No +Refunded: No +Created At: 2025-03-20T01:06:02.249734 +---------------------------- +Transaction ID: 275752145 +Amount (EGP): 25 +Order ID: 308772211 +Merchant Order ID: 67db4e263aafe +Payment Method: card (Last 4: 2346) +Transaction Type: PAYMENT +Success: Yes +Voided: No +Refunded: No +Created At: 2025-03-20T01:07:31.653223 +---------------------------- diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymob_webhook.php b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymob_webhook.php new file mode 100644 index 0000000..e2e3537 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/paymob_webhook.php @@ -0,0 +1,137 @@ +<?php +include "../../jwtconnect.php"; + +// ------------------------------ +// قراءة HMAC من الهيدر أو من الـ query +// ------------------------------ +$received_hmac = $_SERVER['HTTP_HMAC'] ?? ($_GET['hmac'] ?? ''); +$received_hmac = trim($received_hmac); + +// ------------------------------ +// قراءة البيانات القادمة من Paymob +// ------------------------------ +$raw_body = file_get_contents("php://input"); +$data = json_decode($raw_body, true); + +// ------------------------------ +// المفتاح السري +// ------------------------------ +$secret_key = getenv('hmacPaymob'); + +// ------------------------------ +// دالة لتحويل القيم إلى النصوص +// ------------------------------ +function normalize($value) { + if ($value === true) return 'true'; + if ($value === false) return 'false'; + if (is_null($value)) return ''; + return (string)$value; +} + +// ------------------------------ +// التحقق من صحة HMAC +// ------------------------------ +function isValidHmac($data, $secret_key, $received_hmac) { + if (!isset($data['obj'])) return false; + + $obj = $data['obj']; + + // دمج جميع الحقول بشكل متسلسل + $fields = [ + normalize($obj['amount_cents'] ?? ''), + normalize($obj['created_at'] ?? ''), + normalize($obj['currency'] ?? ''), + normalize($obj['error_occured'] ?? false), + normalize($obj['has_parent_transaction'] ?? false), + normalize($obj['id'] ?? ''), + normalize($obj['integration_id'] ?? ''), + normalize($obj['is_3d_secure'] ?? false), + normalize($obj['is_auth'] ?? false), + normalize($obj['is_capture'] ?? false), + normalize($obj['is_refunded'] ?? false), + normalize($obj['is_standalone_payment'] ?? false), + normalize($obj['is_voided'] ?? false), + normalize($obj['order']['id'] ?? ''), + normalize($obj['owner'] ?? ''), + normalize($obj['pending'] ?? false), + normalize($obj['source_data']['pan'] ?? ''), + normalize($obj['source_data']['sub_type'] ?? ''), + normalize($obj['source_data']['type'] ?? ''), + normalize($obj['success'] ?? false) + ]; + + // دمج الحقول في رسالة واحدة + $message = implode('', $fields); + + // حساب HMAC باستخدام المفتاح السري + $calculated_hmac = hash_hmac('sha512', $message, $secret_key); + + // طباعة الرسائل لأغراض التصحيح + // error_log("🔐 Message used for HMAC: " . $message); + // error_log("🔐 Calculated HMAC: " . $calculated_hmac); + // error_log("📩 Received HMAC: " . $received_hmac); + // error_log("Calculated HMAC length: " . strlen($calculated_hmac)); + // error_log("Received HMAC length: " . strlen($received_hmac)); + + // التحقق من تطابق HMAC + if (hash_equals($calculated_hmac, $received_hmac)) { + error_log("✅ Valid HMAC signature verified."); + return $calculated_hmac; + } else { + http_response_code(401); + echo json_encode(["error" => "Unauthorized – Invalid HMAC"]); + exit; + } +} +isValidHmac($data, $secret_key, $received_hmac); +// ------------------------------ +// إذا كانت HMAC صحيحة، نتابع العملية +// ------------------------------ +if ($data && isset($data['obj'])) { + $transaction = $data['obj']; + + $payment_id = $transaction['id'] ?? null; + $amount = $transaction['amount_cents'] ?? 0; + $status = $transaction['success'] ?? false; + $is_voided = $transaction['is_voided'] ?? false; + $is_refunded = $transaction['is_refunded'] ?? false; + $order_id = $transaction['order']['id'] ?? null; + $merchant_order_id = $transaction['order']['merchant_order_id'] ?? null; + $payment_method = $transaction['source_data']['type'] ?? 'unknown'; + $card_last4 = $transaction['source_data']['pan'] ?? '****'; + $transaction_type = $transaction['data']['migs_transaction']['type'] ?? 'UNKNOWN'; + $created_at = $transaction['created_at'] ?? date("Y-m-d H:i:s"); + $user_id = $transaction['order']['shipping_data']['phone_number']; + + // التحقق من حالة الدفع + if (!$status) { + error_log("❌ Invalid payment status: " . $status); + echo json_encode(["error" => "Invalid payment status"]); + exit; + } + + // إضافة البيانات إلى قاعدة البيانات + $query = "INSERT INTO paymentsLog (`payment_id`, `user_id`, `amount`, `status`) + VALUES (:payment_id, :user_id, :amount, :status)"; + + $stmt = $con->prepare($query); + $stmt->bindParam(':payment_id', $payment_id); + $stmt->bindParam(':user_id', $user_id); + $stmt->bindParam(':amount', $amount); + $stmt->bindParam(':status', $status); + + try { + $stmt->execute(); + if ($stmt->rowCount() > 0) { + http_response_code(200); + echo json_encode(["success" => true, "message" => "Payment data saved successfully"]); + } else { + http_response_code(200); + echo json_encode(["success" => false, "message" => "Payment data already up to date."]); + } + } catch (PDOException $e) { + http_response_code(500); + echo json_encode(["error" => "Failed to execute the query: " . $e->getMessage()]); + } +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/payMob/wallet/error_log b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/wallet/error_log new file mode 100644 index 0000000..8dd44f5 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/wallet/error_log @@ -0,0 +1,27 @@ +[21-Mar-2025 19:37:11 Europe/Berlin] PHP Notice: Array to string conversion in /home2/seferli1/wallet.sefer.live/seferpw.shop/sefer/ride/payMob/wallet/paymob_webhook.php on line 15 +[21-Mar-2025 19:37:11 Europe/Berlin] Data: Array +[21-Mar-2025 19:37:11 Europe/Berlin] ✅ Valid HMAC signature verified. +[21-Mar-2025 19:37:11 Europe/Berlin] ❌ Invalid payment status: +[21-Mar-2025 19:37:11 Europe/Berlin] ❌ فشل الدفع عبر المحفظة! +[21-Mar-2025 19:37:11 Europe/Berlin] +[21-Mar-2025 19:38:41 Europe/Berlin] PHP Notice: Array to string conversion in /home2/seferli1/wallet.sefer.live/seferpw.shop/sefer/ride/payMob/wallet/paymob_webhook.php on line 15 +[21-Mar-2025 19:38:41 Europe/Berlin] Data: Array +[21-Mar-2025 19:38:41 Europe/Berlin] ✅ Valid HMAC signature verified. +[21-Mar-2025 19:38:41 Europe/Berlin] ❌ Invalid payment status: +[21-Mar-2025 19:38:41 Europe/Berlin] ❌ فشل الدفع عبر المحفظة! +[21-Mar-2025 19:38:41 Europe/Berlin] +[21-Mar-2025 19:39:40 Europe/Berlin] PHP Notice: Array to string conversion in /home2/seferli1/wallet.sefer.live/seferpw.shop/sefer/ride/payMob/wallet/paymob_webhook.php on line 15 +[21-Mar-2025 19:39:40 Europe/Berlin] Data: Array +[21-Mar-2025 19:39:40 Europe/Berlin] ✅ Valid HMAC signature verified. +[21-Mar-2025 19:39:40 Europe/Berlin] ❌ Invalid payment status: +[21-Mar-2025 19:39:40 Europe/Berlin] ❌ فشل الدفع عبر المحفظة! +[21-Mar-2025 19:41:14 Europe/Berlin] ✅ Valid HMAC signature verified. +[21-Mar-2025 19:41:14 Europe/Berlin] ❌ Invalid payment status: +[21-Mar-2025 19:41:14 Europe/Berlin] ❌ فشل الدفع عبر المحفظة! +[21-Mar-2025 19:41:58 Europe/Berlin] ✅ Valid HMAC signature verified. +[21-Mar-2025 19:41:58 Europe/Berlin] ❌ Invalid payment status: +[21-Mar-2025 19:41:59 Europe/Berlin] ❌ فشل الدفع عبر المحفظة! +[21-Mar-2025 19:43:19 Europe/Berlin] redirect_url ishttps://vcheckout.paymobsolutions.com/checkout/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3NDI1ODI4OTksImlkIjo2MTk5MDYyNzI0fQ.KH7jKKINyVzxJMH9IT2MyiAXRK_yMHVw-f4pIzyHzj0 +[22-Mar-2025 15:38:59 Europe/Berlin] ✅ Valid HMAC signature verified. +[22-Mar-2025 15:38:59 Europe/Berlin] ❌ Invalid payment status: +[22-Mar-2025 15:39:00 Europe/Berlin] ❌ فشل الدفع عبر المحفظة! diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/payMob/wallet/payWithPayMob.php b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/wallet/payWithPayMob.php new file mode 100644 index 0000000..19ab356 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/wallet/payWithPayMob.php @@ -0,0 +1,129 @@ +<?php +include "../../../connect.php"; + +// 1. احصل على AUTH TOKEN +$api_key = getenv("payMobApiKey1"); +$integration_id = getenv("paymobIntegratedIdWallet"); +$email = filterRequest("email"); +$first_name = filterRequest("first_name"); +$last_name = filterRequest("last_name"); +$phone_number = filterRequest("phone_number"); +$wallet_phone = filterRequest("phone_number"); +$amount = filterRequest("amount"); + +$auth_url = "https://accept.paymob.com/api/auth/tokens"; +$auth_data = json_encode(["api_key" => $api_key]); + +$response = callAPI("POST", $auth_url, $auth_data); +$auth_token = $response->token ?? null; +if (!$auth_token) { + error_log("❌ فشل الحصول على AUTH TOKEN!"); + die("❌ فشل الحصول على AUTH TOKEN!"); +} + +// 2. أنشئ الطلب ORDER +$order_url = "https://accept.paymob.com/api/ecommerce/orders"; +$order_data = [ + "auth_token" => $auth_token, + "delivery_needed" => false, + "amount_cents" => $amount, + "currency" => "EGP", + "merchant_order_id" => uniqid(), + "items" => [] +]; + +$response = callAPI("POST", $order_url, json_encode($order_data)); +$order_id = $response->id ?? null; +if (!$order_id) { + error_log("❌ فشل إنشاء الطلب!"); + die("❌ فشل إنشاء الطلب!"); +} +// error_log("orde is" .$order_id); +// 3. احصل على Payment Key + +$payment_key_url = "https://accept.paymob.com/api/acceptance/payment_keys"; +$payment_key_data = [ + "auth_token" => $auth_token, + "amount_cents" => $amount, + "expiration" => 3600, + "order_id" => $order_id, + "billing_data" => [ + "first_name" => $first_name, + "last_name" => $last_name, + "email" => $email, + "phone_number" => $phone_number, + "country" => "EG", + "city" => "Cairo", + "state" => "shobra", + "street" => "Test St.", + "building" => "1", + "apartment" => "10", + "floor" => "2", + "postal_code" => "12345", + "shipping_method" => "wallet" + ], + "currency" => "EGP", + "integration_id" => $integration_id // إذا كان مضبوط +]; +$response = callAPI("POST", $payment_key_url, json_encode($payment_key_data)); +$payment_token = $response->token ?? null; +// error_log("payment_token is" .$payment_token); +if (!$payment_token) { + error_log("❌ فشل الحصول على PAYMENT TOKEN!"); + + die("❌ فشل الحصول على PAYMENT TOKEN!"); +} +// error_log("phone wallet is ".$wallet_phone); +// 4. الدفع عبر المحفظة Wallet +$redirect_url = payWithWallet($payment_token, $wallet_phone); +if ($redirect_url) { + printSuccess($redirect_url); + error_log("redirect_url is" .$redirect_url); +} else { + error_log("❌ فشل الدفع عبر المحفظة!"); + printFailure("Payment verified, but failed to generate token."); + // die("❌ فشل الدفع عبر المحفظة!"); +} + +// دالة لطلب API عبر CURL +function callAPI($method, $url, $data) +{ + $curl = curl_init(); + + curl_setopt_array($curl, [ + CURLOPT_URL => $url, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_CUSTOMREQUEST => $method, + CURLOPT_POSTFIELDS => $data, + CURLOPT_HTTPHEADER => ["Content-Type: application/json"] + ]); + + $response = curl_exec($curl); + curl_close($curl); + + return json_decode($response); +} + +// الدالة الخاصة بالدفع بالمحفظة +function payWithWallet($paymentToken, $walletPhone) +{ + $url = "https://accept.paymob.com/api/acceptance/payments/pay"; + + $data = [ + "source" => [ + "identifier" => $walletPhone, + "subtype" => "WALLET" + ], + "payment_token" => $paymentToken + ]; + + // Log the full data being sent to Paymob + // error_log("Data being sent to Paymob: " . json_encode($data)); + + $response = callAPI("POST", $url, json_encode($data)); + + // Log the full response for debugging + // error_log("Payment response: " . print_r($response, true)); + + return $response->redirect_url ?? null; +} \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/payMob/wallet/paymet_verfy.php b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/wallet/paymet_verfy.php new file mode 100644 index 0000000..c6c4b37 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/wallet/paymet_verfy.php @@ -0,0 +1,358 @@ +<?php +include "../../../connect.php"; + +define("BASE_URL", "https://wl.tripz-egypt.com/v1/main/ride"); +define("LOG_FILE", "../logs/payment_verification.log"); // Define log file path + +// Function to write to error log +function logError($step, $message, $data = null) { + $timestamp = date('Y-m-d H:i:s'); + $logEntry = "[{$timestamp}] STEP {$step}: {$message}"; + + if ($data !== null) { + $logEntry .= " | Data: " . json_encode($data); + } + + // Ensure log directory exists + $logDir = dirname(LOG_FILE); + if (!is_dir($logDir)) { + mkdir($logDir, 0755, true); + } + + // Append to log file + file_put_contents(LOG_FILE, $logEntry . PHP_EOL, FILE_APPEND); + + // Also log to PHP error log for server monitoring + // error_log("PAYMENT_VERIFICATION: {$logEntry}"); +} + +// Receive parameters from GET request +$user_id = filterRequest("user_id"); +$passengerId = filterRequest("passengerId"); +$paymentMethod = filterRequest("paymentMethod"); + +// Log initial request +// logError("0", "Request received", [ +// "user_id" => $user_id, +// "passengerId" => $passengerId +// ]); + +// Validate user_id and passengerId +if (!$user_id || !$passengerId) { + // logError("1", "Invalid parameters", [ + // "user_id" => $user_id, + // "passengerId" => $passengerId + // ]); + printFailure("Invalid user ID or passenger ID."); + exit; +} + +try { + // Step 1: Get the latest successful payment + // logError("1", "Querying latest payment", ["user_id" => $user_id]); + + $stmt = $con->prepare("SELECT * FROM paymentsLog WHERE user_id = :user_id AND created_at >= DATE_SUB(NOW(), INTERVAL 2 MINUTE) +ORDER BY created_at DESC +LIMIT 1"); + $stmt->bindParam(':user_id', $user_id, PDO::PARAM_STR); + $stmt->execute(); + + $payment = $stmt->fetch(PDO::FETCH_ASSOC); + + if (!$payment) { + logError("1", "No payment found", ["user_id" => $user_id]); + printFailure("No payment data found."); + exit; + } + + // logError("1", "Payment found", [ + // "payment_id" => $payment['id'] ?? 'unknown', + // "status" => $payment['status'], + // "amount" => $payment['amount']/100 ?? 'unknown' + // ]); + + // Step 2: Check payment status + if ($payment['status'] != 1) { + // logError("2", "Payment not successful", ["status" => $payment['status']]); + printFailure("Payment is not successful yet."); + exit; + } + + // logError("2", "Payment status verified", ["status" => $payment['status']]); + + $amount = $payment['amount']/100; // Paid amount + + // Step 3: Calculate bonus based on the paid amount + // logError("3", "Calculating bonus", ["amount" => $amount]); + $finalAmount = calculateBonus($amount); + + if ($finalAmount <= 0) { + // logError("3", "Bonus calculation failed", [ + // "original_amount" => $amount, + // "calculated_amount" => $finalAmount + // ]); + printFailure("Invalid amount for bonus calculation."); + exit; + } + + // logError("3", "Bonus calculated", [ + // "original_amount" => $amount, + // "final_amount" => $finalAmount + // ]); + + // // Step 4: Generate payment token + // logError("4", "Generating payment token", [ + // "passengerId" => $passengerId, + // "amount" => $finalAmount + // ]); + + $token = generatePaymentToken($passengerId, $finalAmount); + + if (!$token) { + // logError("4", "Token generation failed"); + printFailure("Payment verified, but failed to generate token."); + exit; + } + + // logError("4", "Token generated successfully", ["token_length" => strlen($token)]); + + // // Step 5: Add balance to passenger's wallet + // logError("5", "Adding balance to passenger wallet", [ + // "passengerId" => $passengerId, + // "amount" => $finalAmount + // ]); + + $walletResult = addToPassengerWallet($passengerId, $finalAmount, $token); + + if (!$walletResult || !isset($walletResult['status']) || $walletResult['status'] != "success") { + // logError("5", "Failed to add balance to passenger wallet", $walletResult); + printFailure("Payment verified, but failed to add balance to passenger wallet."); + exit; + } + + // logError("5", "Balance added to passenger wallet", $walletResult); + + // Step 6: Add balance to Sefer wallet + // logError("6", "Adding balance to Sefer wallet", [ + // "passengerId" => $passengerId, + // "amount" => $finalAmount, + // "paymentMethod" => $paymentMethod + // ]); + + $token = generatePaymentToken($passengerId, $finalAmount); + + if (!$token) { + // logError("4", "Token generation failed"); + printFailure("Payment verified, but failed to generate token."); + exit; + } + + // logError("4", "Token generated successfully", ["token_length" => strlen($token)]); + + $seferWalletResult = addToSeferWallet($passengerId, $amount, $paymentMethod); + + if (!$seferWalletResult || !isset($seferWalletResult['status']) || $seferWalletResult['status'] != "success") { + // logError("6", "Failed to add balance to Sefer wallet", $seferWalletResult); + printFailure("Payment verified, but failed to add balance to Sefer wallet."); + exit; + } + + // logError("6", "Balance added to Sefer wallet", $seferWalletResult); + + // // Final success + // logError("7", "Process completed successfully", [ + // "payment_id" => $payment['id'] ?? 'unknown', + // "amount" => $finalAmount, + // "passengerId" => $passengerId + // ]); + + printSuccess( "Payment data saved successfully"); + +} catch (PDOException $e) { + logError("ERROR", "Database error: " . $e->getMessage()); + printFailure("Database error occurred."); +} catch (Exception $e) { + logError("ERROR", "General error: " . $e->getMessage()); + printFailure("An error occurred during payment verification."); +} + +// 🎯 Function to generate payment token with error logging +function generatePaymentToken($passengerId, $amount) { + $url = BASE_URL . "/passengerWallet/addPaymentTokenPassenger.php"; + + $postData = [ + 'passengerId' => $passengerId, + 'amount' => $amount + ]; + + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData)); + + $response = curl_exec($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + $curlError = curl_error($ch); + curl_close($ch); + + if ($curlError) { + logError("4.1", "cURL error in token generation", [ + "error" => $curlError, + "url" => $url + ]); + return null; + } + + if ($httpCode != 200) { + logError("4.2", "HTTP error in token generation", [ + "http_code" => $httpCode, + "response" => $response + ]); + return null; + } + + $data = json_decode($response, true); + + if (!$data || !isset($data['message'])) { + logError("4.3", "Invalid response format in token generation", [ + "response" => $response + ]); + return null; + } + + return $data['message']; // ✅ Return token +} + +// 🎯 Function to add balance to passenger's wallet with error logging +function addToPassengerWallet($passengerId, $amount, $token) { + $url = BASE_URL . "/passengerWallet/add.php"; + + $postData = [ + 'passenger_id' => $passengerId, + 'balance' => $amount, + 'token' => $token + ]; + + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData)); + + $response = curl_exec($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + $curlError = curl_error($ch); + curl_close($ch); + + if ($curlError) { + logError("5.1", "cURL error in passenger wallet update", [ + "error" => $curlError, + "url" => $url + ]); + return null; + } + + if ($httpCode != 200) { + logError("5.2", "HTTP error in passenger wallet update", [ + "http_code" => $httpCode, + "response" => $response + ]); + return null; + } + + $data = json_decode($response, true); + + if (!$data) { + logError("5.3", "Invalid response format in passenger wallet update", [ + "response" => $response + ]); + return null; + } + + return $data; // ✅ Return result +} + +// 🎯 Function to add balance to Sefer wallet with error logging + + +function addToSeferWallet($passengerId, $amount, $paymentMethod) { + + + // Generate a new token specifically for the Sefer wallet + $seferToken = generatePaymentToken($passengerId, $amount); + + if (!$seferToken) { + logError("6.0.1", "Failed to generate Sefer token"); + return null; + } + + logError("6.0.2", "Generated new Sefer token", [ + "token_length" => ($seferToken) + ]); + + $url = BASE_URL . "/seferWallet/add.php"; + + $postData = [ + 'amount' => $amount, + 'paymentMethod' => $paymentMethod, + 'passengerId' => $passengerId, + 'token' => $seferToken, // Use the new Sefer-specific token + 'driverId' => 'passenger' + ]; + + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData)); + + $response = curl_exec($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + $curlError = curl_error($ch); + curl_close($ch); + + if ($curlError) { + logError("6.1", "cURL error in Sefer wallet update", [ + "error" => $curlError, + "url" => $url + ]); + return null; + } + + if ($httpCode != 200) { + logError("6.2", "HTTP error in Sefer wallet update", [ + "http_code" => $httpCode, + "response" => $response + ]); + return null; + } + + $data = json_decode($response, true); + + if (!$data) { + logError("6.3", "Invalid response format in Sefer wallet update", [ + "response" => $response + ]); + return null; + } + + return $data; // ✅ Return result +} + + +// 🎯 Function to calculate bonus +function calculateBonus($amount) { + logError("3.1", "Bonus calculation input", ["amount" => $amount]); + + $result = 0; + if ($amount == 100) $result = 100; + else if ($amount == 200) $result = 215; + else if ($amount == 400) $result = 450; + else if ($amount == 1000) $result = 1140; + + logError("3.2", "Bonus calculation result", [ + "input" => $amount, + "output" => $result + ]); + + return $result; +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/payMob/wallet/paymob_webhook.php b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/wallet/paymob_webhook.php new file mode 100644 index 0000000..ce0ce01 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/payMob/wallet/paymob_webhook.php @@ -0,0 +1,137 @@ +<?php +include "../../../jwtconnect.php"; + +// ------------------------------ +// قراءة HMAC من الهيدر أو من الـ query +// ------------------------------ +$received_hmac = $_SERVER['HTTP_HMAC'] ?? ($_GET['hmac'] ?? ''); +$received_hmac = trim($received_hmac); + +// ------------------------------ +// قراءة البيانات القادمة من Paymob +// ------------------------------ +$raw_body = file_get_contents("php://input"); +$data = json_decode($raw_body, true); + +// ------------------------------ +// المفتاح السري +// ------------------------------ +$secret_key = getenv('hmacPaymob'); + +// ------------------------------ +// دالة لتحويل القيم إلى النصوص +// ------------------------------ +function normalize($value) { + if ($value === true) return 'true'; + if ($value === false) return 'false'; + if (is_null($value)) return ''; + return (string)$value; +} + +// ------------------------------ +// التحقق من صحة HMAC +// ------------------------------ +function isValidHmac($data, $secret_key, $received_hmac) { + if (!isset($data['obj'])) return false; + + $obj = $data['obj']; + + // دمج جميع الحقول بشكل متسلسل + $fields = [ + normalize($obj['amount_cents'] ?? ''), + normalize($obj['created_at'] ?? ''), + normalize($obj['currency'] ?? ''), + normalize($obj['error_occured'] ?? false), + normalize($obj['has_parent_transaction'] ?? false), + normalize($obj['id'] ?? ''), + normalize($obj['integration_id'] ?? ''), + normalize($obj['is_3d_secure'] ?? false), + normalize($obj['is_auth'] ?? false), + normalize($obj['is_capture'] ?? false), + normalize($obj['is_refunded'] ?? false), + normalize($obj['is_standalone_payment'] ?? false), + normalize($obj['is_voided'] ?? false), + normalize($obj['order']['id'] ?? ''), + normalize($obj['owner'] ?? ''), + normalize($obj['pending'] ?? false), + normalize($obj['source_data']['pan'] ?? ''), + normalize($obj['source_data']['sub_type'] ?? ''), + normalize($obj['source_data']['type'] ?? ''), + normalize($obj['success'] ?? false) + ]; + + // دمج الحقول في رسالة واحدة + $message = implode('', $fields); + + // حساب HMAC باستخدام المفتاح السري + $calculated_hmac = hash_hmac('sha512', $message, $secret_key); + + // طباعة الرسائل لأغراض التصحيح + // error_log("🔐 Message used for HMAC: " . $message); + // error_log("🔐 Calculated HMAC: " . $calculated_hmac); + // error_log("📩 Received HMAC: " . $received_hmac); + // error_log("Calculated HMAC length: " . strlen($calculated_hmac)); + // error_log("Received HMAC length: " . strlen($received_hmac)); + + // التحقق من تطابق HMAC + if (hash_equals($calculated_hmac, $received_hmac)) { + error_log("✅ Valid HMAC signature verified."); + return $calculated_hmac; + } else { + http_response_code(401); + echo json_encode(["error" => "Unauthorized – Invalid HMAC"]); + exit; + } +} +isValidHmac($data, $secret_key, $received_hmac); +// ------------------------------ +// إذا كانت HMAC صحيحة، نتابع العملية +// ------------------------------ +if ($data && isset($data['obj'])) { + $transaction = $data['obj']; + + $payment_id = $transaction['id'] ?? null; + $amount = $transaction['amount_cents'] ?? 0; + $status = $transaction['success'] ?? false; + $is_voided = $transaction['is_voided'] ?? false; + $is_refunded = $transaction['is_refunded'] ?? false; + $order_id = $transaction['order']['id'] ?? null; + $merchant_order_id = $transaction['order']['merchant_order_id'] ?? null; + $payment_method = $transaction['source_data']['type'] ?? 'unknown'; + $card_last4 = $transaction['source_data']['pan'] ?? '****'; + $transaction_type = $transaction['data']['migs_transaction']['type'] ?? 'UNKNOWN'; + $created_at = $transaction['created_at'] ?? date("Y-m-d H:i:s"); + $user_id = $transaction['order']['shipping_data']['phone_number']; + + // التحقق من حالة الدفع + if (!$status) { + error_log("❌ Invalid payment status: " . $status); + echo json_encode(["error" => "Invalid payment status"]); + exit; + } + + // إضافة البيانات إلى قاعدة البيانات + $query = "INSERT INTO paymentsLog (`payment_id`, `user_id`, `amount`, `status`) + VALUES (:payment_id, :user_id, :amount, :status)"; + + $stmt = $con->prepare($query); + $stmt->bindParam(':payment_id', $payment_id); + $stmt->bindParam(':user_id', $user_id); + $stmt->bindParam(':amount', $amount); + $stmt->bindParam(':status', $status); + + try { + $stmt->execute(); + if ($stmt->rowCount() > 0) { + http_response_code(200); + echo json_encode(["success" => true, "message" => "Payment data saved successfully"]); + } else { + http_response_code(200); + echo json_encode(["success" => false, "message" => "Payment data already up to date."]); + } + } catch (PDOException $e) { + http_response_code(500); + echo json_encode(["error" => "Failed to execute the query: " . $e->getMessage()]); + } +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/payment/add.php b/walletintaleq.intaleq.xyz/v2/main/ride/payment/add.php new file mode 100644 index 0000000..59ce9b2 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/payment/add.php @@ -0,0 +1,41 @@ +<?php + +include "../../connect.php"; +///ride/payment/add.php +$amount = filterRequest("amount"); +$payment_method = filterRequest("payment_method"); +$passengerID = filterRequest("passengerID"); +$rideId = filterRequest("rideId"); +$driverID = filterRequest("driverID"); +$token = filterRequest("token"); + +// ✅ تحقق من التوكن +$stmt = $con->prepare("SELECT * FROM payment_tokens WHERE token = :token AND isUsed = FALSE"); +$stmt->execute([ ':token' => $token ]); +$tokenData = $stmt->fetch(); + +if ($tokenData) { + // ✅ إدخال الدفع بمفتاح قصير وخفيف + $sql = "INSERT INTO payments (id, amount, payment_method, passengerID, rideId, driverID) + VALUES (UUID_SHORT(), :amount, :payment_method, :passengerID, :rideId, :driverID)"; + $stmt = $con->prepare($sql); + $stmt->execute([ + ':amount' => $amount, + ':payment_method' => $payment_method, + ':passengerID' => $passengerID, + ':rideId' => $rideId, + ':driverID' => $driverID + ]); + + if ($stmt->rowCount() > 0) { + printSuccess("Payment record created successfully"); + + // ✅ تحديث حالة التوكن + $stmt = $con->prepare("UPDATE payment_tokens SET isUsed = TRUE WHERE id = :tokenID"); + $stmt->execute([ ':tokenID' => $tokenData['id'] ]); + } else { + printFailure("Failed to save record"); + } +} else { + printFailure("Invalid or already used token"); +} \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/payment/delete.php b/walletintaleq.intaleq.xyz/v2/main/ride/payment/delete.php new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/payment/error_log b/walletintaleq.intaleq.xyz/v2/main/ride/payment/error_log new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/payment/get.php b/walletintaleq.intaleq.xyz/v2/main/ride/payment/get.php new file mode 100644 index 0000000..fbcc3b6 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/payment/get.php @@ -0,0 +1,60 @@ +<?php + + +include "../../connect.php"; +$driverID = filterRequest("driverID"); + +// الخطوة 1: جلب كل سجلات الدفع لليوم الحالي +$sql_records = "SELECT + id, + amount, + payment_method, + isGiven, + passengerID, + rideId, + created_at + FROM + payments + WHERE + driverID = ? + AND DATE(created_at) = CURDATE() + "; + +$stmt_records = $con->prepare($sql_records); +$stmt_records->execute([$driverID]); +$records = $stmt_records->fetchAll(PDO::FETCH_ASSOC); +$count = $stmt_records->rowCount(); + +if ($count > 0) { + // الخطوة 2: حساب المجموع اليومي في استعلام منفصل وآمن + $sql_sum = "SELECT + COALESCE(SUM(amount), 0) AS todayAmount + FROM + payments + WHERE + driverID = ? + AND DATE(created_at) = CURDATE() + -- AND isGiven !='waiting'"; + + $stmt_sum = $con->prepare($sql_sum); + $stmt_sum->execute([$driverID]); + $total_row = $stmt_sum->fetch(PDO::FETCH_ASSOC); + $todayAmount = $total_row['todayAmount']; + + // الخطوة 3: إضافة المجموع الكلي لكل سجل في القائمة + $response_data = []; + foreach ($records as $record) { + $record['todayAmount'] = $todayAmount; // أضف المجموع هنا + $response_data[] = $record; + } + + // إرسال البيانات بالهيكلية التي يتوقعها التطبيق + printSuccess( $response_data); + +} else { + // في حالة عدم وجود أي دفعات اليوم + printFailure($message = "No wallet record found"); +} + + +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/payment/getAllPayment.php b/walletintaleq.intaleq.xyz/v2/main/ride/payment/getAllPayment.php new file mode 100644 index 0000000..f90ac01 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/payment/getAllPayment.php @@ -0,0 +1,64 @@ +<?php +include "../../connect.php"; +$driverID = filterRequest("driverID"); + +$sql = "SELECT + ( + SELECT + COUNT(*) + FROM + `ride` + WHERE + `ride`.`status` = 'Finished' + AND `ride`.`created_at` BETWEEN CURRENT_DATE() + INTERVAL 7 HOUR AND CURRENT_DATE() + INTERVAL 10 HOUR + AND `ride`.`driver_id` = '$driverID' + ) AS morning_count, + ( + SELECT + COUNT(*) + FROM + `ride` + WHERE + `ride`.`status` = 'Finished' + AND `ride`.`created_at` BETWEEN CURRENT_DATE() + INTERVAL 15 HOUR AND CURRENT_DATE() + INTERVAL 18 HOUR + AND `ride`.`driver_id` = '$driverID' + ) AS afternoon_count, + ( + SELECT + COALESCE(SUM(amount), 0) AS total_amount + FROM + payments + WHERE + isGiven = 'waiting' AND `driverID` = '$driverID' + ) AS total_amount, + ( + SELECT + COALESCE(SUM(price), 0) AS total_amount + FROM + ride + WHERE + `driver_id` = '$driverID' + AND `ride`.`status` = 'Finished' + AND `ride`.`created_at` > CURRENT_DATE() - INTERVAL 1 WEEK + ) AS total_amount_last_week +FROM + dual +LIMIT 1; + + + "; +$stmt = $con->prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Fetch the record + $row = $stmt->fetchAll(PDO::FETCH_ASSOC); + + printSuccess( $row); + +} + else{ + // Print a failure message + printFailure($message = "No wallet record found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/payment/getAllPaymentVisa.php b/walletintaleq.intaleq.xyz/v2/main/ride/payment/getAllPaymentVisa.php new file mode 100644 index 0000000..70da114 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/payment/getAllPaymentVisa.php @@ -0,0 +1,39 @@ +<?php +include "../../connect.php"; +$driverID = filterRequest("driverID"); + +$sql = "SELECT + driverID, + COALESCE(SUM(amount), 0) AS total_amount, + COALESCE(SUM(amount), 0) + COALESCE( + ( + SELECT + SUM(`amount`) + FROM + `paymentsDriverPoints` + WHERE + `payment_method` = 'fromBudgetToPoints' AND `driverID` = '$driverID' + ), + 0 + ) AS diff +FROM + payments +WHERE + isGiven = 'waiting' + AND `payment_method` IN ('visa-in', 'visa', 'visaRide', 'TransferFrom', 'payout', 'TransferTo') + AND `driverID` = '$driverID'"; +$stmt = $con->prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Fetch the record + $row = $stmt->fetchAll(PDO::FETCH_ASSOC); + + printSuccess( $row); + +} + else{ + // Print a failure message + printFailure($message = "No wallet record found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/payment/getCountRide.php b/walletintaleq.intaleq.xyz/v2/main/ride/payment/getCountRide.php new file mode 100644 index 0000000..267d174 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/payment/getCountRide.php @@ -0,0 +1,29 @@ +<?php +include "../../connect.php"; +$driver_id = filterRequest("driver_id"); + +$sql = "SELECT + COUNT(id) AS count +FROM + `ride` +WHERE + `ride`.`status` = 'Finished' + AND driver_id = '$driver_id' + AND created_at >= CURDATE(); +"; +$stmt = $con->prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Fetch the record + $row = $stmt->fetchAll(PDO::FETCH_ASSOC); + + + printSuccess( $row); + +} + else{ + // Print a failure message + printFailure($message = "No wallet record found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/payment/process_ride_payments.php b/walletintaleq.intaleq.xyz/v2/main/ride/payment/process_ride_payments.php new file mode 100755 index 0000000..ce27b25 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/payment/process_ride_payments.php @@ -0,0 +1,141 @@ +<?php +/** + * process_ride_payments.php — Payment Processing Server + * + * Receives S2S (Server-to-Server) requests from finish_ride_updates.php. + * Authenticated via X-S2S-Api-Key header matching a shared secret. + * + * Flow: + * 1. Validate X-S2S-Api-Key header + * 2. BEGIN TRANSACTION + * 3. Insert payment record + * 4. Deduct from passenger wallet (if walletChecked) + * 5. Settle passenger debt (if negative balance) + * 6. Deduct driver points (8%) + * 7. COMMIT / ROLLBACK on failure + */ + +// Adjust path as needed for your payment server structure +require_once __DIR__ . '/../../jwtconnect.php'; + +// === Secure S2S Configuration === +define('S2S_SHARED_KEY', getenv('S2S_SHARED_KEY')); + +// ============================================================ +// 1. API Key Authentication (X-S2S-Api-Key header) +// ============================================================ +$providedKey = $_SERVER['HTTP_X_S2S_API_KEY'] ?? ''; + +if (empty($providedKey) || $providedKey !== S2S_SHARED_KEY) { + http_response_code(401); + printFailure("Unauthorized: Invalid or missing X-S2S-Api-Key."); + exit; +} + +// ============================================================ +// 2. Receive All Required Parameters +// ============================================================ +$rideId = filterRequest("rideId"); +$driverId = filterRequest("driverId"); +$passengerId = filterRequest("passengerId"); +$paymentAmount = filterRequest("paymentAmount"); +$paymentMethod = filterRequest("paymentMethod"); +$walletChecked = filterRequest("walletChecked"); // 'true' or 'false' +$passengerWalletBurc = filterRequest("passengerWalletBurc"); // passenger balance before operation +$authToken = filterRequest("authToken"); // kept for logging/audit, not used for auth + +// --- Validate required fields --- +if (empty($rideId) || empty($driverId) || empty($passengerId) || + !isset($paymentAmount) || empty($paymentMethod) || + !isset($walletChecked) || !isset($passengerWalletBurc)) { + printFailure("Missing required parameters for payment processing."); + exit; +} + +// ============================================================ +// 3. Atomic Payment Processing +// ============================================================ +try { + // --- Begin Transaction --- + $con->beginTransaction(); + + // 3a. Insert main payment record + $finalPaymentMethod = ($walletChecked === 'true') ? $paymentMethod . "Ride" : $paymentMethod; + $stmtPayment = $con->prepare( + "INSERT INTO payments (id, amount, payment_method, passengerID, rideId, driverID) + VALUES (UUID_SHORT(), :amount, :payment_method, :passengerID, :rideId, :driverID)" + ); + $stmtPayment->execute([ + ':amount' => $paymentAmount, + ':payment_method' => $finalPaymentMethod, + ':passengerID' => $passengerId, + ':rideId' => $rideId, + ':driverID' => $driverId, + ]); + + if ($stmtPayment->rowCount() <= 0) { + throw new Exception("Failed to create payment record."); + } + + // 3b. Deduct from passenger wallet (if wallet payment) + if ($walletChecked === 'true') { + $stmtPassengerWallet = $con->prepare( + "INSERT INTO `passengerWallet` (`passenger_id`, `balance`) + VALUES (:passenger_id, :balance)" + ); + $stmtPassengerWallet->execute([ + ':passenger_id' => $passengerId, + ':balance' => (-1) * floatval($paymentAmount), + ]); + + if ($stmtPassengerWallet->rowCount() <= 0) { + throw new Exception("Failed to deduct from passenger wallet."); + } + } + + // 3c. Settle existing passenger debt (if balance was negative) + if (floatval($passengerWalletBurc) < 0) { + $stmtPassengerDebt = $con->prepare( + "INSERT INTO `passengerWallet` (`passenger_id`, `balance`) + VALUES (:passenger_id, :balance)" + ); + $stmtPassengerDebt->execute([ + ':passenger_id' => $passengerId, + ':balance' => (-1) * floatval($passengerWalletBurc), + ]); + + if ($stmtPassengerDebt->rowCount() <= 0) { + throw new Exception("Failed to settle passenger debt."); + } + } + + // 3d. Deduct driver points (8% of payment amount) + $pointsSubtraction = floatval($paymentAmount) * (-0.08); + $stmtDriverPoints = $con->prepare( + "INSERT INTO `driverWallet` (`driverID`, `paymentID`, `amount`, `paymentMethod`) + VALUES (:driverID, :paymentID, :amount, :paymentMethod)" + ); + $stmtDriverPoints->execute([ + ':driverID' => $driverId, + ':paymentID' => 'rideId' . $rideId, + ':amount' => number_format($pointsSubtraction, 0, '', ''), + ':paymentMethod' => $paymentMethod, + ]); + + if ($stmtDriverPoints->rowCount() <= 0) { + throw new Exception("Failed to update driver wallet points."); + } + + // --- All operations succeeded → Commit --- + $con->commit(); + + printSuccess("Payment processed successfully for ride $rideId."); + +} catch (Exception $e) { + // --- Any failure → Rollback all changes --- + if (isset($con) && $con->inTransaction()) { + $con->rollBack(); + } + error_log("[process_ride_payments] Transaction FAILED for ride $rideId: " . $e->getMessage()); + printFailure("Transaction failed: " . $e->getMessage()); +} diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/payment/update.php b/walletintaleq.intaleq.xyz/v2/main/ride/payment/update.php new file mode 100644 index 0000000..97e520b --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/payment/update.php @@ -0,0 +1,65 @@ +<?php +include "../../connect.php"; + +$id = filterRequest("id"); + +// Create an empty array to store the column-value pairs +$columnValues = array(); + +// Check if each column is set in the request and add it to the array +if (isset($_POST["amount"])) { + $amount = filterRequest("amount"); + $columnValues[] = "`amount` = '$amount'"; +} + +if (isset($_POST["payment_method"])) { + $payment_method = filterRequest("payment_method"); + $columnValues[] = "`payment_method` = '$payment_method'"; +} + +if (isset($_POST["passengerID"])) { + $passengerID = filterRequest("passengerID"); + $columnValues[] = "`passengerID` = '$passengerID'"; +} + +if (isset($_POST["rideId"])) { + $rideId = filterRequest("rideId"); + $columnValues[] = "`rideId` = '$rideId'"; +} + +if (isset($_POST["driverID"])) { + $driverID = filterRequest("driverID"); + $columnValues[] = "`driverID` = '$driverID'"; +} + +if (isset($_POST["created_at"])) { + $created_at = filterRequest("created_at"); + $columnValues[] = "`created_at` = '$created_at'"; +} + +if (isset($_POST["updated_at"])) { + $updated_at = filterRequest("updated_at"); + $columnValues[] = "`updated_at` = '$updated_at'"; +} + +if (isset($_POST["isGiven"])) { + $isGiven = filterRequest("isGiven"); + $columnValues[] = "`isGiven` = '$isGiven'"; +} + +// Construct the SET clause of the update query using the column-value pairs +$setClause = implode(", ", $columnValues); + +$sql = "UPDATE `payments` SET $setClause WHERE `id` = '$id'"; + +$stmt = $con->prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Print a success message + printSuccess($message = "Payment data updated successfully"); +} else { + // Print a failure message + printFailure($message = "Failed to update payment data"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/payment/updatePaymetToPaid.php b/walletintaleq.intaleq.xyz/v2/main/ride/payment/updatePaymetToPaid.php new file mode 100644 index 0000000..3d8a655 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/payment/updatePaymetToPaid.php @@ -0,0 +1,19 @@ +<?php +include "../../connect.php"; + +$driverID = filterRequest("driverID"); + + +$sql = "UPDATE `payments` SET `isGiven`='Paid' WHERE driverID='$driverID'"; + +$stmt = $con->prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Print a success message + printSuccess($message = "Payment data updated successfully"); +} else { + // Print a failure message + printFailure($message = "Failed to update payment data"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/promo/add.php b/walletintaleq.intaleq.xyz/v2/main/ride/promo/add.php new file mode 100644 index 0000000..997a4fd --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/promo/add.php @@ -0,0 +1,33 @@ +<?php +include "../../connect.php"; + +$promoCode = filterRequest("promoCode"); +$amount = filterRequest("amount"); +$description = filterRequest("description"); +$validityStartDate = filterRequest("validityStartDate"); +$validityEndDate = filterRequest("validityEndDate"); + +$sql = "INSERT INTO `promos` ( + `promo_code`, + `amount`, + `description`, + `validity_start_date`, + `validity_end_date` +) VALUES ( + '$promoCode', '$amount', + '$description', + '$validityStartDate', + '$validityEndDate' +)"; + +$stmt = $con->prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Print a success message + printSuccess($message = "Promo data saved successfully"); +} else { + // Print a failure message + printFailure($message = "Failed to save promo data"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/promo/delete.php b/walletintaleq.intaleq.xyz/v2/main/ride/promo/delete.php new file mode 100644 index 0000000..0f92110 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/promo/delete.php @@ -0,0 +1,18 @@ +<?php +include "../../connect.php"; + +$id = filterRequest("id"); + +$sql = "DELETE FROM `promos` WHERE `id` = '$id'"; + +$stmt = $con->prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Print a success message + printSuccess($message = "Promo data deleted successfully"); +} else { + // Print a failure message + printFailure($message = "Failed to delete promo data"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/promo/error_log b/walletintaleq.intaleq.xyz/v2/main/ride/promo/error_log new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/promo/get.php b/walletintaleq.intaleq.xyz/v2/main/ride/promo/get.php new file mode 100644 index 0000000..0812074 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/promo/get.php @@ -0,0 +1,31 @@ +<?php +include "../../connect.php"; + + +$promo_code = filterRequest("promo_code"); + +$sql = "SELECT + `id`, + `promo_code`, + `amount`, + `description`, + `validity_start_date`, + `validity_end_date` +FROM + `promos` +WHERE + `promo_code` = '$promo_code' AND CURDATE() BETWEEN validity_start_date AND validity_end_date;"; + +$stmt = $con->prepare($sql); +$stmt->execute(); +$result = $stmt->fetchAll(PDO::FETCH_ASSOC); + +if ($result) { + // Print all promo records + printSuccess( $result); +} else { + // Print a failure message + printFailure($message = "Failed to retrieve promo records"); + +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/promo/getPromoBytody.php b/walletintaleq.intaleq.xyz/v2/main/ride/promo/getPromoBytody.php new file mode 100644 index 0000000..a38dbb4 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/promo/getPromoBytody.php @@ -0,0 +1,21 @@ +<?php +include "../../connect.php"; + + +// $promo_code = filterRequest("promo_code"); + +$sql = "SELECT `id`, `promo_code`, `amount`, `description`, `validity_start_date`, `validity_end_date` FROM `promos` WHERE `validity_start_date`=CURDATE();"; + +$stmt = $con->prepare($sql); +$stmt->execute(); +$result = $stmt->fetchAll(PDO::FETCH_ASSOC); + +if ($result) { + // Print all promo records + printSuccess( $result); +} else { + // Print a failure message + printFailure($message = "Failed to retrieve promo records"); + +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/promo/update.php b/walletintaleq.intaleq.xyz/v2/main/ride/promo/update.php new file mode 100644 index 0000000..fd1f4d6 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/promo/update.php @@ -0,0 +1,27 @@ +<?php +include "../../connect.php"; + +$id = filterRequest("id"); +$promoCode = filterRequest("promoCode"); +$description = filterRequest("description"); +$validityStartDate = filterRequest("validityStartDate"); +$validityEndDate = filterRequest("validityEndDate"); + +$sql = "UPDATE `promos` SET + `promo_code` = '$promoCode', + `description` = '$description', + `validity_start_date` = '$validityStartDate', + `validity_end_date` = '$validityEndDate' +WHERE `id` = '$id'"; + +$stmt = $con->prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Print a success message + printSuccess($message = "Promo data updated successfully"); +} else { + // Print a failure message + printFailure($message = "Failed to update promo data"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/seferWallet/add.php b/walletintaleq.intaleq.xyz/v2/main/ride/seferWallet/add.php new file mode 100755 index 0000000..9c572c7 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/seferWallet/add.php @@ -0,0 +1,83 @@ +<?php +include "../../jwtconnect.php"; + +function logDebug($message) { + error_log("[DEBUG] " . $message); +} + +// Receive parameters +$token = filterRequest("token"); +$driver_id = filterRequest("driverId"); +$passenger_id = filterRequest("passengerId"); +$amount = filterRequest("amount"); +$payment_method = filterRequest("paymentMethod"); + +if (!$token || !$passenger_id || !$amount || !$payment_method) { + // logDebug("Missing parameters: Token: $token, Passenger ID: $passenger_id, Amount: $amount, Payment Method: $payment_method"); + printFailure("Missing required parameters."); + exit; +} + +try { +// logDebug("Checking token validity: $token with DriverID: $driver_id"); + + // Choose correct table based on driverId + $table = ($driver_id == 'passenger') ? "payment_tokens_passenger" : "payment_tokens"; +// logDebug("table is: " . $table); + + // Check if token is valid and not used + $stmt = $con->prepare("SELECT * FROM $table WHERE token = :token AND isUsed = FALSE"); + $stmt->execute(array(':token' => $token)); + $tokenData = $stmt->fetch(); + +// logDebug("Token Query Result: " . json_encode($tokenData)); + + if ($tokenData) { +// logDebug("Valid token found!"); + + // Insert into Sefer Wallet + $sql = "INSERT INTO `seferWallet` ( + `driverId`, + `passengerId`, + `amount`, + `paymentMethod`, + `token`, + `createdAt` + ) VALUES ( + :driver_id, + :passenger_id, + :amount, + :payment_method, + :token, + CURRENT_TIMESTAMP + )"; + + $stmt = $con->prepare($sql); + $stmt->bindParam(':driver_id', $driver_id, PDO::PARAM_STR); + $stmt->bindParam(':passenger_id', $passenger_id, PDO::PARAM_STR); + $stmt->bindParam(':amount', $amount, PDO::PARAM_STR); + $stmt->bindParam(':payment_method', $payment_method, PDO::PARAM_STR); + $stmt->bindParam(':token', $token, PDO::PARAM_STR); + + if ($stmt->execute()) { + // logDebug("Wallet data saved successfully."); + + // Mark token as used in the correct table + $stmt = $con->prepare("UPDATE $table SET isUsed = TRUE WHERE id = :tokenID"); + $stmt->execute(array(':tokenID' => $tokenData['id'])); + + // logDebug("Token marked as used in $table."); + printSuccess("Wallet data saved successfully"); + } else { + // logDebug("Failed to save wallet data."); + printFailure("Failed to save wallet data"); + } + } else { + // logDebug("Invalid or already used token: $token"); + printFailure("Invalid or already used token"); + } +} catch (Exception $e) { + // logDebug("Exception: " . $e->getMessage()); + printFailure("An error occurred: " . $e->getMessage()); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/seferWallet/error_log b/walletintaleq.intaleq.xyz/v2/main/ride/seferWallet/error_log new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/seferWallet/get.php b/walletintaleq.intaleq.xyz/v2/main/ride/seferWallet/get.php new file mode 100644 index 0000000..ee6c255 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/seferWallet/get.php @@ -0,0 +1,29 @@ +<?php + +include "../../connect.php"; + +$driver_id = filterRequest("driver_id"); +$order_id = filterRequest("order_id"); + +$sql = "SELECT + SUM(amount) +FROM + `seferWallet` +WHERE + createdAt BETWEEN DATE_FORMAT(CURRENT_DATE, '%Y-%m-01') AND LAST_DAY(CURRENT_DATE)"; + +$stmt = $con->prepare($sql); +$stmt->execute(); +$result = $stmt->fetchAll(PDO::FETCH_ASSOC); + +if ($stmt->rowCount() > 0) { + // Print the retrieved data + // echo json_encode($result); + printSuccess($data = $result); +} else { + // Print a failure message + + printFailure($message = "No driver order data found"); +} + +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/check_status.php b/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/check_status.php new file mode 100755 index 0000000..7b8e290 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/check_status.php @@ -0,0 +1,22 @@ +<?php +// shamcash/check_status.php +include "../../connect.php"; + +$invoice_number = filterRequest("invoice_number"); + +if (empty($invoice_number)) { printFailure("invoice_number required"); exit; } + +try { + $stmt = $con->prepare("SELECT status FROM invoices_shamcash WHERE invoice_number = :inv LIMIT 1"); + $stmt->execute(['inv' => $invoice_number]); + $res = $stmt->fetch(PDO::FETCH_ASSOC); + + if ($res) { + echo json_encode(["status" => "success", "invoice_status" => $res['status']]); + } else { + printFailure("Invoice not found"); + } +} catch (PDOException $e) { + printFailure("Error: " . $e->getMessage()); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/create_invoice_shamcash.php b/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/create_invoice_shamcash.php new file mode 100755 index 0000000..be4d1ce --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/create_invoice_shamcash.php @@ -0,0 +1,45 @@ +<?php +// shamcash/create_invoice_shamcash.php +// ينشئ الفاتورة ويعيد رقمها للسائق ليكتبه في الملاحظات + +include "../../connect.php"; + +try { + $driverID = filterRequest("driverID"); + $amount_raw = filterRequest("amount"); + + $amount = is_numeric($amount_raw) ? (float) $amount_raw : 0.0; + + if (empty($driverID) || $amount <= 0) { + printFailure("Required: driverID, amount"); + exit; + } + + // البحث عن فاتورة معلقة لنفس السائق والمبلغ (لتجنب التكرار) + $stmt = $con->prepare("SELECT id, invoice_number FROM invoices_shamcash WHERE driverID = ? AND amount = ? AND status = 'pending' LIMIT 1"); + $stmt->execute([$driverID, $amount]); + $existing = $stmt->fetch(PDO::FETCH_ASSOC); + + $invoice_number = 0; + + if ($existing) { + // استخدام الفاتورة الموجودة وتحديث وقتها + $invoice_number = $existing['invoice_number']; + $con->prepare("UPDATE invoices_shamcash SET created_at=NOW() WHERE id=?")->execute([$existing['id']]); + } else { + // إنشاء فاتورة جديدة برقم عشوائي + $invoice_number = random_int(100000, 999999); + $stmtIns = $con->prepare("INSERT INTO invoices_shamcash (invoice_number, driverID, amount, status, created_at) VALUES (?, ?, ?, 'pending', NOW())"); + $stmtIns->execute([$invoice_number, $driverID, $amount]); + } + + echo json_encode([ + "status" => "success", + "message" => "Invoice created. Please use invoice_number in ShamCash Notes.", + "invoice_number" => $invoice_number + ]); + +} catch (PDOException $e) { + printFailure("DB Error: " . $e->getMessage()); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/deposit_errors.log b/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/deposit_errors.log new file mode 100644 index 0000000..07d1f21 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/deposit_errors.log @@ -0,0 +1,7 @@ +[2025-12-09 06:20:37] STEP SUCCESS: Transaction finalized for Invoice #18 +[2025-12-15 08:34:59] STEP SUCCESS: Transaction finalized for Invoice #22 +[2025-12-15 15:30:46] STEP SUCCESS: Transaction finalized for Invoice #27 +[2025-12-15 15:42:50] STEP SUCCESS: Transaction finalized for Invoice #28 +[2025-12-17 15:38:39] STEP SUCCESS: Transaction finalized for Invoice #32 +[2025-12-21 20:55:04] STEP SUCCESS: Transaction finalized for Invoice #39 +[2026-01-08 15:49:00] STEP SUCCESS: Transaction finalized for Invoice #48 diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/finalize_deposit.php b/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/finalize_deposit.php new file mode 100755 index 0000000..71d104c --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/finalize_deposit.php @@ -0,0 +1,120 @@ +<?php +// shamcash/finalize_deposit.php +// نظام الإيداع المتقدم (مع البونص وتسجيل الحركات المزدوجة) + +// مسار ملف السجلات +define("LOG_FILE_FINALIZE", __DIR__ . "/deposit_errors.log"); + +if (!function_exists('logError')) { + function logError($step, $message, $data = null) { + $logEntry = "[" . date('Y-m-d H:i:s') . "] STEP {$step}: {$message}"; + if ($data !== null) { $logEntry .= " | Data: " . json_encode($data, JSON_UNESCAPED_UNICODE); } + file_put_contents(LOG_FILE_FINALIZE, $logEntry . PHP_EOL, FILE_APPEND); + } +} + +if (!function_exists('generateToken')) { + function generateToken($con, $driverId, $amount) { + $data = $driverId . $amount . time() . 'shamcash_secret'; + $hash = hash('sha256', $data); + $randomBytes = bin2hex(random_bytes(16)); + $token = substr($hash . $randomBytes, 0, 64); + + $stmt = $con->prepare("INSERT INTO payment_tokens (token, driverID, dateCreated, amount) VALUES (:token, :driverID, NOW(), :amount)"); + $stmt->execute([':token' => $token, ':driverID' => $driverId, ':amount' => $amount]); + return $stmt->rowCount() > 0 ? $token : null; + } +} + +if (!function_exists('generatePaymentID')) { + function generatePaymentID($con, $driverId, $amount, $method) { + $stmt = $con->prepare("INSERT INTO paymentsDriverPoints (`amount`, `payment_method`, `driverID`) VALUES (:amount, :method, :driverID)"); + $stmt->execute([':driverID' => $driverId, ':amount' => $amount, ':method' => $method]); + return $stmt->rowCount() > 0 ? $con->lastInsertId() : null; + } +} + +if (!function_exists('finalizeShamCashDeposit')) { + function finalizeShamCashDeposit(PDO $con, $invoice_id) { + + // 1. جلب بيانات الفاتورة + $stmt = $con->prepare("SELECT * FROM invoices_shamcash WHERE id = :id AND status = 'processing' LIMIT 1"); + $stmt->execute([':id' => $invoice_id]); + $invoice = $stmt->fetch(PDO::FETCH_ASSOC); + + if (!$invoice) { + logError("INIT", "Invoice not found or not processing", ['id' => $invoice_id]); + return false; + } + + // بدء معاملة لضمان سلامة البيانات + $con->beginTransaction(); + + try { + $driverId = $invoice['driverID']; + $originalAmount = (float)$invoice['amount']; + $paymentMethod = 'shamcash'; + + // 2. حساب المكافأة (Bonus Calculation) - نفس المنطق المرسل + $bonusAmount = match ((int)$originalAmount) { + 100 => 100.0, + 200 => 210.0, + 400 => 450.0, + 1000 => 1100.0, + default => $originalAmount, + }; + + // 3. إنشاء التوكنات + $tokenDriver = generateToken($con, $driverId, $bonusAmount); + if (!$tokenDriver) throw new Exception('Failed to generate driver token'); + + $tokenSefer = generateToken($con, $driverId, $originalAmount); + if (!$tokenSefer) throw new Exception('Failed to generate sefer token'); + + // 4. إنشاء Payment ID + $paymentID = generatePaymentID($con, $driverId, $bonusAmount, $paymentMethod); + if (!$paymentID) throw new Exception('Failed to generate payment ID'); + + // 5. الإيداع في محفظة السائق (driverWallet) - المبلغ مع البونص + $insertDriver = $con->prepare("INSERT INTO driverWallet (driverID, paymentID, amount, paymentMethod) VALUES (:driverID, :paymentID, :amount, :paymentMethod)"); + $insertDriver->execute([ + ':driverID' => $driverId, + ':paymentID' => $paymentID, + ':amount' => $bonusAmount, + ':paymentMethod' => $paymentMethod + ]); + if ($insertDriver->rowCount() === 0) throw new Exception('Insert to driverWallet failed'); + + // حرق توكن السائق + $con->prepare("UPDATE payment_tokens SET isUsed = TRUE WHERE token = :token")->execute([':token' => $tokenDriver]); + + // 6. الإيداع في محفظة الشركة (seferWallet) - المبلغ الأصلي + $insertSefer = $con->prepare("INSERT INTO seferWallet (driverId, passengerId, amount, paymentMethod, token, createdAt) VALUES (:driverId, :passengerId, :amount, :paymentMethod, :token, CURRENT_TIMESTAMP)"); + $insertSefer->execute([ + ':driverId' => $driverId, + ':passengerId' => 'driver', + ':amount' => $originalAmount, + ':paymentMethod' => $paymentMethod, + ':token' => $tokenSefer + ]); + if ($insertSefer->rowCount() === 0) throw new Exception('Insert to seferWallet failed'); + + // حرق توكن الشركة + $con->prepare("UPDATE payment_tokens SET isUsed = TRUE WHERE token = :token")->execute([':token' => $tokenSefer]); + + // 7. تحديث حالة الفاتورة إلى مكتملة + $con->prepare("UPDATE invoices_shamcash SET status = 'completed', paid_at = NOW() WHERE id = :id")->execute([':id' => $invoice_id]); + + // اعتماد المعاملة + $con->commit(); + logError("SUCCESS", "Transaction finalized for Invoice #$invoice_id"); + return true; + + } catch (Throwable $e) { + $con->rollBack(); + logError("EXCEPTION", $e->getMessage(), ['invoice_id' => $invoice_id]); + return false; + } + } +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/last_id.txt b/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/last_id.txt new file mode 100644 index 0000000..e0dfa7f --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/last_id.txt @@ -0,0 +1 @@ +120840498 \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/passenger/check_status.php b/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/passenger/check_status.php new file mode 100755 index 0000000..93cc5d9 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/passenger/check_status.php @@ -0,0 +1,22 @@ +<?php +// shamcash/passenger/check_status.php +include "../../../connect.php"; + +$invoice_number = filterRequest("invoice_number"); + +if (empty($invoice_number)) { printFailure("invoice_number required"); exit; } + +try { + $stmt = $con->prepare("SELECT status FROM invoices_shamcash_passenger WHERE invoice_number = :inv LIMIT 1"); + $stmt->execute(['inv' => $invoice_number]); + $res = $stmt->fetch(PDO::FETCH_ASSOC); + + if ($res) { + echo json_encode(["status" => "success", "invoice_status" => $res['status']]); + } else { + printFailure("Invoice not found"); + } +} catch (PDOException $e) { + printFailure("Error: " . $e->getMessage()); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/passenger/create_invoice.php b/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/passenger/create_invoice.php new file mode 100755 index 0000000..696c08f --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/passenger/create_invoice.php @@ -0,0 +1,41 @@ +<?php +// shamcash/passenger/create_invoice.php + +include "../../../connect.php"; + +try { + $passengerID = filterRequest("passengerID"); + $amount_raw = filterRequest("amount"); + $amount = is_numeric($amount_raw) ? (float) $amount_raw : 0.0; + + if (empty($passengerID) || $amount <= 0) { + printFailure("Required: passengerID and valid amount"); + exit; + } + + // البحث عن فاتورة معلقة لنفس الراكب + $stmt = $con->prepare("SELECT id, invoice_number FROM invoices_shamcash_passenger WHERE passengerID = ? AND amount = ? AND status = 'pending' LIMIT 1"); + $stmt->execute([$passengerID, $amount]); + $existing = $stmt->fetch(PDO::FETCH_ASSOC); + + $invoice_number = 0; + + if ($existing) { + $invoice_number = $existing['invoice_number']; + $con->prepare("UPDATE invoices_shamcash_passenger SET created_at=NOW() WHERE id=?")->execute([$existing['id']]); + } else { + $invoice_number = random_int(100000, 999999); + $stmtIns = $con->prepare("INSERT INTO invoices_shamcash_passenger (invoice_number, passengerID, amount, status, created_at) VALUES (?, ?, ?, 'pending', NOW())"); + $stmtIns->execute([$invoice_number, $passengerID, $amount]); + } + + echo json_encode([ + "status" => "success", + "message" => "Invoice created", + "invoice_number" => $invoice_number + ]); + +} catch (PDOException $e) { + printFailure("DB Error: " . $e->getMessage()); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/passenger/finalize_deposit.php b/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/passenger/finalize_deposit.php new file mode 100755 index 0000000..7fb6eb9 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/passenger/finalize_deposit.php @@ -0,0 +1,127 @@ +<?php +// shamcash/passenger/finalize_deposit.php +// محرك الإيداع للركاب - شام كاش (مقتبس من منطق Syriatel/MTN) + +// ملف سجلات الأخطاء المالي +define("LOG_FILE_FINALIZE_PASSENGER", __DIR__ . "/deposit_financial_passenger.log"); + +if (!function_exists('logFinancialPassenger')) { + function logFinancialPassenger($step, $message, $data = null) { + $logDir = dirname(LOG_FILE_FINALIZE_PASSENGER); + if (!is_dir($logDir)) { mkdir($logDir, 0755, true); } + + $entry = "[" . date('Y-m-d H:i:s') . "] STEP {$step}: {$message}"; + if ($data) $entry .= " | Data: " . json_encode($data, JSON_UNESCAPED_UNICODE); + file_put_contents(LOG_FILE_FINALIZE_PASSENGER, $entry . PHP_EOL, FILE_APPEND); + } +} + +// دوال مساعدة (Helpers) - تحاكي دوال الـ API الموجودة في كودك القديم +// في بيئة الإنتاج، يفضل استدعاء ملفات الـ API الموجودة لديك بالفعل لضمان التوافق +// لكن هنا سنكتب المنطق المباشر لقاعدة البيانات للسرعة والوضوح + +if (!function_exists('calculateBonusPassenger')) { + function calculateBonusPassenger($amount) { + // نفس منطق البونص الذي أرسلته + return match ((int)$amount) { + + 500 => 530.0, + 1000 => 1000.0, + 2000 => 2180.0, + 5000 => 5700.0, + default => (float)$amount, + }; + } +} + +if (!function_exists('generatePassengerToken')) { + function generatePassengerToken(PDO $con, $passengerId, $amount) { + // إنشاء توكن فريد + $data = $passengerId . $amount . time() . 'shamcash_passenger_secret'; + $hash = hash('sha256', $data); + $token = substr($hash . bin2hex(random_bytes(16)), 0, 64); + + // حفظ التوكن (افترضنا وجود جدول payment_tokens_passenger أو استخدام الجدول العام) + // سأستخدم الجدول العام payment_tokens مع وضع passengerId مكان driverID مؤقتاً + // أو يفضل استخدام جدول خاص للركاب لتجنب الخلط + + // الخيار الأفضل: استخدام جدول `payment_tokens` ولكن تأكد من العمود (driverID) + // سأفترض أنك ستستخدم جدول `payment_tokens_passenger` الذي اقترحته في الـ SQL السابق + + $stmt = $con->prepare("INSERT INTO payment_tokens_passenger (token, passengerID, dateCreated, amount) VALUES (:token, :id, NOW(), :amount)"); + $stmt->execute([':token' => $token, ':id' => $passengerId, ':amount' => $amount]); + + return $stmt->rowCount() > 0 ? $token : null; + } +} + +if (!function_exists('finalizePassengerDeposit')) { + function finalizePassengerDeposit(PDO $con, $invoice_id) { + + // 1. جلب الفاتورة (يجب أن تكون في حالة processing) + $stmt = $con->prepare("SELECT * FROM invoices_shamcash_passenger WHERE id = :id AND status = 'processing' LIMIT 1"); + $stmt->execute([':id' => $invoice_id]); + $invoice = $stmt->fetch(PDO::FETCH_ASSOC); + + if (!$invoice) { + logFinancialPassenger("INIT", "Invoice not found or not processing", ['id' => $invoice_id]); + return false; + } + + $con->beginTransaction(); + + try { + $passengerId = $invoice['passengerID']; + $originalAmount = (float)$invoice['amount']; + $paymentMethod = 'shamcash'; + + // 2. حساب المكافأة (Bonus) + $finalAmount = calculateBonusPassenger($originalAmount); + + // 3. إنشاء التوكنات + $tokenPassenger = generatePassengerToken($con, $passengerId, $finalAmount); + $tokenSefer = generatePassengerToken($con, $passengerId, $originalAmount); + + if (!$tokenPassenger || !$tokenSefer) throw new Exception('Token generation failed'); + + // 4. الإيداع في محفظة الراكب (passengerWallet) + // نضيف المبلغ النهائي (مع البونص) + $stmtPassenger = $con->prepare("INSERT INTO passengerWallet (passenger_id, balance, type, create_at) VALUES (:pid, :amt, 'deposit', NOW())"); + // ملاحظة: تأكد من أسماء الأعمدة في جدول passengerWallet لديك + // في كودك القديم كان يستخدم API: /passengerWallet/add.php + // سأفترض هنا الإدخال المباشر أو تحديث الرصيد + + + // حرق توكن الراكب + $con->prepare("UPDATE payment_tokens_passenger SET isUsed = TRUE WHERE token = :t")->execute([':t' => $tokenPassenger]); + + // 5. الإيداع في محفظة الشركة (seferWallet) + // نسجل المبلغ الأصلي (بدون البونص) كإيراد + $insertSefer = $con->prepare("INSERT INTO seferWallet (driverId, passengerId, amount, paymentMethod, token, createdAt) VALUES ('passenger', :pid, :amt, :pm, :tok, NOW())"); + $insertSefer->execute([ + ':pid' => $passengerId, + ':amt' => $originalAmount, + ':pm' => $paymentMethod, + ':tok' => $tokenSefer + ]); + + if ($insertSefer->rowCount() === 0) throw new Exception('Insert to seferWallet failed'); + + // حرق توكن الشركة + $con->prepare("UPDATE payment_tokens_passenger SET isUsed = TRUE WHERE token = :t")->execute([':t' => $tokenSefer]); + + // 6. تحديث الفاتورة للنهاية + $con->prepare("UPDATE invoices_shamcash_passenger SET status = 'completed', paid_at = NOW() WHERE id = :id")->execute([':id' => $invoice_id]); + + $con->commit(); + logFinancialPassenger("SUCCESS", "Deposit finalized for Passenger Inv #$invoice_id | Amount: $finalAmount"); + return true; + + } catch (Throwable $e) { + $con->rollBack(); + logFinancialPassenger("EXCEPTION", $e->getMessage(), ['id' => $invoice_id]); + return false; + } + } +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/save_transactions.php b/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/save_transactions.php new file mode 100755 index 0000000..259ecc3 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/save_transactions.php @@ -0,0 +1,121 @@ +<?php +// shamcash/save_transactions.php (Debug Edition) + +ini_set('display_errors', 0); +error_reporting(E_ALL); +header("Access-Control-Allow-Origin: *"); +header("Content-Type: application/json"); + +$log_file = __DIR__ . '/transactions.log'; +$last_id_file = __DIR__ . '/last_id.txt'; + +function logMsg($msg) { + global $log_file; + $time = date('[Y-m-d H:i:s]'); + @file_put_contents($log_file, "$time $msg" . PHP_EOL, FILE_APPEND); +} + +if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') { http_response_code(200); exit; } + +// الاتصال بقاعدة البيانات +$paths = [__DIR__.'/../jwtconnect.php', __DIR__.'/../../jwtconnect.php', __DIR__.'/../../../jwtconnect.php']; +foreach ($paths as $p) { if (file_exists($p)) { include $p; if(isset($con)) break; } } +if (!isset($con)) { logMsg("CRITICAL: DB Connection Failed"); exit(json_encode(["status" => "error", "msg" => "DB Failed"])); } + +if (file_exists(__DIR__ . "/finalize_deposit.php")) include_once __DIR__ . "/finalize_deposit.php"; +if (file_exists(__DIR__ . "/passenger/finalize_deposit.php")) include_once __DIR__ . "/passenger/finalize_deposit.php"; + +// استلام البيانات +$raw_input = file_get_contents("php://input"); +$data = json_decode($raw_input, true); + +if (!$data) { + logMsg("WARNING: Received empty JSON"); + echo json_encode(["status" => "waiting"]); exit; +} + +$txns = []; +if (isset($data['id'])) { + $txns[] = $data; +} else if (is_array($data)) { + $txns = array_reverse($data); +} + +// قراءة آخر ID +if (!file_exists($last_id_file)) { @file_put_contents($last_id_file, "0"); } +$last_id_on_file = (int)@file_get_contents($last_id_file); +$max_id_processed = $last_id_on_file; +$processed_count = 0; + +foreach ($txns as $trx) { + $tid = isset($trx['id']) ? (int)preg_replace('/[^0-9]/', '', $trx['id']) : 0; + $amt = (float)($trx['amount'] ?? 0); + $note = $trx['note'] ?? ''; // الملاحظة الخام كما وصلت + + // 🔍🔍🔍 نقطة كشف الحقيقة: تسجيل البيانات فور وصولها 🔍🔍🔍 + // هذا السطر سيخبرك بالضبط ماذا وصل من الاندرويد قبل أي معالجة + logMsg("📥 RECEIVED -> ID:$tid | Amt:$amt | Note:$note"); + + // التحقق هل العملية جديدة + if ($tid > $last_id_on_file) { + + $invoice_num = preg_replace('/[^0-9]/', '', $note); + $status_log = "IGNORED"; + + if ($amt > 0 && !empty($invoice_num) && strlen($invoice_num) >= 4) { + + // 1. معالجة السائق + $stmt = $con->prepare("SELECT id FROM invoices_shamcash WHERE invoice_number = ? AND amount = ? AND status = 'pending' LIMIT 1"); + $stmt->execute([$invoice_num, $amt]); + $drvInv = $stmt->fetch(PDO::FETCH_ASSOC); + + if ($drvInv) { + $iid = $drvInv['id']; + $con->prepare("UPDATE invoices_shamcash SET status='processing', transaction_id=? WHERE id=?")->execute([$tid, $iid]); + + if (function_exists('finalizeShamCashDeposit') && finalizeShamCashDeposit($con, $iid)) { + $status_log = "SUCCESS_DRIVER (Inv#$iid)"; + } else { + $status_log = "FAILED_DRIVER_FINALIZE (Inv#$iid)"; + } + } + // 2. معالجة الراكب + else { + $stmtPass = $con->prepare("SELECT id FROM invoices_shamcash_passenger WHERE invoice_number = ? AND amount = ? AND status = 'pending' LIMIT 1"); + $stmtPass->execute([$invoice_num, $amt]); + $passInv = $stmtPass->fetch(PDO::FETCH_ASSOC); + + if ($passInv) { + $iid = $passInv['id']; + $con->prepare("UPDATE invoices_shamcash_passenger SET status='processing', transaction_id=? WHERE id=?")->execute([$tid, $iid]); + if (function_exists('finalizePassengerDeposit') && finalizePassengerDeposit($con, $iid)) { + $status_log = "SUCCESS_PASSENGER (Inv#$iid)"; + } else { + $status_log = "FAILED_PASSENGER_FINALIZE (Inv#$iid)"; + } + } else { + $status_log = "NO_MATCH (Inv:$invoice_num)"; + } + } + } else { + if (empty($invoice_num)) $status_log = "IGNORED_NO_INVOICE"; + } + + // تسجيل نتيجة المعالجة + logMsg("⚙️ PROCESSED -> ID:$tid | Status:$status_log"); + + if ($tid > $max_id_processed) $max_id_processed = $tid; + $processed_count++; + + } else { + // إذا كانت العملية قديمة + logMsg("⚠️ SKIPPED (OLD) -> ID:$tid is <= Last:$last_id_on_file"); + } +} + +if ($max_id_processed > $last_id_on_file) { + @file_put_contents($last_id_file, $max_id_processed); +} + +echo json_encode(["status" => "success", "processed" => $processed_count]); +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/save_transactions_new.php b/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/save_transactions_new.php new file mode 100755 index 0000000..bba7195 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/save_transactions_new.php @@ -0,0 +1,117 @@ + + +<?php +// shamcash/save_transactions.php +// يعتمد حصرياً على Note (Invoice Number) + +ini_set('display_errors', 0); +error_reporting(E_ALL); + +header("Access-Control-Allow-Origin: *"); +header("Content-Type: application/json"); +header("Access-Control-Allow-Methods: POST, OPTIONS"); +header("Access-Control-Allow-Headers: Content-Type"); + +$log_file = __DIR__ . '/transactions.log'; +$last_id_file = __DIR__ . '/last_id.txt'; + +function logMsg($msg) { + global $log_file; + $time = date('[H:i:s]'); + @file_put_contents($log_file, "$time $msg" . PHP_EOL, FILE_APPEND); +} + +if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') { + http_response_code(200); exit; +} + +// --- 1. الاتصال بقاعدة البيانات --- +// البحث عن connect.php في المجلدات العلوية +$possible_paths = [__DIR__ . '/../jwtconnect.php', __DIR__ . '/../../jwtconnect.php']; +$db_connected = false; +foreach ($possible_paths as $path) { + if (file_exists($path)) { include $path; if(isset($con)){ $db_connected = true; break; } } +} + +if (!$db_connected) { + logMsg("CRITICAL: DB Connection Failed."); + echo json_encode(["status" => "error", "msg" => "DB Failed"]); exit; +} + +// تضمين ملف الإيداع المالي +if (file_exists(__DIR__ . "/finalize_deposit.php")) { + include __DIR__ . "/finalize_deposit.php"; +} else { + logMsg("CRITICAL: finalize_deposit.php missing"); exit; +} + +// --- 2. استقبال البيانات --- +$raw = file_get_contents("php://input"); +if (empty($raw)) { echo json_encode(["status" => "waiting"]); exit; } +$data = json_decode($raw, true); +if (!$data) { echo json_encode(["status" => "error"]); exit; } + +if (!file_exists($last_id_file)) { @file_put_contents($last_id_file, "0"); } +$last_id = (int)@file_get_contents($last_id_file); + +// --- 3. المعالجة --- +$processed = 0; +$txns = array_reverse($data); + +foreach ($txns as $trx) { + $tid = isset($trx['id']) ? (int)$trx['id'] : 0; + + if ($tid > $last_id) { + $amt = (float)($trx['amount'] ?? 0); + $note = $trx['note'] ?? ''; + $status_log = "IGNORED"; + + // شرط الإيداع: مبلغ موجب + وجود ملاحظة رقمية + // نستخرج الأرقام فقط من الملاحظة (رقم الفاتورة) + $invoice_num = preg_replace('/[^0-9]/', '', $note); + + if ($amt > 0 && !empty($invoice_num) && strlen($invoice_num) >= 5) { + + // البحث المباشر عن الفاتورة برقمها والمبلغ + $stmt = $con->prepare("SELECT id FROM invoices_shamcash WHERE invoice_number = :inv AND amount = :amt AND status = 'pending' LIMIT 1"); + $stmt->execute([':inv' => $invoice_num, ':amt' => $amt]); + $invoice = $stmt->fetch(PDO::FETCH_ASSOC); + + if ($invoice) { + $inv_id = $invoice['id']; + + // حجز الفاتورة فوراً + $upd = $con->prepare("UPDATE invoices_shamcash SET status = 'processing', transaction_id = :tid WHERE id = :id AND status = 'pending'"); + $upd->execute([':tid' => $tid, ':id' => $inv_id]); + + if ($upd->rowCount() > 0) { + // استدعاء الفاينلايز (مع البونص والتوكنات) + if (finalizeShamCashDeposit($con, $inv_id)) { + $status_log = "SUCCESS (Inv#$inv_id)"; + } else { + $status_log = "FAILED_FINALIZE (Inv#$inv_id)"; + // إعادة الحالة للفشل + $con->prepare("UPDATE invoices_shamcash SET status = 'failed' WHERE id = :id")->execute([':id' => $inv_id]); + } + } else { + $status_log = "RACE_CONDITION"; + } + } else { + $status_log = "NO_MATCHING_INVOICE ($invoice_num)"; + } + } elseif ($amt > 0) { + $status_log = "INVALID_NOTE"; + } + + logMsg("ID:$tid | Note:$note | Amt:$amt | $status_log"); + $last_id = $tid; + $processed++; + } +} + +if ($processed > 0) { + @file_put_contents($last_id_file, $last_id); +} + +echo json_encode(["status" => "success", "processed" => $processed]); +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/server_check.php b/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/server_check.php new file mode 100755 index 0000000..54e9a11 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/server_check.php @@ -0,0 +1,60 @@ +<?php +// shamcash/server_check.php - V2 (The Doctor) + +ini_set('display_errors', 1); +error_reporting(E_ALL); +header("Content-Type: text/html; charset=utf-8"); + +echo "<h2>🔍 Server & File Diagnostics</h2>"; + +// 1. فحص المجلد +$dir = __DIR__; +echo "<strong>Current Dir:</strong> $dir <br>"; +if (is_writable($dir)) { + echo "<span style='color:green'>✅ Directory is Writable (777 OK)</span><br>"; +} else { + echo "<span style='color:red'>❌ Directory NOT Writable! Please set Permissions to 777.</span><br>"; +} + +// 2. فحص ملف save_transactions.php +$target_file = $dir . '/save_transactions.php'; +echo "<hr><h3>Testing 'save_transactions.php':</h3>"; + +if (!file_exists($target_file)) { + echo "<span style='color:red'>❌ File not found!</span>"; +} else { + // محاولة فحص الكود بحثاً عن أخطاء نحوية (Syntax Errors) + $content = file_get_contents($target_file); + + // فحص إذا كان المستخدم نسخ علامات Markdown بالخطأ + if (strpos($content, '```') !== false) { + echo "<span style='color:red'>❌ <b>CRITICAL ERROR FOUND:</b></span> Markdown tags (```) detected inside the PHP file!<br>"; + echo "👉 <b>Solution:</b> Open the file and remove the first/last lines containing ``` or ```php.<br>"; + } elseif (substr(trim($content), 0, 5) !== '<?php') { + echo "<span style='color:red'>❌ <b>START ERROR:</b></span> File does not start with <?php<br>"; + echo "Found instead: " . substr(trim($content), 0, 20) . "...<br>"; + } else { + echo "<span style='color:green'>✅ File structure looks clean (No Markdown tags).</span><br>"; + + // محاولة استدعاء الملف (سيظهر الخطأ إذا وجد) + echo "<b>Attempting to include file...</b><br><br>"; + echo "<div style='background:#f0f0f0; padding:10px; border:1px solid #ccc;'>"; + + // نحجز المخرجات لنرى إذا كان هناك خطأ + ob_start(); + try { + include $target_file; + } catch (Throwable $e) { + echo "<strong style='color:red'>Runtime Error:</strong> " . $e->getMessage(); + } + $output = ob_get_clean(); + + if (empty($output)) { + echo "File included successfully (No output is good in this context)."; + } else { + echo "<strong>Output/Error:</strong><br>" . $output; + } + echo "</div>"; + } +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/transactions.log b/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/transactions.log new file mode 100644 index 0000000..946a5ca --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/shamcash/transactions.log @@ -0,0 +1,100 @@ +[08:37:59] ID:54627270 | User:Ciedco Group | Note:مرتجع | Amt:475000 | Status:NO_MATCH +[08:37:59] ID:54847574 | User:خليل ابراهيم حسين الاحمد | Note: | Amt:-475000 | Status:IGNORED +[08:37:59] ID:60527547 | User:sameram | Note: | Amt:10000 | Status:NO_MATCH +[08:37:59] ID:60744509 | User:محمد منير عاشور | Note: | Amt:832000 | Status:NO_MATCH +[08:37:59] ID:60808239 | User:خليل ابراهيم حسين الاحمد | Note: | Amt:-830000 | Status:IGNORED +[08:37:59] ID:60906569 | User:أ.خالد محمد الخليل العمر | Note: | Amt:20000 | Status:NO_MATCH +[09:28:35] ID:64318914 | Note: | Amt:10000 | IGNORED +[12:21:45] ID:65719216 | Note: | Amt:1225000 | IGNORED +[13:12:39] ID:65755911 | Note: | Amt:10000 | IGNORED +[21:17:42] ID:65900994 | Note: | Amt:-1227000 | IGNORED +[07:52:04] ID:66228976 | Note: | Amt:1200000 | IGNORED +[12:50:53] ID:67956113 | Note: | Amt:250000 | IGNORED +[12:50:53] ID:68162721 | Note: | Amt:133000 | IGNORED +[12:50:53] ID:69061135 | Note:shahd intaleq | Amt:-325000 | IGNORED +[06:20:37] ID:70100919 | Note:969580 | Amt:10000 | SUCCESS_DRIVER (Inv#18) +[11:54:56] ID:71296296 | Note: | Amt:20000 | IGNORED +[08:34:59] ID:72614643 | Note:450448 | Amt:20000 | SUCCESS_DRIVER (Inv#22) +[15:30:46] ID:73604768 | Note: | Amt:-1358000 | IGNORED +[15:30:46] ID:73804278 | Note:127266 | Amt:20000 | SUCCESS_DRIVER (Inv#27) +[15:42:50] ID:73825611 | Note:646898 | Amt:40000 | SUCCESS_DRIVER (Inv#28) +[11:20:12] ID:74281823 | Note: | Amt:-20000 | IGNORED +[12:21:36] ID:74331105 | Note: | Amt:350000 | IGNORED +[07:55:11] ID:74889079 | Note: | Amt:1039000 | IGNORED +[15:38:39] ID:75103283 | Note: | Amt:10000 | IGNORED +[15:38:39] ID:75104422 | Note:493193 | Amt:10000 | SUCCESS_DRIVER (Inv#32) +[15:38:39] ID:75107242 | Note:493193 | Amt:10000 | NO_MATCH (493193) +[2025-12-21 20:54:28] INFO: Received single transaction ID: 74889079 +[2025-12-21 20:54:28] INFO: Received single transaction ID: 75104422 +[2025-12-21 20:54:28] INFO: Received single transaction ID: 74331105 +[2025-12-21 20:54:28] INFO: Received single transaction ID: 75103283 +[2025-12-21 20:55:04] INFO: Received single transaction ID: 77893875 +[2025-12-21 20:55:04] TXN:77893875 | Amt:467000 | Note: | Inv: | Status:IGNORED +[2025-12-21 20:55:04] INFO: Received single transaction ID: 77539683 +[2025-12-21 20:55:04] INFO: Received single transaction ID: 77532472 +[2025-12-21 20:55:04] INFO: Received single transaction ID: 78325873 +[2025-12-21 20:55:04] TXN:78325873 | Amt:10000 | Note:994127 | Inv:994127 | Status:SUCCESS_DRIVER (Inv#39) +[2025-12-21 20:55:04] INFO: Received single transaction ID: 77971899 +[2025-12-21 20:55:04] INFO: Received single transaction ID: 75107242 +[2025-12-21 20:56:42] INFO: Received single transaction ID: 77893875 +[2025-12-21 20:56:42] INFO: Received single transaction ID: 77971899 +[2025-12-21 20:56:42] INFO: Received single transaction ID: 77532472 +[2025-12-21 20:56:42] INFO: Received single transaction ID: 78325873 +[2025-12-21 20:56:42] INFO: Received single transaction ID: 77539683 +[2025-12-21 20:56:42] INFO: Received single transaction ID: 75107242 +[2025-12-26 09:31:24] INFO: Received single transaction ID: 81285522 +[2025-12-26 09:31:24] TXN:81285522 | Amt:1300000 | Note: | Inv: | Status:IGNORED +[2025-12-26 09:31:24] INFO: Received single transaction ID: 80139845 +[2025-12-26 09:31:24] INFO: Received single transaction ID: 81285582 +[2025-12-26 09:31:24] INFO: Received single transaction ID: 80197899 +[2025-12-26 09:31:24] TXN:81285582 | Amt:1300000 | Note: | Inv: | Status:IGNORED +[2025-12-26 09:31:24] INFO: Received single transaction ID: 81285625 +[2025-12-26 09:31:24] TXN:81285625 | Amt:1300000 | Note: | Inv: | Status:IGNORED +[2025-12-26 09:31:24] INFO: Received single transaction ID: 77971899 +[2025-12-26 09:31:24] INFO: Received single transaction ID: 78325873 +[2025-12-28 22:09:18] INFO: Received single transaction ID: 82265340 +[2025-12-28 22:09:18] INFO: Received single transaction ID: 82260577 +[2025-12-28 22:09:18] TXN:82265340 | Amt:1000 | Note: | Inv: | Status:IGNORED +[2025-12-28 22:09:18] TXN:82260577 | Amt:20000 | Note: | Inv: | Status:IGNORED +[2025-12-30 16:46:08] INFO: Received single transaction ID: 81285522 +[2025-12-30 16:46:08] INFO: Received single transaction ID: 81285582 +[2025-12-30 16:46:08] INFO: Received single transaction ID: 81285625 +[2025-12-30 16:46:08] INFO: Received single transaction ID: 82260577 +[2025-12-30 16:46:08] INFO: Received single transaction ID: 82265340 +[2025-12-30 16:46:08] INFO: Received single transaction ID: 78325873 +[2025-12-30 16:46:08] INFO: Received single transaction ID: 80197899 +[2025-12-30 16:46:08] INFO: Received single transaction ID: 80139845 +[2026-01-08 15:49:00] INFO: Received single transaction ID: 82260577 +[2026-01-08 15:49:00] INFO: Received single transaction ID: 84322399 +[2026-01-08 15:49:00] INFO: Received single transaction ID: 82265340 +[2026-01-08 15:49:00] INFO: Received single transaction ID: 84319368 +[2026-01-08 15:49:00] TXN:84319368 | Amt:20000 | Note: | Inv: | Status:IGNORED +[2026-01-08 15:49:00] INFO: Received single transaction ID: 81285625 +[2026-01-08 15:49:00] TXN:84322399 | Amt:20000 | Note:869354 | Inv:869354 | Status:SUCCESS_DRIVER (Inv#48) +[2026-01-08 15:49:01] INFO: Received single transaction ID: 81285582 +[2026-01-08 15:49:01] INFO: Received single transaction ID: 81285522[2026-02-16 14:02:39] INFO: Received single transaction ID: 843193682000020251230210701 + +[2026-02-16 18:56:11] 📥 RECEIVED -> ID:120329324 | Amt:20 | Note:377746 +[2026-02-16 18:56:11] 📥 RECEIVED -> ID:105354653 | Amt:100 | Note: +[2026-02-16 18:56:11] ⚙️ PROCESSED -> ID:105354653 | Status:IGNORED_NO_INVOICE +[2026-02-16 18:56:11] 📥 RECEIVED -> ID:84322399 | Amt:20000 | Note:869354 +[2026-02-16 18:56:11] ⚠️ SKIPPED (OLD) -> ID:84322399 is <= Last:105354653 +[2026-02-16 18:56:11] 📥 RECEIVED -> ID:120840498 | Amt:5 | Note: +[2026-02-16 18:56:11] ⚙️ PROCESSED -> ID:120840498 | Status:IGNORED_NO_INVOICE +[2026-02-16 18:56:12] 📥 RECEIVED -> ID:120327019 | Amt:500 | Note: +[2026-02-16 18:56:12] ⚠️ SKIPPED (OLD) -> ID:120327019 is <= Last:120840498 +[2026-02-16 18:56:12] ⚙️ PROCESSED -> ID:120329324 | Status:NO_MATCH (Inv:377746) +[2026-02-16 18:56:12] 📥 RECEIVED -> ID:84319368 | Amt:20000 | Note: +[2026-02-16 18:56:12] ⚠️ SKIPPED (OLD) -> ID:84319368 is <= Last:120329324 +[2026-02-25 18:13:33] 📥 RECEIVED -> ID:120327019 | Amt:500 | Note: +[2026-02-25 18:13:33] 📥 RECEIVED -> ID:120840498 | Amt:5 | Note: +[2026-02-25 18:13:33] ⚠️ SKIPPED (OLD) -> ID:120327019 is <= Last:120329324 +[2026-02-25 18:13:33] ⚙️ PROCESSED -> ID:120840498 | Status:IGNORED_NO_INVOICE +[2026-02-25 18:13:33] 📥 RECEIVED -> ID:84322399 | Amt:20000 | Note:869354 +[2026-02-25 18:13:33] ⚠️ SKIPPED (OLD) -> ID:84322399 is <= Last:120840498 +[2026-02-25 18:13:33] 📥 RECEIVED -> ID:120329324 | Amt:20 | Note:377746 +[2026-02-25 18:13:33] ⚠️ SKIPPED (OLD) -> ID:120329324 is <= Last:120840498 +[2026-02-25 18:13:33] 📥 RECEIVED -> ID:105354653 | Amt:100 | Note: +[2026-02-25 18:13:33] ⚠️ SKIPPED (OLD) -> ID:105354653 is <= Last:120840498 +[2026-02-25 18:13:33] 📥 RECEIVED -> ID:84319368 | Amt:20000 | Note: +[2026-02-25 18:13:33] ⚠️ SKIPPED (OLD) -> ID:84319368 is <= Last:120840498 diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/archive.zip b/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/archive.zip new file mode 100755 index 0000000..c922a89 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/archive.zip differ diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/driver/confirm_payment.php b/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/driver/confirm_payment.php new file mode 100755 index 0000000..5bcb838 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/driver/confirm_payment.php @@ -0,0 +1,237 @@ +<?php +// /v1/main/ride/syriatel/driver/confirm_payment.php +// يعتمد على connect.php و syriatel_token_handler.php فقط +include_once "../../../connect.php"; +include_once "./syriatel_token_handler.php"; + +header('Content-Type: application/json; charset=utf-8'); + +// ================== Helpers (طباعة/لوج) ================== +if (!function_exists('printSuccess')) { + function printSuccess($data = null, $message = "success") { + echo json_encode(["status" => "success", "message" => $message, "data" => $data], JSON_UNESCAPED_UNICODE); + exit; + } +} +if (!function_exists('printFailure')) { + function printFailure($message = "failure", $code = null) { + $resp = ["status" => "failure", "message" => $message]; + if ($code !== null) $resp["code"] = $code; + echo json_encode($resp, JSON_UNESCAPED_UNICODE); + exit; + } +} + +define("WALLET_LOG", __DIR__ . "/../logs/payment_verification.log"); +function wlog($step, $msg, $data = null) { + $dir = dirname(WALLET_LOG); + if (!is_dir($dir)) { @mkdir($dir, 0755, true); } + $line = "[".date('Y-m-d H:i:s')."] STEP {$step}: {$msg}"; + if ($data !== null) $line .= " | Data: ".json_encode($data, JSON_UNESCAPED_UNICODE); + file_put_contents(WALLET_LOG, $line.PHP_EOL, FILE_APPEND); +} + +// ================== منطق التوكن/المعرف ================== +function generateToken(PDO $con, string $driverId, float $amount): ?string { + // secretKey يُفترض قادم من connect/env + global $secretKey; + $data = $driverId.$amount.time().($secretKey ?? 'default_secret'); + $hash = hash('sha256', $data); + $rand = bin2hex(random_bytes(16)); + $token = substr($hash.$rand, 0, 64); + + $stmt = $con->prepare("INSERT INTO payment_tokens (token, driverID, dateCreated, amount) + VALUES (:t, :d, NOW(), :a)"); + $stmt->execute([':t'=>$token, ':d'=>$driverId, ':a'=>$amount]); + return $stmt->rowCount() ? $token : null; +} + +function generatePaymentID(PDO $con, string $driverId, float $amount, string $method): ?string { + $stmt = $con->prepare("INSERT INTO paymentsDriverPoints (amount, payment_method, driverID) + VALUES (:a, :m, :d)"); + $stmt->execute([':a'=>$amount, ':m'=>$method, ':d'=>$driverId]); + return $stmt->rowCount() ? $con->lastInsertId() : null; +} + +// ================== منطق إنهاء الدفع (مضمَّن) ================== +function finalizeWalletPaymentInline(PDO $con, string $orderRef): void { + // نقفل الصف لمنع السباقات + $stmt = $con->prepare("SELECT * FROM paymentsLogSyriaDriver + WHERE order_ref = :r LIMIT 1 FOR UPDATE"); + $stmt->execute([':r'=>$orderRef]); + $payment = $stmt->fetch(PDO::FETCH_ASSOC); + + if (!$payment) { + wlog("FINALIZE", "Payment row not found", ['orderRef'=>$orderRef]); + throw new RuntimeException("Payment not found."); + } + + // نتأكد من نجاح مزود الدفع + if ((int)$payment['status'] !== 1) { + wlog("FINALIZE", "Payment not completed yet", ['orderRef'=>$orderRef, 'status'=>$payment['status']]); + throw new RuntimeException("Payment not completed."); + } + + // حارس التكرار: إذا تمّت معالجة المحفظة سابقاً لا نكرر + if (!empty($payment['processed_wallet']) && (int)$payment['processed_wallet'] === 1) { + wlog("FINALIZE", "Already processed_wallet=1, skip.", ['orderRef'=>$orderRef]); + return; // لا نرمي استثناء؛ العملية سبق احتسابها + } + + $driverId = $payment['user_id']; // This is now correctly handled as a string + $originalAmount = (float)$payment['amount']; + $paymentMethod = $payment['payment_method'] ?: 'ecash'; + + // البونص + $bonusAmount = match ((int)$originalAmount) { + 100 => 100.0, + 200 => 210.0, + 400 => 450.0, + 1000 => 1100.0, + default => $originalAmount, + }; + + // تنفيذ ككل داخل معاملة + $con->beginTransaction(); + try { + // توليد التوكنات/المعرف + $tokenDriver = generateToken($con, $driverId, $bonusAmount); + if (!$tokenDriver) throw new RuntimeException("Failed to generate driver token"); + + $tokenSefer = generateToken($con, $driverId, $originalAmount); + if (!$tokenSefer) throw new RuntimeException("Failed to generate sefer token"); + + $paymentID = generatePaymentID($con, $driverId, $bonusAmount, $paymentMethod); + if (!$paymentID) throw new RuntimeException("Failed to create payment ID"); + + // driverWallet + $q = $con->prepare("INSERT INTO driverWallet (driverID, paymentID, amount, paymentMethod) + VALUES (:d, :r, :a, :m)"); + $q->execute([ + ':d'=>$driverId, ':a'=>$bonusAmount, + ':m'=>$paymentMethod, ':r'=>$orderRef + ]); + if ($q->rowCount() === 0) throw new RuntimeException("Insert driverWallet failed"); + + // وسم التوكن كمستخدم + $con->prepare("UPDATE payment_tokens SET isUsed = 1 WHERE token = :t")->execute([':t'=>$tokenDriver]); + + // seferWallet + $q2 = $con->prepare("INSERT INTO seferWallet (driverId, passengerId, amount, paymentMethod, token, createdAt) + VALUES (:d, :p, :a, :m, :t, CURRENT_TIMESTAMP)"); + $q2->execute([ + ':d'=>$driverId, ':p'=>'driver', ':a'=>$originalAmount, + ':m'=>$paymentMethod, ':t'=>$tokenSefer + ]); + if ($q2->rowCount() === 0) throw new RuntimeException("Insert seferWallet failed"); + + $con->prepare("UPDATE payment_tokens SET isUsed = 1 WHERE token = :t")->execute([':t'=>$tokenSefer]); + + // تأشير السجل كمنتهٍ للمحفظة + $con->prepare("UPDATE paymentsLogSyriaDriver + SET processed_wallet = 1, updated_at = NOW() + WHERE order_ref = :r")->execute([':r'=>$orderRef]); + + $con->commit(); + wlog("FINALIZE", "Wallets updated successfully", ['orderRef'=>$orderRef, 'driverId'=>$driverId]); + } catch (Throwable $e) { + $con->rollBack(); + wlog("FINALIZE", "Exception: ".$e->getMessage(), ['orderRef'=>$orderRef]); + throw $e; + } +} + +// ================== مدخل تأكيد الدفع ================== +$transactionID = filterRequest('transactionID'); +$otp = filterRequest('otp'); + +error_log("Syriatel Confirm: Request for transaction {$transactionID}"); + +if (!$transactionID || !$otp) { + printFailure("Missing transaction ID or OTP."); +} + +// بيئة +$baseUrl = rtrim((string)getenv('SYRIATEL_API_BASE_URL'), '/'); +$merchantMSISDN = (string)getenv('SYRIATEL_MERCHANT_MSISDN'); +if ($baseUrl === '' || $merchantMSISDN === '') { + error_log("Syriatel Confirm: Missing SYRIATEL envs"); + printFailure("Server configuration error."); +} + +try { + // 1) Auth token + $token = function_exists('GetSerialToken') ? GetSerialToken() : getSyriatelToken(); + if (!$token) { printFailure("Could not authenticate with the payment provider."); } + + // 2) Call provider + $body = [ + "OTP" => $otp, + "merchantMSISDN" => $merchantMSISDN, + "transactionID" => $transactionID, + "token" => $token + ]; + $url = "{$baseUrl}/ePaymentExternalModule/paymentConfirmation"; + $ch = curl_init($url); + curl_setopt_array($ch, [ + CURLOPT_POST => true, + CURLOPT_POSTFIELDS => json_encode($body, JSON_UNESCAPED_UNICODE), + CURLOPT_RETURNTRANSFER => true, + CURLOPT_HTTPHEADER => [ + "Content-Type: application/json", + "Accept: application/json", + "User-Agent: Mozilla/5.0", + ], + CURLOPT_CONNECTTIMEOUT => 8, + CURLOPT_TIMEOUT => 40, + CURLOPT_SSL_VERIFYPEER => true, + CURLOPT_SSL_VERIFYHOST => 2, + ]); + $response = curl_exec($ch); + $errno = curl_errno($ch); + $httpCode = (int)curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + + error_log("Syriatel Confirm: HTTP {$httpCode} - ".substr((string)$response, 0, 300)); + + if ($errno) { printFailure("Payment gateway communication error.", $errno); } + if ($httpCode !== 200 || !$response) { printFailure("Payment gateway communication error (HTTP {$httpCode})."); } + + $responseData = json_decode($response, true); + if (!is_array($responseData)) { printFailure("Invalid provider response."); } + + $ok = (isset($responseData['errorDesc']) && $responseData['errorDesc'] === "Success"); + + if ($ok) { + // نحدّث حالة الدفع، ونُتم المحفظة بشكل آمن داخل نفس الطلب + $con->prepare("UPDATE paymentsLogSyriaDriver + SET status = 1, updated_at = NOW() + WHERE order_ref = :r")->execute([':r'=>$transactionID]); + + // إنهاء المحفظة (داخلية) + $walletOk = true; $walletMsg = null; + try { + finalizeWalletPaymentInline($con, $transactionID); + } catch (Throwable $ex) { + $walletOk = false; $walletMsg = $ex->getMessage(); + } + + $payload = [ + 'message' => 'Payment confirmed.', + 'transactionID' => $transactionID, + 'provider' => $responseData + ]; + if (!$walletOk && $walletMsg) { + $payload['walletNotice'] = "Payment successful, but wallet update failed: ".$walletMsg; + } + + printSuccess($payload); + } + + $errorMessage = $responseData['errorDesc'] ?? 'Unknown provider error'; + printFailure($errorMessage); + +} catch (Throwable $e) { + error_log("Syriatel Confirm: Exception - ".$e->getMessage()); + printFailure("An unexpected server error occurred."); +} \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/driver/finalize_wallet_payment.php b/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/driver/finalize_wallet_payment.php new file mode 100755 index 0000000..d0a4fd2 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/driver/finalize_wallet_payment.php @@ -0,0 +1,127 @@ +<?php +// wallet/finalize_wallet_payment.php + +// تم حذف include_once من هنا لأنه يُفترض أن ملف الاتصال قد تم تحميله بالفعل +// بواسطة الملف الذي يستدعي هذه الدالة (confirm_payment.php). +// include_once "../../../jwtconnect.php"; + +define("LOG_FILE", __DIR__ . "/../logs/payment_verification.log"); + +if (!function_exists('logError')) { + function logError($step, $message, $data = null) { + $logDir = dirname(LOG_FILE); + if (!is_dir($logDir)) { mkdir($logDir, 0755, true); } + $logEntry = "[" . date('Y-m-d H:i:s') . "] STEP {$step}: {$message}"; + if ($data !== null) { $logEntry .= " | Data: " . json_encode($data, JSON_UNESCAPED_UNICODE); } + file_put_contents(LOG_FILE, $logEntry . PHP_EOL, FILE_APPEND); + } +} + +if (!function_exists('generateToken')) { + function generateToken($con, $driverId, $amount): ?string { + global $secretKey; + $data = $driverId . $amount . time() . ($secretKey ?? 'default_secret'); + $hash = hash('sha256', $data); + $randomBytes = bin2hex(random_bytes(16)); + $token = substr($hash . $randomBytes, 0, 64); + + $stmt = $con->prepare("INSERT INTO payment_tokens (token, driverID, dateCreated, amount) VALUES (:token, :driverID, NOW(), :amount)"); + $stmt->execute([':token' => $token, ':driverID' => $driverId, ':amount' => $amount]); + return $stmt->rowCount() > 0 ? $token : null; + } +} + +if (!function_exists('generatePaymentID')) { + function generatePaymentID($con, $driverId, $amount, $method): ?string { + $stmt = $con->prepare("INSERT INTO paymentsDriverPoints (`amount`, `payment_method`, `driverID`) VALUES (:amount, :method, :driverID)"); + $stmt->execute([':driverID' => $driverId, ':amount' => $amount, ':method' => $method]); + return $stmt->rowCount() > 0 ? $con->lastInsertId() : null; + } +} + + +if (!function_exists('finalizeWalletPayment')) { + function finalizeWalletPayment($con) { + $orderRef = $_GET['orderRef'] ?? null; + if (empty($orderRef)) { + logError("FINALIZE", "Missing orderRef"); + return; // لا نستخدم throw هنا لأن الخطأ داخلي + } + + // 1. تحقق من الدفع + $stmt = $con->prepare("SELECT * FROM `paymentsLogSyriaDriver` WHERE order_ref = :order_ref AND status = 1 LIMIT 1"); + $stmt->execute([':order_ref' => $orderRef]); + $payment = $stmt->fetch(PDO::FETCH_ASSOC); + + if (!$payment) { + logError("FINALIZE", "Payment not found or not completed", ['orderRef' => $orderRef]); + return; + } + + // [تحسين] استخدام معاملات لضمان سلامة البيانات + $con->beginTransaction(); + try { + $driverId = $payment['user_id']; + $originalAmount = floatval($payment['amount']); + $paymentMethod = $payment['payment_method'] ?? 'ecash'; + + // حساب المكافأة + $bonusAmount = match ((int)$originalAmount) { + 100 => 100.0, + 200 => 210.0, + 400 => 450.0, + 1000 => 1100.0, + default => $originalAmount, + }; + + // إنشاء التوكنات + $tokenDriver = generateToken($con, $driverId, $bonusAmount); + if (!$tokenDriver) throw new Exception('Failed to generate driver token'); + + $tokenSefer = generateToken($con, $driverId, $originalAmount); + if (!$tokenSefer) throw new Exception('Failed to generate sefer token'); + + $paymentID = generatePaymentID($con, $driverId, $bonusAmount, $paymentMethod); + if (!$paymentID) throw new Exception('Failed to generate payment ID'); + + // driverWallet + $insertDriver = $con->prepare("INSERT INTO driverWallet (driverID, paymentID, amount, paymentMethod) VALUES (:driverID, :paymentID, :amount, :paymentMethod)"); + $insertDriver->execute([ + ':driverID' => $driverId, + ':paymentID' => $paymentID, + ':amount' => $bonusAmount, + ':paymentMethod' => $paymentMethod + ]); + if ($insertDriver->rowCount() === 0) throw new Exception('Insert to driverWallet failed'); + + $con->prepare("UPDATE payment_tokens SET isUsed = TRUE WHERE token = :token")->execute([':token' => $tokenDriver]); + + // seferWallet + $insertSefer = $con->prepare("INSERT INTO seferWallet (driverId, passengerId, amount, paymentMethod, token, createdAt) + VALUES (:driverId, :passengerId, :amount, :paymentMethod, :token, CURRENT_TIMESTAMP)"); + $insertSefer->execute([ + ':driverId' => $driverId, + ':passengerId' => 'driver', + ':amount' => $originalAmount, + ':paymentMethod' => $paymentMethod, + ':token' => $tokenSefer + ]); + if ($insertSefer->rowCount() === 0) throw new Exception('Insert to seferWallet failed'); + + $con->prepare("UPDATE payment_tokens SET isUsed = TRUE WHERE token = :token")->execute([':token' => $tokenSefer]); + + // إذا نجحت كل العمليات، قم بتثبيتها في قاعدة البيانات + $con->commit(); + + logError("FINALIZE", "Wallets updated successfully", ['orderRef' => $orderRef]); + // لا نطبع نجاح هنا، الملف المستدعي هو المسؤول عن إرسال الرد النهائي + + } catch (Throwable $e) { + // في حالة حدوث أي خطأ، تراجع عن كل التغييرات + $con->rollBack(); + logError("FINALIZE", "Exception during finalization: " . $e->getMessage(), ['orderRef' => $orderRef]); + // نمرر الخطأ للملف الأعلى ليعالجه + throw $e; + } + } +} diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/driver/start_payment.php b/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/driver/start_payment.php new file mode 100755 index 0000000..c77f8b2 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/driver/start_payment.php @@ -0,0 +1,141 @@ +<?php +// /v1/main/ride/syriatel/driver/start_payment.php +include "../../../connect.php"; +include_once "./syriatel_token_handler.php"; + +header('Content-Type: application/json; charset=utf-8'); + +/** دوال الطباعة (لو موجودة أصلاً في connect.php تجاهل هذه) */ +if (!function_exists('printSuccess')) { + function printSuccess($data = null, $message = "success") { + echo json_encode(["status"=>"success","message"=>$message,"data"=>$data], JSON_UNESCAPED_UNICODE); exit; + } +} +if (!function_exists('printFailure')) { + function printFailure($message = "failure", $code = null) { + $resp = ["status"=>"failure","message"=>$message]; if ($code!==null) $resp["code"]=$code; + echo json_encode($resp, JSON_UNESCAPED_UNICODE); exit; + } +} + +/** مولّد مرجع الطلب (TransactionID) */ +function generate_order_ref(): string { + // مرجع مقروء + فريد: INT-YYYYMMDDHHMMSS-6digits + $ts = date('YmdHis'); + $rand = str_pad((string)random_int(0, 999999), 6, '0', STR_PAD_LEFT); + return "INT-$ts-$rand"; +} + +// --- Input Parameters --- +$amount = filterRequest('amount'); +$driverId = filterRequest('driverId'); +$phone = filterRequest('phone'); // customerMSISDN +$lang = filterRequest('lang') ?? 'ar'; + +error_log("Syriatel Start: Request received for driver {$driverId} with amount {$amount}"); + +if (!$amount || !$driverId || !$phone) { + printFailure("Missing required parameters."); +} + +// --- Environment Variables --- +$baseUrl = rtrim((string)getenv('SYRIATEL_API_BASE_URL'), '/'); +$merchantMSISDN = (string)getenv('SYRIATEL_MERCHANT_MSISDN'); + +if ($baseUrl === '' || $merchantMSISDN === '') { + error_log("Syriatel Start: Missing SYRIATEL_API_BASE_URL or SYRIATEL_MERCHANT_MSISDN"); + printFailure("Server configuration error."); +} + +// --- Logic --- +try { + // 1) Token + $token = getSyriatelToken(); + error_log("Syriatel Start: token=" . ($token ? substr($token,0,8).'...' : 'NULL')); + + if (!$token) { + printFailure("Could not authenticate with the payment provider."); + } + + // 2) Transaction ID + log DB + $transactionID = generate_order_ref(); + $stmt = $con->prepare( + "INSERT INTO `paymentsLogSyriaDriver` (user_id, amount, status, order_ref, payment_method, created_at) + VALUES (:user_id, :amount, 0, :order_ref, 'syriatel', NOW())" + ); + $stmt->execute([ + ':user_id' => $driverId, + ':amount' => $amount, + ':order_ref' => $transactionID + ]); + error_log("Syriatel Start: Logged transaction {$transactionID} for driver {$driverId}"); + + // 3) Payment Request → Syriatel + $body = [ + "customerMSISDN" => $phone, // مثال: 09xxxxxxxx (حسب وثيقتهم) + "merchantMSISDN" => $merchantMSISDN, // من env + "amount" => $amount, + "transactionID" => $transactionID, + "token" => $token + ]; +error_log("Syriatel Start: customerMSISDN {$phone} merchantMSISDN {$merchantMSISDN}"); + $url = "{$baseUrl}/ePaymentExternalModule/paymentRequest"; + $ch = curl_init($url); + curl_setopt_array($ch, [ + CURLOPT_POST => true, + CURLOPT_POSTFIELDS => json_encode($body, JSON_UNESCAPED_UNICODE), + CURLOPT_RETURNTRANSFER => true, + CURLOPT_HTTPHEADER => [ + "Content-Type: application/json", + "User-Agent: Mozilla/5.0", + "Accept: application/json" + ], + CURLOPT_CONNECTTIMEOUT => 8, + CURLOPT_TIMEOUT => 40, + CURLOPT_SSL_VERIFYPEER => true, + CURLOPT_SSL_VERIFYHOST => 2, + ]); + $response = curl_exec($ch); + $errno = curl_errno($ch); + $errstr = curl_error($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + + error_log("Syriatel Start: paymentRequest HTTP {$httpCode} errno={$errno} resp=" . substr((string)$response,0,300)); + + if ($errno) { + printFailure("Payment gateway communication error.", $errno); + } + if ($httpCode !== 200) { + printFailure("Payment gateway communication error (HTTP {$httpCode})."); + } + + $responseData = json_decode($response, true); + + // حسب الدوكيومنت: resultCode = 1 يعني OTP انرسل بنجاح + //errorCode = 0 => Success +if (isset($responseData['errorCode']) && (string)$responseData['errorCode'] === "0") { + printSuccess([ + 'message' => 'OTP sent successfully.', + 'transactionID' => $transactionID, + ]); +} +// 2) إذا resultCode = 1 => OTP sent +elseif (isset($responseData['resultCode']) && (int)$responseData['resultCode'] === 1) { + printSuccess([ + 'message' => 'OTP sent successfully.', + 'transactionID' => $transactionID, + ]); +} +// 3) أي شيء آخر => فشل +else { + $errorMessage = $responseData['resultDescription'] + ?? $responseData['errorDesc'] + ?? 'Failed to initiate payment.'; + printFailure($errorMessage); +} + +} catch (Throwable $e) { + error_log("Syriatel Start: Exception - " . $e->getMessage()); + printFailure("An unexpected server error occurred."); +} \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/driver/syriatel_token_handler.php b/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/driver/syriatel_token_handler.php new file mode 100755 index 0000000..ba53ae6 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/driver/syriatel_token_handler.php @@ -0,0 +1,74 @@ +<?php // syriatel_token_handler +function getSyriatelToken(): ?string { + // اضبط البيئة: prod أو stage (افتراضي prod) + $env = getenv("SYRIATEL_ENV") ?: "prod"; + + // Base URLs من Postman + $baseStage = "https://merchants.syriatel.sy:1443/ePayment_external_Json_test/rs/ePaymentExternalModule"; + $baseProd = "https://merchants.syriatel.sy:1443/ePayment_external_Json/rs/ePaymentExternalModule"; + + $baseUrl = ($env === "stage") ? $baseStage : $baseProd; + $url = $baseUrl . "/getToken"; + + // ⚠️ لا تضع قيم افتراضية حساسة Hardcoded + $username = getenv("SYRIATEL_USERNAME"); + $password = getenv("SYRIATEL_PASSWORD"); + + if (!$username || !$password) { + error_log("[GetSyriatelToken] Missing credentials in ENV"); + printFailure("Payment provider credentials are missing."); + return null; + } + + error_log("[GetSyriatelToken] Env={$env} | URL={$url} | user={$username}"); + + $payload = [ + "username" => $username, + "password" => $password + ]; + + $ch = curl_init($url); + curl_setopt_array($ch, [ + CURLOPT_POST => true, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_HTTPHEADER => [ + "Content-Type: application/json", + "User-Agent: Mozilla/5.0", + ], + CURLOPT_POSTFIELDS => json_encode($payload, JSON_UNESCAPED_UNICODE), + CURLOPT_CONNECTTIMEOUT => 8, + CURLOPT_TIMEOUT => 40, + CURLOPT_SSL_VERIFYPEER => true, + CURLOPT_SSL_VERIFYHOST => 2, + ]); + + $response = curl_exec($ch); + $errno = curl_errno($ch); + $errstr = curl_error($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + + if ($errno) { + error_log("[GetSyriatelToken] cURL error {$errno}: {$errstr}"); + printFailure("Could not connect to the payment provider.", $errno); + return null; + } + + if ($httpCode !== 200 || !$response) { + error_log("[GetSyriatelToken] HTTP {$httpCode} | Empty/invalid response"); + printFailure("Could not authenticate with the payment provider."); + return null; + } + + $data = json_decode($response, true); + $token = $data["token"] ?? null; + + if (!$token) { + error_log("[GetSyriatelToken] Token not found in response: " . substr($response, 0, 300)); + printFailure("Could not authenticate with the payment provider."); + return null; + } + + error_log("[GetSyriatelToken] Token received successfully"); + return $token; +} \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/logs/payment_verification.log b/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/logs/payment_verification.log new file mode 100644 index 0000000..0ef1101 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/logs/payment_verification.log @@ -0,0 +1,25 @@ +[2025-11-04 11:16:27] STEP FINALIZE: Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'orderRef' in 'field list' | Data: {"orderRef":"INT-20251104111538-994380"} +[2025-11-05 11:36:24] STEP FINALIZE: Exception: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined | Data: {"orderRef":"INT-20251105113557-052588"} +[2025-11-08 07:24:27] STEP FINALIZE: Exception: generateToken(): Argument #2 ($driverId) must be of type int, string given, called in /home/intaleq-wallet/htdocs/walletintaleq.intaleq.xyz/v1/main/ride/syriatel/driver/confirm_payment.php on line 98 | Data: {"orderRef":"INT-20251108072402-591731"} +[2025-11-15 03:12:44] STEP FINALIZE: Wallets updated successfully | Data: {"orderRef":"INT-20251115031225-211431","driverId":"1031b1b342a9a9e20b95"} +[2025-11-16 23:34:48] STEP FINALIZE: Wallets updated successfully | Data: {"orderRef":"INT-20251116233429-590104","driverId":"048e59b0737d7ad85370"} +[2025-11-17 07:48:33] STEP FINALIZE: Wallets updated successfully | Data: {"orderRef":"INT-20251117074803-798991","driverId":"28b3b16129d555cafb9b"} +[2025-11-22 16:35:44] STEP FINALIZE: Wallets updated successfully | Data: {"orderRef":"INT-20251122163518-755824","driverId":"986bf7b2242410647d05"} +[2025-11-25 11:50:26] STEP FINALIZE: Wallets updated successfully | Data: {"orderRef":"INT-20251125114917-921160","driverId":"7b437f291b5330536488"} +[2025-11-25 22:53:31] STEP FINALIZE: Wallets updated successfully | Data: {"orderRef":"INT-20251125225306-092996","driverId":"aec6f1335b72b5976dea"} +[2025-11-25 23:38:09] STEP FINALIZE: Wallets updated successfully | Data: {"orderRef":"INT-20251125233750-436593","driverId":"aec6f1335b72b5976dea"} +[2025-11-26 16:24:04] STEP FINALIZE: Wallets updated successfully | Data: {"orderRef":"INT-20251126162327-487255","driverId":"7a30afbb9b33d68a8b78"} +[2025-11-27 11:13:43] STEP FINALIZE: Wallets updated successfully | Data: {"orderRef":"INT-20251127111247-519577","driverId":"92e2fd19f4be30c3c727"} +[2025-11-27 16:48:44] STEP FINALIZE: Wallets updated successfully | Data: {"orderRef":"INT-20251127164535-525644","driverId":"e49604074b0b27710516"} +[2025-11-29 17:23:58] STEP FINALIZE: Wallets updated successfully | Data: {"orderRef":"INT-20251129172343-124569","driverId":"2870ec487be28f0929c7"} +[2025-11-30 21:34:28] STEP FINALIZE: Wallets updated successfully | Data: {"orderRef":"INT-20251130213350-345293","driverId":"3de8047aee520ff6555f"} +[2025-12-02 14:52:41] STEP FINALIZE: Wallets updated successfully | Data: {"orderRef":"INT-20251202145224-318083","driverId":"590c719b3aaefb07d001"} +[2025-12-13 13:33:03] STEP FINALIZE: Wallets updated successfully | Data: {"orderRef":"INT-20251213133220-085952","driverId":"94973848bd46ab517fa4"} +[2025-12-14 21:59:36] STEP FINALIZE: Wallets updated successfully | Data: {"orderRef":"INT-20251214215921-864193","driverId":"e0d0a6a92804240482fc"} +[2025-12-16 20:05:03] STEP FINALIZE: Wallets updated successfully | Data: {"orderRef":"INT-20251216200446-674525","driverId":"793ebf9e18327a828c55"} +[2025-12-18 11:20:20] STEP FINALIZE: Wallets updated successfully | Data: {"orderRef":"INT-20251218111954-420209","driverId":"df4e0e0cb135ac836e68"} +[2025-12-18 11:22:21] STEP FINALIZE: Wallets updated successfully | Data: {"orderRef":"INT-20251218112152-679624","driverId":"df4e0e0cb135ac836e68"} +[2025-12-18 21:25:11] STEP FINALIZE: Wallets updated successfully | Data: {"orderRef":"INT-20251218212432-696061","driverId":"64bfc098a99342c0c729"} +[2025-12-21 13:03:16] STEP FINALIZE: Wallets updated successfully | Data: {"orderRef":"INT-20251221130240-780780","driverId":"527c0a89cdf35841e4eb"} +[2025-12-21 13:14:09] STEP FINALIZE: Wallets updated successfully | Data: {"orderRef":"INT-20251221131302-717915","driverId":"527c0a89cdf35841e4eb"} +[2025-12-31 10:56:16] STEP FINALIZE: Wallets updated successfully | Data: {"orderRef":"INT-20251231105523-483044","driverId":"d881d416c9d712c9b222"} diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/passenger/confirm_payment.php b/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/passenger/confirm_payment.php new file mode 100755 index 0000000..fe8c79e --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/passenger/confirm_payment.php @@ -0,0 +1,201 @@ +<?php +// /v1/main/ride/syriatel/passenger/confirm_payment.php +include "../../../connect.php"; +include_once __DIR__ . "/syriatel_token_handler.php"; +header('Content-Type: application/json; charset=utf-8'); + +/** Helpers **/ +function mlog(string $msg) { error_log($msg); } + +// تعريف دالة توليد التوكن محلياً (نفس منطق السائق ولكن للراكب) +if (!function_exists('generateLocalToken')) { + function generateLocalToken($con, $userId, $amount) { + // مفتاح سري بسيط للتشفير (يمكنك تغييره أو جلبه من ملف الإعدادات) + $secretKey = 'Tripz_Passenger_Secret_Key'; + $data = $userId . $amount . time() . $secretKey; + $hash = hash('sha256', $data); + $randomBytes = bin2hex(random_bytes(16)); + $token = substr($hash . $randomBytes, 0, 64); + + $stmt = $con->prepare("INSERT INTO payment_tokens (token, passengerID, dateCreated, amount) VALUES (:token, :passengerID, NOW(), :amount)"); + // لاحظ: استخدمنا passengerID هنا بدلاً من driverID بناء على الجدول، إذا كان الجدول موحداً استخدم العمود المناسب + // غالباً الجدول يحتوي user_id أو يتم استخدام driverID للكل. + // سأفترض هنا أن الجدول يقبل التوكن، وسأقوم بربطه بالراكب. + // إذا كان عمود driverID هو الوحيد الموجود، يمكن تمرير الراكب فيه أو تعديل الجدول. + // **للتوافق مع السائق:** سأستخدم الحقل العام أو أتجاوز الـ foreign key إذا وجد. + // لكن الأضمن: + $stmt->execute([':token' => $token, ':passengerID' => $userId, ':amount' => $amount]); + return $stmt->rowCount() > 0 ? $token : null; + } +} + +// --- المدخلات --- +$transactionID = filterRequest('transactionID'); // يقابل order_ref +$otp = filterRequest('otp'); // كود التأكيد +$lang = filterRequest('lang'); // اختياري + +mlog("Syriatel Confirm (Passenger): Start tx={$transactionID}"); + +if (!$transactionID || !$otp) { + printFailure($lang === 'ar' ? "رقم العملية أو رمز OTP مفقود." : "Missing transaction ID or OTP."); + exit; +} + +// --- المتغيرات البيئية --- +$baseUrl = rtrim(getenv('SYRIATEL_API_BASE_URL'), '/'); +$merchantMSISDN = getenv('SYRIATEL_MERCHANT_MSISDN'); + +if (!$baseUrl || !$merchantMSISDN) { + printFailure($lang === 'ar' ? "خطأ في إعدادات الخادم." : "Server configuration error."); + exit; +} + +try { + // 1) توكن المصادقة من Syriatel + $token = getSyriatelToken(); + if (!$token) { + printFailure($lang === 'ar' ? "تعذّر المصادقة مع مزوّد الدفع." : "Could not authenticate with the payment provider."); + exit; + } + + // 2) تحضير وإرسال طلب التأكيد لشركة سيريتل + $body = [ + "OTP" => $otp, + "merchantMSISDN" => $merchantMSISDN, + "transactionID" => $transactionID, + "token" => $token + ]; + + $ch = curl_init("{$baseUrl}/ePaymentExternalModule/paymentConfirmation"); + curl_setopt_array($ch, [ + CURLOPT_POST => true, + CURLOPT_POSTFIELDS => json_encode($body, JSON_UNESCAPED_UNICODE), + CURLOPT_RETURNTRANSFER => true, + CURLOPT_HTTPHEADER => ["Content-Type: application/json"], + CURLOPT_TIMEOUT => 25, + ]); + + $response = curl_exec($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + + $res = json_decode($response ?: '{}', true); + if (!is_array($res)) { $res = []; } + $errCode = isset($res['errorCode']) ? (string)$res['errorCode'] : null; + + // التحقق من رد سيريتل + if ($httpCode !== 200 || $errCode !== "0") { + $errText = $res['errorDesc'] ?? $res['resultDescription'] ?? 'Payment failed'; + mlog("Syriatel Confirm (Passenger): Failed - " . json_encode($res, JSON_UNESCAPED_UNICODE)); + printFailure(['message' => $errText, 'syriatel' => $res]); + exit; + } + + // ============================================================ + // ✅ هنا يبدأ التعديل: التحديث المباشر لقاعدة البيانات (بدون cURL) + // ============================================================ + global $con; + + // 4) التحقق من السجل في قاعدة البيانات + $chk = $con->prepare("SELECT status, user_id, amount, payment_method FROM paymentsLogSyria WHERE order_ref = :ref LIMIT 1"); + $chk->execute([':ref' => $transactionID]); + $payment = $chk->fetch(PDO::FETCH_ASSOC); + + if (!$payment) { + printFailure($lang === 'ar' ? "لم يتم العثور على السجل." : "Payment row not found"); + exit; + } + + if ((int)$payment['status'] === 1) { + printSuccess(['message' => 'Already confirmed', 'data' => ['order_ref' => $transactionID]]); + exit; + } + + // بدء المعاملة (Transaction) + $con->beginTransaction(); + + try { + // أ) تحديث حالة الدفع في السجل + $stmtUpdate = $con->prepare("UPDATE `paymentsLogSyria` SET status = 1, updated_at = NOW() WHERE order_ref = :ref"); + $stmtUpdate->execute([':ref' => $transactionID]); + + $passengerId = $payment['user_id']; + $originalAmount = floatval($payment['amount']); + $paymentMethod = $payment['payment_method'] ?? 'syriatel'; + + // ب) حساب المكافأة (نفس المنطق القديم) + $bonusAmount = match ((int)$originalAmount) { + 500 => 530.0, + 1000 => 1070.0, + 2000 => 2180.0, + 5000 => 5700.0, + default => $originalAmount, + }; + + // ج) إنشاء التوكنات مباشرة (بدون دالة خارجية) + // 1. توكن لمحفظة الراكب (بالمبلغ مع البونص) + $tokenPassenger = generateLocalToken($con, $passengerId, $bonusAmount); + if (!$tokenPassenger) throw new Exception('Failed to generate passenger token'); + + // 2. توكن لمحفظة السفر/الإيرادات (بالمبلغ الأصلي) + $tokenSefer = generateLocalToken($con, $passengerId, $originalAmount); + if (!$tokenSefer) throw new Exception('Failed to generate sefer token'); + + // د) الإضافة إلى passengerWallet مباشرة + // ملاحظة: تأكد من أسماء الأعمدة في جدول passengerWallet + $insertPassWallet = $con->prepare("INSERT INTO passengerWallet (passenger_id, balance, token, created_at) VALUES (:pid, :amount, :token, NOW())"); + $insertPassWallet->execute([ + ':pid' => $passengerId, + ':amount' => $bonusAmount, + ':token' => $tokenPassenger + ]); + if ($insertPassWallet->rowCount() === 0) throw new Exception('Insert to passengerWallet failed'); + + // هـ) الإضافة إلى seferWallet مباشرة + // ملاحظة: في الراكب، يكون driverId عادة هو 'passenger' لتمييز أن الدفع جاء من تطبيق الراكب + $insertSefer = $con->prepare("INSERT INTO seferWallet (driverId, passengerId, amount, paymentMethod, token, createdAt) + VALUES (:did, :pid, :amount, :method, :token, NOW())"); + $insertSefer->execute([ + ':did' => 'passenger', // كما في السكربت القديم + ':pid' => $passengerId, + ':amount' => $originalAmount, + ':method' => $paymentMethod, + ':token' => $tokenSefer + ]); + if ($insertSefer->rowCount() === 0) throw new Exception('Insert to seferWallet failed'); + + // و) تحديث التوكنات لتصبح مستخدمة (isUsed = TRUE) + $updateToken = $con->prepare("UPDATE payment_tokens SET isUsed = TRUE WHERE token = :token"); + $updateToken->execute([':token' => $tokenPassenger]); + $updateToken->execute([':token' => $tokenSefer]); + + // ز) تثبيت المعاملة + $con->commit(); + + mlog("Syriatel Confirm (Passenger): Success DB Transaction for user {$passengerId}"); + + // إرجاع رد النجاح + printSuccess([ + 'message' => 'Syriatel Confirm Success', + 'data' => [ + 'order_ref' => $transactionID, + 'finalAmount' => $bonusAmount, + 'syriatel' => $res + ] + ]); + exit; + + } catch (Throwable $e) { + // في حال حدوث خطأ، تراجع عن كل شيء + $con->rollBack(); + mlog("Syriatel Confirm (Passenger): Transaction Error - " . $e->getMessage()); + printFailure($lang === 'ar' ? "فشل تحديث المحفظة." : "Wallet update failed."); + exit; + } + +} catch (Throwable $e) { + mlog("Syriatel Confirm (Passenger): General Exception - " . $e->getMessage()); + printFailure($lang === 'ar' ? "خطأ في الخادم." : "Server error"); + exit; +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/passenger/start_payment.php b/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/passenger/start_payment.php new file mode 100755 index 0000000..9d4f7f5 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/passenger/start_payment.php @@ -0,0 +1,124 @@ +<?php +// /v1/main/ride/syriatel/passenger/start_payment.php +include "../../../connect.php"; +include_once "./syriatel_token_handler.php"; + +header('Content-Type: application/json; charset=utf-8'); + +// --- Input Parameters --- +$amount = filterRequest('amount'); +$passengerId = filterRequest('passengerId'); // بدل driverId +$phone = filterRequest('phone'); // رقم الراكب (customerMSISDN) +$lang = filterRequest('lang') ?? 'ar'; + +error_log("Syriatel Start (Passenger): Request received for passenger {$passengerId} with amount {$amount}"); + +if (!$amount || !$passengerId || !$phone) { + printFailure($lang === 'ar' ? "بيانات ناقصة." : "Missing required parameters."); + exit; +} +function generate_order_ref(): string { + // مرجع مقروء + فريد: INT-YYYYMMDDHHMMSS-6digits + $ts = date('YmdHis'); + $rand = str_pad((string)random_int(0, 999999), 6, '0', STR_PAD_LEFT); + return "INT-$ts-$rand"; +} + +// --- Environment Variables --- +$baseUrl = rtrim(getenv('SYRIATEL_API_BASE_URL'), '/'); +$merchantMSISDN = getenv('SYRIATEL_MERCHANT_MSISDN'); + +if (!$baseUrl || !$merchantMSISDN) { + error_log("Syriatel Start (Passenger): Missing SYRIATEL_API_BASE_URL or SYRIATEL_MERCHANT_MSISDN env variables."); + printFailure($lang === 'ar' ? "خطأ إعدادات الخادم." : "Server configuration error."); + exit; +} + +try { + // 1) Get Authentication Token + $token = getSyriatelToken(); + error_log("Syriatel Start (Passenger):token= .$token"); + if (!$token) { + printFailure($lang === 'ar' ? "تعذّر المصادقة مع مزوّد الدفع." : "Could not authenticate with the payment provider."); + exit; + } + + // 2) Generate transaction ID + log + $transactionID = generate_order_ref(); // موجود لديك مسبقًا + // ملاحظة: استخدم جدول منفصل للركاب، أو وحّد الجدول مع حقل user_type. هنا نفترض جدول خاص بالراكب. + $stmt = $con->prepare( + "INSERT INTO `paymentsLogSyria` + (user_id, amount, status, order_ref, payment_method, created_at) + VALUES + (:user_id, :amount, 0, :order_ref, 'syriatel', NOW())" + ); + $stmt->execute([ + ':user_id' => $passengerId, + ':amount' => $amount, + ':order_ref' => $transactionID + ]); + error_log("Syriatel Start (Passenger): Logged transaction {$transactionID} for passenger {$passengerId}"); + + // 3) Call Syriatel paymentRequest + $body = [ + "customerMSISDN" => $phone, // هاتف الراكب + "merchantMSISDN" => $merchantMSISDN, // هاتف التاجر (المحفظة) + "amount" => $amount, + "transactionID" => $transactionID, + "token" => $token + ]; + + $ch = curl_init("{$baseUrl}/ePaymentExternalModule/paymentRequest"); + curl_setopt_array($ch, [ + CURLOPT_POST => true, + CURLOPT_POSTFIELDS => json_encode($body, JSON_UNESCAPED_UNICODE), + CURLOPT_RETURNTRANSFER => true, + CURLOPT_HTTPHEADER => ["Content-Type: application/json"], + CURLOPT_TIMEOUT => 25, + ]); + + $response = curl_exec($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + $curlErr = curl_error($ch); + curl_close($ch); + + if ($curlErr) { + error_log("Syriatel Start (Passenger): cURL Error - {$curlErr}"); + } + + error_log("Syriatel Start (Passenger): API Response HTTP {$httpCode} - {$response}"); + + if ($httpCode !== 200) { + printFailure($lang === 'ar' ? "خطأ اتصال ببوابة الدفع." : "Payment gateway communication error."); + exit; + } + + $responseData = json_decode($response, true); + + // حسب الدوكيومنت: resultCode = 1 يعني OTP انرسل بنجاح + //errorCode = 0 => Success +if (isset($responseData['errorCode']) && (string)$responseData['errorCode'] === "0") { + printSuccess([ + 'message' => 'OTP sent successfully.', + 'transactionID' => $transactionID, + ]); +} +// 2) إذا resultCode = 1 => OTP sent +elseif (isset($responseData['resultCode']) && (int)$responseData['resultCode'] === 1) { + printSuccess([ + 'message' => 'OTP sent successfully.', + 'transactionID' => $transactionID, + ]); +} +// 3) أي شيء آخر => فشل +else { + $errorMessage = $responseData['resultDescription'] + ?? $responseData['errorDesc'] + ?? 'Failed to initiate payment.'; + printFailure($errorMessage); +} + +} catch (Throwable $e) { + error_log("Syriatel Start: Exception - " . $e->getMessage()); + printFailure("An unexpected server error occurred."); +} \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/passenger/syriatel_token.cache b/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/passenger/syriatel_token.cache new file mode 100644 index 0000000..3877044 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/passenger/syriatel_token.cache @@ -0,0 +1 @@ +{"token":"E964A84D88C9A2306016886254475A49BE2BC95AFB6F4C30CD24857F5EFACDD2173D59A4B951CCEEE311AEFD3E40ABBF3E70BD2B1B8B3F0703E094C419E6291A6CFEA5C3CCD3B57E093FD58E6BB09ECF","expires_at":1759998218} \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/passenger/syriatel_token_handler.php b/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/passenger/syriatel_token_handler.php new file mode 100755 index 0000000..ba53ae6 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/syriatel/passenger/syriatel_token_handler.php @@ -0,0 +1,74 @@ +<?php // syriatel_token_handler +function getSyriatelToken(): ?string { + // اضبط البيئة: prod أو stage (افتراضي prod) + $env = getenv("SYRIATEL_ENV") ?: "prod"; + + // Base URLs من Postman + $baseStage = "https://merchants.syriatel.sy:1443/ePayment_external_Json_test/rs/ePaymentExternalModule"; + $baseProd = "https://merchants.syriatel.sy:1443/ePayment_external_Json/rs/ePaymentExternalModule"; + + $baseUrl = ($env === "stage") ? $baseStage : $baseProd; + $url = $baseUrl . "/getToken"; + + // ⚠️ لا تضع قيم افتراضية حساسة Hardcoded + $username = getenv("SYRIATEL_USERNAME"); + $password = getenv("SYRIATEL_PASSWORD"); + + if (!$username || !$password) { + error_log("[GetSyriatelToken] Missing credentials in ENV"); + printFailure("Payment provider credentials are missing."); + return null; + } + + error_log("[GetSyriatelToken] Env={$env} | URL={$url} | user={$username}"); + + $payload = [ + "username" => $username, + "password" => $password + ]; + + $ch = curl_init($url); + curl_setopt_array($ch, [ + CURLOPT_POST => true, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_HTTPHEADER => [ + "Content-Type: application/json", + "User-Agent: Mozilla/5.0", + ], + CURLOPT_POSTFIELDS => json_encode($payload, JSON_UNESCAPED_UNICODE), + CURLOPT_CONNECTTIMEOUT => 8, + CURLOPT_TIMEOUT => 40, + CURLOPT_SSL_VERIFYPEER => true, + CURLOPT_SSL_VERIFYHOST => 2, + ]); + + $response = curl_exec($ch); + $errno = curl_errno($ch); + $errstr = curl_error($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + + if ($errno) { + error_log("[GetSyriatelToken] cURL error {$errno}: {$errstr}"); + printFailure("Could not connect to the payment provider.", $errno); + return null; + } + + if ($httpCode !== 200 || !$response) { + error_log("[GetSyriatelToken] HTTP {$httpCode} | Empty/invalid response"); + printFailure("Could not authenticate with the payment provider."); + return null; + } + + $data = json_decode($response, true); + $token = $data["token"] ?? null; + + if (!$token) { + error_log("[GetSyriatelToken] Token not found in response: " . substr($response, 0, 300)); + printFailure("Could not authenticate with the payment provider."); + return null; + } + + error_log("[GetSyriatelToken] Token received successfully"); + return $token; +} \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/tips/add.php b/walletintaleq.intaleq.xyz/v2/main/ride/tips/add.php new file mode 100755 index 0000000..0a7ee18 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/tips/add.php @@ -0,0 +1,36 @@ +<?php +include "../../connect.php"; + +$passengerID = filterRequest("passengerID"); +$driverID = filterRequest("driverID"); +$rideID = filterRequest("rideID"); +$tipAmount = filterRequest("tipAmount"); + +// Validate tipAmount to ensure it fits within the column's allowed range +if (!is_numeric($tipAmount) || $tipAmount < 0 || $tipAmount > 99999999.99) { + printFailure("Invalid tip amount."); + exit(); +} + +// Assuming your `created_at` column is of type TIMESTAMP and has the default value CURRENT_TIMESTAMP +$sql = "INSERT INTO `tips`(`id`, `driverID`, `passengerID`, `rideID`, `tipAmount`) VALUES (null, :driverID, :passengerID, :rideID, :tipAmount)"; + +$stmt = $con->prepare($sql); + +// Bind parameters to prevent SQL injection +$stmt->bindParam(':driverID', $driverID); +$stmt->bindParam(':passengerID', $passengerID); +$stmt->bindParam(':rideID', $rideID); +$stmt->bindParam(':tipAmount', $tipAmount); + +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Print a success message + printSuccess($message = 'Tip inserted successfully'); +} else { + + // Print a failure message + printFailure($message = "Failed to save tip information"); +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/ride/tips/get.php b/walletintaleq.intaleq.xyz/v2/main/ride/tips/get.php new file mode 100644 index 0000000..e49aef6 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/ride/tips/get.php @@ -0,0 +1,32 @@ +<?php +include "../../connect.php"; +$driverID = filterRequest("driverID"); +$passendgerID = filterRequest("passendgerID"); + +$sql = "SELECT + `id`, + `driverID`, + `passendgerID`, + `rideID`, + `tipAmount` +FROM + `tips` +WHERE + `driverID`='$driverID'OR`passendgerID`='$passendgerID'"; +$stmt = $con->prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Fetch the record + $row = $stmt->fetchAll(PDO::FETCH_ASSOC); + $count = $stmt->rowCount(); + + + printSuccess( $row); + +} + else{ + // Print a failure message + printFailure($message = "No wallet record found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/serviceApp/addNotesDriver.php b/walletintaleq.intaleq.xyz/v2/main/serviceApp/addNotesDriver.php new file mode 100644 index 0000000..c10e60c --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/serviceApp/addNotesDriver.php @@ -0,0 +1,31 @@ +<?php + +include "../connect.php"; + +// Retrieve and sanitize input parameters +$phone = filterRequest("phone"); +$note = filterRequest("note"); +$editor = filterRequest("editor"); + +// SQL query to insert a new note into the notesForDriverService table +$sql = "INSERT INTO `notesForDriverService` ( `phone`, `note`, `editor`) + VALUES (:phone, :note, :editor)"; + +// Prepare the SQL statement +$stmt = $con->prepare($sql); + +// Bind the parameters +$stmt->bindParam(':phone', $phone); +$stmt->bindParam(':note', $note); +$stmt->bindParam(':editor', $editor); + +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Print a success message + printSuccess($message = "note inserted successfully"); +} else { + // Print a failure message + printFailure($message = "Failed to insert note"); +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/serviceApp/addNotesPassenger.php b/walletintaleq.intaleq.xyz/v2/main/serviceApp/addNotesPassenger.php new file mode 100644 index 0000000..ce18529 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/serviceApp/addNotesPassenger.php @@ -0,0 +1,31 @@ +<?php + +include "../connect.php"; + +// Retrieve and sanitize input parameters +$phone = filterRequest("phone"); +$note = filterRequest("note"); +$editor = filterRequest("editor"); + +// SQL query to insert a new note into the notesForDriverService table +$sql = "INSERT INTO `notesForPassengerService` ( `phone`, `note`, `editor`) + VALUES (:phone, :note, :editor)"; + +// Prepare the SQL statement +$stmt = $con->prepare($sql); + +// Bind the parameters +$stmt->bindParam(':phone', $phone); +$stmt->bindParam(':note', $note); +$stmt->bindParam(':editor', $editor); + +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Print a success message + printSuccess($message = "note inserted successfully"); +} else { + // Print a failure message + printFailure($message = "Failed to insert note"); +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/serviceApp/addWelcomeDriverNote.php b/walletintaleq.intaleq.xyz/v2/main/serviceApp/addWelcomeDriverNote.php new file mode 100644 index 0000000..c0be64e --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/serviceApp/addWelcomeDriverNote.php @@ -0,0 +1,26 @@ +<?php + +include "../connect.php"; + +// Retrieve and sanitize input parameters +$driverId = filterRequest("driverId"); +$notes = filterRequest("notes"); + + +// SQL query to insert a new note into the notesForDriverService table +$sql = "INSERT INTO `welcomeDriverCall`( `driverId`, `isCall`, `notes`) VALUES ('$driverId','1','$notes')"; + +// Prepare the SQL statement +$stmt = $con->prepare($sql); + + +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Print a success message + printSuccess($message = "note inserted successfully"); +} else { + // Print a failure message + printFailure($message = "Failed to insert note"); +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/serviceApp/driverWhoregisterFfterCall.php b/walletintaleq.intaleq.xyz/v2/main/serviceApp/driverWhoregisterFfterCall.php new file mode 100644 index 0000000..0a3226b --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/serviceApp/driverWhoregisterFfterCall.php @@ -0,0 +1,30 @@ +<?php +include "../connect.php"; +// $driverID = filterRequest("driverID"); + +$sql = "SELECT + * +FROM + `driver` +LEFT JOIN `notesForDriverService` ON `notesForDriverService`.`phone` = driver.phone +WHERE + `notesForDriverService`.phone = driver.phone + AND MONTH(`driver`.`created_at`) = MONTH(CURRENT_DATE()) +ORDER BY + `driver`.`created_at` +DESC;"; +$stmt = $con->prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Fetch the record + $row = $stmt->fetchAll(PDO::FETCH_ASSOC); + + printSuccess( $row); + +} + else{ + // Print a failure message + printFailure($message = "No wallet record found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/serviceApp/editCarPlate.php b/walletintaleq.intaleq.xyz/v2/main/serviceApp/editCarPlate.php new file mode 100644 index 0000000..fcdf44a --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/serviceApp/editCarPlate.php @@ -0,0 +1,43 @@ +<?php +include "../connect.php"; + +// Retrieve and sanitize input parameters +$driverId = filterRequest("driverId"); +$carPlate = filterRequest("carPlate"); + +// Start a transaction +$con->beginTransaction(); + +try { + // Update CarRegistration table + $sqlUpdate = "UPDATE `CarRegistration` SET `car_plate` = :carPlate WHERE `driverID` = :driverId"; + $stmtUpdate = $con->prepare($sqlUpdate); + $stmtUpdate->bindParam(':carPlate', $carPlate); + $stmtUpdate->bindParam(':driverId', $driverId); + $stmtUpdate->execute(); + + // Check if the update was successful + if ($stmtUpdate->rowCount() > 0) { + // Insert into carPlateEdit table + $sqlInsert = "INSERT INTO `carPlateEdit` (`driverId`, `carPlate`, `isEdit`) VALUES (:driverId, :carPlate, 1)"; + $stmtInsert = $con->prepare($sqlInsert); + $stmtInsert->bindParam(':driverId', $driverId); + $stmtInsert->bindParam(':carPlate', $carPlate); + $stmtInsert->execute(); + + // Commit the transaction + $con->commit(); + + // Print a success message + printSuccess("Car plate updated and edit record inserted successfully"); + } else { + // Rollback the transaction if update failed + $con->rollBack(); + printFailure("Failed to update car plate. No matching record found."); + } +} catch (PDOException $e) { + // Rollback the transaction if any error occurred + $con->rollBack(); + printFailure("An error occurred: " . $e->getMessage()); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/serviceApp/error_log b/walletintaleq.intaleq.xyz/v2/main/serviceApp/error_log new file mode 100644 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/serviceApp/getCarPlateNotEdit.php b/walletintaleq.intaleq.xyz/v2/main/serviceApp/getCarPlateNotEdit.php new file mode 100755 index 0000000..a06f55d --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/serviceApp/getCarPlateNotEdit.php @@ -0,0 +1,48 @@ +<?php + +include "../connect.php"; +$phoneNumber = filterRequest("phone_number"); + +$sql = "SELECT + CR.`id`, + CR.`driverID`, + CR.`vin`, + CR.`car_plate`, + CR.`make`, + CR.`model`, + CR.`year`, + CR.`expiration_date`, + CR.`color`, + CR.`owner`, + CR.`color_hex`, + CR.`address`, + CR.`displacement`, + CR.`fuel`, + CR.`registration_date`, + CR.`created_at` +FROM + `CarRegistration` CR +WHERE + CR.`driverID` NOT IN( + SELECT DISTINCT + CPE.`driverId` + FROM + `carPlateEdit` CPE +) +LIMIT 10; +"; +$stmt = $con->prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Fetch the records + $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); + + printSuccess($rows); + +} else { + // Print a failure message + printFailure($message = "No Car verified yet found"); +} + +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/serviceApp/getComplaintAllData.php b/walletintaleq.intaleq.xyz/v2/main/serviceApp/getComplaintAllData.php new file mode 100644 index 0000000..108ca04 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/serviceApp/getComplaintAllData.php @@ -0,0 +1,169 @@ +<?php +include "../connect.php"; +// $driverID = filterRequest("driverID"); + +$sql = "SELECT + cm.`id`, + cm.`ride_id`, + cm.`passenger_id`, + cm.`driver_id`, + cm.`complaint_type`, + cm.`description`, + cm.`date_filed`, + cm.`statusComplaint`, + cm.`resolution`, + cm.`date_resolved`, + p.first_name AS passengerName, + d.name_arabic AS driverName, + d.gender, + ride.price AS priceOfRide, + ride.status AS rideStatus, + ride.carType ascarType, + ride.paymentMethod AS ridePaymentMethod, + ride.rideTimeFinish AS rideTimeFinish, + payments.amount as paymentFromPaymentTable, + payments.created_at as timeFromPaymentTable, + ( + SELECT + AVG(rd.rating) + FROM + ratingDriver rd + WHERE + rd.driver_id = cm.driver_id +) AS avgRatingDriverFromPassengers, +( + SELECT + COUNT(*) + FROM + ratingDriver rd + WHERE + rd.driver_id = cm.driver_id +) AS countratingDriverFromPassengers, +( + SELECT + AVG(rp.rating) + FROM + ratingPassenger rp + WHERE + rp.passenger_id = cm.passenger_id +) AS avgRatingPassengerFromDrivers, +( + SELECT + COUNT(*) + FROM + ratingPassenger rp + WHERE + rp.passenger_id = cm.passenger_id +) AS countRatingPassengerFromDrivers, +( + SELECT + COUNT(*) + FROM + ride + WHERE + ride.driver_id = cm.driver_id +) countDriverRide, +( + SELECT + COUNT(*) + FROM + ride + WHERE + ride.passenger_id = cm.passenger_id +) countPassengerRide, +( + SELECT + COALESCE(SUM(amount), + 0) AS visaDriver + FROM + payments + WHERE + isGiven = 'waiting' AND `payment_method` IN( + 'visa-in', + 'visa', + 'visaRide', + 'TransferFrom', + 'payout', + 'TransferTo' + ) AND payments.`driverID` = cm.driver_id +) AS driverVisa, +( + SELECT + COALESCE(SUM(amount), + 0) AS pointDriver + FROM + driverWallet dw + WHERE + dw.paymentMethod IN( + 'visa-in', + 'visa', + 'visaRide', + 'TransferFrom', + 'payout', + 'TransferTo' + ) AND dw.`driverID` = cm.driver_id +) AS driverWallet, +( + SELECT + COALESCE(SUM(pw.balance), + 0) + FROM + passengerWallet pw + WHERE + pw.passenger_id = cm.passenger_id +) AS passengerWallet, +( + SELECT + token + FROM + driverToken + WHERE + driverToken.captain_id = cm.driver_id +) AS driverToken, +( + SELECT + token + FROM + tokens + WHERE + tokens.passengerID = cm.passenger_id +) AS passengerToken, +( + SELECT + COUNT(*) + FROM + complaint + WHERE + complaint.passenger_id = cm.passenger_id AND cm.complaint_type = 'Passenger' +) AS countOfComplaintFromPassenger, +( + SELECT + COUNT(*) + FROM + complaint + WHERE + complaint.driver_id = cm.driver_id AND cm.complaint_type = 'Driver' +) AS countOfComplaintFromDriver +FROM + `complaint` cm +LEFT JOIN passengers p ON + p.id = cm.`passenger_id` +LEFT JOIN driver d ON + d.id = cm.driver_id +LEFT JOIN ride ON ride.id = cm.ride_id +left join payments on payments.rideId=cm.ride_id"; +$stmt = $con->prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Fetch the record + $row = $stmt->fetchAll(PDO::FETCH_ASSOC); + + printSuccess( $row); + +} + else{ + // Print a failure message + printFailure($message = "No wallet record found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/serviceApp/getComplaintAllDataForDriver.php b/walletintaleq.intaleq.xyz/v2/main/serviceApp/getComplaintAllDataForDriver.php new file mode 100644 index 0000000..00d0963 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/serviceApp/getComplaintAllDataForDriver.php @@ -0,0 +1,171 @@ +<?php +include "../connect.php"; +$driverID = filterRequest("driver_id"); + +$sql = "SELECT + cm.`id`, + cm.`ride_id`, + cm.`passenger_id`, + cm.`driver_id`, + cm.`complaint_type`, + cm.`description`, + cm.`date_filed`, + cm.`statusComplaint`, + cm.`resolution`, + cm.`date_resolved`, + p.first_name AS passengerName, + d.name_arabic AS driverName, + d.gender, + ride.price AS priceOfRide, + ride.status AS rideStatus, + ride.carType AS carType, + ride.paymentMethod AS ridePaymentMethod, + ride.rideTimeFinish AS rideTimeFinish, + payments.amount AS paymentFromPaymentTable, + payments.created_at AS timeFromPaymentTable, + ( + SELECT + AVG(rd.rating) + FROM + ratingDriver rd + WHERE + rd.driver_id = cm.driver_id +) AS avgRatingDriverFromPassengers, +( + SELECT + COUNT(*) + FROM + ratingDriver rd + WHERE + rd.driver_id = cm.driver_id +) AS countratingDriverFromPassengers, +( + SELECT + AVG(rp.rating) + FROM + ratingPassenger rp + WHERE + rp.passenger_id = cm.passenger_id +) AS avgRatingPassengerFromDrivers, +( + SELECT + COUNT(*) + FROM + ratingPassenger rp + WHERE + rp.passenger_id = cm.passenger_id +) AS countRatingPassengerFromDrivers, +( + SELECT + COUNT(*) + FROM + ride + WHERE + ride.driver_id = cm.driver_id +) countDriverRide, +( + SELECT + COUNT(*) + FROM + ride + WHERE + ride.passenger_id = cm.passenger_id +) countPassengerRide, +( + SELECT + COALESCE(SUM(amount), + 0) AS visaDriver + FROM + payments + WHERE + isGiven = 'waiting' AND `payment_method` IN( + 'visa-in', + 'visa', + 'visaRide', + 'TransferFrom', + 'payout', + 'TransferTo' + ) AND payments.`driverID` = cm.driver_id +) AS driverVisa, +( + SELECT + COALESCE(SUM(amount), + 0) AS pointDriver + FROM + driverWallet dw + WHERE + dw.paymentMethod IN( + 'visa-in', + 'visa', + 'visaRide', + 'TransferFrom', + 'payout', + 'TransferTo' + ) AND dw.`driverID` = cm.driver_id +) AS driverWallet, +( + SELECT + COALESCE(SUM(pw.balance), + 0) + FROM + passengerWallet pw + WHERE + pw.passenger_id = cm.passenger_id +) AS passengerWallet, +( + SELECT + token + FROM + driverToken + WHERE + driverToken.captain_id = cm.driver_id +) AS driverToken, +( + SELECT + token + FROM + tokens + WHERE + tokens.passengerID = cm.passenger_id +) AS passengerToken, +( + SELECT + COUNT(*) + FROM + complaint + WHERE + complaint.passenger_id = cm.passenger_id AND cm.complaint_type = 'Passenger' +) AS countOfComplaintFromPassenger, +( + SELECT + COUNT(*) + FROM + complaint + WHERE + complaint.driver_id = cm.driver_id AND cm.complaint_type = 'Driver' +) AS countOfComplaintFromDriver +FROM + `complaint` cm +LEFT JOIN passengers p ON + p.id = cm.`passenger_id` +LEFT JOIN driver d ON + d.id = cm.driver_id +LEFT JOIN ride ON ride.id = cm.ride_id +LEFT JOIN payments ON payments.rideId = cm.ride_id +WHERE + cm.driver_id = '$driverID'"; +$stmt = $con->prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Fetch the record + $row = $stmt->fetchAll(PDO::FETCH_ASSOC); + + printSuccess( $row); + +} + else{ + // Print a failure message + printFailure($message = $sql); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/serviceApp/getDriverByPhone.php b/walletintaleq.intaleq.xyz/v2/main/serviceApp/getDriverByPhone.php new file mode 100644 index 0000000..7a34453 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/serviceApp/getDriverByPhone.php @@ -0,0 +1,131 @@ +<?php +include "../connect.php"; +$phone = filterRequest("phone"); + +$sql = "SELECT + COALESCE( + ( + SELECT + COUNT(*) + FROM + `ride` + WHERE + `ride`.`driver_id` = d.id + ), + 0 + ) AS countRide, + COALESCE( + ( + SELECT + AVG(`ratingDriver`.`rating`) + FROM + ratingDriver + WHERE + `ratingDriver`.`driver_id` = d.id + ), + 0 + ) AS rating, + COALESCE( + ( + SELECT + SUM(pd.amount) + FROM + `payments` pd + WHERE + pd.driverID = d.id + ), + 0 + ) AS totalPayment, + COALESCE( + ( + SELECT + SUM(dw.amount) + FROM + `driverWallet` dw + WHERE + dw.driverID = d.id + ), + 0 + ) AS totalDriverWallet, + COALESCE( + ( + SELECT + COUNT(*) + FROM + complaint + WHERE + complaint.driver_id = d.id + ), + 0 + ) AS countComplaint, + COALESCE( + ( + SELECT + COUNT(*) + FROM + driver_ride_scam scam + WHERE + scam.driverID = d.id + ), + 0 + ) AS countScam, + COALESCE( + ( + SELECT + complaint.description + FROM + complaint + WHERE + complaint.driver_id = d.id + ORDER BY + complaint.date_resolved + DESC + LIMIT 1 + ), + '' + ) AS complaint, COALESCE( + ( + SELECT + COUNT(*) + FROM + ratingPassenger + WHERE + ratingPassenger.driverID = d.id + ), + 0 + ) AS DRatingPassengersCount, + COALESCE( + ( + SELECT + AVG(ratingPassenger.rating) + FROM + ratingPassenger + WHERE + ratingPassenger.driverID = d.id + ), + 0 + ) AS avgDRatingPassenger, + cr.*, + d.* +FROM + driver d +LEFT JOIN CarRegistration cr ON + cr.driverID = d.id +WHERE + d.`phone` = '$phone'; +"; +$stmt = $con->prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Fetch the record + $row = $stmt->fetchAll(PDO::FETCH_ASSOC); + + printSuccess( $row); + +} + else{ + // Print a failure message + printFailure($message = "No wallet record found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/serviceApp/getDriverNotCompleteRegistration.php b/walletintaleq.intaleq.xyz/v2/main/serviceApp/getDriverNotCompleteRegistration.php new file mode 100755 index 0000000..84c7478 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/serviceApp/getDriverNotCompleteRegistration.php @@ -0,0 +1,40 @@ +<?php + +include "../connect.php"; + +$sql = "SELECT + * +FROM + phone_verification +LEFT JOIN `notesForDriverService` +ON + `notesForDriverService`.`phone` = `phone_verification`.`phone_number` +WHERE + phone_verification.phone_number NOT IN( + SELECT + phone + FROM + driver + WHERE + phone IS NOT NULL +) AND phone_verification.created_at >= DATE_SUB(CURDATE(), INTERVAL 18 DAY) +ORDER BY + created_at +DESC +LIMIT 0, 200; +"; +$stmt = $con->prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Fetch the records + $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); + + printSuccess($rows); + +} else { + // Print a failure message + printFailure($message = "No Phone verified yet found"); +} + +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/serviceApp/getNewDriverRegister.php b/walletintaleq.intaleq.xyz/v2/main/serviceApp/getNewDriverRegister.php new file mode 100644 index 0000000..d79b645 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/serviceApp/getNewDriverRegister.php @@ -0,0 +1,65 @@ +<?php + +include "../connect.php"; + +$sql = "SELECT + d.id, + d.phone, + d.email, + d.gender, + d.license_type, + d.national_number, + d.name_arabic, + d.name_english, + d.issue_date, + d.expiry_date, + d.license_categories, + d.address, + d.card_id, + d.occupation, + d.licenseIssueDate, + d.religion, + d.status, + d.birthdate, + d.site, + d.first_name, + d.last_name, + d.accountBank, + d.bankCode, + d.education, + d.employmentType, + d.maritalStatus, + d.fullNameMaritial, + d.expirationDate, + d.created_at, + d.updated_at, + wdc.id AS welcomId, + wdc.isCall, + wdc.notes, + wdc.createdAt AS welcomeCreatedAt +FROM + driver d +LEFT JOIN welcomeDriverCall wdc ON + wdc.driverId = d.id +WHERE + d.created_at BETWEEN DATE_SUB(CURDATE(), INTERVAL 1 DAY) AND CURDATE() + INTERVAL 1 DAY +ORDER BY + d.created_at DESC; + + +"; +$stmt = $con->prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Fetch the records + $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); + + printSuccess($rows); + +} else { + // Print a failure message + printFailure($message = "No Phone verified yet found"); +} + +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/serviceApp/getPassengersByPhone.php b/walletintaleq.intaleq.xyz/v2/main/serviceApp/getPassengersByPhone.php new file mode 100644 index 0000000..7aadbb3 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/serviceApp/getPassengersByPhone.php @@ -0,0 +1,65 @@ +<?php +include "../connect.php"; +$phone = filterRequest("phone"); + +$sql = "SELECT + p.*, + COALESCE(r.id, 0) AS ride_id, + COALESCE(r.start_location, '') AS start_location, + COALESCE(r.end_location, '') AS end_location, + COALESCE(r.date, '1970-01-01') AS ride_date, + COALESCE(r.time, '00:00:00') AS ride_time, + COALESCE(r.endtime, '00:00:00') AS ride_endtime, + COALESCE(r.price, 0) AS price, + COALESCE(r.passenger_id, 0) AS ride_passenger_id, + COALESCE(r.driver_id, 0) AS driver_id, + COALESCE(r.status, '') AS ride_status, + COALESCE(r.paymentMethod, '') AS ride_payment_method, + COALESCE(r.carType, '') AS car_type, + COALESCE(r.created_at, '1970-01-01 00:00:00') AS ride_created_at, + COALESCE(r.updated_at, '1970-01-01 00:00:00') AS ride_updated_at, + COALESCE(r.DriverIsGoingToPassenger, 0) AS driver_is_going_to_passenger, + COALESCE(r.rideTimeStart, '1970-01-01 00:00:00') AS ride_time_start, + COALESCE(r.rideTimeFinish, '1970-01-01 00:00:00') AS ride_time_finish, + COALESCE(r.price_for_driver, 0) AS price_for_driver, + COALESCE(r.price_for_passenger, 0) AS price_for_passenger, + COALESCE(r.distance, 0) AS distance, + COALESCE(pw.balance, 0) AS passenger_wallet_balance, + COALESCE(pay.amount, 0) AS passenger_payment_amount, + COALESCE(pay.payment_method, '') AS passenger_payment_method, + COALESCE(dw.amount, 0) AS driver_payment_amount, + COALESCE(dw.paymentMethod, '') AS driver_payment_method +FROM + passengers p +LEFT JOIN + ride r ON p.id = r.passenger_id +LEFT JOIN + passengerWallet pw ON p.id = pw.passenger_id +LEFT JOIN + payments pay ON r.id = pay.rideId +LEFT JOIN + driverWallet dw ON r.driver_id = dw.driverID AND pay.id = dw.paymentID +WHERE + p.phone = '$phone' + AND r.id = ( + SELECT id + FROM ride + WHERE passenger_id = p.id + ORDER BY date DESC, time DESC + LIMIT 1 + )"; +$stmt = $con->prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Fetch the record + $row = $stmt->fetchAll(PDO::FETCH_ASSOC); + + printSuccess( $row); + +} + else{ + // Print a failure message + printFailure($message = "No wallet record found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/serviceApp/getPassengersNotCompleteRegistration.php b/walletintaleq.intaleq.xyz/v2/main/serviceApp/getPassengersNotCompleteRegistration.php new file mode 100644 index 0000000..7528cc9 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/serviceApp/getPassengersNotCompleteRegistration.php @@ -0,0 +1,41 @@ +<?php + +include "../connect.php"; + +$sql = "SELECT + * + +FROM + phone_verification_passenger + LEFT JOIN `notesForPassengerService` +ON + `notesForPassengerService`.`phone` = `notesForPassengerService`.`phone` +WHERE + phone_verification_passenger.phone_number NOT IN( + SELECT + phone + FROM + passengers + WHERE + phone IS NOT NULL +) AND phone_verification_passenger.created_at >= DATE_SUB(CURDATE(), INTERVAL 4 DAY) +ORDER BY + created_at +DESC +LIMIT 0, 25; +"; +$stmt = $con->prepare($sql); +$stmt->execute(); + +if ($stmt->rowCount() > 0) { + // Fetch the records + $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); + + printSuccess($rows); + +} else { + // Print a failure message + printFailure($message = "No Phone verified yet found"); +} + +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/serviceApp/getPassengersStatic.php b/walletintaleq.intaleq.xyz/v2/main/serviceApp/getPassengersStatic.php new file mode 100644 index 0000000..7b42847 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/serviceApp/getPassengersStatic.php @@ -0,0 +1,48 @@ +<?php +include "../connect.php"; +$current_month = date('m'); +$current_year = date('Y'); +// Get the first and last days of the current month. +$first_day_of_month = date('Y-m-d', strtotime($current_year . '-' . $current_month . '-01')); +$last_day_of_month = date('Y-m-d', strtotime($current_year . '-' . $current_month . '-' . cal_days_in_month(CAL_GREGORIAN, $current_month, $current_year))); + +// Create a SQL query to select the total passengers for each day in the current month. +$sql = " +WITH RECURSIVE date_series AS ( + SELECT '$first_day_of_month' AS date + UNION ALL + SELECT DATE_ADD(date, INTERVAL 1 DAY) + FROM date_series + WHERE date < LEAST(CURDATE(), DATE_SUB('$last_day_of_month', INTERVAL 1 DAY)) +) +SELECT + date_series.date AS day, + COALESCE(COUNT(passengers.id), 0) AS totalPassengers, + (SELECT COUNT(*) FROM passengers + WHERE passengers.created_at >= '$first_day_of_month' + AND passengers.created_at < '$last_day_of_month') AS totalMonthly +FROM + date_series +LEFT JOIN + passengers ON DATE(passengers.created_at) = date_series.date +WHERE + date_series.date >= '$first_day_of_month' + AND date_series.date < '$last_day_of_month' +GROUP BY + date_series.date +ORDER BY + date_series.date DESC +"; + +$stmt = $con->prepare($sql); +$stmt->execute(); +$passenger_data = $stmt->fetchAll(PDO::FETCH_ASSOC); + +if ($passenger_data) { + // Print the passenger data as JSON + printSuccess($data = $passenger_data); +} else { + // Print a failure message + printFailure($message = "No passenger data found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/serviceApp/getdriverstotalMonthly.php b/walletintaleq.intaleq.xyz/v2/main/serviceApp/getdriverstotalMonthly.php new file mode 100644 index 0000000..42b90e3 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/serviceApp/getdriverstotalMonthly.php @@ -0,0 +1,114 @@ +<?php +include "../connect.php"; +$current_month = date('m'); +$current_year = date('Y'); +// Get the first and last days of the current month. +$first_day_of_month = date('Y-m-d', strtotime($current_year . '-' . $current_month . '-01')); +$last_day_of_month = date('Y-m-t', strtotime($first_day_of_month)); + +// Create a SQL query to select the total duration for the driver for each day in the current month. +$sql = "WITH + RECURSIVE date_series AS( + SELECT + '$first_day_of_month' AS DATE + UNION ALL +SELECT + DATE_ADD(DATE, INTERVAL 1 DAY) +FROM + date_series +WHERE + DATE < LEAST( + CURDATE(), DATE_SUB('$last_day_of_month', INTERVAL 1 DAY)) + ) +SELECT + date_series.date AS day, + ( +SELECT + COUNT(*) +FROM + `driver` +) AS totalDrivers, +( + SELECT + COUNT(*) + FROM + driver + WHERE + DATE(driver.created_at) = date_series.date +) AS dailyTotalDrivers, +( + SELECT + COUNT(*) + FROM + notesForDriverService + WHERE + DATE( + notesForDriverService.createdAt + ) = date_series.date +) AS dailyTotalCallingDrivers, +( + SELECT + COUNT(*) + FROM + notesForDriverService n + JOIN driver d ON + n.phone = d.phone + WHERE + DATE(n.createdAt) = date_series.date +) AS dailyMatchingNotes, +( + SELECT + COUNT(*) + FROM + driver + WHERE + driver.created_at >= '$first_day_of_month' AND driver.created_at < '$last_day_of_month' +) AS totalMonthlyDrivers, +( + SELECT + COUNT(*) + FROM + notesForDriverService + WHERE + notesForDriverService.createdAt >= '$first_day_of_month' AND notesForDriverService.createdAt < '$last_day_of_month' +) AS totalMonthlyCallingDrivers, +( + SELECT + COUNT(*) + FROM + notesForDriverService n + JOIN driver d ON + n.phone = d.phone + WHERE + n.createdAt >= '$first_day_of_month' AND n.createdAt < '$last_day_of_month' +) AS totalMonthlyMatchingNotes +FROM + date_series +LEFT JOIN driver ON DATE(driver.created_at) = date_series.date +LEFT JOIN notesForDriverService ON DATE( + notesForDriverService.createdAt + ) = date_series.date AND notesForDriverService.phone = driver.phone +WHERE + date_series.date >= '$first_day_of_month' AND date_series.date <= LEAST( + CURDATE(), DATE_SUB('$last_day_of_month', INTERVAL 1 DAY)) + GROUP BY + date_series.date + ORDER BY + date_series.date + DESC + ; + +"; + +$stmt = $con->prepare($sql); +$stmt->execute(); +$car_locations = $stmt->fetchAll(PDO::FETCH_ASSOC); + +if ($car_locations) { + // Print the car location data as JSON + printSuccess($data = $car_locations); +} else { + // Print a failure message + printFailure($message = "No car locations found"); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/serviceApp/login.php b/walletintaleq.intaleq.xyz/v2/main/serviceApp/login.php new file mode 100644 index 0000000..e26c4e3 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/serviceApp/login.php @@ -0,0 +1,57 @@ +<?php +include "../connect.php"; + +// Get email and password from the request +$email = filterRequest('email'); +$password = filterRequest('password'); + +// Check if email and password are provided +if (empty($email) || empty($password)) { + echo json_encode([ + "status" => "failure", + "message" => "Email and password are required." + ]); + exit(); +} + +// SQL to check for user with provided email +$sql = "SELECT * FROM `users` WHERE `email` = :email"; + +$stmt = $con->prepare($sql); +$stmt->bindParam(':email', $email); +$stmt->execute(); + +$user = $stmt->fetch(PDO::FETCH_ASSOC); + +header('Content-Type: application/json'); // Ensure the response is JSON + +if ($user) { + // Verify the password + if ($password=== $user['password']) { + // Password is correct + unset($user['password']); // Remove password from the response + echo json_encode([ + "status" => "success", + "message" => "Login successful", + "data" => $user + ]); + } else { + // Password is incorrect + echo json_encode([ + "status" => "failure", + "message" => "Incorrect password", + "password"=>$password, + "password1"=>$user['password'], + ]); + } +} else { + // User not found + echo json_encode([ + "status" => "failure", + "message" => "User not found" + ]); +} + +$stmt = null; // Close the statement +$con = null; // Close the connection +exit(); // Ensure no further output \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/sms_webhook/archive.zip b/walletintaleq.intaleq.xyz/v2/main/sms_webhook/archive.zip new file mode 100755 index 0000000..fc138a6 Binary files /dev/null and b/walletintaleq.intaleq.xyz/v2/main/sms_webhook/archive.zip differ diff --git a/walletintaleq.intaleq.xyz/v2/main/sms_webhook/check_invoice_status.php b/walletintaleq.intaleq.xyz/v2/main/sms_webhook/check_invoice_status.php new file mode 100755 index 0000000..4c06ab1 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/sms_webhook/check_invoice_status.php @@ -0,0 +1,44 @@ +<?php +//check_invoice_status.php +// تضمين ملف الاتصال والإعدادات الخاص بك +// يفترض أن هذا الملف يقوم بالاتصال بقاعدة البيانات ($con) +include "../connect.php"; + +// --- 1. استقبال البيانات من تطبيق فلاتر --- +$invoice_number = filterRequest("invoice_number"); + +// التحقق من أن رقم القسيمة قد تم إرساله +if (empty($invoice_number)) { + printFailure("invoice_number is required."); + exit(); +} + +// --- 2. البحث عن الفاتورة في قاعدة البيانات --- +try { + // إعداد الاستعلام للبحث عن حالة الفاتورة + $sql = "SELECT status FROM `invoices_sms` WHERE invoice_number = :invoice_number LIMIT 1"; + + $stmt = $con->prepare($sql); + $stmt->execute([ + ':invoice_number' => $invoice_number + ]); + + // جلب نتيجة الاستعلام + $invoice = $stmt->fetch(PDO::FETCH_ASSOC); + + if ($invoice) { + // تم العثور على الفاتورة، أرجع حالتها الحالية + echo json_encode([ + "status" => "success", + "invoice_status" => $invoice['status'] // سيكون "pending" أو "completed" + ]); + } else { + // لم يتم العثور على فاتورة بهذا الرقم + printFailure("Invoice not found."); + } + +} catch (PDOException $e) { + // في حال حدوث خطأ في قاعدة البيانات + printFailure("Database error: " . $e->getMessage()); +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/sms_webhook/check_invoice_status_passenger.php b/walletintaleq.intaleq.xyz/v2/main/sms_webhook/check_invoice_status_passenger.php new file mode 100755 index 0000000..7a312ae --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/sms_webhook/check_invoice_status_passenger.php @@ -0,0 +1,36 @@ +<?php +// check_invoice_status_passenger.php +header('Content-Type: application/json; charset=utf-8'); + +// تضمين الاتصال بقاعدة البيانات ($con) +include "../connect.php"; + +// 1) استقبال رقم الفاتورة +$invoice_number = filterRequest("invoice_number"); + +// التحقق من المدخلات +if (empty($invoice_number)) { + printFailure("invoice_number is required."); + exit(); +} + +try { + // 2) البحث عن حالة الفاتورة في جدول الركّاب + $sql = "SELECT status FROM `invoices_sms_passenger` WHERE invoice_number = :invoice_number LIMIT 1"; + $stmt = $con->prepare($sql); + $stmt->execute([':invoice_number' => $invoice_number]); + + $invoice = $stmt->fetch(PDO::FETCH_ASSOC); + + if ($invoice) { + echo json_encode([ + "status" => "success", + "invoice_status" => $invoice['status'] // "pending" أو "completed" أو "failed" + ]); + } else { + printFailure("Invoice not found."); + } + +} catch (PDOException $e) { + printFailure("Database error: " . $e->getMessage()); +} \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/sms_webhook/create_invoice.php b/walletintaleq.intaleq.xyz/v2/main/sms_webhook/create_invoice.php new file mode 100755 index 0000000..db3d816 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/sms_webhook/create_invoice.php @@ -0,0 +1,103 @@ +<?php +// create_invoice.php + +// --- بداية التسجيل: تأكيد بدء تشغيل السكربت --- +//error_log("[CreateInvoice] --- Request Started ---"); + +// تضمين ملف الاتصال والإعدادات الخاص بك +// تأكد من أن هذا الملف لا يحتوي على أخطاء قد تسبب مشكلة Parse +include "../connect.php"; +//error_log("[CreateInvoice] Included 'connect.php'"); + +try { + // --- 1. تسجيل واستقبال المدخلات --- + // تسجيل البيانات الخام القادمة من الطلب لمعرفة ما يصل بالضبط + // error_log("[CreateInvoice] Raw POST data: " . json_encode($_POST)); + + $driverID = filterRequest("driverID"); + $user_phone = filterRequest("user_phone"); + $amount_raw = filterRequest("amount"); + + // تسجيل البيانات بعد الفلترة + //error_log("[CreateInvoice] Filtered Input: driverID={$driverID}, user_phone={$user_phone}, amount_raw={$amount_raw}"); + + // تأكيد المبلغ كرقم + $amount = is_numeric($amount_raw) ? (float) $amount_raw : 0.0; + + // --- 2. التحقق الأساسي من المدخلات --- + if (empty($driverID) || empty($user_phone) || $amount <= 0) { + error_log("[CreateInvoice] Validation Failed: Missing or invalid required parameters."); + printFailure("driverID, user_phone and a valid amount are required."); + exit; + } + // error_log("[CreateInvoice] Input validation passed."); + + // --- 3. التحقق من وجود فاتورة معلقة --- + // error_log("[CreateInvoice] Checking for existing pending invoice for driverID: {$driverID}"); + $sql_check = "SELECT id, invoice_number FROM invoices_sms WHERE driverID = :driverID AND user_phone = :user_phone AND status = 'pending' ORDER BY created_at DESC LIMIT 1"; + $stmt_check = $con->prepare($sql_check); + $stmt_check->execute(['driverID' => $driverID, 'user_phone' => $user_phone]); + $existing = $stmt_check->fetch(PDO::FETCH_ASSOC); + + // إنشاء رقم فاتورة جديد ومميز + $new_invoice_number = random_int(100000, 999999); + + if ($existing) { + // --- 4a. تحديث الفاتورة المعلقة الحالية --- + // error_log("[CreateInvoice] Found existing pending invoice (ID: {$existing['id']}). Updating it."); + + $sql_update = "UPDATE invoices_sms SET invoice_number = :invoice_number, amount = :amount, created_at = NOW() WHERE id = :id"; + $stmt_update = $con->prepare($sql_update); + $stmt_update->execute([ + ':invoice_number' => $new_invoice_number, + ':amount' => $amount, + ':id' => $existing['id'] + ]); + + // error_log("[CreateInvoice] Invoice updated. New invoice number: {$new_invoice_number}"); + echo json_encode([ + "status" => "success", + "message" => "Pending invoice updated.", + "invoice_number" => $new_invoice_number + ]); + + } else { + // --- 4b. إنشاء فاتورة جديدة --- + // error_log("[CreateInvoice] No pending invoice found. Creating a new one."); + + $sql_insert = "INSERT INTO invoices_sms (invoice_number, driverID, user_phone, amount, status) VALUES (:invoice_number, :driverID, :user_phone, :amount, 'pending')"; + $stmt_insert = $con->prepare($sql_insert); + $ok = $stmt_insert->execute([ + ':invoice_number' => $new_invoice_number, + ':driverID' => $driverID, + ':user_phone' => $user_phone, + ':amount' => $amount + ]); + + if ($ok) { + // error_log("[CreateInvoice] New invoice created successfully. Invoice number: {$new_invoice_number}"); + echo json_encode([ + "status" => "success", + "message" => "New invoice created.", + "invoice_number" => $new_invoice_number + ]); + } else { + // error_log("[CreateInvoice] CRITICAL: Failed to execute INSERT statement."); + printFailure("Failed to create invoice."); + } + } + +} catch (PDOException $e) { + // تسجيل أخطاء قاعدة البيانات + // error_log("[CreateInvoice] PDOException: " . $e->getMessage()); + printFailure("Database error: " . $e->getMessage()); + +} catch (Throwable $e) { + // تسجيل أي أخطاء أخرى غير متوقعة + // error_log("[CreateInvoice] Throwable Exception: " . $e->getMessage()); + printFailure("An unexpected server error occurred."); +} + +//error_log("[CreateInvoice] --- Request Ended ---"); +?> + diff --git a/walletintaleq.intaleq.xyz/v2/main/sms_webhook/create_invoice_passenger.php b/walletintaleq.intaleq.xyz/v2/main/sms_webhook/create_invoice_passenger.php new file mode 100755 index 0000000..93021b1 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/sms_webhook/create_invoice_passenger.php @@ -0,0 +1,126 @@ +<?php +// create_invoice_passenger.php + +header('Content-Type: application/json; charset=utf-8'); + +// ------------------------------------- +// تضمين الاتصال +// ------------------------------------- +include "../connect.php"; +error_log("[CreateInvoicePassenger] Included 'connect.php'"); + +error_log("[CreateInvoicePassenger] --- Request Started ---"); + +try { + // ------------------------------------- + // 1) قراءة المدخلات + // ------------------------------------- + $passengerID = filterRequest("passengerID"); + $user_phone = filterRequest("user_phone"); + $amount_raw = filterRequest("amount"); + error_log("[CreateInvoicePassenger] Read inputs (passengerID, user_phone, amount)"); + + // ------------------------------------- + // 2) تحويل/التحقق من المبلغ + // ------------------------------------- + $amount = is_numeric($amount_raw) ? (float)$amount_raw : 0.0; + if (empty($passengerID) || empty($user_phone) || $amount <= 0) { + error_log("[CreateInvoicePassenger] Validation failed: missing/invalid parameters"); + printFailure("passengerID, user_phone and a valid amount are required."); + exit; + } + error_log("[CreateInvoicePassenger] Input validation passed"); + + // ------------------------------------- + // 3) التحقق من وجود فاتورة معلّقة لنفس الراكب ونفس الهاتف + // ------------------------------------- + $sql_check = " + SELECT id, invoice_number + FROM invoices_sms_passenger + WHERE passengerID = :passengerID + AND user_phone = :user_phone + AND status = 'pending' + ORDER BY created_at DESC + LIMIT 1 + "; + $stmt_check = $con->prepare($sql_check); + $stmt_check->execute([ + 'passengerID' => $passengerID, + 'user_phone' => $user_phone + ]); + $existing = $stmt_check->fetch(PDO::FETCH_ASSOC); + error_log("[CreateInvoicePassenger] Checked for existing pending invoice"); + + // ------------------------------------- + // 4) توليد رقم فاتورة جديد (6 أرقام) + // ------------------------------------- + $new_invoice_number = random_int(100000, 999999); + error_log("[CreateInvoicePassenger] Generated invoice number"); + + if ($existing) { + // ------------------------------------- + // 4a) تحديث الفاتورة المعلّقة الحالية + // ------------------------------------- + error_log("[CreateInvoicePassenger] Existing pending invoice found. Updating..."); + $sql_update = " + UPDATE invoices_sms_passenger + SET invoice_number = :invoice_number, + amount = :amount, + created_at = NOW() + WHERE id = :id + "; + $stmt_update = $con->prepare($sql_update); + $stmt_update->execute([ + ':invoice_number' => $new_invoice_number, + ':amount' => $amount, + ':id' => $existing['id'] + ]); + error_log("[CreateInvoicePassenger] Invoice updated successfully"); + + echo json_encode([ + "status" => "success", + "message" => "Pending passenger invoice updated.", + "invoice_number" => $new_invoice_number + ]); + error_log("[CreateInvoicePassenger] Response sent (update)"); + } else { + // ------------------------------------- + // 4b) إنشاء فاتورة جديدة + // ------------------------------------- + error_log("[CreateInvoicePassenger] No existing invoice. Creating new one..."); + $sql_insert = " + INSERT INTO invoices_sms_passenger (invoice_number, passengerID, user_phone, amount, status) + VALUES (:invoice_number, :passengerID, :user_phone, :amount, 'pending') + "; + $stmt_insert = $con->prepare($sql_insert); + $ok = $stmt_insert->execute([ + ':invoice_number' => $new_invoice_number, + ':passengerID' => $passengerID, + ':user_phone' => $user_phone, + ':amount' => $amount + ]); + + if ($ok) { + error_log("[CreateInvoicePassenger] New invoice created successfully"); + echo json_encode([ + "status" => "success", + "message" => "New passenger invoice created.", + "invoice_number" => $new_invoice_number + ]); + error_log("[CreateInvoicePassenger] Response sent (insert)"); + } else { + error_log("[CreateInvoicePassenger] Failed to create passenger invoice (DB insert)"); + printFailure("Failed to create passenger invoice."); + } + } + +} catch (PDOException $e) { + error_log("[CreateInvoicePassenger] Database exception: " . $e->getMessage()); + printFailure("Database error: " . $e->getMessage()); + +} catch (Throwable $e) { + error_log("[CreateInvoicePassenger] Unexpected exception: " . $e->getMessage()); + printFailure("An unexpected server error occurred."); +} + +error_log("[CreateInvoicePassenger] --- Request Ended ---"); \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/sms_webhook/finalize_payout.php b/walletintaleq.intaleq.xyz/v2/main/sms_webhook/finalize_payout.php new file mode 100755 index 0000000..136c40f --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/sms_webhook/finalize_payout.php @@ -0,0 +1,127 @@ +<?php +// finalize_payout.php + +if (!function_exists('logPayoutError')) { + /** + * دالة مخصصة لتسجيل الأخطاء والخطوات في ملف سجل خاص بعمليات السحب. + */ + function logPayoutError($step, $message, $data = null) { + $logFile = __DIR__ . "/../logs/payout_finalization.log"; + $logDir = dirname($logFile); + if (!is_dir($logDir)) { mkdir($logDir, 0755, true); } + $logEntry = "[" . date('Y-m-d H:i:s') . "] STEP {$step}: {$message}"; + if ($data !== null) { $logEntry .= " | Data: " . json_encode($data, JSON_UNESCAPED_UNICODE); } + file_put_contents($logFile, $logEntry . PHP_EOL, FILE_APPEND); + } +} + +if (!function_exists('generateToken')) { + /** + * دالة لإنشاء توكن دفع فريد وحفظه في قاعدة البيانات. + */ + function generateToken(PDO $con, $driverId, $amount): ?string { + global $secretKey; + $data = $driverId . $amount . time() . ($secretKey ?? 'default_secret_for_token'); + $hash = hash('sha256', $data); + $randomBytes = bin2hex(random_bytes(16)); + $token = substr($hash . $randomBytes, 0, 64); + + $stmt = $con->prepare("INSERT INTO payment_tokens (token, driverID, dateCreated, amount) VALUES (:token, :driverID, NOW(), :amount)"); + $stmt->execute([':token' => $token, ':driverID' => $driverId, ':amount' => $amount]); + + return $stmt->rowCount() > 0 ? $token : null; + } +} + +if (!function_exists('generatePaymentID')) { + /** + * دالة لإنشاء سجل دفعة جديد وإرجاع الـ ID الخاص به. + * هذا السجل هو المرجع الأساسي للمعاملة. + */ + function generatePaymentID(PDO $con, $driverId, $amount, $method): ?string { + $stmt = $con->prepare("INSERT INTO paymentsDriverPoints (`amount`, `payment_method`, `driverID`) VALUES (:amount, :method, :driverID)"); + $stmt->execute([':driverID' => $driverId, ':amount' => $amount, ':method' => $method]); + + return $stmt->rowCount() > 0 ? $con->lastInsertId() : null; + } +} + + +if (!function_exists('finalizePayout')) { + /** + * دالة الإتمام الرئيسية لعمليات السحب. + * تقوم بتسجيل كل المعاملات في محافظ السائق والشركة وتحديث حالة الدفعات. + */ + function finalizePayout(PDO $con, int $payoutId) { + logPayoutError("START", "Starting finalization for payout ID: {$payoutId}"); + + try { + // 1. جلب بيانات طلب السحب المكتمل + $stmt = $con->prepare("SELECT * FROM `payout_requests` WHERE id = :id AND status = 'completed' LIMIT 1"); + $stmt->execute([':id' => $payoutId]); + $payout = $stmt->fetch(PDO::FETCH_ASSOC); + + if (!$payout) { + logPayoutError("FETCH_PAYOUT", "Payout request not found or not completed.", ['payoutId' => $payoutId]); + return false; + } + + $driverId = $payout['driver_id']; + $payoutFee = 3500; + $netAmount = (float)$payout['amount']-$payoutFee; // المبلغ الصافي الذي طلبه السائق + $totalDeducted = $netAmount; // المبلغ الإجمالي الذي سيتم خصمه + + // 2. إنشاء معرف دفع رئيسي لهذه المعاملة + // نسجل المبلغ الإجمالي المخصوم بالسالب + $paymentID = generatePaymentID($con, $driverId, -$totalDeducted, 'payout'); + if (!$paymentID) throw new Exception('Failed to generate master payment ID'); + logPayoutError("GEN_PAYMENT_ID", "Master Payment ID created: {$paymentID}"); + + // 3. إنشاء التوكنات اللازمة + $tokenDriver = generateToken($con, $driverId, -$totalDeducted); + $tokenSefer = generateToken($con, $driverId, $payoutFee); + if (!$tokenDriver || !$tokenSefer) throw new Exception('Failed to generate required tokens'); + logPayoutError("GEN_TOKENS", "Driver and Sefer tokens generated successfully."); + + // 4. تسجيل معاملة الخصم في محفظة السائق (driverWallet) + $insertDriver = $con->prepare("INSERT INTO driverWallet (driverID, paymentID, amount, paymentMethod) VALUES (:driverID, :paymentID, :amount, :paymentMethod)"); + $insertDriver->execute([ + ':driverID' => $driverId, + ':paymentID' => $paymentID, + ':amount' => -$totalDeducted, // تسجيل المبلغ بالسالب + ':paymentMethod' => 'payout' + ]); + if ($insertDriver->rowCount() === 0) throw new Exception('Insert to driverWallet failed'); + $con->prepare("UPDATE payment_tokens SET isUsed = TRUE WHERE token = :token")->execute([':token' => $tokenDriver]); + logPayoutError("DRIVER_WALLET", "Negative transaction of {$totalDeducted} recorded in driverWallet."); + + // 5. تسجيل معاملة الربح (العمولة) في محفظة الشركة (seferWallet) + $insertSefer = $con->prepare("INSERT INTO seferWallet (driverId, passengerId, amount, paymentMethod, token) VALUES (:driverId, :passengerId, :amount, :paymentMethod, :token)"); + $insertSefer->execute([ + ':driverId' => $driverId, + ':passengerId' => 'payout_fee', // تمييز المعاملة كعمولة سحب + ':amount' => $payoutFee, // تسجيل العمولة بالموجب + ':paymentMethod' => 'payout_fee', + ':token' => $tokenSefer + ]); + if ($insertSefer->rowCount() === 0) throw new Exception('Insert to seferWallet failed'); + $con->prepare("UPDATE payment_tokens SET isUsed = TRUE WHERE token = :token")->execute([':token' => $tokenSefer]); + logPayoutError("SEFER_WALLET", "Fee transaction of {$payoutFee} recorded in seferWallet."); + + // 6. تحديث حالة الدفعات التي تم سحبها في جدول 'payments' + // هذا السطر يقوم بتحديث كل الدفعات المعلقة للسائق، معتبراً أن عملية السحب تغطيها + $updatePayments = $con->prepare("UPDATE payments SET isGiven = TRUE WHERE driverID = :driverId AND isGiven = FALSE"); + $updatePayments->execute([':driverId' => $driverId]); + logPayoutError("UPDATE_PAYMENTS", "Marked pending payments as 'isGiven' for driver {$driverId}. Rows affected: " . $updatePayments->rowCount()); + + logPayoutError("SUCCESS", "Payout finalization completed successfully for payout ID: {$payoutId}"); + return true; + + } catch (Throwable $e) { + logPayoutError("EXCEPTION", "An exception occurred: " . $e->getMessage(), ['payoutId' => $payoutId]); + return false; + } + } +} +?> + diff --git a/walletintaleq.intaleq.xyz/v2/main/sms_webhook/finalize_wallet_payment.php b/walletintaleq.intaleq.xyz/v2/main/sms_webhook/finalize_wallet_payment.php new file mode 100755 index 0000000..983dc9b --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/sms_webhook/finalize_wallet_payment.php @@ -0,0 +1,112 @@ +<?php +// wallet/finalize_wallet_payment.php + +// لم نعد بحاجة لـ jwtconnect.php هنا لأن الاتصال يتم تمريره من السكربت الرئيسي + +if (!function_exists('logError')) { + function logError($step, $message, $data = null) { + $logFile = __DIR__ . "/../logs/finalization.log"; + $logDir = dirname($logFile); + if (!is_dir($logDir)) { mkdir($logDir, 0755, true); } + $logEntry = "[" . date('Y-m-d H:i:s') . "] STEP {$step}: {$message}"; + if ($data !== null) { $logEntry .= " | Data: " . json_encode($data, JSON_UNESCAPED_UNICODE); } + file_put_contents($logFile, $logEntry . PHP_EOL, FILE_APPEND); + } +} + + +/** + * دالة لإنشاء توكن دفع فريد وحفظه في قاعدة البيانات. + */ +function generateToken($con, $driverId, $amount): ?string { + // افترض أن secretKey تم تعريفه في ملف connect.php + global $secretKey; + $data = $driverId . $amount . time() . ($secretKey ?? 'default_secret_for_token'); + $hash = hash('sha256', $data); + $randomBytes = bin2hex(random_bytes(16)); + $token = substr($hash . $randomBytes, 0, 64); + + $stmt = $con->prepare("INSERT INTO payment_tokens (token, driverID, dateCreated, amount) VALUES (:token, :driverID, NOW(), :amount)"); + $stmt->execute([':token' => $token, ':driverID' => $driverId, ':amount' => $amount]); + + return $stmt->rowCount() > 0 ? $token : null; +} + +/** + * دالة لإنشاء سجل دفعة جديد وإرجاع الـ ID الخاص به. + */ +function generatePaymentID($con, $driverId, $amount, $method): ?string { + $stmt = $con->prepare("INSERT INTO paymentsDriverPoints (`amount`, `payment_method`, `driverID`) VALUES (:amount, :method, :driverID)"); + $stmt->execute([':driverID' => $driverId, ':amount' => $amount, ':method' => $method]); + + return $stmt->rowCount() > 0 ? $con->lastInsertId() : null; +} + +/** + * دالة الإتمام الرئيسية، تم تعديلها لتستقبل ID الفاتورة مباشرة + */ +function finalizeWalletPaymentByInvoice($con, $invoiceId) { + logError("FINALIZE", "Starting finalization for invoice ID: {$invoiceId}"); + + try { + // 1. جلب بيانات الفاتورة المكتملة + $stmt = $con->prepare("SELECT * FROM `invoices_sms` WHERE id = :id AND status = 'completed' LIMIT 1"); + $stmt->execute([':id' => $invoiceId]); + $invoice = $stmt->fetch(PDO::FETCH_ASSOC); + + if (!$invoice) { + logError("FINALIZE", "Invoice not found or not completed", ['invoiceId' => $invoiceId]); + return false; + } + + $driverId = $invoice['driverID']; + $originalAmount = floatval($invoice['amount']); + $paymentMethod = $invoice['sender'] ?? 'sms'; + + // حساب المكافأة + $bonusAmount = match ((int)$originalAmount) { + 10000 => 10000.0, + 20000 => 21000.0, + 40000 => 45000.0, + 100000 => 110000.0, + default => $originalAmount, + }; + + // إنشاء التوكنات ومعرف الدفع + $tokenDriver = generateToken($con, $driverId, $bonusAmount); + $tokenSefer = generateToken($con, $driverId, $originalAmount); + $paymentID = generatePaymentID($con, $driverId, $bonusAmount, $paymentMethod); + + if (!$tokenDriver || !$tokenSefer || !$paymentID) { + throw new Exception('Failed to generate required tokens or payment ID'); + } + + // --- تحديث المحافظ --- + + // driverWallet + $insertDriver = $con->prepare("INSERT INTO driverWallet (driverID, paymentID, amount, paymentMethod) VALUES (:driverID, :paymentID, :amount, :paymentMethod)"); + $insertDriver->execute([ + ':driverID' => $driverId, ':paymentID' => $paymentID, + ':amount' => $bonusAmount, ':paymentMethod' => $paymentMethod + ]); + if ($insertDriver->rowCount() === 0) throw new Exception('Insert to driverWallet failed'); + $con->prepare("UPDATE payment_tokens SET isUsed = TRUE WHERE token = :token")->execute([':token' => $tokenDriver]); + + // seferWallet + $insertSefer = $con->prepare("INSERT INTO seferWallet (driverId, passengerId, amount, paymentMethod, token) VALUES (:driverId, 'driver', :amount, :paymentMethod, :token)"); + $insertSefer->execute([ + ':driverId' => $driverId, ':amount' => $originalAmount, + ':paymentMethod' => $paymentMethod, ':token' => $tokenSefer + ]); + if ($insertSefer->rowCount() === 0) throw new Exception('Insert to seferWallet failed'); + $con->prepare("UPDATE payment_tokens SET isUsed = TRUE WHERE token = :token")->execute([':token' => $tokenSefer]); + + logError("FINALIZE", "SUCCESS: Wallets updated successfully for invoice ID: {$invoiceId}"); + return true; + + } catch (Throwable $e) { + logError("FINALIZE", "EXCEPTION: " . $e->getMessage(), ['invoiceId' => $invoiceId]); + return false; + } +} +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/sms_webhook/process_passenger_sms_payment.php b/walletintaleq.intaleq.xyz/v2/main/sms_webhook/process_passenger_sms_payment.php new file mode 100755 index 0000000..b758068 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/sms_webhook/process_passenger_sms_payment.php @@ -0,0 +1,255 @@ +<?php +/** + * process_passenger_sms_payment.php + * - يستخدم BASE_URL الموجودة مسبقًا (لا يُعرّف بديل). + * - يستخدم Gemini 2.5 Flash Lite. + * - لا يحدّث raw_sms_log الآن (لا mark processed/failed). + * - الدفع للراكب فقط: invoices_sms_passenger → bonus → generate token → add to wallets. + */ + +header('Content-Type: application/json; charset=utf-8'); + +include_once __DIR__ . '/../../connect.php'; + +if (!defined('BASE_URL')) { + $APP_BASE_URL = rtrim(getenv('APP_BASE_URL') ?: '', '/'); + if ($APP_BASE_URL === '') { + $scheme = isset($_SERVER['REQUEST_SCHEME']) ? $_SERVER['REQUEST_SCHEME'] : 'https'; + $host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost'; + define('BASE_URL', $scheme . '://' . $host); + } else { + define('BASE_URL', $APP_BASE_URL); + } +} + +/* ===== Gemini: Flash Lite ===== */ +$geminiModel = 'gemini-2.5-flash-lite'; +$geminiApiKey = getenv('GEMINI_API_KEY'); +if (!$geminiApiKey) { + printFailure("Missing GEMINI_API_KEY"); + exit; +} +$geminiApiUrl = "https://generativelanguage.googleapis.com/v1beta/models/{$geminiModel}:generateContent?key={$geminiApiKey}"; + +/* ===== اجلب رسالة واحدة pending (مع sender) ===== */ +try { + $stmt = $con->prepare(" + SELECT id, message_body, sender + FROM raw_sms_log + WHERE status = 'pending' + ORDER BY created_at ASC + LIMIT 1 + "); + $stmt->execute(); + $sms = $stmt->fetch(PDO::FETCH_ASSOC); + if (!$sms) { + echo json_encode(["status" => "idle", "message" => "No pending messages"]); + exit; + } +} catch (PDOException $e) { + printFailure("DB fetch error: " . $e->getMessage()); + exit; +} + +$smsId = (int)$sms['id']; +$body = (string)$sms['message_body']; +$sender = (string)$sms['sender']; // نستخدمه لاشتقاق طريقة الدفع + +/* ===== Prompt لِـ Gemini ===== */ +$prompt = "Analyze the following financial SMS and return ONLY a valid JSON object: +{ + \"transaction_type\": \"income\" | \"payout\", + \"amount\": number, + \"currency\": \"SYP\" | string (3 letters), + \"phone_number\": string | null +} +SMS Text: \"$body\""; + +$payload = ['contents' => [['parts' => [['text' => $prompt]]]]]; + +$ch = curl_init($geminiApiUrl); +curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); +curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']); +curl_setopt($ch, CURLOPT_POST, true); +curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload, JSON_UNESCAPED_UNICODE)); +$response = curl_exec($ch); +$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); +$curlErr = curl_error($ch); +curl_close($ch); + +if ($response === false) { + printFailure("Gemini curl error: " . $curlErr); + exit; +} + +$gem = json_decode($response, true); +$gemText = $gem['candidates'][0]['content']['parts'][0]['text'] ?? null; +if ($httpCode !== 200 || !$gemText) { + printFailure("Gemini HTTP $httpCode / empty response"); + exit; +} + +/* Gemini أحيانًا يحيط الـ JSON بعلامات Markdown */ +$clean = trim(str_replace(['```json','```JSON','```'], '', $gemText)); +$data = json_decode($clean, true); +if (!is_array($data) || empty($data['transaction_type'])) { + printFailure("Failed to parse Gemini JSON"); + exit; +} + +/* ===== القيم المستخرجة ===== */ +$trxType = strtolower((string)$data['transaction_type']); +$amount = isset($data['amount']) ? floatval($data['amount']) : 0.0; +$currency = isset($data['currency']) ? strtoupper((string)$data['currency']) : ''; +$phone = isset($data['phone_number']) ? (string)$data['phone_number'] : ''; + +/* ===== طريقة الدفع من الـ sender (الآن ثابتة shamcash كما طلبت) ===== */ +$paymentMethod = 'shamcash'; // أو اشتقاق ذكي: strpos(strtolower($sender),'sham') !== false ? 'shamcash' : 'unknown'; + +/* ===== فقط INCOME: نفّذ تدفّق الراكب ===== */ +if ($trxType === 'income' && $amount > 0 && $phone !== '') { + try { + // ابحث عن فاتورة راكب حديثة متطابقة خلال 60 دقيقة + $q = $con->prepare(" + SELECT id + FROM invoices_sms_passenger + WHERE status='pending' + AND user_phone = :p + AND amount = :a + AND created_at >= (NOW() - INTERVAL 60 MINUTE) + ORDER BY created_at DESC + LIMIT 1 + "); + $q->execute([':p' => $phone, ':a' => $amount]); + $inv = $q->fetch(PDO::FETCH_ASSOC); + + if (!$inv) { + printFailure( "No matching passenger invoice"); + exit; + } + + $invoiceId = $inv['id']; + + // حدّث حالة الفاتورة + $con->prepare("UPDATE invoices_sms_passenger SET status='completed', updated_at=NOW() WHERE id=:id") + ->execute([':id' => $invoiceId]); + + // احضر بيانات الفاتورة لمعرفة passengerID والمبلغ المؤكد + $st = $con->prepare("SELECT passengerID, amount FROM invoices_sms_passenger WHERE id=:id LIMIT 1"); + $st->execute([':id' => $invoiceId]); + $row = $st->fetch(PDO::FETCH_ASSOC); + if (!$row) { + printFailure("Invoice row not found after update"); + exit; + } + + $passengerId = $row['passengerID']; + $amt = floatval($row['amount']); + + // 1) Bonus + $finalAmount = calculateBonus($amt); + + // 2) Generate payment token (للراكب) + $token = generatePaymentToken($passengerId, $finalAmount); + + // 3) Add to Passenger Wallet + $walletResult = addToPassengerWallet($passengerId, $finalAmount, $token); + + // 4) Add to Sefer Wallet (محاسبي) بطريقة الدفع المستخلصة من sender + $token2 = generatePaymentToken($passengerId, $amt); + $seferWalletResult = addToSeferWallet($passengerId, $amt, $paymentMethod, $token2); + + printSuccess([ + "message" => "Passenger income processed", + "invoice_id" => $invoiceId, + "passenger_id" => $passengerId, + "amount" => $amt, + "final_amount" => $finalAmount, + "payment_method" => $paymentMethod, + "wallet" => $walletResult, + "seferWallet" => $seferWalletResult, + "sender" => $sender + ]); + exit; + + } catch (PDOException $e) { + printFailure("DB income error: " . $e->getMessage()); + exit; + } +} + +/* غير مدعوم الآن (payout أو مدخلات ناقصة) */ +printFailure([ + "status" => "ignored", + "message" => "Unsupported or incomplete transaction", + "type" => $trxType, + "sender" => $sender +]); +exit; + +/* ===== Helpers — تعتمد على BASE_URL الموجودة عندك ===== */ + +function calculateBonus($amount) { + if ($amount == 20000) return 20500; + if ($amount == 40000) return 42500; + if ($amount == 100000) return 104000; + return $amount; +} + +function generatePaymentToken($passengerId, $amount) { + if (!defined('BASE_URL')) return null; // نعتمد وجودها لديك + $url = rtrim(BASE_URL, '/') . "/passengerWallet/addPaymentTokenPassenger.php"; + $post = ['passengerId' => $passengerId, 'amount' => $amount]; + + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post)); + $resp = curl_exec($ch); + $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + + if ($code != 200 || !$resp) return null; + $j = json_decode($resp, true); + return $j['message'] ?? null; +} + +function addToPassengerWallet($passengerId, $amount, $token) { + if (!defined('BASE_URL')) return null; + $url = rtrim(BASE_URL, '/') . "/passengerWallet/add.php"; + $post = ['passenger_id' => $passengerId, 'balance' => $amount, 'token' => $token]; + + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post)); + $resp = curl_exec($ch); + $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + + if ($code != 200 || !$resp) return null; + return json_decode($resp, true); +} + +function addToSeferWallet($passengerId, $amount, $paymentMethod, $token) { + if (!defined('BASE_URL')) return null; + $url = rtrim(BASE_URL, '/') . "/seferWallet/add.php"; + $post = [ + 'amount' => $amount, + 'paymentMethod' => $paymentMethod, // من sender + 'passengerId' => $passengerId, + 'token' => $token, + 'driverId' => 'passenger' + ]; + + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post)); + $resp = curl_exec($ch); + $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + + if ($code != 200 || !$resp) return null; + return json_decode($resp, true); +} \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/sms_webhook/process_with_gemini.php b/walletintaleq.intaleq.xyz/v2/main/sms_webhook/process_with_gemini.php new file mode 100755 index 0000000..99365b5 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/sms_webhook/process_with_gemini.php @@ -0,0 +1,132 @@ +<?php +// تأكد من أن هذا السكربت لا يمكن الوصول إليه مباشرة من الويب (للحماية) +// يمكنك وضع ملف .htaccess في المجلد لمنع الوصول المباشر + +// المسار الصحيح لملف الاتصال +// هذه الطريقة تضمن أن المسار صحيح دائمًا بغض النظر عن كيفية استدعاء السكربت +include_once __DIR__ . '/../../connect.php'; + +// يمكنك هنا تضمين أي ملفات مساعدة أخرى +// استخدام __DIR__ هنا أيضًا يضمن إيجاد الملف في نفس المجلد الحالي +include_once __DIR__ . '/finalize_wallet_payment.php'; +// --- إعدادات Gemini API --- +// من الأفضل قراءة مفتاح API من متغيرات البيئة لزيادة الأمان +$geminiApiKey = getenv('GEMINI_API_KEY'); + +$geminiApiUrl = "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-preview-05-20:generateContent?key=" . $geminiApiKey; + +// 1. جلب رسالة واحدة بحالة "pending" لمعالجتها +$stmt_fetch = $con->prepare("SELECT id, message_body FROM `raw_sms_log` WHERE `status` = 'pending' ORDER BY created_at ASC LIMIT 1"); +$stmt_fetch->execute(); +$sms = $stmt_fetch->fetch(PDO::FETCH_ASSOC); + +if (!$sms) { + exit("No pending messages found.\n"); +} + +$sms_id = $sms['id']; +$sms_text = $sms['message_body']; + +// 2. بناء الطلب (Prompt) الذكي إلى Gemini +$prompt = "Analyze the following financial SMS and return ONLY a valid JSON object. +- `transaction_type`: Must be 'income' (money received) or 'payout' (money sent). +- `amount`: Must be a number (float). +- `currency`: Must be a 3-letter code (e.g., SYP). +- `phone_number`: The phone number of the other party. Must be a string, or `null` if not found. + +SMS Text: \"$sms_text\""; + +$payload = ['contents' => [['parts' => [['text' => $prompt]]]]]; + +// 3. إرسال الطلب إلى Gemini API +$ch = curl_init($geminiApiUrl); +curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); +curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']); +curl_setopt($ch, CURLOPT_POST, true); +curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload)); +$response = curl_exec($ch); +$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE); +curl_close($ch); + +// 4. معالجة رد Gemini +$result = json_decode($response, true); +$gemini_text_response = $result['candidates'][0]['content']['parts'][0]['text'] ?? null; + +if ($httpcode == 200 && $gemini_text_response) { + $clean_json_str = trim(str_replace(['```json', '```'], '', $gemini_text_response)); + $data = json_decode($clean_json_str, true); + + if ($data && isset($data['transaction_type'])) { + // --- نجحت المعالجة: استخراج البيانات --- + $phone_raw = $data['phone_number'] ?? null; + $amount = isset($data['amount']) ? (float)$data['amount'] : 0; + + // توحيد صيغة رقم الهاتف (مثال بسيط) + $phone_norm = $phone_raw; // يمكنك إضافة منطق أكثر تعقيداً هنا إذا لزم الأمر + + if ($data['transaction_type'] === 'income' && !empty($phone_norm) && $amount > 0) { + // البحث عن فاتورة مطابقة خلال آخر 60 دقيقة + $q = $con->prepare("SELECT id FROM invoices_sms WHERE status='pending' AND user_phone=:p AND amount=:a AND created_at >= (NOW() - INTERVAL 60 MINUTE) ORDER BY created_at DESC LIMIT 1"); + $q->execute([':p' => $phone_norm, ':a' => $amount]); + $inv = $q->fetch(PDO::FETCH_ASSOC); + + if ($inv) { + // تم العثور على فاتورة مطابقة -> قم بتحديثها وتنفيذ الإجراء النهائي + $con->prepare("UPDATE invoices_sms SET status='completed' WHERE id=:id")->execute([':id' => $inv['id']]); + + // افترض أن هذه الدالة موجودة في ملف connect.php أو ملف مساعد آخر + $ok = function_exists('finalizeWalletPaymentByInvoice') ? finalizeWalletPaymentByInvoice($con, $inv['id']) : false; + $note = $ok ? 'finalized' : 'finalize_failed'; + + $con->prepare("UPDATE raw_sms_log SET status='processed', gemini_result=:r WHERE id=:id")->execute([':r' => json_encode($data, JSON_UNESCAPED_UNICODE), ':id' => $sms_id]); + echo "Income matched -> invoice {$inv['id']} -> $note\n"; + + } else { + // لم يتم العثور على فاتورة مطابقة + $con->prepare("UPDATE raw_sms_log SET status='failed', gemini_result=:r WHERE id=:id")->execute([':r' => json_encode(['warn' => 'no pending invoice match', 'parsed' => $data], JSON_UNESCAPED_UNICODE), ':id' => $sms_id]); + echo "No matching pending invoice found.\n"; + } + + } elseif ($data['transaction_type'] === 'payout' && !empty($phone_norm) && $amount > 0) { + // --- منطق معالجة الدفعات الصادرة --- + $q = $con->prepare("SELECT id FROM payout_requests WHERE status='pending' AND driver_phone=:p AND amount=:a ORDER BY created_at DESC LIMIT 1"); + $q->execute([':p' => $phone_norm, ':a' => $amount]); + $payout = $q->fetch(PDO::FETCH_ASSOC); + + if ($payout) { + // تم العثور على طلب سحب مطابق -> قم بتحديثه واستدعاء الإتمام + $payout_id = $payout['id']; + $con->prepare("UPDATE payout_requests SET status='completed', completed_at=NOW() WHERE id=:id")->execute([':id' => $payout_id]); + + include_once __DIR__ . '/finalize_payout.php'; + if (function_exists('finalizePayout')) { + finalizePayout($con, $payout_id); + $note = "Payout request {$payout_id} finalized."; + } else { + $note = "CRITICAL: finalizePayout function not found!"; + } + + $con->prepare("UPDATE raw_sms_log SET status='processed', gemini_result=:r WHERE id=:id")->execute([':r'=>json_encode($data), ':id'=>$sms_id]); + error_log("[ProcessGemini] $note"); + + } else { + // لم يتم العثور على طلب سحب مطابق + $con->prepare("UPDATE raw_sms_log SET status='failed', gemini_result=:r WHERE id=:id")->execute([':r'=>json_encode(['warn'=>'no pending payout match', 'parsed'=>$data]), ':id'=>$sms_id]); + error_log("[ProcessGemini] No matching pending payout found for SMS ID {$sms_id}"); + } +} + + } else { + // فشل تحليل رد Gemini + $stmt_update = $con->prepare("UPDATE `raw_sms_log` SET `status` = 'failed', `gemini_result` = :result WHERE `id` = :id"); + $stmt_update->execute([':result' => json_encode(['error' => "Failed to parse Gemini's JSON response", 'response' => $gemini_text_response]), ':id' => $sms_id]); + echo "Failed to parse Gemini's JSON response for message ID $sms_id.\n"; + } +} else { + // لم يتم استلام رد من Gemini أو حدث خطأ في الطلب + $stmt_update = $con->prepare("UPDATE `raw_sms_log` SET `status` = 'failed', `gemini_result` = :result WHERE `id` = :id"); + $stmt_update->execute([':result' => json_encode(['error' => 'No valid response from Gemini API', 'http_code' => $httpcode]), ':id' => $sms_id]); + echo "No valid response from Gemini API for message ID $sms_id. HTTP Code: $httpcode\n"; +} +?> + diff --git a/walletintaleq.intaleq.xyz/v2/main/sms_webhook/request_payout.php b/walletintaleq.intaleq.xyz/v2/main/sms_webhook/request_payout.php new file mode 100755 index 0000000..a1c1f1f --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/sms_webhook/request_payout.php @@ -0,0 +1,84 @@ +<?php +// request_payout.php +include "../connect.php"; // ملف الاتصال الذي يتحقق من JWT + +error_log("[RequestPayout] --- Request Started ---"); + +// --- 1. استقبال المدخلات --- +$driverId = filterRequest("driverId"); +$amount_raw = filterRequest("amount"); +$wallet_type = filterRequest("wallet_type") ?? 'Sham Cash'; // قيمة افتراضية +$phone = filterRequest("phone"); + +// تأكيد المبلغ كرقم +$amount = is_numeric($amount_raw) ? (float)$amount_raw : 0.0; + +// تحقق أساسي +if (empty($driverId) || $amount <= 0) { + printFailure("driverId and a valid amount are required."); + exit; +} + +try { + // --- 2. التحقق من بيانات السائق ورصيده --- + $stmt_driver = $con->prepare(" + SELECT SUM(amount) AS balance + FROM driverWallet + WHERE driverID = :id + LIMIT 1 + "); + $stmt_driver->execute([':id' => $driverId]); + $driver = $stmt_driver->fetch(PDO::FETCH_ASSOC); + + if (!$driver) { + printFailure("Driver not found."); + exit; + } + + $payout_fee = 3500.00; // عمولة السحب + $total_deduction = $amount + $payout_fee; // المبلغ المطلوب مع العمولة + + if ($driver['balance'] < $total_deduction) { + printFailure("Insufficient balance. Required: $total_deduction"); + exit; + } + + // --- 3. إنشاء طلب السحب في قاعدة البيانات --- + $sql = " + INSERT INTO payout_requests (driver_id, driver_phone, amount, wallet_type) + VALUES (:did, :phone, :amount, :wallet) + "; + $stmt = $con->prepare($sql); + $stmt->execute([ + ':did' => $driverId, + ':phone' => $phone, + ':amount'=> $amount, + ':wallet'=> $wallet_type + ]); + + if ($stmt->rowCount() > 0) { + // --- 4. إرسال إشعار لخدمة العملاء --- + $customerServicePhone = getenv('CUSTOMER_SERVICE_PHONE'); + + $message = + "⚠️ طلب دفع جديد:\n" . + "ID السائق: {$driverId}\n" . + "هاتف السائق: {$phone}\n" . + "نوع المحفظة: {$wallet_type}\n" . + "المبلغ: {$amount} SYP\n\n" . + "الرجاء من فريق خدمة العملاء تنفيذ عملية الدفع الآن."; + + // الإرسال (الفنكشن مُضمّن لديك مسبقًا) + sendWhatsAppFromServer($customerServicePhone, $message); + + error_log("[RequestPayout] Successfully created payout request for driver ID: $driverId"); + printSuccess("Payout request created successfully. It will be processed shortly."); + } else { + printFailure("Failed to create payout request."); + } + +} catch (PDOException $e) { + error_log("[RequestPayout] PDOException: " . $e->getMessage()); + printFailure("A database error occurred."); +} +?> \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/sms_webhook/save_raw_sms.php b/walletintaleq.intaleq.xyz/v2/main/sms_webhook/save_raw_sms.php new file mode 100755 index 0000000..54f39fd --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/sms_webhook/save_raw_sms.php @@ -0,0 +1,37 @@ +<?php +//save_raw_sms.php +// تضمين ملف الاتصال والإعدادات الرئيسي +// تأكد من أن هذا الملف يقوم بالتحقق من صحة JWT و HMAC القادم في الهيدرز +include __DIR__ . "/../connect.php"; + +// استقبال الرسالة الخام من تطبيق الأندرويد +$json_data = file_get_contents('php://input'); +$data = json_decode($json_data, true); + +// التحقق من وجود البيانات المطلوبة +if ($data && isset($data['sender']) && isset($data['message'])) { + try { + // حفظ الرسالة في جدول السجل الخام مع حالة "pending" + $sql = "INSERT INTO `raw_sms_log` (sender, message_body, status) VALUES (:sender, :message, 'pending')"; + $stmt = $con->prepare($sql); + $stmt->execute([':sender' => $data['sender'], ':message' => $data['message']]); + + // --- خطوة مهمة: تفعيل سكربت المعالجة في الخلفية --- + // هذا الأمر يجعل سكربت التحليل يعمل فورًا دون أن ينتظر المستخدم + // تأكد من أن المسار صحيح تمامًا على سيرفرك + $command = "php " . __DIR__ . "/process_with_gemini.php > /dev/null 2>&1 &"; + shell_exec($command); + + http_response_code(200); + echo json_encode(['status' => 'success', 'message' => 'SMS received and scheduled for processing.']); + + } catch (PDOException $e) { + http_response_code(500); + echo json_encode(['status' => 'error', 'message' => 'Database error: ' . $e->getMessage()]); + } +} else { + http_response_code(400); + echo json_encode(['status' => 'error', 'message' => 'Invalid data provided.']); +} +?> + diff --git a/walletintaleq.intaleq.xyz/v2/main/sms_webhook/save_raw_sms_passenger.php b/walletintaleq.intaleq.xyz/v2/main/sms_webhook/save_raw_sms_passenger.php new file mode 100755 index 0000000..cdc3ca0 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/sms_webhook/save_raw_sms_passenger.php @@ -0,0 +1,37 @@ +<?php +//save_raw_sms.php +// تضمين ملف الاتصال والإعدادات الرئيسي +// تأكد من أن هذا الملف يقوم بالتحقق من صحة JWT و HMAC القادم في الهيدرز +include __DIR__ . "/../connect.php"; + +// استقبال الرسالة الخام من تطبيق الأندرويد +$json_data = file_get_contents('php://input'); +$data = json_decode($json_data, true); + +// التحقق من وجود البيانات المطلوبة +if ($data && isset($data['sender']) && isset($data['message'])) { + try { + // حفظ الرسالة في جدول السجل الخام مع حالة "pending" + $sql = "INSERT INTO `raw_sms_log` (sender, message_body, status) VALUES (:sender, :message, 'pending')"; + $stmt = $con->prepare($sql); + $stmt->execute([':sender' => $data['sender'], ':message' => $data['message']]); + + // --- خطوة مهمة: تفعيل سكربت المعالجة في الخلفية --- + // هذا الأمر يجعل سكربت التحليل يعمل فورًا دون أن ينتظر المستخدم + // تأكد من أن المسار صحيح تمامًا على سيرفرك + $command = "php " . __DIR__ . "/process_passenger_sms_payment.php > /dev/null 2>&1 &"; + shell_exec($command); + + http_response_code(200); + echo json_encode(['status' => 'success', 'message' => 'SMS received and scheduled for processing.']); + + } catch (PDOException $e) { + http_response_code(500); + echo json_encode(['status' => 'error', 'message' => 'Database error: ' . $e->getMessage()]); + } +} else { + http_response_code(400); + echo json_encode(['status' => 'error', 'message' => 'Invalid data provided.']); +} +?> + diff --git a/walletintaleq.intaleq.xyz/v2/main/sms_webhook/webhook.php b/walletintaleq.intaleq.xyz/v2/main/sms_webhook/webhook.php new file mode 100755 index 0000000..40e3d7b --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/sms_webhook/webhook.php @@ -0,0 +1,75 @@ +<?php +//webhook.php +// تضمين ملف الاتصال الذي يتحقق أيضاً من توكن JWT +include "../connect.php"; + +// --- 1. قراءة البيانات المرسلة --- +$json_data = file_get_contents('php://input'); +$data = json_decode($json_data, true); + +if ($data === null || !isset($data['sender']) || !isset($data['message'])) { + http_response_code(400); // Bad Request + echo json_encode(['status' => 'error', 'message' => 'Invalid JSON data received']); + exit(); +} + +// --- 2. استخراج البيانات --- +$sender = $data['sender']; +$message_body = $data['message']; +$received_at = date('Y-m-d H:i:s'); +$log_entry = "[$received_at] From: $sender | Message: $message_body"; + +// --- 3. تحليل الرسالة (يركز على Orange Money حالياً) --- +$pattern_orangemoney_jo = '/تم استقبال حوالة مالية من (\d+)\s+من مزود الخدمة:\s+Orange Money إلى محفظتك بمبلغ ([\d,.]+)\s+دينار/'; + +if (preg_match($pattern_orangemoney_jo, $message_body, $matches)) { + $payer_phone_raw = $matches[1]; + $amount_str = $matches[2]; + $amount = (float) str_replace(',', '', $amount_str); + + // توحيد صيغة رقم الهاتف (إزالة 0096 إذا وجدت وإضافة 0) + $payer_phone = $payer_phone_raw; + if (substr($payer_phone_raw, 0, 4) === '0096') { + $payer_phone = '0' . substr($payer_phone_raw, 4); + } + + $log_entry .= " | MATCH: Orange Money | SUCCESS: Parsed Amount = $amount, Payer Phone = $payer_phone"; + + // --- 4. منطق تحديث الفاتورة --- + try { + // البحث عن أحدث فاتورة مطابقة (نفس الرقم والمبلغ) بحالة انتظار وتحديثها + $sql = "UPDATE invoices_sms SET status = 'completed' + WHERE user_phone = :phone + AND amount = :amount + AND status = 'pending' + ORDER BY created_at DESC + LIMIT 1"; + + $stmt = $con->prepare($sql); + $stmt->execute([ + ':phone' => $payer_phone, + ':amount' => $amount + ]); + + if ($stmt->rowCount() > 0) { + $log_entry .= " | DB: SUCCESS - Invoice found and updated." . PHP_EOL; + // يمكنك هنا إضافة كود لإرسال إشعار للمستخدم + } else { + $log_entry .= " | DB: WARNING - No pending invoice found for this transaction." . PHP_EOL; + } + + } catch (PDOException $e) { + $log_entry .= " | DB: ERROR - " . $e->getMessage() . PHP_EOL; + } + +} else { + $log_entry .= " | INFO: Message did not match any known payment pattern. Ignored." . PHP_EOL; +} + +// كتابة السجل (مهم لتصحيح الأخطاء) +file_put_contents('sms_log.txt', $log_entry, FILE_APPEND); + +// إرسال رد إلى تطبيق الأندرويد +http_response_code(200); +echo json_encode(['status' => 'success', 'message' => 'Webhook processed.']); +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/stderr.log b/walletintaleq.intaleq.xyz/v2/main/stderr.log new file mode 100755 index 0000000..e69de29 diff --git a/walletintaleq.intaleq.xyz/v2/main/test.php b/walletintaleq.intaleq.xyz/v2/main/test.php new file mode 100755 index 0000000..6102be4 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/test.php @@ -0,0 +1,53 @@ +<?php + +include "connect.php"; + +$email = filterRequest('email'); +$id = filterRequest('id'); + +// --- Load Secret Key from .env --- +$secretKey = getenv('SECRET_KEY'); + +// --- Generate HMAC Function --- +function generateHmac($id, $secretKey) { + return hash_hmac('sha256', $id, $secretKey); +} + +$sql = "SELECT + *, + phone_verification_passenger.verified +FROM + passengers +LEFT JOIN phone_verification_passenger ON phone_verification_passenger.phone_number = passengers.phone +WHERE + passengers.email = :email AND passengers.id = :id AND phone_verification_passenger.verified = '1' +"; +$stmt = $con->prepare($sql); +$stmt->bindParam(':email', $email); +$stmt->bindParam(':id', $id); +$stmt->execute(); +$data = $stmt->fetchAll(PDO::FETCH_ASSOC); +$count = $stmt->rowCount(); + +header('Content-Type: application/json'); // Ensure the response is JSON + +if ($count > 0) { + // Generate HMAC using passenger ID + $hmac = generateHmac($id, $secretKey); + + echo json_encode([ + "status" => "success", + "count" => $count, + "data" => $data, + "hmac" => $hmac // Add the generated HMAC here + ]); +} else { + echo json_encode([ + "status" => "Failure", + "data" => "User does not exist." + ]); +} + +$stmt = null; // Close the statement +$con = null; // Close the connection +exit(); // Ensure no further output \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/main/uploadEgypt.php b/walletintaleq.intaleq.xyz/v2/main/uploadEgypt.php new file mode 100755 index 0000000..6cefd8c --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/uploadEgypt.php @@ -0,0 +1,61 @@ +<?php +include "connect.php"; + +// Get the image file from the request. +$image_file = $_FILES['image']; +$driverID = filterRequest("driverID"); +$imageType = filterRequest("imageType"); + +// Define allowed extensions +$allowed_extensions = ['jpg', 'jpeg', 'png']; + +// Get the image file from the request. +$image_file = $_FILES['image']; + +// Check if the image file was uploaded successfully. +if ($image_file['error'] !== UPLOAD_ERR_OK) { + echo "Image upload failed"; + exit; +} + +// Get file information +$image_name = $image_file['name']; +$image_size = $image_file['size']; +$image_extension = strtolower(pathinfo($image_name, PATHINFO_EXTENSION)); + +// Validate file extension +if (!in_array($image_extension, $allowed_extensions)) { + echo "Invalid image format"; + exit; +} + +// Generate a unique filename using timestamp and random string +$new_filename = $imageType . '-'.$driverID . '.' . $image_extension; + +// Set target directory for uploads +$target_dir = "card_image/"; + +// Construct target file path +$target_file = $target_dir . $new_filename; + +// Move the image file to the target location +if (!move_uploaded_file($image_file['tmp_name'], $target_file)) { + echo json_encode(array('status' => "Failed to save image")); ; + exit; +} + +// Store additional information (modify based on your needs) +$image_url = $target_dir . $new_filename; // Update if needed +$image_details = [ + "name" => $image_name, + "size" => $image_size, + "extension" => $image_extension, + "url" => $image_url, +]; + +// Use the image details for further processing (e.g., display, store in database) +// ... + + echo json_encode(array('status' => 'Image uploaded successfully!')); + +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/uploadEgyptIdBack.php b/walletintaleq.intaleq.xyz/v2/main/uploadEgyptIdBack.php new file mode 100755 index 0000000..9484b89 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/uploadEgyptIdBack.php @@ -0,0 +1,60 @@ +<?php +include "../connect.php"; + +// Get the image file from the request. +$image_file = $_FILES['image']; +$driverID = filterRequest("driverID"); + +// Define allowed extensions +$allowed_extensions = ['jpg', 'jpeg', 'png']; + +// Get the image file from the request. +$image_file = $_FILES['image']; + +// Check if the image file was uploaded successfully. +if ($image_file['error'] !== UPLOAD_ERR_OK) { + echo "Image upload failed"; + exit; +} + +// Get file information +$image_name = $image_file['name']; +$image_size = $image_file['size']; +$image_extension = strtolower(pathinfo($image_name, PATHINFO_EXTENSION)); + +// Validate file extension +if (!in_array($image_extension, $allowed_extensions)) { + echo "Invalid image format"; + exit; +} + +// Generate a unique filename using timestamp and random string +$new_filename = $driverID . '.' . $image_extension; + +// Set target directory for uploads +$target_dir = "egypt/IdBack"; + +// Construct target file path +$target_file = $target_dir . $new_filename; + +// Move the image file to the target location +if (!move_uploaded_file($image_file['tmp_name'], $target_file)) { + echo json_encode(array('status' => "Failed to save image")); ; + exit; +} + +// Store additional information (modify based on your needs) +$image_url = $target_dir . $new_filename; // Update if needed +$image_details = [ + "name" => $image_name, + "size" => $image_size, + "extension" => $image_extension, + "url" => $image_url, +]; + +// Use the image details for further processing (e.g., display, store in database) +// ... + + echo json_encode(array('status' => 'Image uploaded successfully!')); + +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/uploadImage.php b/walletintaleq.intaleq.xyz/v2/main/uploadImage.php new file mode 100755 index 0000000..4cad930 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/uploadImage.php @@ -0,0 +1,73 @@ +<?php + +include "connect.php"; + +// Get the image file from the request. +$image_file = $_FILES['image']; +$driverID = filterRequest("driverID"); + +// Check if the image file was uploaded successfully. +if ($image_file['error'] != UPLOAD_ERR_OK) { + echo json_encode(array('status' => 'The image file was not uploaded successfully.')); + exit; +} + +// Get the file name of the image file. +$image_name = $image_file['name']; + +// Get the file extension of the image file. +$image_extension = pathinfo($image_name, PATHINFO_EXTENSION); + +// Check if the image file is a valid image file. +if (!in_array($image_extension, array('jpg', 'jpeg', 'png'))) { + echo json_encode(array('status' => 'The image file is not a valid image file.')); + exit; +} + +// Generate a new filename using the driver ID. +$new_filename = $driverID . '.' . $image_extension; + +// Move the image file to the uploads directory with the new filename. +$target_dir = "card_image/"; +$target_file = $target_dir . $new_filename; +move_uploaded_file($image_file['tmp_name'], $target_file); + +// Update the image name variable with the new filename. +$image_name = $new_filename; + +// Check if the driverID already exists in the database. +$sql = "SELECT * FROM card_images WHERE driverID = '$driverID'"; +$result = mysqli_query($conn, $sql); + +if (mysqli_num_rows($result) > 0) { + // The driverID already exists in the database, so update the upload_date + $uploadDate = date("Y-m-d H:i:s"); + $linkImage = 'https://ride.mobile-app.store/card_image/' . $image_name; + + $updateSQL = "UPDATE card_images SET upload_date = '$uploadDate' WHERE driverID = '$driverID'"; + mysqli_query($conn, $updateSQL); + + if (mysqli_affected_rows($conn) > 0) { + // Print a success message for update + echo json_encode(array('status' => 'Record updated successfully')); + } else { + // Print a failure message for update + echo json_encode(array('status' => 'Failed to update record')); + } +} else { + // The driverID does not exist in the database, so insert a new row. + $linkImage = 'https://ride.mobile-app.store/card_image/' . $image_name; + $insertSQL = "INSERT INTO `card_images`( `driverID`, `image_name`, `link`) VALUES ('$driverID', '$image_name', '$linkImage')"; + mysqli_query($conn, $insertSQL); + + if (mysqli_affected_rows($conn) > 0) { + // Print a success message for insert + echo json_encode(array('status' => 'Record inserted successfully')); + } else { + // Print a failure message for insert + echo json_encode(array('status' => 'Failed to insert record')); + } +} + +mysqli_close($conn); +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/uploadImage1.php b/walletintaleq.intaleq.xyz/v2/main/uploadImage1.php new file mode 100755 index 0000000..93c6017 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/uploadImage1.php @@ -0,0 +1,60 @@ +<?php +include "connect.php"; + +// Get the image file from the request. +$image_file = $_FILES['image']; +$driverID = filterRequest("driverID"); + +// Define allowed extensions +$allowed_extensions = ['jpg', 'jpeg', 'png']; + +// Get the image file from the request. +$image_file = $_FILES['image']; + +// Check if the image file was uploaded successfully. +if ($image_file['error'] !== UPLOAD_ERR_OK) { + echo "Image upload failed"; + exit; +} + +// Get file information +$image_name = $image_file['name']; +$image_size = $image_file['size']; +$image_extension = strtolower(pathinfo($image_name, PATHINFO_EXTENSION)); + +// Validate file extension +if (!in_array($image_extension, $allowed_extensions)) { + echo "Invalid image format"; + exit; +} + +// Generate a unique filename using timestamp and random string +$new_filename = $driverID . '.' . $image_extension; + +// Set target directory for uploads +$target_dir = "portrate_captain_image/"; + +// Construct target file path +$target_file = $target_dir . $new_filename; + +// Move the image file to the target location +if (!move_uploaded_file($image_file['tmp_name'], $target_file)) { + echo json_encode(array('status' => "Failed to save image")); ; + exit; +} + +// Store additional information (modify based on your needs) +$image_url = $target_dir . $new_filename; // Update if needed +$image_details = [ + "name" => $image_name, + "size" => $image_size, + "extension" => $image_extension, + "url" => $image_url, +]; + +// Use the image details for further processing (e.g., display, store in database) +// ... + + echo json_encode(array('status' => 'Image uploaded successfully!')); + +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/uploadImagePortrate.php b/walletintaleq.intaleq.xyz/v2/main/uploadImagePortrate.php new file mode 100755 index 0000000..15513b9 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/uploadImagePortrate.php @@ -0,0 +1,73 @@ +<?php + +include "connect.php"; + +// Get the image file from the request. +$image_file = $_FILES['image']; +$driverID = filterRequest("driverID"); + +// Check if the image file was uploaded successfully. +if ($image_file['error'] != UPLOAD_ERR_OK) { + echo json_encode(array('status' => 'The image file was not uploaded successfully.')); + exit; +} + +// Get the file name of the image file. +$image_name = $image_file['name']; + +// Get the file extension of the image file. +$image_extension = pathinfo($image_name, PATHINFO_EXTENSION); + +// // Check if the image file is a valid image file. +// if (!in_array($image_extension, array('jpg', 'jpeg', 'png'))) { +// echo json_encode(array('status' => 'The image file is not a valid image file.')); +// exit; +// } + +// Generate a new filename using the driver ID. +$new_filename = $driverID . '.' . $image_extension; + +// Move the image file to the uploads directory with the new filename. +$target_dir = "portrate_captain_image/"; +$target_file = $target_dir . $new_filename; +move_uploaded_file($image_file['tmp_name'], $target_file); + +// Update the image name variable with the new filename. +$image_name = $new_filename; + +// Check if the driverID already exists in the database. +$sql = "SELECT * FROM card_images WHERE driverID = '$driverID'"; +$result = mysqli_query($conn, $sql); + +if (mysqli_num_rows($result) > 0) { + // The driverID already exists in the database, so update the upload_date + $uploadDate = date("Y-m-d H:i:s"); + $linkImage = 'https://ride.mobile-app.store/card_image/' . $image_name; + + $updateSQL = "UPDATE card_images SET upload_date = '$uploadDate' WHERE driverID = '$driverID'"; + mysqli_query($conn, $updateSQL); + + if (mysqli_affected_rows($conn) > 0) { + // Print a success message for update + echo json_encode(array('status' => 'Record updated successfully')); + } else { + // Print a failure message for update + echo json_encode(array('status' => 'Failed to update record')); + } +} else { + // The driverID does not exist in the database, so insert a new row. + $linkImage = 'https://ride.mobile-app.store/card_image/' . $image_name; + $insertSQL = "INSERT INTO `imageProfileCaptain`( `driverID`, `image_name`, `link`) VALUES ('$driverID', '$image_name', '$linkImage')"; + mysqli_query($conn, $insertSQL); + + if (mysqli_affected_rows($conn) > 0) { + // Print a success message for insert + echo json_encode(array('status' => 'Record inserted successfully')); + } else { + // Print a failure message for insert + echo json_encode(array('status' => 'Failed to insert record')); + } +} + +mysqli_close($conn); +?> diff --git a/walletintaleq.intaleq.xyz/v2/main/uploadImageType.php b/walletintaleq.intaleq.xyz/v2/main/uploadImageType.php new file mode 100755 index 0000000..43ddb77 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/main/uploadImageType.php @@ -0,0 +1,57 @@ +<?php + +// ربط ملف connect.php +include "connect.php"; + +// Get the image file from the request. +$image_file = $_FILES['image']; +$name = filterRequest("name"); +$kind = filterRequest("kind"); + +// Check if the image file was uploaded successfully. +if ($image_file['error'] != UPLOAD_ERR_OK) { + echo json_encode(array('status' => 'The image file was not uploaded successfully.')); + exit; +} + +// Get the file name of the image file. +$image_name = $image_file['name']; + +// Get the file extension of the image file. +$image_extension = pathinfo($image_name, PATHINFO_EXTENSION); + +// Check if the image file is a valid image file. +if (!in_array($image_extension, array('jpg', 'jpeg', 'png'))) { + echo json_encode(array('status' => 'The image file is not a valid image file.')); + exit; +} + +// Move the image file to the uploads directory. +$target_dir = "upload/types/"; +$target_file = $target_dir . $image_name; +move_uploaded_file($image_file['tmp_name'], $target_file); + + +// التحقق مما إذا كان النوع موجودًا بالفعل في قاعدة البيانات +$sql = "SELECT * FROM types WHERE name = '$name' AND kind = '$kind'"; +$stmt = $con->prepare($sql); +$stmt->execute(); +$count = $stmt->rowCount(); + +if ($stmt->rowCount() > 0) { + // النوع موجود بالفعل في قاعدة البيانات ، لذا قم بتحديث ملف الصورة +$sql = "UPDATE types SET imageLink = '$image_name' WHERE name = '$name' AND kind = '$kind'"; + mysqli_query($conn, $sql); + echo json_encode(array('status' => "success")); + +} else { + // النوع غير موجود في قاعدة البيانات ، لذا أدخل صفًا جديدًا + $data = array( + "imageLink" =>"https://fleek-tech.com/reef/upload/types/". $image_name, + "name" => $name, + "kind" => $kind + ); + insertData("types", $data, $json = true); +} + +?> diff --git a/walletintaleq.intaleq.xyz/v2/vendor/autoload.php b/walletintaleq.intaleq.xyz/v2/vendor/autoload.php new file mode 100644 index 0000000..155f051 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/autoload.php @@ -0,0 +1,22 @@ +<?php + +// autoload.php @generated by Composer + +if (PHP_VERSION_ID < 50600) { + if (!headers_sent()) { + header('HTTP/1.1 500 Internal Server Error'); + } + $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; + if (!ini_get('display_errors')) { + if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { + fwrite(STDERR, $err); + } elseif (!headers_sent()) { + echo $err; + } + } + throw new RuntimeException($err); +} + +require_once __DIR__ . '/composer/autoload_real.php'; + +return ComposerAutoloaderInitf4992f859d487b64a98d0924286c7152::getLoader(); diff --git a/walletintaleq.intaleq.xyz/v2/vendor/composer/ClassLoader.php b/walletintaleq.intaleq.xyz/v2/vendor/composer/ClassLoader.php new file mode 100644 index 0000000..7824d8f --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/composer/ClassLoader.php @@ -0,0 +1,579 @@ +<?php + +/* + * This file is part of Composer. + * + * (c) Nils Adermann <naderman@naderman.de> + * Jordi Boggiano <j.boggiano@seld.be> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier <fabien@symfony.com> + * @author Jordi Boggiano <j.boggiano@seld.be> + * @see https://www.php-fig.org/psr/psr-0/ + * @see https://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + /** @var \Closure(string):void */ + private static $includeFile; + + /** @var string|null */ + private $vendorDir; + + // PSR-4 + /** + * @var array<string, array<string, int>> + */ + private $prefixLengthsPsr4 = array(); + /** + * @var array<string, list<string>> + */ + private $prefixDirsPsr4 = array(); + /** + * @var list<string> + */ + private $fallbackDirsPsr4 = array(); + + // PSR-0 + /** + * List of PSR-0 prefixes + * + * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) + * + * @var array<string, array<string, list<string>>> + */ + private $prefixesPsr0 = array(); + /** + * @var list<string> + */ + private $fallbackDirsPsr0 = array(); + + /** @var bool */ + private $useIncludePath = false; + + /** + * @var array<string, string> + */ + private $classMap = array(); + + /** @var bool */ + private $classMapAuthoritative = false; + + /** + * @var array<string, bool> + */ + private $missingClasses = array(); + + /** @var string|null */ + private $apcuPrefix; + + /** + * @var array<string, self> + */ + private static $registeredLoaders = array(); + + /** + * @param string|null $vendorDir + */ + public function __construct($vendorDir = null) + { + $this->vendorDir = $vendorDir; + self::initializeIncludeClosure(); + } + + /** + * @return array<string, list<string>> + */ + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); + } + + return array(); + } + + /** + * @return array<string, list<string>> + */ + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + /** + * @return list<string> + */ + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + /** + * @return list<string> + */ + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + /** + * @return array<string, string> Array of classname => path + */ + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array<string, string> $classMap Class to filename map + * + * @return void + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param list<string>|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + * + * @return void + */ + public function add($prefix, $paths, $prepend = false) + { + $paths = (array) $paths; + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param list<string>|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + * + * @return void + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + $paths = (array) $paths; + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param list<string>|string $paths The PSR-0 base directories + * + * @return void + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param list<string>|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + * + * @return void + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + * + * @return void + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + * + * @return void + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + * + * @return void + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + * + * @return void + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + + if (null === $this->vendorDir) { + return; + } + + if ($prepend) { + self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; + } else { + unset(self::$registeredLoaders[$this->vendorDir]); + self::$registeredLoaders[$this->vendorDir] = $this; + } + } + + /** + * Unregisters this instance as an autoloader. + * + * @return void + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + + if (null !== $this->vendorDir) { + unset(self::$registeredLoaders[$this->vendorDir]); + } + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return true|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + $includeFile = self::$includeFile; + $includeFile($file); + + return true; + } + + return null; + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + /** + * Returns the currently registered loaders keyed by their corresponding vendor directories. + * + * @return array<string, self> + */ + public static function getRegisteredLoaders() + { + return self::$registeredLoaders; + } + + /** + * @param string $class + * @param string $ext + * @return string|false + */ + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath . '\\'; + if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); + foreach ($this->prefixDirsPsr4[$search] as $dir) { + if (file_exists($file = $dir . $pathEnd)) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } + + /** + * @return void + */ + private static function initializeIncludeClosure() + { + if (self::$includeFile !== null) { + return; + } + + /** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + * + * @param string $file + * @return void + */ + self::$includeFile = \Closure::bind(static function($file) { + include $file; + }, null, null); + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/composer/InstalledVersions.php b/walletintaleq.intaleq.xyz/v2/vendor/composer/InstalledVersions.php new file mode 100644 index 0000000..2052022 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/composer/InstalledVersions.php @@ -0,0 +1,396 @@ +<?php + +/* + * This file is part of Composer. + * + * (c) Nils Adermann <naderman@naderman.de> + * Jordi Boggiano <j.boggiano@seld.be> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer; + +use Composer\Autoload\ClassLoader; +use Composer\Semver\VersionParser; + +/** + * This class is copied in every Composer installed project and available to all + * + * See also https://getcomposer.org/doc/07-runtime.md#installed-versions + * + * To require its presence, you can require `composer-runtime-api ^2.0` + * + * @final + */ +class InstalledVersions +{ + /** + * @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to + * @internal + */ + private static $selfDir = null; + + /** + * @var mixed[]|null + * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null + */ + private static $installed; + + /** + * @var bool + */ + private static $installedIsLocalDir; + + /** + * @var bool|null + */ + private static $canGetVendors; + + /** + * @var array[] + * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> + */ + private static $installedByVendor = array(); + + /** + * Returns a list of all package names which are present, either by being installed, replaced or provided + * + * @return string[] + * @psalm-return list<string> + */ + public static function getInstalledPackages() + { + $packages = array(); + foreach (self::getInstalled() as $installed) { + $packages[] = array_keys($installed['versions']); + } + + if (1 === \count($packages)) { + return $packages[0]; + } + + return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); + } + + /** + * Returns a list of all package names with a specific type e.g. 'library' + * + * @param string $type + * @return string[] + * @psalm-return list<string> + */ + public static function getInstalledPackagesByType($type) + { + $packagesByType = array(); + + foreach (self::getInstalled() as $installed) { + foreach ($installed['versions'] as $name => $package) { + if (isset($package['type']) && $package['type'] === $type) { + $packagesByType[] = $name; + } + } + } + + return $packagesByType; + } + + /** + * Checks whether the given package is installed + * + * This also returns true if the package name is provided or replaced by another package + * + * @param string $packageName + * @param bool $includeDevRequirements + * @return bool + */ + public static function isInstalled($packageName, $includeDevRequirements = true) + { + foreach (self::getInstalled() as $installed) { + if (isset($installed['versions'][$packageName])) { + return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; + } + } + + return false; + } + + /** + * Checks whether the given package satisfies a version constraint + * + * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: + * + * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') + * + * @param VersionParser $parser Install composer/semver to have access to this class and functionality + * @param string $packageName + * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package + * @return bool + */ + public static function satisfies(VersionParser $parser, $packageName, $constraint) + { + $constraint = $parser->parseConstraints((string) $constraint); + $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); + + return $provided->matches($constraint); + } + + /** + * Returns a version constraint representing all the range(s) which are installed for a given package + * + * It is easier to use this via isInstalled() with the $constraint argument if you need to check + * whether a given version of a package is installed, and not just whether it exists + * + * @param string $packageName + * @return string Version constraint usable with composer/semver + */ + public static function getVersionRanges($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + $ranges = array(); + if (isset($installed['versions'][$packageName]['pretty_version'])) { + $ranges[] = $installed['versions'][$packageName]['pretty_version']; + } + if (array_key_exists('aliases', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); + } + if (array_key_exists('replaced', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); + } + if (array_key_exists('provided', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); + } + + return implode(' || ', $ranges); + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present + */ + public static function getVersion($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['version'])) { + return null; + } + + return $installed['versions'][$packageName]['version']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present + */ + public static function getPrettyVersion($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['pretty_version'])) { + return null; + } + + return $installed['versions'][$packageName]['pretty_version']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference + */ + public static function getReference($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['reference'])) { + return null; + } + + return $installed['versions'][$packageName]['reference']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. + */ + public static function getInstallPath($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @return array + * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} + */ + public static function getRootPackage() + { + $installed = self::getInstalled(); + + return $installed[0]['root']; + } + + /** + * Returns the raw installed.php data for custom implementations + * + * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. + * @return array[] + * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} + */ + public static function getRawData() + { + @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); + + if (null === self::$installed) { + // only require the installed.php file if this file is loaded from its dumped location, + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + if (substr(__DIR__, -8, 1) !== 'C') { + self::$installed = include __DIR__ . '/installed.php'; + } else { + self::$installed = array(); + } + } + + return self::$installed; + } + + /** + * Returns the raw data of all installed.php which are currently loaded for custom implementations + * + * @return array[] + * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> + */ + public static function getAllRawData() + { + return self::getInstalled(); + } + + /** + * Lets you reload the static array from another file + * + * This is only useful for complex integrations in which a project needs to use + * this class but then also needs to execute another project's autoloader in process, + * and wants to ensure both projects have access to their version of installed.php. + * + * A typical case would be PHPUnit, where it would need to make sure it reads all + * the data it needs from this class, then call reload() with + * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure + * the project in which it runs can then also use this class safely, without + * interference between PHPUnit's dependencies and the project's dependencies. + * + * @param array[] $data A vendor/composer/installed.php data set + * @return void + * + * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data + */ + public static function reload($data) + { + self::$installed = $data; + self::$installedByVendor = array(); + + // when using reload, we disable the duplicate protection to ensure that self::$installed data is + // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not, + // so we have to assume it does not, and that may result in duplicate data being returned when listing + // all installed packages for example + self::$installedIsLocalDir = false; + } + + /** + * @return string + */ + private static function getSelfDir() + { + if (self::$selfDir === null) { + self::$selfDir = strtr(__DIR__, '\\', '/'); + } + + return self::$selfDir; + } + + /** + * @return array[] + * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> + */ + private static function getInstalled() + { + if (null === self::$canGetVendors) { + self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); + } + + $installed = array(); + $copiedLocalDir = false; + + if (self::$canGetVendors) { + $selfDir = self::getSelfDir(); + foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { + $vendorDir = strtr($vendorDir, '\\', '/'); + if (isset(self::$installedByVendor[$vendorDir])) { + $installed[] = self::$installedByVendor[$vendorDir]; + } elseif (is_file($vendorDir.'/composer/installed.php')) { + /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ + $required = require $vendorDir.'/composer/installed.php'; + self::$installedByVendor[$vendorDir] = $required; + $installed[] = $required; + if (self::$installed === null && $vendorDir.'/composer' === $selfDir) { + self::$installed = $required; + self::$installedIsLocalDir = true; + } + } + if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) { + $copiedLocalDir = true; + } + } + } + + if (null === self::$installed) { + // only require the installed.php file if this file is loaded from its dumped location, + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + if (substr(__DIR__, -8, 1) !== 'C') { + /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ + $required = require __DIR__ . '/installed.php'; + self::$installed = $required; + } else { + self::$installed = array(); + } + } + + if (self::$installed !== array() && !$copiedLocalDir) { + $installed[] = self::$installed; + } + + return $installed; + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/composer/LICENSE b/walletintaleq.intaleq.xyz/v2/vendor/composer/LICENSE new file mode 100644 index 0000000..f27399a --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/walletintaleq.intaleq.xyz/v2/vendor/composer/autoload_classmap.php b/walletintaleq.intaleq.xyz/v2/vendor/composer/autoload_classmap.php new file mode 100644 index 0000000..5490b88 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/composer/autoload_classmap.php @@ -0,0 +1,15 @@ +<?php + +// autoload_classmap.php @generated by Composer + +$vendorDir = dirname(__DIR__); +$baseDir = dirname($vendorDir); + +return array( + 'Attribute' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php', + 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', + 'PhpToken' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php', + 'Stringable' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Stringable.php', + 'UnhandledMatchError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php', + 'ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php', +); diff --git a/walletintaleq.intaleq.xyz/v2/vendor/composer/autoload_files.php b/walletintaleq.intaleq.xyz/v2/vendor/composer/autoload_files.php new file mode 100644 index 0000000..7ff36b4 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/composer/autoload_files.php @@ -0,0 +1,12 @@ +<?php + +// autoload_files.php @generated by Composer + +$vendorDir = dirname(__DIR__); +$baseDir = dirname($vendorDir); + +return array( + '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', + '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', + 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php', +); diff --git a/walletintaleq.intaleq.xyz/v2/vendor/composer/autoload_namespaces.php b/walletintaleq.intaleq.xyz/v2/vendor/composer/autoload_namespaces.php new file mode 100644 index 0000000..15a2ff3 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/composer/autoload_namespaces.php @@ -0,0 +1,9 @@ +<?php + +// autoload_namespaces.php @generated by Composer + +$vendorDir = dirname(__DIR__); +$baseDir = dirname($vendorDir); + +return array( +); diff --git a/walletintaleq.intaleq.xyz/v2/vendor/composer/autoload_psr4.php b/walletintaleq.intaleq.xyz/v2/vendor/composer/autoload_psr4.php new file mode 100644 index 0000000..9fa215d --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/composer/autoload_psr4.php @@ -0,0 +1,17 @@ +<?php + +// autoload_psr4.php @generated by Composer + +$vendorDir = dirname(__DIR__); +$baseDir = dirname($vendorDir); + +return array( + 'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'), + 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'), + 'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'), + 'Root\\V1\\' => array($baseDir . '/src'), + 'PhpOption\\' => array($vendorDir . '/phpoption/phpoption/src/PhpOption'), + 'GrahamCampbell\\ResultType\\' => array($vendorDir . '/graham-campbell/result-type/src'), + 'Firebase\\JWT\\' => array($vendorDir . '/firebase/php-jwt/src'), + 'Dotenv\\' => array($vendorDir . '/vlucas/phpdotenv/src'), +); diff --git a/walletintaleq.intaleq.xyz/v2/vendor/composer/autoload_real.php b/walletintaleq.intaleq.xyz/v2/vendor/composer/autoload_real.php new file mode 100644 index 0000000..4c3ff71 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/composer/autoload_real.php @@ -0,0 +1,50 @@ +<?php + +// autoload_real.php @generated by Composer + +class ComposerAutoloaderInitf4992f859d487b64a98d0924286c7152 +{ + private static $loader; + + public static function loadClassLoader($class) + { + if ('Composer\Autoload\ClassLoader' === $class) { + require __DIR__ . '/ClassLoader.php'; + } + } + + /** + * @return \Composer\Autoload\ClassLoader + */ + public static function getLoader() + { + if (null !== self::$loader) { + return self::$loader; + } + + require __DIR__ . '/platform_check.php'; + + spl_autoload_register(array('ComposerAutoloaderInitf4992f859d487b64a98d0924286c7152', 'loadClassLoader'), true, true); + self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); + spl_autoload_unregister(array('ComposerAutoloaderInitf4992f859d487b64a98d0924286c7152', 'loadClassLoader')); + + require __DIR__ . '/autoload_static.php'; + call_user_func(\Composer\Autoload\ComposerStaticInitf4992f859d487b64a98d0924286c7152::getInitializer($loader)); + + $loader->register(true); + + $filesToLoad = \Composer\Autoload\ComposerStaticInitf4992f859d487b64a98d0924286c7152::$files; + $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + + require $file; + } + }, null, null); + foreach ($filesToLoad as $fileIdentifier => $file) { + $requireFile($fileIdentifier, $file); + } + + return $loader; + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/composer/autoload_static.php b/walletintaleq.intaleq.xyz/v2/vendor/composer/autoload_static.php new file mode 100644 index 0000000..9827b12 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/composer/autoload_static.php @@ -0,0 +1,97 @@ +<?php + +// autoload_static.php @generated by Composer + +namespace Composer\Autoload; + +class ComposerStaticInitf4992f859d487b64a98d0924286c7152 +{ + public static $files = array ( + '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', + '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', + 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', + ); + + public static $prefixLengthsPsr4 = array ( + 'S' => + array ( + 'Symfony\\Polyfill\\Php80\\' => 23, + 'Symfony\\Polyfill\\Mbstring\\' => 26, + 'Symfony\\Polyfill\\Ctype\\' => 23, + ), + 'R' => + array ( + 'Root\\V1\\' => 8, + ), + 'P' => + array ( + 'PhpOption\\' => 10, + ), + 'G' => + array ( + 'GrahamCampbell\\ResultType\\' => 26, + ), + 'F' => + array ( + 'Firebase\\JWT\\' => 13, + ), + 'D' => + array ( + 'Dotenv\\' => 7, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'Symfony\\Polyfill\\Php80\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-php80', + ), + 'Symfony\\Polyfill\\Mbstring\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring', + ), + 'Symfony\\Polyfill\\Ctype\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-ctype', + ), + 'Root\\V1\\' => + array ( + 0 => __DIR__ . '/../..' . '/src', + ), + 'PhpOption\\' => + array ( + 0 => __DIR__ . '/..' . '/phpoption/phpoption/src/PhpOption', + ), + 'GrahamCampbell\\ResultType\\' => + array ( + 0 => __DIR__ . '/..' . '/graham-campbell/result-type/src', + ), + 'Firebase\\JWT\\' => + array ( + 0 => __DIR__ . '/..' . '/firebase/php-jwt/src', + ), + 'Dotenv\\' => + array ( + 0 => __DIR__ . '/..' . '/vlucas/phpdotenv/src', + ), + ); + + public static $classMap = array ( + 'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php', + 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', + 'PhpToken' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php', + 'Stringable' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Stringable.php', + 'UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php', + 'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php', + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInitf4992f859d487b64a98d0924286c7152::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitf4992f859d487b64a98d0924286c7152::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInitf4992f859d487b64a98d0924286c7152::$classMap; + + }, null, ClassLoader::class); + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/composer/installed.json b/walletintaleq.intaleq.xyz/v2/vendor/composer/installed.json new file mode 100644 index 0000000..961de6a --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/composer/installed.json @@ -0,0 +1,551 @@ +{ + "packages": [ + { + "name": "firebase/php-jwt", + "version": "v6.11.1", + "version_normalized": "6.11.1.0", + "source": { + "type": "git", + "url": "https://github.com/firebase/php-jwt.git", + "reference": "d1e91ecf8c598d073d0995afa8cd5c75c6e19e66" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/d1e91ecf8c598d073d0995afa8cd5c75c6e19e66", + "reference": "d1e91ecf8c598d073d0995afa8cd5c75c6e19e66", + "shasum": "" + }, + "require": { + "php": "^8.0" + }, + "require-dev": { + "guzzlehttp/guzzle": "^7.4", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.5", + "psr/cache": "^2.0||^3.0", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0" + }, + "suggest": { + "ext-sodium": "Support EdDSA (Ed25519) signatures", + "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present" + }, + "time": "2025-04-09T20:32:01+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Firebase\\JWT\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Neuman Vong", + "email": "neuman+pear@twilio.com", + "role": "Developer" + }, + { + "name": "Anant Narayanan", + "email": "anant@php.net", + "role": "Developer" + } + ], + "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.", + "homepage": "https://github.com/firebase/php-jwt", + "keywords": [ + "jwt", + "php" + ], + "support": { + "issues": "https://github.com/firebase/php-jwt/issues", + "source": "https://github.com/firebase/php-jwt/tree/v6.11.1" + }, + "install-path": "../firebase/php-jwt" + }, + { + "name": "graham-campbell/result-type", + "version": "v1.1.3", + "version_normalized": "1.1.3.0", + "source": { + "type": "git", + "url": "https://github.com/GrahamCampbell/Result-Type.git", + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/3ba905c11371512af9d9bdd27d99b782216b6945", + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.3" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" + }, + "time": "2024-07-20T21:45:45+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "GrahamCampbell\\ResultType\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "An Implementation Of The Result Type", + "keywords": [ + "Graham Campbell", + "GrahamCampbell", + "Result Type", + "Result-Type", + "result" + ], + "support": { + "issues": "https://github.com/GrahamCampbell/Result-Type/issues", + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.3" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", + "type": "tidelift" + } + ], + "install-path": "../graham-campbell/result-type" + }, + { + "name": "phpoption/phpoption", + "version": "1.9.3", + "version_normalized": "1.9.3.0", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/php-option.git", + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/e3fac8b24f56113f7cb96af14958c0dd16330f54", + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" + }, + "time": "2024-07-20T21:41:07+00:00", + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "PhpOption\\": "src/PhpOption/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh" + }, + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "Option Type for PHP", + "keywords": [ + "language", + "option", + "php", + "type" + ], + "support": { + "issues": "https://github.com/schmittjoh/php-option/issues", + "source": "https://github.com/schmittjoh/php-option/tree/1.9.3" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", + "type": "tidelift" + } + ], + "install-path": "../phpoption/phpoption" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.32.0", + "version_normalized": "1.32.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "time": "2024-09-09T11:45:10+00:00", + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.32.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/polyfill-ctype" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.32.0", + "version_normalized": "1.32.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", + "shasum": "" + }, + "require": { + "ext-iconv": "*", + "php": ">=7.2" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "time": "2024-12-23T08:48:59+00:00", + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.32.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/polyfill-mbstring" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.32.0", + "version_normalized": "1.32.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/0cc9dd0f17f61d8131e7df6b84bd344899fe2608", + "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "time": "2025-01-02T08:10:11+00:00", + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.32.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/polyfill-php80" + }, + { + "name": "vlucas/phpdotenv", + "version": "v5.6.2", + "version_normalized": "5.6.2.0", + "source": { + "type": "git", + "url": "https://github.com/vlucas/phpdotenv.git", + "reference": "24ac4c74f91ee2c193fa1aaa5c249cb0822809af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/24ac4c74f91ee2c193fa1aaa5c249cb0822809af", + "reference": "24ac4c74f91ee2c193fa1aaa5c249cb0822809af", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "graham-campbell/result-type": "^1.1.3", + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.3", + "symfony/polyfill-ctype": "^1.24", + "symfony/polyfill-mbstring": "^1.24", + "symfony/polyfill-php80": "^1.24" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "ext-filter": "*", + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + }, + "suggest": { + "ext-filter": "Required to use the boolean validator." + }, + "time": "2025-04-30T23:37:27+00:00", + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, + "branch-alias": { + "dev-master": "5.6-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Dotenv\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Vance Lucas", + "email": "vance@vancelucas.com", + "homepage": "https://github.com/vlucas" + } + ], + "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "keywords": [ + "dotenv", + "env", + "environment" + ], + "support": { + "issues": "https://github.com/vlucas/phpdotenv/issues", + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.2" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", + "type": "tidelift" + } + ], + "install-path": "../vlucas/phpdotenv" + } + ], + "dev": true, + "dev-package-names": [] +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/composer/installed.php b/walletintaleq.intaleq.xyz/v2/vendor/composer/installed.php new file mode 100644 index 0000000..820eed7 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/composer/installed.php @@ -0,0 +1,86 @@ +<?php return array( + 'root' => array( + 'name' => 'root/v1', + 'pretty_version' => '1.0.0+no-version-set', + 'version' => '1.0.0.0', + 'reference' => null, + 'type' => 'library', + 'install_path' => __DIR__ . '/../../', + 'aliases' => array(), + 'dev' => true, + ), + 'versions' => array( + 'firebase/php-jwt' => array( + 'pretty_version' => 'v6.11.1', + 'version' => '6.11.1.0', + 'reference' => 'd1e91ecf8c598d073d0995afa8cd5c75c6e19e66', + 'type' => 'library', + 'install_path' => __DIR__ . '/../firebase/php-jwt', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'graham-campbell/result-type' => array( + 'pretty_version' => 'v1.1.3', + 'version' => '1.1.3.0', + 'reference' => '3ba905c11371512af9d9bdd27d99b782216b6945', + 'type' => 'library', + 'install_path' => __DIR__ . '/../graham-campbell/result-type', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'phpoption/phpoption' => array( + 'pretty_version' => '1.9.3', + 'version' => '1.9.3.0', + 'reference' => 'e3fac8b24f56113f7cb96af14958c0dd16330f54', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpoption/phpoption', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'root/v1' => array( + 'pretty_version' => '1.0.0+no-version-set', + 'version' => '1.0.0.0', + 'reference' => null, + 'type' => 'library', + 'install_path' => __DIR__ . '/../../', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/polyfill-ctype' => array( + 'pretty_version' => 'v1.32.0', + 'version' => '1.32.0.0', + 'reference' => 'a3cc8b044a6ea513310cbd48ef7333b384945638', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/polyfill-ctype', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/polyfill-mbstring' => array( + 'pretty_version' => 'v1.32.0', + 'version' => '1.32.0.0', + 'reference' => '6d857f4d76bd4b343eac26d6b539585d2bc56493', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'symfony/polyfill-php80' => array( + 'pretty_version' => 'v1.32.0', + 'version' => '1.32.0.0', + 'reference' => '0cc9dd0f17f61d8131e7df6b84bd344899fe2608', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/polyfill-php80', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'vlucas/phpdotenv' => array( + 'pretty_version' => 'v5.6.2', + 'version' => '5.6.2.0', + 'reference' => '24ac4c74f91ee2c193fa1aaa5c249cb0822809af', + 'type' => 'library', + 'install_path' => __DIR__ . '/../vlucas/phpdotenv', + 'aliases' => array(), + 'dev_requirement' => false, + ), + ), +); diff --git a/walletintaleq.intaleq.xyz/v2/vendor/composer/platform_check.php b/walletintaleq.intaleq.xyz/v2/vendor/composer/platform_check.php new file mode 100644 index 0000000..a70ba47 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/composer/platform_check.php @@ -0,0 +1,25 @@ +<?php + +// platform_check.php @generated by Composer + +$issues = array(); + +if (!(PHP_VERSION_ID >= 80000)) { + $issues[] = 'Your Composer dependencies require a PHP version ">= 8.0.0". You are running ' . PHP_VERSION . '.'; +} + +if ($issues) { + if (!headers_sent()) { + header('HTTP/1.1 500 Internal Server Error'); + } + if (!ini_get('display_errors')) { + if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { + fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); + } elseif (!headers_sent()) { + echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; + } + } + throw new \RuntimeException( + 'Composer detected issues in your platform: ' . implode(' ', $issues) + ); +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/CHANGELOG.md b/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/CHANGELOG.md new file mode 100644 index 0000000..7b5f6ce --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/CHANGELOG.md @@ -0,0 +1,205 @@ +# Changelog + +## [6.11.1](https://github.com/firebase/php-jwt/compare/v6.11.0...v6.11.1) (2025-04-09) + + +### Bug Fixes + +* update error text for consistency ([#528](https://github.com/firebase/php-jwt/issues/528)) ([c11113a](https://github.com/firebase/php-jwt/commit/c11113afa13265e016a669e75494b9203b8a7775)) + +## [6.11.0](https://github.com/firebase/php-jwt/compare/v6.10.2...v6.11.0) (2025-01-23) + + +### Features + +* support octet typed JWK ([#587](https://github.com/firebase/php-jwt/issues/587)) ([7cb8a26](https://github.com/firebase/php-jwt/commit/7cb8a265fa81edf2fa6ef8098f5bc5ae573c33ad)) + + +### Bug Fixes + +* refactor constructor Key to use PHP 8.0 syntax ([#577](https://github.com/firebase/php-jwt/issues/577)) ([29fa2ce](https://github.com/firebase/php-jwt/commit/29fa2ce9e0582cd397711eec1e80c05ce20fabca)) + +## [6.10.2](https://github.com/firebase/php-jwt/compare/v6.10.1...v6.10.2) (2024-11-24) + + +### Bug Fixes + +* Mitigate PHP8.4 deprecation warnings ([#570](https://github.com/firebase/php-jwt/issues/570)) ([76808fa](https://github.com/firebase/php-jwt/commit/76808fa227f3811aa5cdb3bf81233714b799a5b5)) +* support php 8.4 ([#583](https://github.com/firebase/php-jwt/issues/583)) ([e3d68b0](https://github.com/firebase/php-jwt/commit/e3d68b044421339443c74199edd020e03fb1887e)) + +## [6.10.1](https://github.com/firebase/php-jwt/compare/v6.10.0...v6.10.1) (2024-05-18) + + +### Bug Fixes + +* ensure ratelimit expiry is set every time ([#556](https://github.com/firebase/php-jwt/issues/556)) ([09cb208](https://github.com/firebase/php-jwt/commit/09cb2081c2c3bc0f61e2f2a5fbea5741f7498648)) +* ratelimit cache expiration ([#550](https://github.com/firebase/php-jwt/issues/550)) ([dda7250](https://github.com/firebase/php-jwt/commit/dda725033585ece30ff8cae8937320d7e9f18bae)) + +## [6.10.0](https://github.com/firebase/php-jwt/compare/v6.9.0...v6.10.0) (2023-11-28) + + +### Features + +* allow typ header override ([#546](https://github.com/firebase/php-jwt/issues/546)) ([79cb30b](https://github.com/firebase/php-jwt/commit/79cb30b729a22931b2fbd6b53f20629a83031ba9)) + +## [6.9.0](https://github.com/firebase/php-jwt/compare/v6.8.1...v6.9.0) (2023-10-04) + + +### Features + +* add payload to jwt exception ([#521](https://github.com/firebase/php-jwt/issues/521)) ([175edf9](https://github.com/firebase/php-jwt/commit/175edf958bb61922ec135b2333acf5622f2238a2)) + +## [6.8.1](https://github.com/firebase/php-jwt/compare/v6.8.0...v6.8.1) (2023-07-14) + + +### Bug Fixes + +* accept float claims but round down to ignore them ([#492](https://github.com/firebase/php-jwt/issues/492)) ([3936842](https://github.com/firebase/php-jwt/commit/39368423beeaacb3002afa7dcb75baebf204fe7e)) +* different BeforeValidException messages for nbf and iat ([#526](https://github.com/firebase/php-jwt/issues/526)) ([0a53cf2](https://github.com/firebase/php-jwt/commit/0a53cf2986e45c2bcbf1a269f313ebf56a154ee4)) + +## [6.8.0](https://github.com/firebase/php-jwt/compare/v6.7.0...v6.8.0) (2023-06-14) + + +### Features + +* add support for P-384 curve ([#515](https://github.com/firebase/php-jwt/issues/515)) ([5de4323](https://github.com/firebase/php-jwt/commit/5de4323f4baf4d70bca8663bd87682a69c656c3d)) + + +### Bug Fixes + +* handle invalid http responses ([#508](https://github.com/firebase/php-jwt/issues/508)) ([91c39c7](https://github.com/firebase/php-jwt/commit/91c39c72b22fc3e1191e574089552c1f2041c718)) + +## [6.7.0](https://github.com/firebase/php-jwt/compare/v6.6.0...v6.7.0) (2023-06-14) + + +### Features + +* add ed25519 support to JWK (public keys) ([#452](https://github.com/firebase/php-jwt/issues/452)) ([e53979a](https://github.com/firebase/php-jwt/commit/e53979abae927de916a75b9d239cfda8ce32be2a)) + +## [6.6.0](https://github.com/firebase/php-jwt/compare/v6.5.0...v6.6.0) (2023-06-13) + + +### Features + +* allow get headers when decoding token ([#442](https://github.com/firebase/php-jwt/issues/442)) ([fb85f47](https://github.com/firebase/php-jwt/commit/fb85f47cfaeffdd94faf8defdf07164abcdad6c3)) + + +### Bug Fixes + +* only check iat if nbf is not used ([#493](https://github.com/firebase/php-jwt/issues/493)) ([398ccd2](https://github.com/firebase/php-jwt/commit/398ccd25ea12fa84b9e4f1085d5ff448c21ec797)) + +## [6.5.0](https://github.com/firebase/php-jwt/compare/v6.4.0...v6.5.0) (2023-05-12) + + +### Bug Fixes + +* allow KID of '0' ([#505](https://github.com/firebase/php-jwt/issues/505)) ([9dc46a9](https://github.com/firebase/php-jwt/commit/9dc46a9c3e5801294249cfd2554c5363c9f9326a)) + + +### Miscellaneous Chores + +* drop support for PHP 7.3 ([#495](https://github.com/firebase/php-jwt/issues/495)) + +## [6.4.0](https://github.com/firebase/php-jwt/compare/v6.3.2...v6.4.0) (2023-02-08) + + +### Features + +* add support for W3C ES256K ([#462](https://github.com/firebase/php-jwt/issues/462)) ([213924f](https://github.com/firebase/php-jwt/commit/213924f51936291fbbca99158b11bd4ae56c2c95)) +* improve caching by only decoding jwks when necessary ([#486](https://github.com/firebase/php-jwt/issues/486)) ([78d3ed1](https://github.com/firebase/php-jwt/commit/78d3ed1073553f7d0bbffa6c2010009a0d483d5c)) + +## [6.3.2](https://github.com/firebase/php-jwt/compare/v6.3.1...v6.3.2) (2022-11-01) + + +### Bug Fixes + +* check kid before using as array index ([bad1b04](https://github.com/firebase/php-jwt/commit/bad1b040d0c736bbf86814c6b5ae614f517cf7bd)) + +## [6.3.1](https://github.com/firebase/php-jwt/compare/v6.3.0...v6.3.1) (2022-11-01) + + +### Bug Fixes + +* casing of GET for PSR compat ([#451](https://github.com/firebase/php-jwt/issues/451)) ([60b52b7](https://github.com/firebase/php-jwt/commit/60b52b71978790eafcf3b95cfbd83db0439e8d22)) +* string interpolation format for php 8.2 ([#446](https://github.com/firebase/php-jwt/issues/446)) ([2e07d8a](https://github.com/firebase/php-jwt/commit/2e07d8a1524d12b69b110ad649f17461d068b8f2)) + +## 6.3.0 / 2022-07-15 + + - Added ES256 support to JWK parsing ([#399](https://github.com/firebase/php-jwt/pull/399)) + - Fixed potential caching error in `CachedKeySet` by caching jwks as strings ([#435](https://github.com/firebase/php-jwt/pull/435)) + +## 6.2.0 / 2022-05-14 + + - Added `CachedKeySet` ([#397](https://github.com/firebase/php-jwt/pull/397)) + - Added `$defaultAlg` parameter to `JWT::parseKey` and `JWT::parseKeySet` ([#426](https://github.com/firebase/php-jwt/pull/426)). + +## 6.1.0 / 2022-03-23 + + - Drop support for PHP 5.3, 5.4, 5.5, 5.6, and 7.0 + - Add parameter typing and return types where possible + +## 6.0.0 / 2022-01-24 + + - **Backwards-Compatibility Breaking Changes**: See the [Release Notes](https://github.com/firebase/php-jwt/releases/tag/v6.0.0) for more information. + - New Key object to prevent key/algorithm type confusion (#365) + - Add JWK support (#273) + - Add ES256 support (#256) + - Add ES384 support (#324) + - Add Ed25519 support (#343) + +## 5.0.0 / 2017-06-26 +- Support RS384 and RS512. + See [#117](https://github.com/firebase/php-jwt/pull/117). Thanks [@joostfaassen](https://github.com/joostfaassen)! +- Add an example for RS256 openssl. + See [#125](https://github.com/firebase/php-jwt/pull/125). Thanks [@akeeman](https://github.com/akeeman)! +- Detect invalid Base64 encoding in signature. + See [#162](https://github.com/firebase/php-jwt/pull/162). Thanks [@psignoret](https://github.com/psignoret)! +- Update `JWT::verify` to handle OpenSSL errors. + See [#159](https://github.com/firebase/php-jwt/pull/159). Thanks [@bshaffer](https://github.com/bshaffer)! +- Add `array` type hinting to `decode` method + See [#101](https://github.com/firebase/php-jwt/pull/101). Thanks [@hywak](https://github.com/hywak)! +- Add all JSON error types. + See [#110](https://github.com/firebase/php-jwt/pull/110). Thanks [@gbalduzzi](https://github.com/gbalduzzi)! +- Bugfix 'kid' not in given key list. + See [#129](https://github.com/firebase/php-jwt/pull/129). Thanks [@stampycode](https://github.com/stampycode)! +- Miscellaneous cleanup, documentation and test fixes. + See [#107](https://github.com/firebase/php-jwt/pull/107), [#115](https://github.com/firebase/php-jwt/pull/115), + [#160](https://github.com/firebase/php-jwt/pull/160), [#161](https://github.com/firebase/php-jwt/pull/161), and + [#165](https://github.com/firebase/php-jwt/pull/165). Thanks [@akeeman](https://github.com/akeeman), + [@chinedufn](https://github.com/chinedufn), and [@bshaffer](https://github.com/bshaffer)! + +## 4.0.0 / 2016-07-17 +- Add support for late static binding. See [#88](https://github.com/firebase/php-jwt/pull/88) for details. Thanks to [@chappy84](https://github.com/chappy84)! +- Use static `$timestamp` instead of `time()` to improve unit testing. See [#93](https://github.com/firebase/php-jwt/pull/93) for details. Thanks to [@josephmcdermott](https://github.com/josephmcdermott)! +- Fixes to exceptions classes. See [#81](https://github.com/firebase/php-jwt/pull/81) for details. Thanks to [@Maks3w](https://github.com/Maks3w)! +- Fixes to PHPDoc. See [#76](https://github.com/firebase/php-jwt/pull/76) for details. Thanks to [@akeeman](https://github.com/akeeman)! + +## 3.0.0 / 2015-07-22 +- Minimum PHP version updated from `5.2.0` to `5.3.0`. +- Add `\Firebase\JWT` namespace. See +[#59](https://github.com/firebase/php-jwt/pull/59) for details. Thanks to +[@Dashron](https://github.com/Dashron)! +- Require a non-empty key to decode and verify a JWT. See +[#60](https://github.com/firebase/php-jwt/pull/60) for details. Thanks to +[@sjones608](https://github.com/sjones608)! +- Cleaner documentation blocks in the code. See +[#62](https://github.com/firebase/php-jwt/pull/62) for details. Thanks to +[@johanderuijter](https://github.com/johanderuijter)! + +## 2.2.0 / 2015-06-22 +- Add support for adding custom, optional JWT headers to `JWT::encode()`. See +[#53](https://github.com/firebase/php-jwt/pull/53/files) for details. Thanks to +[@mcocaro](https://github.com/mcocaro)! + +## 2.1.0 / 2015-05-20 +- Add support for adding a leeway to `JWT:decode()` that accounts for clock skew +between signing and verifying entities. Thanks to [@lcabral](https://github.com/lcabral)! +- Add support for passing an object implementing the `ArrayAccess` interface for +`$keys` argument in `JWT::decode()`. Thanks to [@aztech-dev](https://github.com/aztech-dev)! + +## 2.0.0 / 2015-04-01 +- **Note**: It is strongly recommended that you update to > v2.0.0 to address + known security vulnerabilities in prior versions when both symmetric and + asymmetric keys are used together. +- Update signature for `JWT::decode(...)` to require an array of supported + algorithms to use when verifying token signatures. diff --git a/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/LICENSE b/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/LICENSE new file mode 100644 index 0000000..11c0146 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/LICENSE @@ -0,0 +1,30 @@ +Copyright (c) 2011, Neuman Vong + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * Neither the name of the copyright holder nor the names of other + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/README.md b/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/README.md new file mode 100644 index 0000000..e45ccb8 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/README.md @@ -0,0 +1,425 @@ +![Build Status](https://github.com/firebase/php-jwt/actions/workflows/tests.yml/badge.svg) +[![Latest Stable Version](https://poser.pugx.org/firebase/php-jwt/v/stable)](https://packagist.org/packages/firebase/php-jwt) +[![Total Downloads](https://poser.pugx.org/firebase/php-jwt/downloads)](https://packagist.org/packages/firebase/php-jwt) +[![License](https://poser.pugx.org/firebase/php-jwt/license)](https://packagist.org/packages/firebase/php-jwt) + +PHP-JWT +======= +A simple library to encode and decode JSON Web Tokens (JWT) in PHP, conforming to [RFC 7519](https://tools.ietf.org/html/rfc7519). + +Installation +------------ + +Use composer to manage your dependencies and download PHP-JWT: + +```bash +composer require firebase/php-jwt +``` + +Optionally, install the `paragonie/sodium_compat` package from composer if your +php env does not have libsodium installed: + +```bash +composer require paragonie/sodium_compat +``` + +Example +------- +```php +use Firebase\JWT\JWT; +use Firebase\JWT\Key; + +$key = 'example_key'; +$payload = [ + 'iss' => 'http://example.org', + 'aud' => 'http://example.com', + 'iat' => 1356999524, + 'nbf' => 1357000000 +]; + +/** + * IMPORTANT: + * You must specify supported algorithms for your application. See + * https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40 + * for a list of spec-compliant algorithms. + */ +$jwt = JWT::encode($payload, $key, 'HS256'); +$decoded = JWT::decode($jwt, new Key($key, 'HS256')); +print_r($decoded); + +// Pass a stdClass in as the third parameter to get the decoded header values +$headers = new stdClass(); +$decoded = JWT::decode($jwt, new Key($key, 'HS256'), $headers); +print_r($headers); + +/* + NOTE: This will now be an object instead of an associative array. To get + an associative array, you will need to cast it as such: +*/ + +$decoded_array = (array) $decoded; + +/** + * You can add a leeway to account for when there is a clock skew times between + * the signing and verifying servers. It is recommended that this leeway should + * not be bigger than a few minutes. + * + * Source: http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html#nbfDef + */ +JWT::$leeway = 60; // $leeway in seconds +$decoded = JWT::decode($jwt, new Key($key, 'HS256')); +``` +Example encode/decode headers +------- +Decoding the JWT headers without verifying the JWT first is NOT recommended, and is not supported by +this library. This is because without verifying the JWT, the header values could have been tampered with. +Any value pulled from an unverified header should be treated as if it could be any string sent in from an +attacker. If this is something you still want to do in your application for whatever reason, it's possible to +decode the header values manually simply by calling `json_decode` and `base64_decode` on the JWT +header part: +```php +use Firebase\JWT\JWT; + +$key = 'example_key'; +$payload = [ + 'iss' => 'http://example.org', + 'aud' => 'http://example.com', + 'iat' => 1356999524, + 'nbf' => 1357000000 +]; + +$headers = [ + 'x-forwarded-for' => 'www.google.com' +]; + +// Encode headers in the JWT string +$jwt = JWT::encode($payload, $key, 'HS256', null, $headers); + +// Decode headers from the JWT string WITHOUT validation +// **IMPORTANT**: This operation is vulnerable to attacks, as the JWT has not yet been verified. +// These headers could be any value sent by an attacker. +list($headersB64, $payloadB64, $sig) = explode('.', $jwt); +$decoded = json_decode(base64_decode($headersB64), true); + +print_r($decoded); +``` +Example with RS256 (openssl) +---------------------------- +```php +use Firebase\JWT\JWT; +use Firebase\JWT\Key; + +$privateKey = <<<EOD +-----BEGIN RSA PRIVATE KEY----- +MIIEowIBAAKCAQEAuzWHNM5f+amCjQztc5QTfJfzCC5J4nuW+L/aOxZ4f8J3Frew +M2c/dufrnmedsApb0By7WhaHlcqCh/ScAPyJhzkPYLae7bTVro3hok0zDITR8F6S +JGL42JAEUk+ILkPI+DONM0+3vzk6Kvfe548tu4czCuqU8BGVOlnp6IqBHhAswNMM +78pos/2z0CjPM4tbeXqSTTbNkXRboxjU29vSopcT51koWOgiTf3C7nJUoMWZHZI5 +HqnIhPAG9yv8HAgNk6CMk2CadVHDo4IxjxTzTTqo1SCSH2pooJl9O8at6kkRYsrZ +WwsKlOFE2LUce7ObnXsYihStBUDoeBQlGG/BwQIDAQABAoIBAFtGaOqNKGwggn9k +6yzr6GhZ6Wt2rh1Xpq8XUz514UBhPxD7dFRLpbzCrLVpzY80LbmVGJ9+1pJozyWc +VKeCeUdNwbqkr240Oe7GTFmGjDoxU+5/HX/SJYPpC8JZ9oqgEA87iz+WQX9hVoP2 +oF6EB4ckDvXmk8FMwVZW2l2/kd5mrEVbDaXKxhvUDf52iVD+sGIlTif7mBgR99/b +c3qiCnxCMmfYUnT2eh7Vv2LhCR/G9S6C3R4lA71rEyiU3KgsGfg0d82/XWXbegJW +h3QbWNtQLxTuIvLq5aAryV3PfaHlPgdgK0ft6ocU2de2FagFka3nfVEyC7IUsNTK +bq6nhAECgYEA7d/0DPOIaItl/8BWKyCuAHMss47j0wlGbBSHdJIiS55akMvnAG0M +39y22Qqfzh1at9kBFeYeFIIU82ZLF3xOcE3z6pJZ4Dyvx4BYdXH77odo9uVK9s1l +3T3BlMcqd1hvZLMS7dviyH79jZo4CXSHiKzc7pQ2YfK5eKxKqONeXuECgYEAyXlG +vonaus/YTb1IBei9HwaccnQ/1HRn6MvfDjb7JJDIBhNClGPt6xRlzBbSZ73c2QEC +6Fu9h36K/HZ2qcLd2bXiNyhIV7b6tVKk+0Psoj0dL9EbhsD1OsmE1nTPyAc9XZbb +OPYxy+dpBCUA8/1U9+uiFoCa7mIbWcSQ+39gHuECgYAz82pQfct30aH4JiBrkNqP +nJfRq05UY70uk5k1u0ikLTRoVS/hJu/d4E1Kv4hBMqYCavFSwAwnvHUo51lVCr/y +xQOVYlsgnwBg2MX4+GjmIkqpSVCC8D7j/73MaWb746OIYZervQ8dbKahi2HbpsiG +8AHcVSA/agxZr38qvWV54QKBgCD5TlDE8x18AuTGQ9FjxAAd7uD0kbXNz2vUYg9L +hFL5tyL3aAAtUrUUw4xhd9IuysRhW/53dU+FsG2dXdJu6CxHjlyEpUJl2iZu/j15 +YnMzGWHIEX8+eWRDsw/+Ujtko/B7TinGcWPz3cYl4EAOiCeDUyXnqnO1btCEUU44 +DJ1BAoGBAJuPD27ErTSVtId90+M4zFPNibFP50KprVdc8CR37BE7r8vuGgNYXmnI +RLnGP9p3pVgFCktORuYS2J/6t84I3+A17nEoB4xvhTLeAinAW/uTQOUmNicOP4Ek +2MsLL2kHgL8bLTmvXV4FX+PXphrDKg1XxzOYn0otuoqdAQrkK4og +-----END RSA PRIVATE KEY----- +EOD; + +$publicKey = <<<EOD +-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzWHNM5f+amCjQztc5QT +fJfzCC5J4nuW+L/aOxZ4f8J3FrewM2c/dufrnmedsApb0By7WhaHlcqCh/ScAPyJ +hzkPYLae7bTVro3hok0zDITR8F6SJGL42JAEUk+ILkPI+DONM0+3vzk6Kvfe548t +u4czCuqU8BGVOlnp6IqBHhAswNMM78pos/2z0CjPM4tbeXqSTTbNkXRboxjU29vS +opcT51koWOgiTf3C7nJUoMWZHZI5HqnIhPAG9yv8HAgNk6CMk2CadVHDo4IxjxTz +TTqo1SCSH2pooJl9O8at6kkRYsrZWwsKlOFE2LUce7ObnXsYihStBUDoeBQlGG/B +wQIDAQAB +-----END PUBLIC KEY----- +EOD; + +$payload = [ + 'iss' => 'example.org', + 'aud' => 'example.com', + 'iat' => 1356999524, + 'nbf' => 1357000000 +]; + +$jwt = JWT::encode($payload, $privateKey, 'RS256'); +echo "Encode:\n" . print_r($jwt, true) . "\n"; + +$decoded = JWT::decode($jwt, new Key($publicKey, 'RS256')); + +/* + NOTE: This will now be an object instead of an associative array. To get + an associative array, you will need to cast it as such: +*/ + +$decoded_array = (array) $decoded; +echo "Decode:\n" . print_r($decoded_array, true) . "\n"; +``` + +Example with a passphrase +------------------------- + +```php +use Firebase\JWT\JWT; +use Firebase\JWT\Key; + +// Your passphrase +$passphrase = '[YOUR_PASSPHRASE]'; + +// Your private key file with passphrase +// Can be generated with "ssh-keygen -t rsa -m pem" +$privateKeyFile = '/path/to/key-with-passphrase.pem'; + +// Create a private key of type "resource" +$privateKey = openssl_pkey_get_private( + file_get_contents($privateKeyFile), + $passphrase +); + +$payload = [ + 'iss' => 'example.org', + 'aud' => 'example.com', + 'iat' => 1356999524, + 'nbf' => 1357000000 +]; + +$jwt = JWT::encode($payload, $privateKey, 'RS256'); +echo "Encode:\n" . print_r($jwt, true) . "\n"; + +// Get public key from the private key, or pull from from a file. +$publicKey = openssl_pkey_get_details($privateKey)['key']; + +$decoded = JWT::decode($jwt, new Key($publicKey, 'RS256')); +echo "Decode:\n" . print_r((array) $decoded, true) . "\n"; +``` + +Example with EdDSA (libsodium and Ed25519 signature) +---------------------------- +```php +use Firebase\JWT\JWT; +use Firebase\JWT\Key; + +// Public and private keys are expected to be Base64 encoded. The last +// non-empty line is used so that keys can be generated with +// sodium_crypto_sign_keypair(). The secret keys generated by other tools may +// need to be adjusted to match the input expected by libsodium. + +$keyPair = sodium_crypto_sign_keypair(); + +$privateKey = base64_encode(sodium_crypto_sign_secretkey($keyPair)); + +$publicKey = base64_encode(sodium_crypto_sign_publickey($keyPair)); + +$payload = [ + 'iss' => 'example.org', + 'aud' => 'example.com', + 'iat' => 1356999524, + 'nbf' => 1357000000 +]; + +$jwt = JWT::encode($payload, $privateKey, 'EdDSA'); +echo "Encode:\n" . print_r($jwt, true) . "\n"; + +$decoded = JWT::decode($jwt, new Key($publicKey, 'EdDSA')); +echo "Decode:\n" . print_r((array) $decoded, true) . "\n"; +```` + +Example with multiple keys +-------------------------- +```php +use Firebase\JWT\JWT; +use Firebase\JWT\Key; + +// Example RSA keys from previous example +// $privateKey1 = '...'; +// $publicKey1 = '...'; + +// Example EdDSA keys from previous example +// $privateKey2 = '...'; +// $publicKey2 = '...'; + +$payload = [ + 'iss' => 'example.org', + 'aud' => 'example.com', + 'iat' => 1356999524, + 'nbf' => 1357000000 +]; + +$jwt1 = JWT::encode($payload, $privateKey1, 'RS256', 'kid1'); +$jwt2 = JWT::encode($payload, $privateKey2, 'EdDSA', 'kid2'); +echo "Encode 1:\n" . print_r($jwt1, true) . "\n"; +echo "Encode 2:\n" . print_r($jwt2, true) . "\n"; + +$keys = [ + 'kid1' => new Key($publicKey1, 'RS256'), + 'kid2' => new Key($publicKey2, 'EdDSA'), +]; + +$decoded1 = JWT::decode($jwt1, $keys); +$decoded2 = JWT::decode($jwt2, $keys); + +echo "Decode 1:\n" . print_r((array) $decoded1, true) . "\n"; +echo "Decode 2:\n" . print_r((array) $decoded2, true) . "\n"; +``` + +Using JWKs +---------- + +```php +use Firebase\JWT\JWK; +use Firebase\JWT\JWT; + +// Set of keys. The "keys" key is required. For example, the JSON response to +// this endpoint: https://www.gstatic.com/iap/verify/public_key-jwk +$jwks = ['keys' => []]; + +// JWK::parseKeySet($jwks) returns an associative array of **kid** to Firebase\JWT\Key +// objects. Pass this as the second parameter to JWT::decode. +JWT::decode($jwt, JWK::parseKeySet($jwks)); +``` + +Using Cached Key Sets +--------------------- + +The `CachedKeySet` class can be used to fetch and cache JWKS (JSON Web Key Sets) from a public URI. +This has the following advantages: + +1. The results are cached for performance. +2. If an unrecognized key is requested, the cache is refreshed, to accomodate for key rotation. +3. If rate limiting is enabled, the JWKS URI will not make more than 10 requests a second. + +```php +use Firebase\JWT\CachedKeySet; +use Firebase\JWT\JWT; + +// The URI for the JWKS you wish to cache the results from +$jwksUri = 'https://www.gstatic.com/iap/verify/public_key-jwk'; + +// Create an HTTP client (can be any PSR-7 compatible HTTP client) +$httpClient = new GuzzleHttp\Client(); + +// Create an HTTP request factory (can be any PSR-17 compatible HTTP request factory) +$httpFactory = new GuzzleHttp\Psr\HttpFactory(); + +// Create a cache item pool (can be any PSR-6 compatible cache item pool) +$cacheItemPool = Phpfastcache\CacheManager::getInstance('files'); + +$keySet = new CachedKeySet( + $jwksUri, + $httpClient, + $httpFactory, + $cacheItemPool, + null, // $expiresAfter int seconds to set the JWKS to expire + true // $rateLimit true to enable rate limit of 10 RPS on lookup of invalid keys +); + +$jwt = 'eyJhbGci...'; // Some JWT signed by a key from the $jwkUri above +$decoded = JWT::decode($jwt, $keySet); +``` + +Miscellaneous +------------- + +#### Exception Handling + +When a call to `JWT::decode` is invalid, it will throw one of the following exceptions: + +```php +use Firebase\JWT\JWT; +use Firebase\JWT\SignatureInvalidException; +use Firebase\JWT\BeforeValidException; +use Firebase\JWT\ExpiredException; +use DomainException; +use InvalidArgumentException; +use UnexpectedValueException; + +try { + $decoded = JWT::decode($jwt, $keys); +} catch (InvalidArgumentException $e) { + // provided key/key-array is empty or malformed. +} catch (DomainException $e) { + // provided algorithm is unsupported OR + // provided key is invalid OR + // unknown error thrown in openSSL or libsodium OR + // libsodium is required but not available. +} catch (SignatureInvalidException $e) { + // provided JWT signature verification failed. +} catch (BeforeValidException $e) { + // provided JWT is trying to be used before "nbf" claim OR + // provided JWT is trying to be used before "iat" claim. +} catch (ExpiredException $e) { + // provided JWT is trying to be used after "exp" claim. +} catch (UnexpectedValueException $e) { + // provided JWT is malformed OR + // provided JWT is missing an algorithm / using an unsupported algorithm OR + // provided JWT algorithm does not match provided key OR + // provided key ID in key/key-array is empty or invalid. +} +``` + +All exceptions in the `Firebase\JWT` namespace extend `UnexpectedValueException`, and can be simplified +like this: + +```php +use Firebase\JWT\JWT; +use UnexpectedValueException; +try { + $decoded = JWT::decode($jwt, $keys); +} catch (LogicException $e) { + // errors having to do with environmental setup or malformed JWT Keys +} catch (UnexpectedValueException $e) { + // errors having to do with JWT signature and claims +} +``` + +#### Casting to array + +The return value of `JWT::decode` is the generic PHP object `stdClass`. If you'd like to handle with arrays +instead, you can do the following: + +```php +// return type is stdClass +$decoded = JWT::decode($jwt, $keys); + +// cast to array +$decoded = json_decode(json_encode($decoded), true); +``` + +Tests +----- +Run the tests using phpunit: + +```bash +$ pear install PHPUnit +$ phpunit --configuration phpunit.xml.dist +PHPUnit 3.7.10 by Sebastian Bergmann. +..... +Time: 0 seconds, Memory: 2.50Mb +OK (5 tests, 5 assertions) +``` + +New Lines in private keys +----- + +If your private key contains `\n` characters, be sure to wrap it in double quotes `""` +and not single quotes `''` in order to properly interpret the escaped characters. + +License +------- +[3-Clause BSD](http://opensource.org/licenses/BSD-3-Clause). diff --git a/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/composer.json b/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/composer.json new file mode 100644 index 0000000..816cfd0 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/composer.json @@ -0,0 +1,42 @@ +{ + "name": "firebase/php-jwt", + "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.", + "homepage": "https://github.com/firebase/php-jwt", + "keywords": [ + "php", + "jwt" + ], + "authors": [ + { + "name": "Neuman Vong", + "email": "neuman+pear@twilio.com", + "role": "Developer" + }, + { + "name": "Anant Narayanan", + "email": "anant@php.net", + "role": "Developer" + } + ], + "license": "BSD-3-Clause", + "require": { + "php": "^8.0" + }, + "suggest": { + "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present", + "ext-sodium": "Support EdDSA (Ed25519) signatures" + }, + "autoload": { + "psr-4": { + "Firebase\\JWT\\": "src" + } + }, + "require-dev": { + "guzzlehttp/guzzle": "^7.4", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.5", + "psr/cache": "^2.0||^3.0", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0" + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/src/BeforeValidException.php b/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/src/BeforeValidException.php new file mode 100644 index 0000000..595164b --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/src/BeforeValidException.php @@ -0,0 +1,18 @@ +<?php + +namespace Firebase\JWT; + +class BeforeValidException extends \UnexpectedValueException implements JWTExceptionWithPayloadInterface +{ + private object $payload; + + public function setPayload(object $payload): void + { + $this->payload = $payload; + } + + public function getPayload(): object + { + return $this->payload; + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/src/CachedKeySet.php b/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/src/CachedKeySet.php new file mode 100644 index 0000000..8e8e8d6 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/src/CachedKeySet.php @@ -0,0 +1,274 @@ +<?php + +namespace Firebase\JWT; + +use ArrayAccess; +use InvalidArgumentException; +use LogicException; +use OutOfBoundsException; +use Psr\Cache\CacheItemInterface; +use Psr\Cache\CacheItemPoolInterface; +use Psr\Http\Client\ClientInterface; +use Psr\Http\Message\RequestFactoryInterface; +use RuntimeException; +use UnexpectedValueException; + +/** + * @implements ArrayAccess<string, Key> + */ +class CachedKeySet implements ArrayAccess +{ + /** + * @var string + */ + private $jwksUri; + /** + * @var ClientInterface + */ + private $httpClient; + /** + * @var RequestFactoryInterface + */ + private $httpFactory; + /** + * @var CacheItemPoolInterface + */ + private $cache; + /** + * @var ?int + */ + private $expiresAfter; + /** + * @var ?CacheItemInterface + */ + private $cacheItem; + /** + * @var array<string, array<mixed>> + */ + private $keySet; + /** + * @var string + */ + private $cacheKey; + /** + * @var string + */ + private $cacheKeyPrefix = 'jwks'; + /** + * @var int + */ + private $maxKeyLength = 64; + /** + * @var bool + */ + private $rateLimit; + /** + * @var string + */ + private $rateLimitCacheKey; + /** + * @var int + */ + private $maxCallsPerMinute = 10; + /** + * @var string|null + */ + private $defaultAlg; + + public function __construct( + string $jwksUri, + ClientInterface $httpClient, + RequestFactoryInterface $httpFactory, + CacheItemPoolInterface $cache, + ?int $expiresAfter = null, + bool $rateLimit = false, + ?string $defaultAlg = null + ) { + $this->jwksUri = $jwksUri; + $this->httpClient = $httpClient; + $this->httpFactory = $httpFactory; + $this->cache = $cache; + $this->expiresAfter = $expiresAfter; + $this->rateLimit = $rateLimit; + $this->defaultAlg = $defaultAlg; + $this->setCacheKeys(); + } + + /** + * @param string $keyId + * @return Key + */ + public function offsetGet($keyId): Key + { + if (!$this->keyIdExists($keyId)) { + throw new OutOfBoundsException('Key ID not found'); + } + return JWK::parseKey($this->keySet[$keyId], $this->defaultAlg); + } + + /** + * @param string $keyId + * @return bool + */ + public function offsetExists($keyId): bool + { + return $this->keyIdExists($keyId); + } + + /** + * @param string $offset + * @param Key $value + */ + public function offsetSet($offset, $value): void + { + throw new LogicException('Method not implemented'); + } + + /** + * @param string $offset + */ + public function offsetUnset($offset): void + { + throw new LogicException('Method not implemented'); + } + + /** + * @return array<mixed> + */ + private function formatJwksForCache(string $jwks): array + { + $jwks = json_decode($jwks, true); + + if (!isset($jwks['keys'])) { + throw new UnexpectedValueException('"keys" member must exist in the JWK Set'); + } + + if (empty($jwks['keys'])) { + throw new InvalidArgumentException('JWK Set did not contain any keys'); + } + + $keys = []; + foreach ($jwks['keys'] as $k => $v) { + $kid = isset($v['kid']) ? $v['kid'] : $k; + $keys[(string) $kid] = $v; + } + + return $keys; + } + + private function keyIdExists(string $keyId): bool + { + if (null === $this->keySet) { + $item = $this->getCacheItem(); + // Try to load keys from cache + if ($item->isHit()) { + // item found! retrieve it + $this->keySet = $item->get(); + // If the cached item is a string, the JWKS response was cached (previous behavior). + // Parse this into expected format array<kid, jwk> instead. + if (\is_string($this->keySet)) { + $this->keySet = $this->formatJwksForCache($this->keySet); + } + } + } + + if (!isset($this->keySet[$keyId])) { + if ($this->rateLimitExceeded()) { + return false; + } + $request = $this->httpFactory->createRequest('GET', $this->jwksUri); + $jwksResponse = $this->httpClient->sendRequest($request); + if ($jwksResponse->getStatusCode() !== 200) { + throw new UnexpectedValueException( + \sprintf('HTTP Error: %d %s for URI "%s"', + $jwksResponse->getStatusCode(), + $jwksResponse->getReasonPhrase(), + $this->jwksUri, + ), + $jwksResponse->getStatusCode() + ); + } + $this->keySet = $this->formatJwksForCache((string) $jwksResponse->getBody()); + + if (!isset($this->keySet[$keyId])) { + return false; + } + + $item = $this->getCacheItem(); + $item->set($this->keySet); + if ($this->expiresAfter) { + $item->expiresAfter($this->expiresAfter); + } + $this->cache->save($item); + } + + return true; + } + + private function rateLimitExceeded(): bool + { + if (!$this->rateLimit) { + return false; + } + + $cacheItem = $this->cache->getItem($this->rateLimitCacheKey); + + $cacheItemData = []; + if ($cacheItem->isHit() && \is_array($data = $cacheItem->get())) { + $cacheItemData = $data; + } + + $callsPerMinute = $cacheItemData['callsPerMinute'] ?? 0; + $expiry = $cacheItemData['expiry'] ?? new \DateTime('+60 seconds', new \DateTimeZone('UTC')); + + if (++$callsPerMinute > $this->maxCallsPerMinute) { + return true; + } + + $cacheItem->set(['expiry' => $expiry, 'callsPerMinute' => $callsPerMinute]); + $cacheItem->expiresAt($expiry); + $this->cache->save($cacheItem); + return false; + } + + private function getCacheItem(): CacheItemInterface + { + if (\is_null($this->cacheItem)) { + $this->cacheItem = $this->cache->getItem($this->cacheKey); + } + + return $this->cacheItem; + } + + private function setCacheKeys(): void + { + if (empty($this->jwksUri)) { + throw new RuntimeException('JWKS URI is empty'); + } + + // ensure we do not have illegal characters + $key = preg_replace('|[^a-zA-Z0-9_\.!]|', '', $this->jwksUri); + + // add prefix + $key = $this->cacheKeyPrefix . $key; + + // Hash keys if they exceed $maxKeyLength of 64 + if (\strlen($key) > $this->maxKeyLength) { + $key = substr(hash('sha256', $key), 0, $this->maxKeyLength); + } + + $this->cacheKey = $key; + + if ($this->rateLimit) { + // add prefix + $rateLimitKey = $this->cacheKeyPrefix . 'ratelimit' . $key; + + // Hash keys if they exceed $maxKeyLength of 64 + if (\strlen($rateLimitKey) > $this->maxKeyLength) { + $rateLimitKey = substr(hash('sha256', $rateLimitKey), 0, $this->maxKeyLength); + } + + $this->rateLimitCacheKey = $rateLimitKey; + } + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/src/ExpiredException.php b/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/src/ExpiredException.php new file mode 100644 index 0000000..12fef09 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/src/ExpiredException.php @@ -0,0 +1,18 @@ +<?php + +namespace Firebase\JWT; + +class ExpiredException extends \UnexpectedValueException implements JWTExceptionWithPayloadInterface +{ + private object $payload; + + public function setPayload(object $payload): void + { + $this->payload = $payload; + } + + public function getPayload(): object + { + return $this->payload; + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/src/JWK.php b/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/src/JWK.php new file mode 100644 index 0000000..405dcc4 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/src/JWK.php @@ -0,0 +1,355 @@ +<?php + +namespace Firebase\JWT; + +use DomainException; +use InvalidArgumentException; +use UnexpectedValueException; + +/** + * JSON Web Key implementation, based on this spec: + * https://tools.ietf.org/html/draft-ietf-jose-json-web-key-41 + * + * PHP version 5 + * + * @category Authentication + * @package Authentication_JWT + * @author Bui Sy Nguyen <nguyenbs@gmail.com> + * @license http://opensource.org/licenses/BSD-3-Clause 3-clause BSD + * @link https://github.com/firebase/php-jwt + */ +class JWK +{ + private const OID = '1.2.840.10045.2.1'; + private const ASN1_OBJECT_IDENTIFIER = 0x06; + private const ASN1_SEQUENCE = 0x10; // also defined in JWT + private const ASN1_BIT_STRING = 0x03; + private const EC_CURVES = [ + 'P-256' => '1.2.840.10045.3.1.7', // Len: 64 + 'secp256k1' => '1.3.132.0.10', // Len: 64 + 'P-384' => '1.3.132.0.34', // Len: 96 + // 'P-521' => '1.3.132.0.35', // Len: 132 (not supported) + ]; + + // For keys with "kty" equal to "OKP" (Octet Key Pair), the "crv" parameter must contain the key subtype. + // This library supports the following subtypes: + private const OKP_SUBTYPES = [ + 'Ed25519' => true, // RFC 8037 + ]; + + /** + * Parse a set of JWK keys + * + * @param array<mixed> $jwks The JSON Web Key Set as an associative array + * @param string $defaultAlg The algorithm for the Key object if "alg" is not set in the + * JSON Web Key Set + * + * @return array<string, Key> An associative array of key IDs (kid) to Key objects + * + * @throws InvalidArgumentException Provided JWK Set is empty + * @throws UnexpectedValueException Provided JWK Set was invalid + * @throws DomainException OpenSSL failure + * + * @uses parseKey + */ + public static function parseKeySet(array $jwks, ?string $defaultAlg = null): array + { + $keys = []; + + if (!isset($jwks['keys'])) { + throw new UnexpectedValueException('"keys" member must exist in the JWK Set'); + } + + if (empty($jwks['keys'])) { + throw new InvalidArgumentException('JWK Set did not contain any keys'); + } + + foreach ($jwks['keys'] as $k => $v) { + $kid = isset($v['kid']) ? $v['kid'] : $k; + if ($key = self::parseKey($v, $defaultAlg)) { + $keys[(string) $kid] = $key; + } + } + + if (0 === \count($keys)) { + throw new UnexpectedValueException('No supported algorithms found in JWK Set'); + } + + return $keys; + } + + /** + * Parse a JWK key + * + * @param array<mixed> $jwk An individual JWK + * @param string $defaultAlg The algorithm for the Key object if "alg" is not set in the + * JSON Web Key Set + * + * @return Key The key object for the JWK + * + * @throws InvalidArgumentException Provided JWK is empty + * @throws UnexpectedValueException Provided JWK was invalid + * @throws DomainException OpenSSL failure + * + * @uses createPemFromModulusAndExponent + */ + public static function parseKey(array $jwk, ?string $defaultAlg = null): ?Key + { + if (empty($jwk)) { + throw new InvalidArgumentException('JWK must not be empty'); + } + + if (!isset($jwk['kty'])) { + throw new UnexpectedValueException('JWK must contain a "kty" parameter'); + } + + if (!isset($jwk['alg'])) { + if (\is_null($defaultAlg)) { + // The "alg" parameter is optional in a KTY, but an algorithm is required + // for parsing in this library. Use the $defaultAlg parameter when parsing the + // key set in order to prevent this error. + // @see https://datatracker.ietf.org/doc/html/rfc7517#section-4.4 + throw new UnexpectedValueException('JWK must contain an "alg" parameter'); + } + $jwk['alg'] = $defaultAlg; + } + + switch ($jwk['kty']) { + case 'RSA': + if (!empty($jwk['d'])) { + throw new UnexpectedValueException('RSA private keys are not supported'); + } + if (!isset($jwk['n']) || !isset($jwk['e'])) { + throw new UnexpectedValueException('RSA keys must contain values for both "n" and "e"'); + } + + $pem = self::createPemFromModulusAndExponent($jwk['n'], $jwk['e']); + $publicKey = \openssl_pkey_get_public($pem); + if (false === $publicKey) { + throw new DomainException( + 'OpenSSL error: ' . \openssl_error_string() + ); + } + return new Key($publicKey, $jwk['alg']); + case 'EC': + if (isset($jwk['d'])) { + // The key is actually a private key + throw new UnexpectedValueException('Key data must be for a public key'); + } + + if (empty($jwk['crv'])) { + throw new UnexpectedValueException('crv not set'); + } + + if (!isset(self::EC_CURVES[$jwk['crv']])) { + throw new DomainException('Unrecognised or unsupported EC curve'); + } + + if (empty($jwk['x']) || empty($jwk['y'])) { + throw new UnexpectedValueException('x and y not set'); + } + + $publicKey = self::createPemFromCrvAndXYCoordinates($jwk['crv'], $jwk['x'], $jwk['y']); + return new Key($publicKey, $jwk['alg']); + case 'OKP': + if (isset($jwk['d'])) { + // The key is actually a private key + throw new UnexpectedValueException('Key data must be for a public key'); + } + + if (!isset($jwk['crv'])) { + throw new UnexpectedValueException('crv not set'); + } + + if (empty(self::OKP_SUBTYPES[$jwk['crv']])) { + throw new DomainException('Unrecognised or unsupported OKP key subtype'); + } + + if (empty($jwk['x'])) { + throw new UnexpectedValueException('x not set'); + } + + // This library works internally with EdDSA keys (Ed25519) encoded in standard base64. + $publicKey = JWT::convertBase64urlToBase64($jwk['x']); + return new Key($publicKey, $jwk['alg']); + case 'oct': + if (!isset($jwk['k'])) { + throw new UnexpectedValueException('k not set'); + } + + return new Key(JWT::urlsafeB64Decode($jwk['k']), $jwk['alg']); + default: + break; + } + + return null; + } + + /** + * Converts the EC JWK values to pem format. + * + * @param string $crv The EC curve (only P-256 & P-384 is supported) + * @param string $x The EC x-coordinate + * @param string $y The EC y-coordinate + * + * @return string + */ + private static function createPemFromCrvAndXYCoordinates(string $crv, string $x, string $y): string + { + $pem = + self::encodeDER( + self::ASN1_SEQUENCE, + self::encodeDER( + self::ASN1_SEQUENCE, + self::encodeDER( + self::ASN1_OBJECT_IDENTIFIER, + self::encodeOID(self::OID) + ) + . self::encodeDER( + self::ASN1_OBJECT_IDENTIFIER, + self::encodeOID(self::EC_CURVES[$crv]) + ) + ) . + self::encodeDER( + self::ASN1_BIT_STRING, + \chr(0x00) . \chr(0x04) + . JWT::urlsafeB64Decode($x) + . JWT::urlsafeB64Decode($y) + ) + ); + + return \sprintf( + "-----BEGIN PUBLIC KEY-----\n%s\n-----END PUBLIC KEY-----\n", + wordwrap(base64_encode($pem), 64, "\n", true) + ); + } + + /** + * Create a public key represented in PEM format from RSA modulus and exponent information + * + * @param string $n The RSA modulus encoded in Base64 + * @param string $e The RSA exponent encoded in Base64 + * + * @return string The RSA public key represented in PEM format + * + * @uses encodeLength + */ + private static function createPemFromModulusAndExponent( + string $n, + string $e + ): string { + $mod = JWT::urlsafeB64Decode($n); + $exp = JWT::urlsafeB64Decode($e); + + $modulus = \pack('Ca*a*', 2, self::encodeLength(\strlen($mod)), $mod); + $publicExponent = \pack('Ca*a*', 2, self::encodeLength(\strlen($exp)), $exp); + + $rsaPublicKey = \pack( + 'Ca*a*a*', + 48, + self::encodeLength(\strlen($modulus) + \strlen($publicExponent)), + $modulus, + $publicExponent + ); + + // sequence(oid(1.2.840.113549.1.1.1), null)) = rsaEncryption. + $rsaOID = \pack('H*', '300d06092a864886f70d0101010500'); // hex version of MA0GCSqGSIb3DQEBAQUA + $rsaPublicKey = \chr(0) . $rsaPublicKey; + $rsaPublicKey = \chr(3) . self::encodeLength(\strlen($rsaPublicKey)) . $rsaPublicKey; + + $rsaPublicKey = \pack( + 'Ca*a*', + 48, + self::encodeLength(\strlen($rsaOID . $rsaPublicKey)), + $rsaOID . $rsaPublicKey + ); + + return "-----BEGIN PUBLIC KEY-----\r\n" . + \chunk_split(\base64_encode($rsaPublicKey), 64) . + '-----END PUBLIC KEY-----'; + } + + /** + * DER-encode the length + * + * DER supports lengths up to (2**8)**127, however, we'll only support lengths up to (2**8)**4. See + * {@link http://itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf#p=13 X.690 paragraph 8.1.3} for more information. + * + * @param int $length + * @return string + */ + private static function encodeLength(int $length): string + { + if ($length <= 0x7F) { + return \chr($length); + } + + $temp = \ltrim(\pack('N', $length), \chr(0)); + + return \pack('Ca*', 0x80 | \strlen($temp), $temp); + } + + /** + * Encodes a value into a DER object. + * Also defined in Firebase\JWT\JWT + * + * @param int $type DER tag + * @param string $value the value to encode + * @return string the encoded object + */ + private static function encodeDER(int $type, string $value): string + { + $tag_header = 0; + if ($type === self::ASN1_SEQUENCE) { + $tag_header |= 0x20; + } + + // Type + $der = \chr($tag_header | $type); + + // Length + $der .= \chr(\strlen($value)); + + return $der . $value; + } + + /** + * Encodes a string into a DER-encoded OID. + * + * @param string $oid the OID string + * @return string the binary DER-encoded OID + */ + private static function encodeOID(string $oid): string + { + $octets = explode('.', $oid); + + // Get the first octet + $first = (int) array_shift($octets); + $second = (int) array_shift($octets); + $oid = \chr($first * 40 + $second); + + // Iterate over subsequent octets + foreach ($octets as $octet) { + if ($octet == 0) { + $oid .= \chr(0x00); + continue; + } + $bin = ''; + + while ($octet) { + $bin .= \chr(0x80 | ($octet & 0x7f)); + $octet >>= 7; + } + $bin[0] = $bin[0] & \chr(0x7f); + + // Convert to big endian if necessary + if (pack('V', 65534) == pack('L', 65534)) { + $oid .= strrev($bin); + } else { + $oid .= $bin; + } + } + + return $oid; + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/src/JWT.php b/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/src/JWT.php new file mode 100644 index 0000000..833a415 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/src/JWT.php @@ -0,0 +1,667 @@ +<?php + +namespace Firebase\JWT; + +use ArrayAccess; +use DateTime; +use DomainException; +use Exception; +use InvalidArgumentException; +use OpenSSLAsymmetricKey; +use OpenSSLCertificate; +use stdClass; +use UnexpectedValueException; + +/** + * JSON Web Token implementation, based on this spec: + * https://tools.ietf.org/html/rfc7519 + * + * PHP version 5 + * + * @category Authentication + * @package Authentication_JWT + * @author Neuman Vong <neuman@twilio.com> + * @author Anant Narayanan <anant@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause 3-clause BSD + * @link https://github.com/firebase/php-jwt + */ +class JWT +{ + private const ASN1_INTEGER = 0x02; + private const ASN1_SEQUENCE = 0x10; + private const ASN1_BIT_STRING = 0x03; + + /** + * When checking nbf, iat or expiration times, + * we want to provide some extra leeway time to + * account for clock skew. + * + * @var int + */ + public static $leeway = 0; + + /** + * Allow the current timestamp to be specified. + * Useful for fixing a value within unit testing. + * Will default to PHP time() value if null. + * + * @var ?int + */ + public static $timestamp = null; + + /** + * @var array<string, string[]> + */ + public static $supported_algs = [ + 'ES384' => ['openssl', 'SHA384'], + 'ES256' => ['openssl', 'SHA256'], + 'ES256K' => ['openssl', 'SHA256'], + 'HS256' => ['hash_hmac', 'SHA256'], + 'HS384' => ['hash_hmac', 'SHA384'], + 'HS512' => ['hash_hmac', 'SHA512'], + 'RS256' => ['openssl', 'SHA256'], + 'RS384' => ['openssl', 'SHA384'], + 'RS512' => ['openssl', 'SHA512'], + 'EdDSA' => ['sodium_crypto', 'EdDSA'], + ]; + + /** + * Decodes a JWT string into a PHP object. + * + * @param string $jwt The JWT + * @param Key|ArrayAccess<string,Key>|array<string,Key> $keyOrKeyArray The Key or associative array of key IDs + * (kid) to Key objects. + * If the algorithm used is asymmetric, this is + * the public key. + * Each Key object contains an algorithm and + * matching key. + * Supported algorithms are 'ES384','ES256', + * 'HS256', 'HS384', 'HS512', 'RS256', 'RS384' + * and 'RS512'. + * @param stdClass $headers Optional. Populates stdClass with headers. + * + * @return stdClass The JWT's payload as a PHP object + * + * @throws InvalidArgumentException Provided key/key-array was empty or malformed + * @throws DomainException Provided JWT is malformed + * @throws UnexpectedValueException Provided JWT was invalid + * @throws SignatureInvalidException Provided JWT was invalid because the signature verification failed + * @throws BeforeValidException Provided JWT is trying to be used before it's eligible as defined by 'nbf' + * @throws BeforeValidException Provided JWT is trying to be used before it's been created as defined by 'iat' + * @throws ExpiredException Provided JWT has since expired, as defined by the 'exp' claim + * + * @uses jsonDecode + * @uses urlsafeB64Decode + */ + public static function decode( + string $jwt, + $keyOrKeyArray, + ?stdClass &$headers = null + ): stdClass { + // Validate JWT + $timestamp = \is_null(static::$timestamp) ? \time() : static::$timestamp; + + if (empty($keyOrKeyArray)) { + throw new InvalidArgumentException('Key may not be empty'); + } + $tks = \explode('.', $jwt); + if (\count($tks) !== 3) { + throw new UnexpectedValueException('Wrong number of segments'); + } + list($headb64, $bodyb64, $cryptob64) = $tks; + $headerRaw = static::urlsafeB64Decode($headb64); + if (null === ($header = static::jsonDecode($headerRaw))) { + throw new UnexpectedValueException('Invalid header encoding'); + } + if ($headers !== null) { + $headers = $header; + } + $payloadRaw = static::urlsafeB64Decode($bodyb64); + if (null === ($payload = static::jsonDecode($payloadRaw))) { + throw new UnexpectedValueException('Invalid claims encoding'); + } + if (\is_array($payload)) { + // prevent PHP Fatal Error in edge-cases when payload is empty array + $payload = (object) $payload; + } + if (!$payload instanceof stdClass) { + throw new UnexpectedValueException('Payload must be a JSON object'); + } + $sig = static::urlsafeB64Decode($cryptob64); + if (empty($header->alg)) { + throw new UnexpectedValueException('Empty algorithm'); + } + if (empty(static::$supported_algs[$header->alg])) { + throw new UnexpectedValueException('Algorithm not supported'); + } + + $key = self::getKey($keyOrKeyArray, property_exists($header, 'kid') ? $header->kid : null); + + // Check the algorithm + if (!self::constantTimeEquals($key->getAlgorithm(), $header->alg)) { + // See issue #351 + throw new UnexpectedValueException('Incorrect key for this algorithm'); + } + if (\in_array($header->alg, ['ES256', 'ES256K', 'ES384'], true)) { + // OpenSSL expects an ASN.1 DER sequence for ES256/ES256K/ES384 signatures + $sig = self::signatureToDER($sig); + } + if (!self::verify("{$headb64}.{$bodyb64}", $sig, $key->getKeyMaterial(), $header->alg)) { + throw new SignatureInvalidException('Signature verification failed'); + } + + // Check the nbf if it is defined. This is the time that the + // token can actually be used. If it's not yet that time, abort. + if (isset($payload->nbf) && floor($payload->nbf) > ($timestamp + static::$leeway)) { + $ex = new BeforeValidException( + 'Cannot handle token with nbf prior to ' . \date(DateTime::ISO8601, (int) floor($payload->nbf)) + ); + $ex->setPayload($payload); + throw $ex; + } + + // Check that this token has been created before 'now'. This prevents + // using tokens that have been created for later use (and haven't + // correctly used the nbf claim). + if (!isset($payload->nbf) && isset($payload->iat) && floor($payload->iat) > ($timestamp + static::$leeway)) { + $ex = new BeforeValidException( + 'Cannot handle token with iat prior to ' . \date(DateTime::ISO8601, (int) floor($payload->iat)) + ); + $ex->setPayload($payload); + throw $ex; + } + + // Check if this token has expired. + if (isset($payload->exp) && ($timestamp - static::$leeway) >= $payload->exp) { + $ex = new ExpiredException('Expired token'); + $ex->setPayload($payload); + throw $ex; + } + + return $payload; + } + + /** + * Converts and signs a PHP array into a JWT string. + * + * @param array<mixed> $payload PHP array + * @param string|resource|OpenSSLAsymmetricKey|OpenSSLCertificate $key The secret key. + * @param string $alg Supported algorithms are 'ES384','ES256', 'ES256K', 'HS256', + * 'HS384', 'HS512', 'RS256', 'RS384', and 'RS512' + * @param string $keyId + * @param array<string, string> $head An array with header elements to attach + * + * @return string A signed JWT + * + * @uses jsonEncode + * @uses urlsafeB64Encode + */ + public static function encode( + array $payload, + $key, + string $alg, + ?string $keyId = null, + ?array $head = null + ): string { + $header = ['typ' => 'JWT']; + if (isset($head)) { + $header = \array_merge($header, $head); + } + $header['alg'] = $alg; + if ($keyId !== null) { + $header['kid'] = $keyId; + } + $segments = []; + $segments[] = static::urlsafeB64Encode((string) static::jsonEncode($header)); + $segments[] = static::urlsafeB64Encode((string) static::jsonEncode($payload)); + $signing_input = \implode('.', $segments); + + $signature = static::sign($signing_input, $key, $alg); + $segments[] = static::urlsafeB64Encode($signature); + + return \implode('.', $segments); + } + + /** + * Sign a string with a given key and algorithm. + * + * @param string $msg The message to sign + * @param string|resource|OpenSSLAsymmetricKey|OpenSSLCertificate $key The secret key. + * @param string $alg Supported algorithms are 'EdDSA', 'ES384', 'ES256', 'ES256K', 'HS256', + * 'HS384', 'HS512', 'RS256', 'RS384', and 'RS512' + * + * @return string An encrypted message + * + * @throws DomainException Unsupported algorithm or bad key was specified + */ + public static function sign( + string $msg, + $key, + string $alg + ): string { + if (empty(static::$supported_algs[$alg])) { + throw new DomainException('Algorithm not supported'); + } + list($function, $algorithm) = static::$supported_algs[$alg]; + switch ($function) { + case 'hash_hmac': + if (!\is_string($key)) { + throw new InvalidArgumentException('key must be a string when using hmac'); + } + return \hash_hmac($algorithm, $msg, $key, true); + case 'openssl': + $signature = ''; + if (!\is_resource($key) && !openssl_pkey_get_private($key)) { + throw new DomainException('OpenSSL unable to validate key'); + } + $success = \openssl_sign($msg, $signature, $key, $algorithm); // @phpstan-ignore-line + if (!$success) { + throw new DomainException('OpenSSL unable to sign data'); + } + if ($alg === 'ES256' || $alg === 'ES256K') { + $signature = self::signatureFromDER($signature, 256); + } elseif ($alg === 'ES384') { + $signature = self::signatureFromDER($signature, 384); + } + return $signature; + case 'sodium_crypto': + if (!\function_exists('sodium_crypto_sign_detached')) { + throw new DomainException('libsodium is not available'); + } + if (!\is_string($key)) { + throw new InvalidArgumentException('key must be a string when using EdDSA'); + } + try { + // The last non-empty line is used as the key. + $lines = array_filter(explode("\n", $key)); + $key = base64_decode((string) end($lines)); + if (\strlen($key) === 0) { + throw new DomainException('Key cannot be empty string'); + } + return sodium_crypto_sign_detached($msg, $key); + } catch (Exception $e) { + throw new DomainException($e->getMessage(), 0, $e); + } + } + + throw new DomainException('Algorithm not supported'); + } + + /** + * Verify a signature with the message, key and method. Not all methods + * are symmetric, so we must have a separate verify and sign method. + * + * @param string $msg The original message (header and body) + * @param string $signature The original signature + * @param string|resource|OpenSSLAsymmetricKey|OpenSSLCertificate $keyMaterial For Ed*, ES*, HS*, a string key works. for RS*, must be an instance of OpenSSLAsymmetricKey + * @param string $alg The algorithm + * + * @return bool + * + * @throws DomainException Invalid Algorithm, bad key, or OpenSSL failure + */ + private static function verify( + string $msg, + string $signature, + $keyMaterial, + string $alg + ): bool { + if (empty(static::$supported_algs[$alg])) { + throw new DomainException('Algorithm not supported'); + } + + list($function, $algorithm) = static::$supported_algs[$alg]; + switch ($function) { + case 'openssl': + $success = \openssl_verify($msg, $signature, $keyMaterial, $algorithm); // @phpstan-ignore-line + if ($success === 1) { + return true; + } + if ($success === 0) { + return false; + } + // returns 1 on success, 0 on failure, -1 on error. + throw new DomainException( + 'OpenSSL error: ' . \openssl_error_string() + ); + case 'sodium_crypto': + if (!\function_exists('sodium_crypto_sign_verify_detached')) { + throw new DomainException('libsodium is not available'); + } + if (!\is_string($keyMaterial)) { + throw new InvalidArgumentException('key must be a string when using EdDSA'); + } + try { + // The last non-empty line is used as the key. + $lines = array_filter(explode("\n", $keyMaterial)); + $key = base64_decode((string) end($lines)); + if (\strlen($key) === 0) { + throw new DomainException('Key cannot be empty string'); + } + if (\strlen($signature) === 0) { + throw new DomainException('Signature cannot be empty string'); + } + return sodium_crypto_sign_verify_detached($signature, $msg, $key); + } catch (Exception $e) { + throw new DomainException($e->getMessage(), 0, $e); + } + case 'hash_hmac': + default: + if (!\is_string($keyMaterial)) { + throw new InvalidArgumentException('key must be a string when using hmac'); + } + $hash = \hash_hmac($algorithm, $msg, $keyMaterial, true); + return self::constantTimeEquals($hash, $signature); + } + } + + /** + * Decode a JSON string into a PHP object. + * + * @param string $input JSON string + * + * @return mixed The decoded JSON string + * + * @throws DomainException Provided string was invalid JSON + */ + public static function jsonDecode(string $input) + { + $obj = \json_decode($input, false, 512, JSON_BIGINT_AS_STRING); + + if ($errno = \json_last_error()) { + self::handleJsonError($errno); + } elseif ($obj === null && $input !== 'null') { + throw new DomainException('Null result with non-null input'); + } + return $obj; + } + + /** + * Encode a PHP array into a JSON string. + * + * @param array<mixed> $input A PHP array + * + * @return string JSON representation of the PHP array + * + * @throws DomainException Provided object could not be encoded to valid JSON + */ + public static function jsonEncode(array $input): string + { + $json = \json_encode($input, \JSON_UNESCAPED_SLASHES); + if ($errno = \json_last_error()) { + self::handleJsonError($errno); + } elseif ($json === 'null') { + throw new DomainException('Null result with non-null input'); + } + if ($json === false) { + throw new DomainException('Provided object could not be encoded to valid JSON'); + } + return $json; + } + + /** + * Decode a string with URL-safe Base64. + * + * @param string $input A Base64 encoded string + * + * @return string A decoded string + * + * @throws InvalidArgumentException invalid base64 characters + */ + public static function urlsafeB64Decode(string $input): string + { + return \base64_decode(self::convertBase64UrlToBase64($input)); + } + + /** + * Convert a string in the base64url (URL-safe Base64) encoding to standard base64. + * + * @param string $input A Base64 encoded string with URL-safe characters (-_ and no padding) + * + * @return string A Base64 encoded string with standard characters (+/) and padding (=), when + * needed. + * + * @see https://www.rfc-editor.org/rfc/rfc4648 + */ + public static function convertBase64UrlToBase64(string $input): string + { + $remainder = \strlen($input) % 4; + if ($remainder) { + $padlen = 4 - $remainder; + $input .= \str_repeat('=', $padlen); + } + return \strtr($input, '-_', '+/'); + } + + /** + * Encode a string with URL-safe Base64. + * + * @param string $input The string you want encoded + * + * @return string The base64 encode of what you passed in + */ + public static function urlsafeB64Encode(string $input): string + { + return \str_replace('=', '', \strtr(\base64_encode($input), '+/', '-_')); + } + + + /** + * Determine if an algorithm has been provided for each Key + * + * @param Key|ArrayAccess<string,Key>|array<string,Key> $keyOrKeyArray + * @param string|null $kid + * + * @throws UnexpectedValueException + * + * @return Key + */ + private static function getKey( + $keyOrKeyArray, + ?string $kid + ): Key { + if ($keyOrKeyArray instanceof Key) { + return $keyOrKeyArray; + } + + if (empty($kid) && $kid !== '0') { + throw new UnexpectedValueException('"kid" empty, unable to lookup correct key'); + } + + if ($keyOrKeyArray instanceof CachedKeySet) { + // Skip "isset" check, as this will automatically refresh if not set + return $keyOrKeyArray[$kid]; + } + + if (!isset($keyOrKeyArray[$kid])) { + throw new UnexpectedValueException('"kid" invalid, unable to lookup correct key'); + } + + return $keyOrKeyArray[$kid]; + } + + /** + * @param string $left The string of known length to compare against + * @param string $right The user-supplied string + * @return bool + */ + public static function constantTimeEquals(string $left, string $right): bool + { + if (\function_exists('hash_equals')) { + return \hash_equals($left, $right); + } + $len = \min(self::safeStrlen($left), self::safeStrlen($right)); + + $status = 0; + for ($i = 0; $i < $len; $i++) { + $status |= (\ord($left[$i]) ^ \ord($right[$i])); + } + $status |= (self::safeStrlen($left) ^ self::safeStrlen($right)); + + return ($status === 0); + } + + /** + * Helper method to create a JSON error. + * + * @param int $errno An error number from json_last_error() + * + * @throws DomainException + * + * @return void + */ + private static function handleJsonError(int $errno): void + { + $messages = [ + JSON_ERROR_DEPTH => 'Maximum stack depth exceeded', + JSON_ERROR_STATE_MISMATCH => 'Invalid or malformed JSON', + JSON_ERROR_CTRL_CHAR => 'Unexpected control character found', + JSON_ERROR_SYNTAX => 'Syntax error, malformed JSON', + JSON_ERROR_UTF8 => 'Malformed UTF-8 characters' //PHP >= 5.3.3 + ]; + throw new DomainException( + isset($messages[$errno]) + ? $messages[$errno] + : 'Unknown JSON error: ' . $errno + ); + } + + /** + * Get the number of bytes in cryptographic strings. + * + * @param string $str + * + * @return int + */ + private static function safeStrlen(string $str): int + { + if (\function_exists('mb_strlen')) { + return \mb_strlen($str, '8bit'); + } + return \strlen($str); + } + + /** + * Convert an ECDSA signature to an ASN.1 DER sequence + * + * @param string $sig The ECDSA signature to convert + * @return string The encoded DER object + */ + private static function signatureToDER(string $sig): string + { + // Separate the signature into r-value and s-value + $length = max(1, (int) (\strlen($sig) / 2)); + list($r, $s) = \str_split($sig, $length); + + // Trim leading zeros + $r = \ltrim($r, "\x00"); + $s = \ltrim($s, "\x00"); + + // Convert r-value and s-value from unsigned big-endian integers to + // signed two's complement + if (\ord($r[0]) > 0x7f) { + $r = "\x00" . $r; + } + if (\ord($s[0]) > 0x7f) { + $s = "\x00" . $s; + } + + return self::encodeDER( + self::ASN1_SEQUENCE, + self::encodeDER(self::ASN1_INTEGER, $r) . + self::encodeDER(self::ASN1_INTEGER, $s) + ); + } + + /** + * Encodes a value into a DER object. + * + * @param int $type DER tag + * @param string $value the value to encode + * + * @return string the encoded object + */ + private static function encodeDER(int $type, string $value): string + { + $tag_header = 0; + if ($type === self::ASN1_SEQUENCE) { + $tag_header |= 0x20; + } + + // Type + $der = \chr($tag_header | $type); + + // Length + $der .= \chr(\strlen($value)); + + return $der . $value; + } + + /** + * Encodes signature from a DER object. + * + * @param string $der binary signature in DER format + * @param int $keySize the number of bits in the key + * + * @return string the signature + */ + private static function signatureFromDER(string $der, int $keySize): string + { + // OpenSSL returns the ECDSA signatures as a binary ASN.1 DER SEQUENCE + list($offset, $_) = self::readDER($der); + list($offset, $r) = self::readDER($der, $offset); + list($offset, $s) = self::readDER($der, $offset); + + // Convert r-value and s-value from signed two's compliment to unsigned + // big-endian integers + $r = \ltrim($r, "\x00"); + $s = \ltrim($s, "\x00"); + + // Pad out r and s so that they are $keySize bits long + $r = \str_pad($r, $keySize / 8, "\x00", STR_PAD_LEFT); + $s = \str_pad($s, $keySize / 8, "\x00", STR_PAD_LEFT); + + return $r . $s; + } + + /** + * Reads binary DER-encoded data and decodes into a single object + * + * @param string $der the binary data in DER format + * @param int $offset the offset of the data stream containing the object + * to decode + * + * @return array{int, string|null} the new offset and the decoded object + */ + private static function readDER(string $der, int $offset = 0): array + { + $pos = $offset; + $size = \strlen($der); + $constructed = (\ord($der[$pos]) >> 5) & 0x01; + $type = \ord($der[$pos++]) & 0x1f; + + // Length + $len = \ord($der[$pos++]); + if ($len & 0x80) { + $n = $len & 0x1f; + $len = 0; + while ($n-- && $pos < $size) { + $len = ($len << 8) | \ord($der[$pos++]); + } + } + + // Value + if ($type === self::ASN1_BIT_STRING) { + $pos++; // Skip the first contents octet (padding indicator) + $data = \substr($der, $pos, $len - 1); + $pos += $len - 1; + } elseif (!$constructed) { + $data = \substr($der, $pos, $len); + $pos += $len; + } else { + $data = null; + } + + return [$pos, $data]; + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/src/JWTExceptionWithPayloadInterface.php b/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/src/JWTExceptionWithPayloadInterface.php new file mode 100644 index 0000000..7933ed6 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/src/JWTExceptionWithPayloadInterface.php @@ -0,0 +1,20 @@ +<?php +namespace Firebase\JWT; + +interface JWTExceptionWithPayloadInterface +{ + /** + * Get the payload that caused this exception. + * + * @return object + */ + public function getPayload(): object; + + /** + * Get the payload that caused this exception. + * + * @param object $payload + * @return void + */ + public function setPayload(object $payload): void; +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/src/Key.php b/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/src/Key.php new file mode 100644 index 0000000..b34eae2 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/src/Key.php @@ -0,0 +1,55 @@ +<?php + +namespace Firebase\JWT; + +use InvalidArgumentException; +use OpenSSLAsymmetricKey; +use OpenSSLCertificate; +use TypeError; + +class Key +{ + /** + * @param string|resource|OpenSSLAsymmetricKey|OpenSSLCertificate $keyMaterial + * @param string $algorithm + */ + public function __construct( + private $keyMaterial, + private string $algorithm + ) { + if ( + !\is_string($keyMaterial) + && !$keyMaterial instanceof OpenSSLAsymmetricKey + && !$keyMaterial instanceof OpenSSLCertificate + && !\is_resource($keyMaterial) + ) { + throw new TypeError('Key material must be a string, resource, or OpenSSLAsymmetricKey'); + } + + if (empty($keyMaterial)) { + throw new InvalidArgumentException('Key material must not be empty'); + } + + if (empty($algorithm)) { + throw new InvalidArgumentException('Algorithm must not be empty'); + } + } + + /** + * Return the algorithm valid for this key + * + * @return string + */ + public function getAlgorithm(): string + { + return $this->algorithm; + } + + /** + * @return string|resource|OpenSSLAsymmetricKey|OpenSSLCertificate + */ + public function getKeyMaterial() + { + return $this->keyMaterial; + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/src/SignatureInvalidException.php b/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/src/SignatureInvalidException.php new file mode 100644 index 0000000..d35dee9 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/firebase/php-jwt/src/SignatureInvalidException.php @@ -0,0 +1,7 @@ +<?php + +namespace Firebase\JWT; + +class SignatureInvalidException extends \UnexpectedValueException +{ +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/graham-campbell/result-type/LICENSE b/walletintaleq.intaleq.xyz/v2/vendor/graham-campbell/result-type/LICENSE new file mode 100644 index 0000000..8e7c898 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/graham-campbell/result-type/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020-2024 Graham Campbell <hello@gjcampbell.co.uk> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/walletintaleq.intaleq.xyz/v2/vendor/graham-campbell/result-type/composer.json b/walletintaleq.intaleq.xyz/v2/vendor/graham-campbell/result-type/composer.json new file mode 100644 index 0000000..32bfc81 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/graham-campbell/result-type/composer.json @@ -0,0 +1,33 @@ +{ + "name": "graham-campbell/result-type", + "description": "An Implementation Of The Result Type", + "keywords": ["result", "result-type", "Result", "Result Type", "Result-Type", "Graham Campbell", "GrahamCampbell"], + "license": "MIT", + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "require": { + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.3" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" + }, + "autoload": { + "psr-4": { + "GrahamCampbell\\ResultType\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "GrahamCampbell\\Tests\\ResultType\\": "tests/" + } + }, + "config": { + "preferred-install": "dist" + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/graham-campbell/result-type/src/Error.php b/walletintaleq.intaleq.xyz/v2/vendor/graham-campbell/result-type/src/Error.php new file mode 100644 index 0000000..2c37c3e --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/graham-campbell/result-type/src/Error.php @@ -0,0 +1,121 @@ +<?php + +declare(strict_types=1); + +/* + * This file is part of Result Type. + * + * (c) Graham Campbell <hello@gjcampbell.co.uk> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace GrahamCampbell\ResultType; + +use PhpOption\None; +use PhpOption\Some; + +/** + * @template T + * @template E + * + * @extends \GrahamCampbell\ResultType\Result<T,E> + */ +final class Error extends Result +{ + /** + * @var E + */ + private $value; + + /** + * Internal constructor for an error value. + * + * @param E $value + * + * @return void + */ + private function __construct($value) + { + $this->value = $value; + } + + /** + * Create a new error value. + * + * @template F + * + * @param F $value + * + * @return \GrahamCampbell\ResultType\Result<T,F> + */ + public static function create($value) + { + return new self($value); + } + + /** + * Get the success option value. + * + * @return \PhpOption\Option<T> + */ + public function success() + { + return None::create(); + } + + /** + * Map over the success value. + * + * @template S + * + * @param callable(T):S $f + * + * @return \GrahamCampbell\ResultType\Result<S,E> + */ + public function map(callable $f) + { + return self::create($this->value); + } + + /** + * Flat map over the success value. + * + * @template S + * @template F + * + * @param callable(T):\GrahamCampbell\ResultType\Result<S,F> $f + * + * @return \GrahamCampbell\ResultType\Result<S,F> + */ + public function flatMap(callable $f) + { + /** @var \GrahamCampbell\ResultType\Result<S,F> */ + return self::create($this->value); + } + + /** + * Get the error option value. + * + * @return \PhpOption\Option<E> + */ + public function error() + { + return Some::create($this->value); + } + + /** + * Map over the error value. + * + * @template F + * + * @param callable(E):F $f + * + * @return \GrahamCampbell\ResultType\Result<T,F> + */ + public function mapError(callable $f) + { + return self::create($f($this->value)); + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/graham-campbell/result-type/src/Result.php b/walletintaleq.intaleq.xyz/v2/vendor/graham-campbell/result-type/src/Result.php new file mode 100644 index 0000000..8c67bcd --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/graham-campbell/result-type/src/Result.php @@ -0,0 +1,69 @@ +<?php + +declare(strict_types=1); + +/* + * This file is part of Result Type. + * + * (c) Graham Campbell <hello@gjcampbell.co.uk> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace GrahamCampbell\ResultType; + +/** + * @template T + * @template E + */ +abstract class Result +{ + /** + * Get the success option value. + * + * @return \PhpOption\Option<T> + */ + abstract public function success(); + + /** + * Map over the success value. + * + * @template S + * + * @param callable(T):S $f + * + * @return \GrahamCampbell\ResultType\Result<S,E> + */ + abstract public function map(callable $f); + + /** + * Flat map over the success value. + * + * @template S + * @template F + * + * @param callable(T):\GrahamCampbell\ResultType\Result<S,F> $f + * + * @return \GrahamCampbell\ResultType\Result<S,F> + */ + abstract public function flatMap(callable $f); + + /** + * Get the error option value. + * + * @return \PhpOption\Option<E> + */ + abstract public function error(); + + /** + * Map over the error value. + * + * @template F + * + * @param callable(E):F $f + * + * @return \GrahamCampbell\ResultType\Result<T,F> + */ + abstract public function mapError(callable $f); +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/graham-campbell/result-type/src/Success.php b/walletintaleq.intaleq.xyz/v2/vendor/graham-campbell/result-type/src/Success.php new file mode 100644 index 0000000..27cd85e --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/graham-campbell/result-type/src/Success.php @@ -0,0 +1,120 @@ +<?php + +declare(strict_types=1); + +/* + * This file is part of Result Type. + * + * (c) Graham Campbell <hello@gjcampbell.co.uk> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace GrahamCampbell\ResultType; + +use PhpOption\None; +use PhpOption\Some; + +/** + * @template T + * @template E + * + * @extends \GrahamCampbell\ResultType\Result<T,E> + */ +final class Success extends Result +{ + /** + * @var T + */ + private $value; + + /** + * Internal constructor for a success value. + * + * @param T $value + * + * @return void + */ + private function __construct($value) + { + $this->value = $value; + } + + /** + * Create a new error value. + * + * @template S + * + * @param S $value + * + * @return \GrahamCampbell\ResultType\Result<S,E> + */ + public static function create($value) + { + return new self($value); + } + + /** + * Get the success option value. + * + * @return \PhpOption\Option<T> + */ + public function success() + { + return Some::create($this->value); + } + + /** + * Map over the success value. + * + * @template S + * + * @param callable(T):S $f + * + * @return \GrahamCampbell\ResultType\Result<S,E> + */ + public function map(callable $f) + { + return self::create($f($this->value)); + } + + /** + * Flat map over the success value. + * + * @template S + * @template F + * + * @param callable(T):\GrahamCampbell\ResultType\Result<S,F> $f + * + * @return \GrahamCampbell\ResultType\Result<S,F> + */ + public function flatMap(callable $f) + { + return $f($this->value); + } + + /** + * Get the error option value. + * + * @return \PhpOption\Option<E> + */ + public function error() + { + return None::create(); + } + + /** + * Map over the error value. + * + * @template F + * + * @param callable(E):F $f + * + * @return \GrahamCampbell\ResultType\Result<T,F> + */ + public function mapError(callable $f) + { + return self::create($this->value); + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/phpoption/phpoption/LICENSE b/walletintaleq.intaleq.xyz/v2/vendor/phpoption/phpoption/LICENSE new file mode 100644 index 0000000..f49a4e1 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/phpoption/phpoption/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/walletintaleq.intaleq.xyz/v2/vendor/phpoption/phpoption/composer.json b/walletintaleq.intaleq.xyz/v2/vendor/phpoption/phpoption/composer.json new file mode 100644 index 0000000..91dd6fb --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/phpoption/phpoption/composer.json @@ -0,0 +1,50 @@ +{ + "name": "phpoption/phpoption", + "description": "Option Type for PHP", + "keywords": ["php", "option", "language", "type"], + "license": "Apache-2.0", + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh" + }, + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" + }, + "autoload": { + "psr-4": { + "PhpOption\\": "src/PhpOption/" + } + }, + "autoload-dev": { + "psr-4": { + "PhpOption\\Tests\\": "tests/PhpOption/Tests/" + } + }, + "config": { + "allow-plugins": { + "bamarni/composer-bin-plugin": true + }, + "preferred-install": "dist" + }, + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, + "branch-alias": { + "dev-master": "1.9-dev" + } + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/phpoption/phpoption/src/PhpOption/LazyOption.php b/walletintaleq.intaleq.xyz/v2/vendor/phpoption/phpoption/src/PhpOption/LazyOption.php new file mode 100644 index 0000000..9cb77c8 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/phpoption/phpoption/src/PhpOption/LazyOption.php @@ -0,0 +1,175 @@ +<?php + +/* + * Copyright 2012 Johannes M. Schmitt <schmittjoh@gmail.com> + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +namespace PhpOption; + +use Traversable; + +/** + * @template T + * + * @extends Option<T> + */ +final class LazyOption extends Option +{ + /** @var callable(mixed...):(Option<T>) */ + private $callback; + + /** @var array<int, mixed> */ + private $arguments; + + /** @var Option<T>|null */ + private $option; + + /** + * @template S + * @param callable(mixed...):(Option<S>) $callback + * @param array<int, mixed> $arguments + * + * @return LazyOption<S> + */ + public static function create($callback, array $arguments = []): self + { + return new self($callback, $arguments); + } + + /** + * @param callable(mixed...):(Option<T>) $callback + * @param array<int, mixed> $arguments + */ + public function __construct($callback, array $arguments = []) + { + if (!is_callable($callback)) { + throw new \InvalidArgumentException('Invalid callback given'); + } + + $this->callback = $callback; + $this->arguments = $arguments; + } + + public function isDefined(): bool + { + return $this->option()->isDefined(); + } + + public function isEmpty(): bool + { + return $this->option()->isEmpty(); + } + + public function get() + { + return $this->option()->get(); + } + + public function getOrElse($default) + { + return $this->option()->getOrElse($default); + } + + public function getOrCall($callable) + { + return $this->option()->getOrCall($callable); + } + + public function getOrThrow(\Exception $ex) + { + return $this->option()->getOrThrow($ex); + } + + public function orElse(Option $else) + { + return $this->option()->orElse($else); + } + + public function ifDefined($callable) + { + $this->option()->forAll($callable); + } + + public function forAll($callable) + { + return $this->option()->forAll($callable); + } + + public function map($callable) + { + return $this->option()->map($callable); + } + + public function flatMap($callable) + { + return $this->option()->flatMap($callable); + } + + public function filter($callable) + { + return $this->option()->filter($callable); + } + + public function filterNot($callable) + { + return $this->option()->filterNot($callable); + } + + public function select($value) + { + return $this->option()->select($value); + } + + public function reject($value) + { + return $this->option()->reject($value); + } + + /** + * @return Traversable<T> + */ + public function getIterator(): Traversable + { + return $this->option()->getIterator(); + } + + public function foldLeft($initialValue, $callable) + { + return $this->option()->foldLeft($initialValue, $callable); + } + + public function foldRight($initialValue, $callable) + { + return $this->option()->foldRight($initialValue, $callable); + } + + /** + * @return Option<T> + */ + private function option(): Option + { + if (null === $this->option) { + /** @var mixed */ + $option = call_user_func_array($this->callback, $this->arguments); + if ($option instanceof Option) { + $this->option = $option; + } else { + throw new \RuntimeException(sprintf('Expected instance of %s', Option::class)); + } + } + + return $this->option; + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/phpoption/phpoption/src/PhpOption/None.php b/walletintaleq.intaleq.xyz/v2/vendor/phpoption/phpoption/src/PhpOption/None.php new file mode 100644 index 0000000..4b85d22 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/phpoption/phpoption/src/PhpOption/None.php @@ -0,0 +1,136 @@ +<?php + +/* + * Copyright 2012 Johannes M. Schmitt <schmittjoh@gmail.com> + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +namespace PhpOption; + +use EmptyIterator; + +/** + * @extends Option<mixed> + */ +final class None extends Option +{ + /** @var None|null */ + private static $instance; + + /** + * @return None + */ + public static function create(): self + { + if (null === self::$instance) { + self::$instance = new self(); + } + + return self::$instance; + } + + public function get() + { + throw new \RuntimeException('None has no value.'); + } + + public function getOrCall($callable) + { + return $callable(); + } + + public function getOrElse($default) + { + return $default; + } + + public function getOrThrow(\Exception $ex) + { + throw $ex; + } + + public function isEmpty(): bool + { + return true; + } + + public function isDefined(): bool + { + return false; + } + + public function orElse(Option $else) + { + return $else; + } + + public function ifDefined($callable) + { + // Just do nothing in that case. + } + + public function forAll($callable) + { + return $this; + } + + public function map($callable) + { + return $this; + } + + public function flatMap($callable) + { + return $this; + } + + public function filter($callable) + { + return $this; + } + + public function filterNot($callable) + { + return $this; + } + + public function select($value) + { + return $this; + } + + public function reject($value) + { + return $this; + } + + public function getIterator(): EmptyIterator + { + return new EmptyIterator(); + } + + public function foldLeft($initialValue, $callable) + { + return $initialValue; + } + + public function foldRight($initialValue, $callable) + { + return $initialValue; + } + + private function __construct() + { + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/phpoption/phpoption/src/PhpOption/Option.php b/walletintaleq.intaleq.xyz/v2/vendor/phpoption/phpoption/src/PhpOption/Option.php new file mode 100644 index 0000000..91fab9c --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/phpoption/phpoption/src/PhpOption/Option.php @@ -0,0 +1,434 @@ +<?php + +/* + * Copyright 2012 Johannes M. Schmitt <schmittjoh@gmail.com> + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +namespace PhpOption; + +use ArrayAccess; +use IteratorAggregate; + +/** + * @template T + * + * @implements IteratorAggregate<T> + */ +abstract class Option implements IteratorAggregate +{ + /** + * Creates an option given a return value. + * + * This is intended for consuming existing APIs and allows you to easily + * convert them to an option. By default, we treat ``null`` as the None + * case, and everything else as Some. + * + * @template S + * + * @param S $value The actual return value. + * @param S $noneValue The value which should be considered "None"; null by + * default. + * + * @return Option<S> + */ + public static function fromValue($value, $noneValue = null) + { + if ($value === $noneValue) { + return None::create(); + } + + return new Some($value); + } + + /** + * Creates an option from an array's value. + * + * If the key does not exist in the array, the array is not actually an + * array, or the array's value at the given key is null, None is returned. + * Otherwise, Some is returned wrapping the value at the given key. + * + * @template S + * + * @param array<string|int,S>|ArrayAccess<string|int,S>|null $array A potential array or \ArrayAccess value. + * @param string|int|null $key The key to check. + * + * @return Option<S> + */ + public static function fromArraysValue($array, $key) + { + if ($key === null || !(is_array($array) || $array instanceof ArrayAccess) || !isset($array[$key])) { + return None::create(); + } + + return new Some($array[$key]); + } + + /** + * Creates a lazy-option with the given callback. + * + * This is also a helper constructor for lazy-consuming existing APIs where + * the return value is not yet an option. By default, we treat ``null`` as + * None case, and everything else as Some. + * + * @template S + * + * @param callable $callback The callback to evaluate. + * @param array $arguments The arguments for the callback. + * @param S $noneValue The value which should be considered "None"; + * null by default. + * + * @return LazyOption<S> + */ + public static function fromReturn($callback, array $arguments = [], $noneValue = null) + { + return new LazyOption(static function () use ($callback, $arguments, $noneValue) { + /** @var mixed */ + $return = call_user_func_array($callback, $arguments); + + if ($return === $noneValue) { + return None::create(); + } + + return new Some($return); + }); + } + + /** + * Option factory, which creates new option based on passed value. + * + * If value is already an option, it simply returns. If value is callable, + * LazyOption with passed callback created and returned. If Option + * returned from callback, it returns directly. On other case value passed + * to Option::fromValue() method. + * + * @template S + * + * @param Option<S>|callable|S $value + * @param S $noneValue Used when $value is mixed or + * callable, for None-check. + * + * @return Option<S>|LazyOption<S> + */ + public static function ensure($value, $noneValue = null) + { + if ($value instanceof self) { + return $value; + } elseif (is_callable($value)) { + return new LazyOption(static function () use ($value, $noneValue) { + /** @var mixed */ + $return = $value(); + + if ($return instanceof self) { + return $return; + } else { + return self::fromValue($return, $noneValue); + } + }); + } else { + return self::fromValue($value, $noneValue); + } + } + + /** + * Lift a function so that it accepts Option as parameters. + * + * We return a new closure that wraps the original callback. If any of the + * parameters passed to the lifted function is empty, the function will + * return a value of None. Otherwise, we will pass all parameters to the + * original callback and return the value inside a new Option, unless an + * Option is returned from the function, in which case, we use that. + * + * @template S + * + * @param callable $callback + * @param mixed $noneValue + * + * @return callable + */ + public static function lift($callback, $noneValue = null) + { + return static function () use ($callback, $noneValue) { + /** @var array<int, mixed> */ + $args = func_get_args(); + + $reduced_args = array_reduce( + $args, + /** @param bool $status */ + static function ($status, self $o) { + return $o->isEmpty() ? true : $status; + }, + false + ); + // if at least one parameter is empty, return None + if ($reduced_args) { + return None::create(); + } + + $args = array_map( + /** @return T */ + static function (self $o) { + // it is safe to do so because the fold above checked + // that all arguments are of type Some + /** @var T */ + return $o->get(); + }, + $args + ); + + return self::ensure(call_user_func_array($callback, $args), $noneValue); + }; + } + + /** + * Returns the value if available, or throws an exception otherwise. + * + * @throws \RuntimeException If value is not available. + * + * @return T + */ + abstract public function get(); + + /** + * Returns the value if available, or the default value if not. + * + * @template S + * + * @param S $default + * + * @return T|S + */ + abstract public function getOrElse($default); + + /** + * Returns the value if available, or the results of the callable. + * + * This is preferable over ``getOrElse`` if the computation of the default + * value is expensive. + * + * @template S + * + * @param callable():S $callable + * + * @return T|S + */ + abstract public function getOrCall($callable); + + /** + * Returns the value if available, or throws the passed exception. + * + * @param \Exception $ex + * + * @return T + */ + abstract public function getOrThrow(\Exception $ex); + + /** + * Returns true if no value is available, false otherwise. + * + * @return bool + */ + abstract public function isEmpty(); + + /** + * Returns true if a value is available, false otherwise. + * + * @return bool + */ + abstract public function isDefined(); + + /** + * Returns this option if non-empty, or the passed option otherwise. + * + * This can be used to try multiple alternatives, and is especially useful + * with lazy evaluating options: + * + * ```php + * $repo->findSomething() + * ->orElse(new LazyOption(array($repo, 'findSomethingElse'))) + * ->orElse(new LazyOption(array($repo, 'createSomething'))); + * ``` + * + * @param Option<T> $else + * + * @return Option<T> + */ + abstract public function orElse(self $else); + + /** + * This is similar to map() below except that the return value has no meaning; + * the passed callable is simply executed if the option is non-empty, and + * ignored if the option is empty. + * + * In all cases, the return value of the callable is discarded. + * + * ```php + * $comment->getMaybeFile()->ifDefined(function($file) { + * // Do something with $file here. + * }); + * ``` + * + * If you're looking for something like ``ifEmpty``, you can use ``getOrCall`` + * and ``getOrElse`` in these cases. + * + * @deprecated Use forAll() instead. + * + * @param callable(T):mixed $callable + * + * @return void + */ + abstract public function ifDefined($callable); + + /** + * This is similar to map() except that the return value of the callable has no meaning. + * + * The passed callable is simply executed if the option is non-empty, and ignored if the + * option is empty. This method is preferred for callables with side-effects, while map() + * is intended for callables without side-effects. + * + * @param callable(T):mixed $callable + * + * @return Option<T> + */ + abstract public function forAll($callable); + + /** + * Applies the callable to the value of the option if it is non-empty, + * and returns the return value of the callable wrapped in Some(). + * + * If the option is empty, then the callable is not applied. + * + * ```php + * (new Some("foo"))->map('strtoupper')->get(); // "FOO" + * ``` + * + * @template S + * + * @param callable(T):S $callable + * + * @return Option<S> + */ + abstract public function map($callable); + + /** + * Applies the callable to the value of the option if it is non-empty, and + * returns the return value of the callable directly. + * + * In contrast to ``map``, the return value of the callable is expected to + * be an Option itself; it is not automatically wrapped in Some(). + * + * @template S + * + * @param callable(T):Option<S> $callable must return an Option + * + * @return Option<S> + */ + abstract public function flatMap($callable); + + /** + * If the option is empty, it is returned immediately without applying the callable. + * + * If the option is non-empty, the callable is applied, and if it returns true, + * the option itself is returned; otherwise, None is returned. + * + * @param callable(T):bool $callable + * + * @return Option<T> + */ + abstract public function filter($callable); + + /** + * If the option is empty, it is returned immediately without applying the callable. + * + * If the option is non-empty, the callable is applied, and if it returns false, + * the option itself is returned; otherwise, None is returned. + * + * @param callable(T):bool $callable + * + * @return Option<T> + */ + abstract public function filterNot($callable); + + /** + * If the option is empty, it is returned immediately. + * + * If the option is non-empty, and its value does not equal the passed value + * (via a shallow comparison ===), then None is returned. Otherwise, the + * Option is returned. + * + * In other words, this will filter all but the passed value. + * + * @param T $value + * + * @return Option<T> + */ + abstract public function select($value); + + /** + * If the option is empty, it is returned immediately. + * + * If the option is non-empty, and its value does equal the passed value (via + * a shallow comparison ===), then None is returned; otherwise, the Option is + * returned. + * + * In other words, this will let all values through except the passed value. + * + * @param T $value + * + * @return Option<T> + */ + abstract public function reject($value); + + /** + * Binary operator for the initial value and the option's value. + * + * If empty, the initial value is returned. If non-empty, the callable + * receives the initial value and the option's value as arguments. + * + * ```php + * + * $some = new Some(5); + * $none = None::create(); + * $result = $some->foldLeft(1, function($a, $b) { return $a + $b; }); // int(6) + * $result = $none->foldLeft(1, function($a, $b) { return $a + $b; }); // int(1) + * + * // This can be used instead of something like the following: + * $option = Option::fromValue($integerOrNull); + * $result = 1; + * if ( ! $option->isEmpty()) { + * $result += $option->get(); + * } + * ``` + * + * @template S + * + * @param S $initialValue + * @param callable(S, T):S $callable + * + * @return S + */ + abstract public function foldLeft($initialValue, $callable); + + /** + * foldLeft() but with reversed arguments for the callable. + * + * @template S + * + * @param S $initialValue + * @param callable(T, S):S $callable + * + * @return S + */ + abstract public function foldRight($initialValue, $callable); +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/phpoption/phpoption/src/PhpOption/Some.php b/walletintaleq.intaleq.xyz/v2/vendor/phpoption/phpoption/src/PhpOption/Some.php new file mode 100644 index 0000000..032632e --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/phpoption/phpoption/src/PhpOption/Some.php @@ -0,0 +1,169 @@ +<?php + +/* + * Copyright 2012 Johannes M. Schmitt <schmittjoh@gmail.com> + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +namespace PhpOption; + +use ArrayIterator; + +/** + * @template T + * + * @extends Option<T> + */ +final class Some extends Option +{ + /** @var T */ + private $value; + + /** + * @param T $value + */ + public function __construct($value) + { + $this->value = $value; + } + + /** + * @template U + * + * @param U $value + * + * @return Some<U> + */ + public static function create($value): self + { + return new self($value); + } + + public function isDefined(): bool + { + return true; + } + + public function isEmpty(): bool + { + return false; + } + + public function get() + { + return $this->value; + } + + public function getOrElse($default) + { + return $this->value; + } + + public function getOrCall($callable) + { + return $this->value; + } + + public function getOrThrow(\Exception $ex) + { + return $this->value; + } + + public function orElse(Option $else) + { + return $this; + } + + public function ifDefined($callable) + { + $this->forAll($callable); + } + + public function forAll($callable) + { + $callable($this->value); + + return $this; + } + + public function map($callable) + { + return new self($callable($this->value)); + } + + public function flatMap($callable) + { + /** @var mixed */ + $rs = $callable($this->value); + if (!$rs instanceof Option) { + throw new \RuntimeException('Callables passed to flatMap() must return an Option. Maybe you should use map() instead?'); + } + + return $rs; + } + + public function filter($callable) + { + if (true === $callable($this->value)) { + return $this; + } + + return None::create(); + } + + public function filterNot($callable) + { + if (false === $callable($this->value)) { + return $this; + } + + return None::create(); + } + + public function select($value) + { + if ($this->value === $value) { + return $this; + } + + return None::create(); + } + + public function reject($value) + { + if ($this->value === $value) { + return None::create(); + } + + return $this; + } + + /** + * @return ArrayIterator<int, T> + */ + public function getIterator(): ArrayIterator + { + return new ArrayIterator([$this->value]); + } + + public function foldLeft($initialValue, $callable) + { + return $callable($initialValue, $this->value); + } + + public function foldRight($initialValue, $callable) + { + return $callable($this->value, $initialValue); + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-ctype/Ctype.php b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-ctype/Ctype.php new file mode 100644 index 0000000..ba75a2c --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-ctype/Ctype.php @@ -0,0 +1,232 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Ctype; + +/** + * Ctype implementation through regex. + * + * @internal + * + * @author Gert de Pagter <BackEndTea@gmail.com> + */ +final class Ctype +{ + /** + * Returns TRUE if every character in text is either a letter or a digit, FALSE otherwise. + * + * @see https://php.net/ctype-alnum + * + * @param mixed $text + * + * @return bool + */ + public static function ctype_alnum($text) + { + $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); + + return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z0-9]/', $text); + } + + /** + * Returns TRUE if every character in text is a letter, FALSE otherwise. + * + * @see https://php.net/ctype-alpha + * + * @param mixed $text + * + * @return bool + */ + public static function ctype_alpha($text) + { + $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); + + return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z]/', $text); + } + + /** + * Returns TRUE if every character in text is a control character from the current locale, FALSE otherwise. + * + * @see https://php.net/ctype-cntrl + * + * @param mixed $text + * + * @return bool + */ + public static function ctype_cntrl($text) + { + $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); + + return \is_string($text) && '' !== $text && !preg_match('/[^\x00-\x1f\x7f]/', $text); + } + + /** + * Returns TRUE if every character in the string text is a decimal digit, FALSE otherwise. + * + * @see https://php.net/ctype-digit + * + * @param mixed $text + * + * @return bool + */ + public static function ctype_digit($text) + { + $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); + + return \is_string($text) && '' !== $text && !preg_match('/[^0-9]/', $text); + } + + /** + * Returns TRUE if every character in text is printable and actually creates visible output (no white space), FALSE otherwise. + * + * @see https://php.net/ctype-graph + * + * @param mixed $text + * + * @return bool + */ + public static function ctype_graph($text) + { + $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); + + return \is_string($text) && '' !== $text && !preg_match('/[^!-~]/', $text); + } + + /** + * Returns TRUE if every character in text is a lowercase letter. + * + * @see https://php.net/ctype-lower + * + * @param mixed $text + * + * @return bool + */ + public static function ctype_lower($text) + { + $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); + + return \is_string($text) && '' !== $text && !preg_match('/[^a-z]/', $text); + } + + /** + * Returns TRUE if every character in text will actually create output (including blanks). Returns FALSE if text contains control characters or characters that do not have any output or control function at all. + * + * @see https://php.net/ctype-print + * + * @param mixed $text + * + * @return bool + */ + public static function ctype_print($text) + { + $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); + + return \is_string($text) && '' !== $text && !preg_match('/[^ -~]/', $text); + } + + /** + * Returns TRUE if every character in text is printable, but neither letter, digit or blank, FALSE otherwise. + * + * @see https://php.net/ctype-punct + * + * @param mixed $text + * + * @return bool + */ + public static function ctype_punct($text) + { + $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); + + return \is_string($text) && '' !== $text && !preg_match('/[^!-\/\:-@\[-`\{-~]/', $text); + } + + /** + * Returns TRUE if every character in text creates some sort of white space, FALSE otherwise. Besides the blank character this also includes tab, vertical tab, line feed, carriage return and form feed characters. + * + * @see https://php.net/ctype-space + * + * @param mixed $text + * + * @return bool + */ + public static function ctype_space($text) + { + $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); + + return \is_string($text) && '' !== $text && !preg_match('/[^\s]/', $text); + } + + /** + * Returns TRUE if every character in text is an uppercase letter. + * + * @see https://php.net/ctype-upper + * + * @param mixed $text + * + * @return bool + */ + public static function ctype_upper($text) + { + $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); + + return \is_string($text) && '' !== $text && !preg_match('/[^A-Z]/', $text); + } + + /** + * Returns TRUE if every character in text is a hexadecimal 'digit', that is a decimal digit or a character from [A-Fa-f] , FALSE otherwise. + * + * @see https://php.net/ctype-xdigit + * + * @param mixed $text + * + * @return bool + */ + public static function ctype_xdigit($text) + { + $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__); + + return \is_string($text) && '' !== $text && !preg_match('/[^A-Fa-f0-9]/', $text); + } + + /** + * Converts integers to their char versions according to normal ctype behaviour, if needed. + * + * If an integer between -128 and 255 inclusive is provided, + * it is interpreted as the ASCII value of a single character + * (negative values have 256 added in order to allow characters in the Extended ASCII range). + * Any other integer is interpreted as a string containing the decimal digits of the integer. + * + * @param mixed $int + * @param string $function + * + * @return mixed + */ + private static function convert_int_to_char_for_ctype($int, $function) + { + if (!\is_int($int)) { + return $int; + } + + if ($int < -128 || $int > 255) { + return (string) $int; + } + + if (\PHP_VERSION_ID >= 80100) { + @trigger_error($function.'(): Argument of type int will be interpreted as string in the future', \E_USER_DEPRECATED); + } + + if ($int < 0) { + $int += 256; + } + + return \chr($int); + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-ctype/LICENSE b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-ctype/LICENSE new file mode 100644 index 0000000..7536cae --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-ctype/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2018-present Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-ctype/README.md b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-ctype/README.md new file mode 100644 index 0000000..b144d03 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-ctype/README.md @@ -0,0 +1,12 @@ +Symfony Polyfill / Ctype +======================== + +This component provides `ctype_*` functions to users who run php versions without the ctype extension. + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-ctype/bootstrap.php b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-ctype/bootstrap.php new file mode 100644 index 0000000..d54524b --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-ctype/bootstrap.php @@ -0,0 +1,50 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Ctype as p; + +if (\PHP_VERSION_ID >= 80000) { + return require __DIR__.'/bootstrap80.php'; +} + +if (!function_exists('ctype_alnum')) { + function ctype_alnum($text) { return p\Ctype::ctype_alnum($text); } +} +if (!function_exists('ctype_alpha')) { + function ctype_alpha($text) { return p\Ctype::ctype_alpha($text); } +} +if (!function_exists('ctype_cntrl')) { + function ctype_cntrl($text) { return p\Ctype::ctype_cntrl($text); } +} +if (!function_exists('ctype_digit')) { + function ctype_digit($text) { return p\Ctype::ctype_digit($text); } +} +if (!function_exists('ctype_graph')) { + function ctype_graph($text) { return p\Ctype::ctype_graph($text); } +} +if (!function_exists('ctype_lower')) { + function ctype_lower($text) { return p\Ctype::ctype_lower($text); } +} +if (!function_exists('ctype_print')) { + function ctype_print($text) { return p\Ctype::ctype_print($text); } +} +if (!function_exists('ctype_punct')) { + function ctype_punct($text) { return p\Ctype::ctype_punct($text); } +} +if (!function_exists('ctype_space')) { + function ctype_space($text) { return p\Ctype::ctype_space($text); } +} +if (!function_exists('ctype_upper')) { + function ctype_upper($text) { return p\Ctype::ctype_upper($text); } +} +if (!function_exists('ctype_xdigit')) { + function ctype_xdigit($text) { return p\Ctype::ctype_xdigit($text); } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-ctype/bootstrap80.php b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-ctype/bootstrap80.php new file mode 100644 index 0000000..ab2f861 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-ctype/bootstrap80.php @@ -0,0 +1,46 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Ctype as p; + +if (!function_exists('ctype_alnum')) { + function ctype_alnum(mixed $text): bool { return p\Ctype::ctype_alnum($text); } +} +if (!function_exists('ctype_alpha')) { + function ctype_alpha(mixed $text): bool { return p\Ctype::ctype_alpha($text); } +} +if (!function_exists('ctype_cntrl')) { + function ctype_cntrl(mixed $text): bool { return p\Ctype::ctype_cntrl($text); } +} +if (!function_exists('ctype_digit')) { + function ctype_digit(mixed $text): bool { return p\Ctype::ctype_digit($text); } +} +if (!function_exists('ctype_graph')) { + function ctype_graph(mixed $text): bool { return p\Ctype::ctype_graph($text); } +} +if (!function_exists('ctype_lower')) { + function ctype_lower(mixed $text): bool { return p\Ctype::ctype_lower($text); } +} +if (!function_exists('ctype_print')) { + function ctype_print(mixed $text): bool { return p\Ctype::ctype_print($text); } +} +if (!function_exists('ctype_punct')) { + function ctype_punct(mixed $text): bool { return p\Ctype::ctype_punct($text); } +} +if (!function_exists('ctype_space')) { + function ctype_space(mixed $text): bool { return p\Ctype::ctype_space($text); } +} +if (!function_exists('ctype_upper')) { + function ctype_upper(mixed $text): bool { return p\Ctype::ctype_upper($text); } +} +if (!function_exists('ctype_xdigit')) { + function ctype_xdigit(mixed $text): bool { return p\Ctype::ctype_xdigit($text); } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-ctype/composer.json b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-ctype/composer.json new file mode 100644 index 0000000..131ca7a --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-ctype/composer.json @@ -0,0 +1,38 @@ +{ + "name": "symfony/polyfill-ctype", + "type": "library", + "description": "Symfony polyfill for ctype functions", + "keywords": ["polyfill", "compatibility", "portable", "ctype"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=7.2" + }, + "provide": { + "ext-ctype": "*" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Ctype\\": "" }, + "files": [ "bootstrap.php" ] + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "minimum-stability": "dev", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/LICENSE b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/LICENSE new file mode 100644 index 0000000..6e3afce --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015-present Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/Mbstring.php b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/Mbstring.php new file mode 100644 index 0000000..31e36a3 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/Mbstring.php @@ -0,0 +1,1045 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Mbstring; + +/** + * Partial mbstring implementation in PHP, iconv based, UTF-8 centric. + * + * Implemented: + * - mb_chr - Returns a specific character from its Unicode code point + * - mb_convert_encoding - Convert character encoding + * - mb_convert_variables - Convert character code in variable(s) + * - mb_decode_mimeheader - Decode string in MIME header field + * - mb_encode_mimeheader - Encode string for MIME header XXX NATIVE IMPLEMENTATION IS REALLY BUGGED + * - mb_decode_numericentity - Decode HTML numeric string reference to character + * - mb_encode_numericentity - Encode character to HTML numeric string reference + * - mb_convert_case - Perform case folding on a string + * - mb_detect_encoding - Detect character encoding + * - mb_get_info - Get internal settings of mbstring + * - mb_http_input - Detect HTTP input character encoding + * - mb_http_output - Set/Get HTTP output character encoding + * - mb_internal_encoding - Set/Get internal character encoding + * - mb_list_encodings - Returns an array of all supported encodings + * - mb_ord - Returns the Unicode code point of a character + * - mb_output_handler - Callback function converts character encoding in output buffer + * - mb_scrub - Replaces ill-formed byte sequences with substitute characters + * - mb_strlen - Get string length + * - mb_strpos - Find position of first occurrence of string in a string + * - mb_strrpos - Find position of last occurrence of a string in a string + * - mb_str_split - Convert a string to an array + * - mb_strtolower - Make a string lowercase + * - mb_strtoupper - Make a string uppercase + * - mb_substitute_character - Set/Get substitution character + * - mb_substr - Get part of string + * - mb_stripos - Finds position of first occurrence of a string within another, case insensitive + * - mb_stristr - Finds first occurrence of a string within another, case insensitive + * - mb_strrchr - Finds the last occurrence of a character in a string within another + * - mb_strrichr - Finds the last occurrence of a character in a string within another, case insensitive + * - mb_strripos - Finds position of last occurrence of a string within another, case insensitive + * - mb_strstr - Finds first occurrence of a string within another + * - mb_strwidth - Return width of string + * - mb_substr_count - Count the number of substring occurrences + * - mb_ucfirst - Make a string's first character uppercase + * - mb_lcfirst - Make a string's first character lowercase + * - mb_trim - Strip whitespace (or other characters) from the beginning and end of a string + * - mb_ltrim - Strip whitespace (or other characters) from the beginning of a string + * - mb_rtrim - Strip whitespace (or other characters) from the end of a string + * + * Not implemented: + * - mb_convert_kana - Convert "kana" one from another ("zen-kaku", "han-kaku" and more) + * - mb_ereg_* - Regular expression with multibyte support + * - mb_parse_str - Parse GET/POST/COOKIE data and set global variable + * - mb_preferred_mime_name - Get MIME charset string + * - mb_regex_encoding - Returns current encoding for multibyte regex as string + * - mb_regex_set_options - Set/Get the default options for mbregex functions + * - mb_send_mail - Send encoded mail + * - mb_split - Split multibyte string using regular expression + * - mb_strcut - Get part of string + * - mb_strimwidth - Get truncated string with specified width + * + * @author Nicolas Grekas <p@tchwork.com> + * + * @internal + */ +final class Mbstring +{ + public const MB_CASE_FOLD = \PHP_INT_MAX; + + private const SIMPLE_CASE_FOLD = [ + ['µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"], + ['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'], + ]; + + private static $encodingList = ['ASCII', 'UTF-8']; + private static $language = 'neutral'; + private static $internalEncoding = 'UTF-8'; + + public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null) + { + if (\is_array($s)) { + $r = []; + foreach ($s as $str) { + $r[] = self::mb_convert_encoding($str, $toEncoding, $fromEncoding); + } + + return $r; + } + + if (\is_array($fromEncoding) || (null !== $fromEncoding && false !== strpos($fromEncoding, ','))) { + $fromEncoding = self::mb_detect_encoding($s, $fromEncoding); + } else { + $fromEncoding = self::getEncoding($fromEncoding); + } + + $toEncoding = self::getEncoding($toEncoding); + + if ('BASE64' === $fromEncoding) { + $s = base64_decode($s); + $fromEncoding = $toEncoding; + } + + if ('BASE64' === $toEncoding) { + return base64_encode($s); + } + + if ('HTML-ENTITIES' === $toEncoding || 'HTML' === $toEncoding) { + if ('HTML-ENTITIES' === $fromEncoding || 'HTML' === $fromEncoding) { + $fromEncoding = 'Windows-1252'; + } + if ('UTF-8' !== $fromEncoding) { + $s = iconv($fromEncoding, 'UTF-8//IGNORE', $s); + } + + return preg_replace_callback('/[\x80-\xFF]+/', [__CLASS__, 'html_encoding_callback'], $s); + } + + if ('HTML-ENTITIES' === $fromEncoding) { + $s = html_entity_decode($s, \ENT_COMPAT, 'UTF-8'); + $fromEncoding = 'UTF-8'; + } + + return iconv($fromEncoding, $toEncoding.'//IGNORE', $s); + } + + public static function mb_convert_variables($toEncoding, $fromEncoding, &...$vars) + { + $ok = true; + array_walk_recursive($vars, function (&$v) use (&$ok, $toEncoding, $fromEncoding) { + if (false === $v = self::mb_convert_encoding($v, $toEncoding, $fromEncoding)) { + $ok = false; + } + }); + + return $ok ? $fromEncoding : false; + } + + public static function mb_decode_mimeheader($s) + { + return iconv_mime_decode($s, 2, self::$internalEncoding); + } + + public static function mb_encode_mimeheader($s, $charset = null, $transferEncoding = null, $linefeed = null, $indent = null) + { + trigger_error('mb_encode_mimeheader() is bugged. Please use iconv_mime_encode() instead', \E_USER_WARNING); + } + + public static function mb_decode_numericentity($s, $convmap, $encoding = null) + { + if (null !== $s && !\is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) { + trigger_error('mb_decode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_WARNING); + + return null; + } + + if (!\is_array($convmap) || (80000 > \PHP_VERSION_ID && !$convmap)) { + return false; + } + + if (null !== $encoding && !\is_scalar($encoding)) { + trigger_error('mb_decode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING); + + return ''; // Instead of null (cf. mb_encode_numericentity). + } + + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + $cnt = floor(\count($convmap) / 4) * 4; + + for ($i = 0; $i < $cnt; $i += 4) { + // collector_decode_htmlnumericentity ignores $convmap[$i + 3] + $convmap[$i] += $convmap[$i + 2]; + $convmap[$i + 1] += $convmap[$i + 2]; + } + + $s = preg_replace_callback('/&#(?:0*([0-9]+)|x0*([0-9a-fA-F]+))(?!&);?/', function (array $m) use ($cnt, $convmap) { + $c = isset($m[2]) ? (int) hexdec($m[2]) : $m[1]; + for ($i = 0; $i < $cnt; $i += 4) { + if ($c >= $convmap[$i] && $c <= $convmap[$i + 1]) { + return self::mb_chr($c - $convmap[$i + 2]); + } + } + + return $m[0]; + }, $s); + + if (null === $encoding) { + return $s; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $s); + } + + public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = false) + { + if (null !== $s && !\is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) { + trigger_error('mb_encode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_WARNING); + + return null; + } + + if (!\is_array($convmap) || (80000 > \PHP_VERSION_ID && !$convmap)) { + return false; + } + + if (null !== $encoding && !\is_scalar($encoding)) { + trigger_error('mb_encode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING); + + return null; // Instead of '' (cf. mb_decode_numericentity). + } + + if (null !== $is_hex && !\is_scalar($is_hex)) { + trigger_error('mb_encode_numericentity() expects parameter 4 to be boolean, '.\gettype($s).' given', \E_USER_WARNING); + + return null; + } + + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4]; + + $cnt = floor(\count($convmap) / 4) * 4; + $i = 0; + $len = \strlen($s); + $result = ''; + + while ($i < $len) { + $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + $i += $ulen; + $c = self::mb_ord($uchr); + + for ($j = 0; $j < $cnt; $j += 4) { + if ($c >= $convmap[$j] && $c <= $convmap[$j + 1]) { + $cOffset = ($c + $convmap[$j + 2]) & $convmap[$j + 3]; + $result .= $is_hex ? sprintf('&#x%X;', $cOffset) : '&#'.$cOffset.';'; + continue 2; + } + } + $result .= $uchr; + } + + if (null === $encoding) { + return $result; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $result); + } + + public static function mb_convert_case($s, $mode, $encoding = null) + { + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + if (\MB_CASE_TITLE == $mode) { + static $titleRegexp = null; + if (null === $titleRegexp) { + $titleRegexp = self::getData('titleCaseRegexp'); + } + $s = preg_replace_callback($titleRegexp, [__CLASS__, 'title_case'], $s); + } else { + if (\MB_CASE_UPPER == $mode) { + static $upper = null; + if (null === $upper) { + $upper = self::getData('upperCase'); + } + $map = $upper; + } else { + if (self::MB_CASE_FOLD === $mode) { + static $caseFolding = null; + if (null === $caseFolding) { + $caseFolding = self::getData('caseFolding'); + } + $s = strtr($s, $caseFolding); + } + + static $lower = null; + if (null === $lower) { + $lower = self::getData('lowerCase'); + } + $map = $lower; + } + + static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4]; + + $i = 0; + $len = \strlen($s); + + while ($i < $len) { + $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + $i += $ulen; + + if (isset($map[$uchr])) { + $uchr = $map[$uchr]; + $nlen = \strlen($uchr); + + if ($nlen == $ulen) { + $nlen = $i; + do { + $s[--$nlen] = $uchr[--$ulen]; + } while ($ulen); + } else { + $s = substr_replace($s, $uchr, $i - $ulen, $ulen); + $len += $nlen - $ulen; + $i += $nlen - $ulen; + } + } + } + } + + if (null === $encoding) { + return $s; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $s); + } + + public static function mb_internal_encoding($encoding = null) + { + if (null === $encoding) { + return self::$internalEncoding; + } + + $normalizedEncoding = self::getEncoding($encoding); + + if ('UTF-8' === $normalizedEncoding || false !== @iconv($normalizedEncoding, $normalizedEncoding, ' ')) { + self::$internalEncoding = $normalizedEncoding; + + return true; + } + + if (80000 > \PHP_VERSION_ID) { + return false; + } + + throw new \ValueError(sprintf('Argument #1 ($encoding) must be a valid encoding, "%s" given', $encoding)); + } + + public static function mb_language($lang = null) + { + if (null === $lang) { + return self::$language; + } + + switch ($normalizedLang = strtolower($lang)) { + case 'uni': + case 'neutral': + self::$language = $normalizedLang; + + return true; + } + + if (80000 > \PHP_VERSION_ID) { + return false; + } + + throw new \ValueError(sprintf('Argument #1 ($language) must be a valid language, "%s" given', $lang)); + } + + public static function mb_list_encodings() + { + return ['UTF-8']; + } + + public static function mb_encoding_aliases($encoding) + { + switch (strtoupper($encoding)) { + case 'UTF8': + case 'UTF-8': + return ['utf8']; + } + + return false; + } + + public static function mb_check_encoding($var = null, $encoding = null) + { + if (null === $encoding) { + if (null === $var) { + return false; + } + $encoding = self::$internalEncoding; + } + + if (!\is_array($var)) { + return self::mb_detect_encoding($var, [$encoding]) || false !== @iconv($encoding, $encoding, $var); + } + + foreach ($var as $key => $value) { + if (!self::mb_check_encoding($key, $encoding)) { + return false; + } + if (!self::mb_check_encoding($value, $encoding)) { + return false; + } + } + + return true; + } + + public static function mb_detect_encoding($str, $encodingList = null, $strict = false) + { + if (null === $encodingList) { + $encodingList = self::$encodingList; + } else { + if (!\is_array($encodingList)) { + $encodingList = array_map('trim', explode(',', $encodingList)); + } + $encodingList = array_map('strtoupper', $encodingList); + } + + foreach ($encodingList as $enc) { + switch ($enc) { + case 'ASCII': + if (!preg_match('/[\x80-\xFF]/', $str)) { + return $enc; + } + break; + + case 'UTF8': + case 'UTF-8': + if (preg_match('//u', $str)) { + return 'UTF-8'; + } + break; + + default: + if (0 === strncmp($enc, 'ISO-8859-', 9)) { + return $enc; + } + } + } + + return false; + } + + public static function mb_detect_order($encodingList = null) + { + if (null === $encodingList) { + return self::$encodingList; + } + + if (!\is_array($encodingList)) { + $encodingList = array_map('trim', explode(',', $encodingList)); + } + $encodingList = array_map('strtoupper', $encodingList); + + foreach ($encodingList as $enc) { + switch ($enc) { + default: + if (strncmp($enc, 'ISO-8859-', 9)) { + return false; + } + // no break + case 'ASCII': + case 'UTF8': + case 'UTF-8': + } + } + + self::$encodingList = $encodingList; + + return true; + } + + public static function mb_strlen($s, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return \strlen($s); + } + + return @iconv_strlen($s, $encoding); + } + + public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return strpos($haystack, $needle, $offset); + } + + $needle = (string) $needle; + if ('' === $needle) { + if (80000 > \PHP_VERSION_ID) { + trigger_error(__METHOD__.': Empty delimiter', \E_USER_WARNING); + + return false; + } + + return 0; + } + + return iconv_strpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return strrpos($haystack, $needle, $offset); + } + + if ($offset != (int) $offset) { + $offset = 0; + } elseif ($offset = (int) $offset) { + if ($offset < 0) { + if (0 > $offset += self::mb_strlen($needle)) { + $haystack = self::mb_substr($haystack, 0, $offset, $encoding); + } + $offset = 0; + } else { + $haystack = self::mb_substr($haystack, $offset, 2147483647, $encoding); + } + } + + $pos = '' !== $needle || 80000 > \PHP_VERSION_ID + ? iconv_strrpos($haystack, $needle, $encoding) + : self::mb_strlen($haystack, $encoding); + + return false !== $pos ? $offset + $pos : false; + } + + public static function mb_str_split($string, $split_length = 1, $encoding = null) + { + if (null !== $string && !\is_scalar($string) && !(\is_object($string) && method_exists($string, '__toString'))) { + trigger_error('mb_str_split() expects parameter 1 to be string, '.\gettype($string).' given', \E_USER_WARNING); + + return null; + } + + if (1 > $split_length = (int) $split_length) { + if (80000 > \PHP_VERSION_ID) { + trigger_error('The length of each segment must be greater than zero', \E_USER_WARNING); + + return false; + } + + throw new \ValueError('Argument #2 ($length) must be greater than 0'); + } + + if (null === $encoding) { + $encoding = mb_internal_encoding(); + } + + if ('UTF-8' === $encoding = self::getEncoding($encoding)) { + $rx = '/('; + while (65535 < $split_length) { + $rx .= '.{65535}'; + $split_length -= 65535; + } + $rx .= '.{'.$split_length.'})/us'; + + return preg_split($rx, $string, -1, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY); + } + + $result = []; + $length = mb_strlen($string, $encoding); + + for ($i = 0; $i < $length; $i += $split_length) { + $result[] = mb_substr($string, $i, $split_length, $encoding); + } + + return $result; + } + + public static function mb_strtolower($s, $encoding = null) + { + return self::mb_convert_case($s, \MB_CASE_LOWER, $encoding); + } + + public static function mb_strtoupper($s, $encoding = null) + { + return self::mb_convert_case($s, \MB_CASE_UPPER, $encoding); + } + + public static function mb_substitute_character($c = null) + { + if (null === $c) { + return 'none'; + } + if (0 === strcasecmp($c, 'none')) { + return true; + } + if (80000 > \PHP_VERSION_ID) { + return false; + } + if (\is_int($c) || 'long' === $c || 'entity' === $c) { + return false; + } + + throw new \ValueError('Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint'); + } + + public static function mb_substr($s, $start, $length = null, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return (string) substr($s, $start, null === $length ? 2147483647 : $length); + } + + if ($start < 0) { + $start = iconv_strlen($s, $encoding) + $start; + if ($start < 0) { + $start = 0; + } + } + + if (null === $length) { + $length = 2147483647; + } elseif ($length < 0) { + $length = iconv_strlen($s, $encoding) + $length - $start; + if ($length < 0) { + return ''; + } + } + + return (string) iconv_substr($s, $start, $length, $encoding); + } + + public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) + { + [$haystack, $needle] = str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], [ + self::mb_convert_case($haystack, \MB_CASE_LOWER, $encoding), + self::mb_convert_case($needle, \MB_CASE_LOWER, $encoding), + ]); + + return self::mb_strpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_stristr($haystack, $needle, $part = false, $encoding = null) + { + $pos = self::mb_stripos($haystack, $needle, 0, $encoding); + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strrchr($haystack, $needle, $part = false, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + $pos = strrpos($haystack, $needle); + } else { + $needle = self::mb_substr($needle, 0, 1, $encoding); + $pos = iconv_strrpos($haystack, $needle, $encoding); + } + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strrichr($haystack, $needle, $part = false, $encoding = null) + { + $needle = self::mb_substr($needle, 0, 1, $encoding); + $pos = self::mb_strripos($haystack, $needle, $encoding); + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) + { + $haystack = self::mb_convert_case($haystack, \MB_CASE_LOWER, $encoding); + $needle = self::mb_convert_case($needle, \MB_CASE_LOWER, $encoding); + + $haystack = str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], $haystack); + $needle = str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], $needle); + + return self::mb_strrpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_strstr($haystack, $needle, $part = false, $encoding = null) + { + $pos = strpos($haystack, $needle); + if (false === $pos) { + return false; + } + if ($part) { + return substr($haystack, 0, $pos); + } + + return substr($haystack, $pos); + } + + public static function mb_get_info($type = 'all') + { + $info = [ + 'internal_encoding' => self::$internalEncoding, + 'http_output' => 'pass', + 'http_output_conv_mimetypes' => '^(text/|application/xhtml\+xml)', + 'func_overload' => 0, + 'func_overload_list' => 'no overload', + 'mail_charset' => 'UTF-8', + 'mail_header_encoding' => 'BASE64', + 'mail_body_encoding' => 'BASE64', + 'illegal_chars' => 0, + 'encoding_translation' => 'Off', + 'language' => self::$language, + 'detect_order' => self::$encodingList, + 'substitute_character' => 'none', + 'strict_detection' => 'Off', + ]; + + if ('all' === $type) { + return $info; + } + if (isset($info[$type])) { + return $info[$type]; + } + + return false; + } + + public static function mb_http_input($type = '') + { + return false; + } + + public static function mb_http_output($encoding = null) + { + return null !== $encoding ? 'pass' === $encoding : 'pass'; + } + + public static function mb_strwidth($s, $encoding = null) + { + $encoding = self::getEncoding($encoding); + + if ('UTF-8' !== $encoding) { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + $s = preg_replace('/[\x{1100}-\x{115F}\x{2329}\x{232A}\x{2E80}-\x{303E}\x{3040}-\x{A4CF}\x{AC00}-\x{D7A3}\x{F900}-\x{FAFF}\x{FE10}-\x{FE19}\x{FE30}-\x{FE6F}\x{FF00}-\x{FF60}\x{FFE0}-\x{FFE6}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}]/u', '', $s, -1, $wide); + + return ($wide << 1) + iconv_strlen($s, 'UTF-8'); + } + + public static function mb_substr_count($haystack, $needle, $encoding = null) + { + return substr_count($haystack, $needle); + } + + public static function mb_output_handler($contents, $status) + { + return $contents; + } + + public static function mb_chr($code, $encoding = null) + { + if (0x80 > $code %= 0x200000) { + $s = \chr($code); + } elseif (0x800 > $code) { + $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F); + } elseif (0x10000 > $code) { + $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } else { + $s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } + + if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { + $s = mb_convert_encoding($s, $encoding, 'UTF-8'); + } + + return $s; + } + + public static function mb_ord($s, $encoding = null) + { + if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { + $s = mb_convert_encoding($s, 'UTF-8', $encoding); + } + + if (1 === \strlen($s)) { + return \ord($s); + } + + $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0; + if (0xF0 <= $code) { + return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80; + } + if (0xE0 <= $code) { + return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80; + } + if (0xC0 <= $code) { + return (($code - 0xC0) << 6) + $s[2] - 0x80; + } + + return $code; + } + + public static function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = \STR_PAD_RIGHT, ?string $encoding = null): string + { + if (!\in_array($pad_type, [\STR_PAD_RIGHT, \STR_PAD_LEFT, \STR_PAD_BOTH], true)) { + throw new \ValueError('mb_str_pad(): Argument #4 ($pad_type) must be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH'); + } + + if (null === $encoding) { + $encoding = self::mb_internal_encoding(); + } else { + self::assertEncoding($encoding, 'mb_str_pad(): Argument #5 ($encoding) must be a valid encoding, "%s" given'); + } + + if (self::mb_strlen($pad_string, $encoding) <= 0) { + throw new \ValueError('mb_str_pad(): Argument #3 ($pad_string) must be a non-empty string'); + } + + $paddingRequired = $length - self::mb_strlen($string, $encoding); + + if ($paddingRequired < 1) { + return $string; + } + + switch ($pad_type) { + case \STR_PAD_LEFT: + return self::mb_substr(str_repeat($pad_string, $paddingRequired), 0, $paddingRequired, $encoding).$string; + case \STR_PAD_RIGHT: + return $string.self::mb_substr(str_repeat($pad_string, $paddingRequired), 0, $paddingRequired, $encoding); + default: + $leftPaddingLength = floor($paddingRequired / 2); + $rightPaddingLength = $paddingRequired - $leftPaddingLength; + + return self::mb_substr(str_repeat($pad_string, $leftPaddingLength), 0, $leftPaddingLength, $encoding).$string.self::mb_substr(str_repeat($pad_string, $rightPaddingLength), 0, $rightPaddingLength, $encoding); + } + } + + public static function mb_ucfirst(string $string, ?string $encoding = null): string + { + if (null === $encoding) { + $encoding = self::mb_internal_encoding(); + } else { + self::assertEncoding($encoding, 'mb_ucfirst(): Argument #2 ($encoding) must be a valid encoding, "%s" given'); + } + + $firstChar = mb_substr($string, 0, 1, $encoding); + $firstChar = mb_convert_case($firstChar, \MB_CASE_TITLE, $encoding); + + return $firstChar.mb_substr($string, 1, null, $encoding); + } + + public static function mb_lcfirst(string $string, ?string $encoding = null): string + { + if (null === $encoding) { + $encoding = self::mb_internal_encoding(); + } else { + self::assertEncoding($encoding, 'mb_lcfirst(): Argument #2 ($encoding) must be a valid encoding, "%s" given'); + } + + $firstChar = mb_substr($string, 0, 1, $encoding); + $firstChar = mb_convert_case($firstChar, \MB_CASE_LOWER, $encoding); + + return $firstChar.mb_substr($string, 1, null, $encoding); + } + + private static function getSubpart($pos, $part, $haystack, $encoding) + { + if (false === $pos) { + return false; + } + if ($part) { + return self::mb_substr($haystack, 0, $pos, $encoding); + } + + return self::mb_substr($haystack, $pos, null, $encoding); + } + + private static function html_encoding_callback(array $m) + { + $i = 1; + $entities = ''; + $m = unpack('C*', htmlentities($m[0], \ENT_COMPAT, 'UTF-8')); + + while (isset($m[$i])) { + if (0x80 > $m[$i]) { + $entities .= \chr($m[$i++]); + continue; + } + if (0xF0 <= $m[$i]) { + $c = (($m[$i++] - 0xF0) << 18) + (($m[$i++] - 0x80) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; + } elseif (0xE0 <= $m[$i]) { + $c = (($m[$i++] - 0xE0) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; + } else { + $c = (($m[$i++] - 0xC0) << 6) + $m[$i++] - 0x80; + } + + $entities .= '&#'.$c.';'; + } + + return $entities; + } + + private static function title_case(array $s) + { + return self::mb_convert_case($s[1], \MB_CASE_UPPER, 'UTF-8').self::mb_convert_case($s[2], \MB_CASE_LOWER, 'UTF-8'); + } + + private static function getData($file) + { + if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) { + return require $file; + } + + return false; + } + + private static function getEncoding($encoding) + { + if (null === $encoding) { + return self::$internalEncoding; + } + + if ('UTF-8' === $encoding) { + return 'UTF-8'; + } + + $encoding = strtoupper($encoding); + + if ('8BIT' === $encoding || 'BINARY' === $encoding) { + return 'CP850'; + } + + if ('UTF8' === $encoding) { + return 'UTF-8'; + } + + return $encoding; + } + + public static function mb_trim(string $string, ?string $characters = null, ?string $encoding = null): string + { + return self::mb_internal_trim('{^[%s]+|[%1$s]+$}Du', $string, $characters, $encoding, __FUNCTION__); + } + + public static function mb_ltrim(string $string, ?string $characters = null, ?string $encoding = null): string + { + return self::mb_internal_trim('{^[%s]+}Du', $string, $characters, $encoding, __FUNCTION__); + } + + public static function mb_rtrim(string $string, ?string $characters = null, ?string $encoding = null): string + { + return self::mb_internal_trim('{[%s]+$}Du', $string, $characters, $encoding, __FUNCTION__); + } + + private static function mb_internal_trim(string $regex, string $string, ?string $characters, ?string $encoding, string $function): string + { + if (null === $encoding) { + $encoding = self::mb_internal_encoding(); + } else { + self::assertEncoding($encoding, $function.'(): Argument #3 ($encoding) must be a valid encoding, "%s" given'); + } + + if ('' === $characters) { + return null === $encoding ? $string : self::mb_convert_encoding($string, $encoding); + } + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $string)) { + $string = @iconv('UTF-8', 'UTF-8//IGNORE', $string); + } + if (null !== $characters && !preg_match('//u', $characters)) { + $characters = @iconv('UTF-8', 'UTF-8//IGNORE', $characters); + } + } else { + $string = iconv($encoding, 'UTF-8//IGNORE', $string); + + if (null !== $characters) { + $characters = iconv($encoding, 'UTF-8//IGNORE', $characters); + } + } + + if (null === $characters) { + $characters = "\\0 \f\n\r\t\v\u{00A0}\u{1680}\u{2000}\u{2001}\u{2002}\u{2003}\u{2004}\u{2005}\u{2006}\u{2007}\u{2008}\u{2009}\u{200A}\u{2028}\u{2029}\u{202F}\u{205F}\u{3000}\u{0085}\u{180E}"; + } else { + $characters = preg_quote($characters); + } + + $string = preg_replace(sprintf($regex, $characters), '', $string); + + if (null === $encoding) { + return $string; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $string); + } + + private static function assertEncoding(string $encoding, string $errorFormat): void + { + try { + $validEncoding = @self::mb_check_encoding('', $encoding); + } catch (\ValueError $e) { + throw new \ValueError(sprintf($errorFormat, $encoding)); + } + + // BC for PHP 7.3 and lower + if (!$validEncoding) { + throw new \ValueError(sprintf($errorFormat, $encoding)); + } + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/README.md b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/README.md new file mode 100644 index 0000000..478b40d --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/README.md @@ -0,0 +1,13 @@ +Symfony Polyfill / Mbstring +=========================== + +This component provides a partial, native PHP implementation for the +[Mbstring](https://php.net/mbstring) extension. + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php new file mode 100644 index 0000000..512bba0 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php @@ -0,0 +1,119 @@ +<?php + +return [ + 'İ' => 'i̇', + 'µ' => 'μ', + 'ſ' => 's', + 'ͅ' => 'ι', + 'ς' => 'σ', + 'ϐ' => 'β', + 'ϑ' => 'θ', + 'ϕ' => 'φ', + 'ϖ' => 'π', + 'ϰ' => 'κ', + 'ϱ' => 'ρ', + 'ϵ' => 'ε', + 'ẛ' => 'ṡ', + 'ι' => 'ι', + 'ß' => 'ss', + 'ʼn' => 'ʼn', + 'ǰ' => 'ǰ', + 'ΐ' => 'ΐ', + 'ΰ' => 'ΰ', + 'և' => 'եւ', + 'ẖ' => 'ẖ', + 'ẗ' => 'ẗ', + 'ẘ' => 'ẘ', + 'ẙ' => 'ẙ', + 'ẚ' => 'aʾ', + 'ẞ' => 'ss', + 'ὐ' => 'ὐ', + 'ὒ' => 'ὒ', + 'ὔ' => 'ὔ', + 'ὖ' => 'ὖ', + 'ᾀ' => 'ἀι', + 'ᾁ' => 'ἁι', + 'ᾂ' => 'ἂι', + 'ᾃ' => 'ἃι', + 'ᾄ' => 'ἄι', + 'ᾅ' => 'ἅι', + 'ᾆ' => 'ἆι', + 'ᾇ' => 'ἇι', + 'ᾈ' => 'ἀι', + 'ᾉ' => 'ἁι', + 'ᾊ' => 'ἂι', + 'ᾋ' => 'ἃι', + 'ᾌ' => 'ἄι', + 'ᾍ' => 'ἅι', + 'ᾎ' => 'ἆι', + 'ᾏ' => 'ἇι', + 'ᾐ' => 'ἠι', + 'ᾑ' => 'ἡι', + 'ᾒ' => 'ἢι', + 'ᾓ' => 'ἣι', + 'ᾔ' => 'ἤι', + 'ᾕ' => 'ἥι', + 'ᾖ' => 'ἦι', + 'ᾗ' => 'ἧι', + 'ᾘ' => 'ἠι', + 'ᾙ' => 'ἡι', + 'ᾚ' => 'ἢι', + 'ᾛ' => 'ἣι', + 'ᾜ' => 'ἤι', + 'ᾝ' => 'ἥι', + 'ᾞ' => 'ἦι', + 'ᾟ' => 'ἧι', + 'ᾠ' => 'ὠι', + 'ᾡ' => 'ὡι', + 'ᾢ' => 'ὢι', + 'ᾣ' => 'ὣι', + 'ᾤ' => 'ὤι', + 'ᾥ' => 'ὥι', + 'ᾦ' => 'ὦι', + 'ᾧ' => 'ὧι', + 'ᾨ' => 'ὠι', + 'ᾩ' => 'ὡι', + 'ᾪ' => 'ὢι', + 'ᾫ' => 'ὣι', + 'ᾬ' => 'ὤι', + 'ᾭ' => 'ὥι', + 'ᾮ' => 'ὦι', + 'ᾯ' => 'ὧι', + 'ᾲ' => 'ὰι', + 'ᾳ' => 'αι', + 'ᾴ' => 'άι', + 'ᾶ' => 'ᾶ', + 'ᾷ' => 'ᾶι', + 'ᾼ' => 'αι', + 'ῂ' => 'ὴι', + 'ῃ' => 'ηι', + 'ῄ' => 'ήι', + 'ῆ' => 'ῆ', + 'ῇ' => 'ῆι', + 'ῌ' => 'ηι', + 'ῒ' => 'ῒ', + 'ῖ' => 'ῖ', + 'ῗ' => 'ῗ', + 'ῢ' => 'ῢ', + 'ῤ' => 'ῤ', + 'ῦ' => 'ῦ', + 'ῧ' => 'ῧ', + 'ῲ' => 'ὼι', + 'ῳ' => 'ωι', + 'ῴ' => 'ώι', + 'ῶ' => 'ῶ', + 'ῷ' => 'ῶι', + 'ῼ' => 'ωι', + 'ff' => 'ff', + 'fi' => 'fi', + 'fl' => 'fl', + 'ffi' => 'ffi', + 'ffl' => 'ffl', + 'ſt' => 'st', + 'st' => 'st', + 'ﬓ' => 'մն', + 'ﬔ' => 'մե', + 'ﬕ' => 'մի', + 'ﬖ' => 'վն', + 'ﬗ' => 'մխ', +]; diff --git a/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php new file mode 100644 index 0000000..fac60b0 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php @@ -0,0 +1,1397 @@ +<?php + +return array ( + 'A' => 'a', + 'B' => 'b', + 'C' => 'c', + 'D' => 'd', + 'E' => 'e', + 'F' => 'f', + 'G' => 'g', + 'H' => 'h', + 'I' => 'i', + 'J' => 'j', + 'K' => 'k', + 'L' => 'l', + 'M' => 'm', + 'N' => 'n', + 'O' => 'o', + 'P' => 'p', + 'Q' => 'q', + 'R' => 'r', + 'S' => 's', + 'T' => 't', + 'U' => 'u', + 'V' => 'v', + 'W' => 'w', + 'X' => 'x', + 'Y' => 'y', + 'Z' => 'z', + 'À' => 'à', + 'Á' => 'á', + 'Â' => 'â', + 'Ã' => 'ã', + 'Ä' => 'ä', + 'Å' => 'å', + 'Æ' => 'æ', + 'Ç' => 'ç', + 'È' => 'è', + 'É' => 'é', + 'Ê' => 'ê', + 'Ë' => 'ë', + 'Ì' => 'ì', + 'Í' => 'í', + 'Î' => 'î', + 'Ï' => 'ï', + 'Ð' => 'ð', + 'Ñ' => 'ñ', + 'Ò' => 'ò', + 'Ó' => 'ó', + 'Ô' => 'ô', + 'Õ' => 'õ', + 'Ö' => 'ö', + 'Ø' => 'ø', + 'Ù' => 'ù', + 'Ú' => 'ú', + 'Û' => 'û', + 'Ü' => 'ü', + 'Ý' => 'ý', + 'Þ' => 'þ', + 'Ā' => 'ā', + 'Ă' => 'ă', + 'Ą' => 'ą', + 'Ć' => 'ć', + 'Ĉ' => 'ĉ', + 'Ċ' => 'ċ', + 'Č' => 'č', + 'Ď' => 'ď', + 'Đ' => 'đ', + 'Ē' => 'ē', + 'Ĕ' => 'ĕ', + 'Ė' => 'ė', + 'Ę' => 'ę', + 'Ě' => 'ě', + 'Ĝ' => 'ĝ', + 'Ğ' => 'ğ', + 'Ġ' => 'ġ', + 'Ģ' => 'ģ', + 'Ĥ' => 'ĥ', + 'Ħ' => 'ħ', + 'Ĩ' => 'ĩ', + 'Ī' => 'ī', + 'Ĭ' => 'ĭ', + 'Į' => 'į', + 'İ' => 'i̇', + 'IJ' => 'ij', + 'Ĵ' => 'ĵ', + 'Ķ' => 'ķ', + 'Ĺ' => 'ĺ', + 'Ļ' => 'ļ', + 'Ľ' => 'ľ', + 'Ŀ' => 'ŀ', + 'Ł' => 'ł', + 'Ń' => 'ń', + 'Ņ' => 'ņ', + 'Ň' => 'ň', + 'Ŋ' => 'ŋ', + 'Ō' => 'ō', + 'Ŏ' => 'ŏ', + 'Ő' => 'ő', + 'Œ' => 'œ', + 'Ŕ' => 'ŕ', + 'Ŗ' => 'ŗ', + 'Ř' => 'ř', + 'Ś' => 'ś', + 'Ŝ' => 'ŝ', + 'Ş' => 'ş', + 'Š' => 'š', + 'Ţ' => 'ţ', + 'Ť' => 'ť', + 'Ŧ' => 'ŧ', + 'Ũ' => 'ũ', + 'Ū' => 'ū', + 'Ŭ' => 'ŭ', + 'Ů' => 'ů', + 'Ű' => 'ű', + 'Ų' => 'ų', + 'Ŵ' => 'ŵ', + 'Ŷ' => 'ŷ', + 'Ÿ' => 'ÿ', + 'Ź' => 'ź', + 'Ż' => 'ż', + 'Ž' => 'ž', + 'Ɓ' => 'ɓ', + 'Ƃ' => 'ƃ', + 'Ƅ' => 'ƅ', + 'Ɔ' => 'ɔ', + 'Ƈ' => 'ƈ', + 'Ɖ' => 'ɖ', + 'Ɗ' => 'ɗ', + 'Ƌ' => 'ƌ', + 'Ǝ' => 'ǝ', + 'Ə' => 'ə', + 'Ɛ' => 'ɛ', + 'Ƒ' => 'ƒ', + 'Ɠ' => 'ɠ', + 'Ɣ' => 'ɣ', + 'Ɩ' => 'ɩ', + 'Ɨ' => 'ɨ', + 'Ƙ' => 'ƙ', + 'Ɯ' => 'ɯ', + 'Ɲ' => 'ɲ', + 'Ɵ' => 'ɵ', + 'Ơ' => 'ơ', + 'Ƣ' => 'ƣ', + 'Ƥ' => 'ƥ', + 'Ʀ' => 'ʀ', + 'Ƨ' => 'ƨ', + 'Ʃ' => 'ʃ', + 'Ƭ' => 'ƭ', + 'Ʈ' => 'ʈ', + 'Ư' => 'ư', + 'Ʊ' => 'ʊ', + 'Ʋ' => 'ʋ', + 'Ƴ' => 'ƴ', + 'Ƶ' => 'ƶ', + 'Ʒ' => 'ʒ', + 'Ƹ' => 'ƹ', + 'Ƽ' => 'ƽ', + 'DŽ' => 'dž', + 'Dž' => 'dž', + 'LJ' => 'lj', + 'Lj' => 'lj', + 'NJ' => 'nj', + 'Nj' => 'nj', + 'Ǎ' => 'ǎ', + 'Ǐ' => 'ǐ', + 'Ǒ' => 'ǒ', + 'Ǔ' => 'ǔ', + 'Ǖ' => 'ǖ', + 'Ǘ' => 'ǘ', + 'Ǚ' => 'ǚ', + 'Ǜ' => 'ǜ', + 'Ǟ' => 'ǟ', + 'Ǡ' => 'ǡ', + 'Ǣ' => 'ǣ', + 'Ǥ' => 'ǥ', + 'Ǧ' => 'ǧ', + 'Ǩ' => 'ǩ', + 'Ǫ' => 'ǫ', + 'Ǭ' => 'ǭ', + 'Ǯ' => 'ǯ', + 'DZ' => 'dz', + 'Dz' => 'dz', + 'Ǵ' => 'ǵ', + 'Ƕ' => 'ƕ', + 'Ƿ' => 'ƿ', + 'Ǹ' => 'ǹ', + 'Ǻ' => 'ǻ', + 'Ǽ' => 'ǽ', + 'Ǿ' => 'ǿ', + 'Ȁ' => 'ȁ', + 'Ȃ' => 'ȃ', + 'Ȅ' => 'ȅ', + 'Ȇ' => 'ȇ', + 'Ȉ' => 'ȉ', + 'Ȋ' => 'ȋ', + 'Ȍ' => 'ȍ', + 'Ȏ' => 'ȏ', + 'Ȑ' => 'ȑ', + 'Ȓ' => 'ȓ', + 'Ȕ' => 'ȕ', + 'Ȗ' => 'ȗ', + 'Ș' => 'ș', + 'Ț' => 'ț', + 'Ȝ' => 'ȝ', + 'Ȟ' => 'ȟ', + 'Ƞ' => 'ƞ', + 'Ȣ' => 'ȣ', + 'Ȥ' => 'ȥ', + 'Ȧ' => 'ȧ', + 'Ȩ' => 'ȩ', + 'Ȫ' => 'ȫ', + 'Ȭ' => 'ȭ', + 'Ȯ' => 'ȯ', + 'Ȱ' => 'ȱ', + 'Ȳ' => 'ȳ', + 'Ⱥ' => 'ⱥ', + 'Ȼ' => 'ȼ', + 'Ƚ' => 'ƚ', + 'Ⱦ' => 'ⱦ', + 'Ɂ' => 'ɂ', + 'Ƀ' => 'ƀ', + 'Ʉ' => 'ʉ', + 'Ʌ' => 'ʌ', + 'Ɇ' => 'ɇ', + 'Ɉ' => 'ɉ', + 'Ɋ' => 'ɋ', + 'Ɍ' => 'ɍ', + 'Ɏ' => 'ɏ', + 'Ͱ' => 'ͱ', + 'Ͳ' => 'ͳ', + 'Ͷ' => 'ͷ', + 'Ϳ' => 'ϳ', + 'Ά' => 'ά', + 'Έ' => 'έ', + 'Ή' => 'ή', + 'Ί' => 'ί', + 'Ό' => 'ό', + 'Ύ' => 'ύ', + 'Ώ' => 'ώ', + 'Α' => 'α', + 'Β' => 'β', + 'Γ' => 'γ', + 'Δ' => 'δ', + 'Ε' => 'ε', + 'Ζ' => 'ζ', + 'Η' => 'η', + 'Θ' => 'θ', + 'Ι' => 'ι', + 'Κ' => 'κ', + 'Λ' => 'λ', + 'Μ' => 'μ', + 'Ν' => 'ν', + 'Ξ' => 'ξ', + 'Ο' => 'ο', + 'Π' => 'π', + 'Ρ' => 'ρ', + 'Σ' => 'σ', + 'Τ' => 'τ', + 'Υ' => 'υ', + 'Φ' => 'φ', + 'Χ' => 'χ', + 'Ψ' => 'ψ', + 'Ω' => 'ω', + 'Ϊ' => 'ϊ', + 'Ϋ' => 'ϋ', + 'Ϗ' => 'ϗ', + 'Ϙ' => 'ϙ', + 'Ϛ' => 'ϛ', + 'Ϝ' => 'ϝ', + 'Ϟ' => 'ϟ', + 'Ϡ' => 'ϡ', + 'Ϣ' => 'ϣ', + 'Ϥ' => 'ϥ', + 'Ϧ' => 'ϧ', + 'Ϩ' => 'ϩ', + 'Ϫ' => 'ϫ', + 'Ϭ' => 'ϭ', + 'Ϯ' => 'ϯ', + 'ϴ' => 'θ', + 'Ϸ' => 'ϸ', + 'Ϲ' => 'ϲ', + 'Ϻ' => 'ϻ', + 'Ͻ' => 'ͻ', + 'Ͼ' => 'ͼ', + 'Ͽ' => 'ͽ', + 'Ѐ' => 'ѐ', + 'Ё' => 'ё', + 'Ђ' => 'ђ', + 'Ѓ' => 'ѓ', + 'Є' => 'є', + 'Ѕ' => 'ѕ', + 'І' => 'і', + 'Ї' => 'ї', + 'Ј' => 'ј', + 'Љ' => 'љ', + 'Њ' => 'њ', + 'Ћ' => 'ћ', + 'Ќ' => 'ќ', + 'Ѝ' => 'ѝ', + 'Ў' => 'ў', + 'Џ' => 'џ', + 'А' => 'а', + 'Б' => 'б', + 'В' => 'в', + 'Г' => 'г', + 'Д' => 'д', + 'Е' => 'е', + 'Ж' => 'ж', + 'З' => 'з', + 'И' => 'и', + 'Й' => 'й', + 'К' => 'к', + 'Л' => 'л', + 'М' => 'м', + 'Н' => 'н', + 'О' => 'о', + 'П' => 'п', + 'Р' => 'р', + 'С' => 'с', + 'Т' => 'т', + 'У' => 'у', + 'Ф' => 'ф', + 'Х' => 'х', + 'Ц' => 'ц', + 'Ч' => 'ч', + 'Ш' => 'ш', + 'Щ' => 'щ', + 'Ъ' => 'ъ', + 'Ы' => 'ы', + 'Ь' => 'ь', + 'Э' => 'э', + 'Ю' => 'ю', + 'Я' => 'я', + 'Ѡ' => 'ѡ', + 'Ѣ' => 'ѣ', + 'Ѥ' => 'ѥ', + 'Ѧ' => 'ѧ', + 'Ѩ' => 'ѩ', + 'Ѫ' => 'ѫ', + 'Ѭ' => 'ѭ', + 'Ѯ' => 'ѯ', + 'Ѱ' => 'ѱ', + 'Ѳ' => 'ѳ', + 'Ѵ' => 'ѵ', + 'Ѷ' => 'ѷ', + 'Ѹ' => 'ѹ', + 'Ѻ' => 'ѻ', + 'Ѽ' => 'ѽ', + 'Ѿ' => 'ѿ', + 'Ҁ' => 'ҁ', + 'Ҋ' => 'ҋ', + 'Ҍ' => 'ҍ', + 'Ҏ' => 'ҏ', + 'Ґ' => 'ґ', + 'Ғ' => 'ғ', + 'Ҕ' => 'ҕ', + 'Җ' => 'җ', + 'Ҙ' => 'ҙ', + 'Қ' => 'қ', + 'Ҝ' => 'ҝ', + 'Ҟ' => 'ҟ', + 'Ҡ' => 'ҡ', + 'Ң' => 'ң', + 'Ҥ' => 'ҥ', + 'Ҧ' => 'ҧ', + 'Ҩ' => 'ҩ', + 'Ҫ' => 'ҫ', + 'Ҭ' => 'ҭ', + 'Ү' => 'ү', + 'Ұ' => 'ұ', + 'Ҳ' => 'ҳ', + 'Ҵ' => 'ҵ', + 'Ҷ' => 'ҷ', + 'Ҹ' => 'ҹ', + 'Һ' => 'һ', + 'Ҽ' => 'ҽ', + 'Ҿ' => 'ҿ', + 'Ӏ' => 'ӏ', + 'Ӂ' => 'ӂ', + 'Ӄ' => 'ӄ', + 'Ӆ' => 'ӆ', + 'Ӈ' => 'ӈ', + 'Ӊ' => 'ӊ', + 'Ӌ' => 'ӌ', + 'Ӎ' => 'ӎ', + 'Ӑ' => 'ӑ', + 'Ӓ' => 'ӓ', + 'Ӕ' => 'ӕ', + 'Ӗ' => 'ӗ', + 'Ә' => 'ә', + 'Ӛ' => 'ӛ', + 'Ӝ' => 'ӝ', + 'Ӟ' => 'ӟ', + 'Ӡ' => 'ӡ', + 'Ӣ' => 'ӣ', + 'Ӥ' => 'ӥ', + 'Ӧ' => 'ӧ', + 'Ө' => 'ө', + 'Ӫ' => 'ӫ', + 'Ӭ' => 'ӭ', + 'Ӯ' => 'ӯ', + 'Ӱ' => 'ӱ', + 'Ӳ' => 'ӳ', + 'Ӵ' => 'ӵ', + 'Ӷ' => 'ӷ', + 'Ӹ' => 'ӹ', + 'Ӻ' => 'ӻ', + 'Ӽ' => 'ӽ', + 'Ӿ' => 'ӿ', + 'Ԁ' => 'ԁ', + 'Ԃ' => 'ԃ', + 'Ԅ' => 'ԅ', + 'Ԇ' => 'ԇ', + 'Ԉ' => 'ԉ', + 'Ԋ' => 'ԋ', + 'Ԍ' => 'ԍ', + 'Ԏ' => 'ԏ', + 'Ԑ' => 'ԑ', + 'Ԓ' => 'ԓ', + 'Ԕ' => 'ԕ', + 'Ԗ' => 'ԗ', + 'Ԙ' => 'ԙ', + 'Ԛ' => 'ԛ', + 'Ԝ' => 'ԝ', + 'Ԟ' => 'ԟ', + 'Ԡ' => 'ԡ', + 'Ԣ' => 'ԣ', + 'Ԥ' => 'ԥ', + 'Ԧ' => 'ԧ', + 'Ԩ' => 'ԩ', + 'Ԫ' => 'ԫ', + 'Ԭ' => 'ԭ', + 'Ԯ' => 'ԯ', + 'Ա' => 'ա', + 'Բ' => 'բ', + 'Գ' => 'գ', + 'Դ' => 'դ', + 'Ե' => 'ե', + 'Զ' => 'զ', + 'Է' => 'է', + 'Ը' => 'ը', + 'Թ' => 'թ', + 'Ժ' => 'ժ', + 'Ի' => 'ի', + 'Լ' => 'լ', + 'Խ' => 'խ', + 'Ծ' => 'ծ', + 'Կ' => 'կ', + 'Հ' => 'հ', + 'Ձ' => 'ձ', + 'Ղ' => 'ղ', + 'Ճ' => 'ճ', + 'Մ' => 'մ', + 'Յ' => 'յ', + 'Ն' => 'ն', + 'Շ' => 'շ', + 'Ո' => 'ո', + 'Չ' => 'չ', + 'Պ' => 'պ', + 'Ջ' => 'ջ', + 'Ռ' => 'ռ', + 'Ս' => 'ս', + 'Վ' => 'վ', + 'Տ' => 'տ', + 'Ր' => 'ր', + 'Ց' => 'ց', + 'Ւ' => 'ւ', + 'Փ' => 'փ', + 'Ք' => 'ք', + 'Օ' => 'օ', + 'Ֆ' => 'ֆ', + 'Ⴀ' => 'ⴀ', + 'Ⴁ' => 'ⴁ', + 'Ⴂ' => 'ⴂ', + 'Ⴃ' => 'ⴃ', + 'Ⴄ' => 'ⴄ', + 'Ⴅ' => 'ⴅ', + 'Ⴆ' => 'ⴆ', + 'Ⴇ' => 'ⴇ', + 'Ⴈ' => 'ⴈ', + 'Ⴉ' => 'ⴉ', + 'Ⴊ' => 'ⴊ', + 'Ⴋ' => 'ⴋ', + 'Ⴌ' => 'ⴌ', + 'Ⴍ' => 'ⴍ', + 'Ⴎ' => 'ⴎ', + 'Ⴏ' => 'ⴏ', + 'Ⴐ' => 'ⴐ', + 'Ⴑ' => 'ⴑ', + 'Ⴒ' => 'ⴒ', + 'Ⴓ' => 'ⴓ', + 'Ⴔ' => 'ⴔ', + 'Ⴕ' => 'ⴕ', + 'Ⴖ' => 'ⴖ', + 'Ⴗ' => 'ⴗ', + 'Ⴘ' => 'ⴘ', + 'Ⴙ' => 'ⴙ', + 'Ⴚ' => 'ⴚ', + 'Ⴛ' => 'ⴛ', + 'Ⴜ' => 'ⴜ', + 'Ⴝ' => 'ⴝ', + 'Ⴞ' => 'ⴞ', + 'Ⴟ' => 'ⴟ', + 'Ⴠ' => 'ⴠ', + 'Ⴡ' => 'ⴡ', + 'Ⴢ' => 'ⴢ', + 'Ⴣ' => 'ⴣ', + 'Ⴤ' => 'ⴤ', + 'Ⴥ' => 'ⴥ', + 'Ⴧ' => 'ⴧ', + 'Ⴭ' => 'ⴭ', + 'Ꭰ' => 'ꭰ', + 'Ꭱ' => 'ꭱ', + 'Ꭲ' => 'ꭲ', + 'Ꭳ' => 'ꭳ', + 'Ꭴ' => 'ꭴ', + 'Ꭵ' => 'ꭵ', + 'Ꭶ' => 'ꭶ', + 'Ꭷ' => 'ꭷ', + 'Ꭸ' => 'ꭸ', + 'Ꭹ' => 'ꭹ', + 'Ꭺ' => 'ꭺ', + 'Ꭻ' => 'ꭻ', + 'Ꭼ' => 'ꭼ', + 'Ꭽ' => 'ꭽ', + 'Ꭾ' => 'ꭾ', + 'Ꭿ' => 'ꭿ', + 'Ꮀ' => 'ꮀ', + 'Ꮁ' => 'ꮁ', + 'Ꮂ' => 'ꮂ', + 'Ꮃ' => 'ꮃ', + 'Ꮄ' => 'ꮄ', + 'Ꮅ' => 'ꮅ', + 'Ꮆ' => 'ꮆ', + 'Ꮇ' => 'ꮇ', + 'Ꮈ' => 'ꮈ', + 'Ꮉ' => 'ꮉ', + 'Ꮊ' => 'ꮊ', + 'Ꮋ' => 'ꮋ', + 'Ꮌ' => 'ꮌ', + 'Ꮍ' => 'ꮍ', + 'Ꮎ' => 'ꮎ', + 'Ꮏ' => 'ꮏ', + 'Ꮐ' => 'ꮐ', + 'Ꮑ' => 'ꮑ', + 'Ꮒ' => 'ꮒ', + 'Ꮓ' => 'ꮓ', + 'Ꮔ' => 'ꮔ', + 'Ꮕ' => 'ꮕ', + 'Ꮖ' => 'ꮖ', + 'Ꮗ' => 'ꮗ', + 'Ꮘ' => 'ꮘ', + 'Ꮙ' => 'ꮙ', + 'Ꮚ' => 'ꮚ', + 'Ꮛ' => 'ꮛ', + 'Ꮜ' => 'ꮜ', + 'Ꮝ' => 'ꮝ', + 'Ꮞ' => 'ꮞ', + 'Ꮟ' => 'ꮟ', + 'Ꮠ' => 'ꮠ', + 'Ꮡ' => 'ꮡ', + 'Ꮢ' => 'ꮢ', + 'Ꮣ' => 'ꮣ', + 'Ꮤ' => 'ꮤ', + 'Ꮥ' => 'ꮥ', + 'Ꮦ' => 'ꮦ', + 'Ꮧ' => 'ꮧ', + 'Ꮨ' => 'ꮨ', + 'Ꮩ' => 'ꮩ', + 'Ꮪ' => 'ꮪ', + 'Ꮫ' => 'ꮫ', + 'Ꮬ' => 'ꮬ', + 'Ꮭ' => 'ꮭ', + 'Ꮮ' => 'ꮮ', + 'Ꮯ' => 'ꮯ', + 'Ꮰ' => 'ꮰ', + 'Ꮱ' => 'ꮱ', + 'Ꮲ' => 'ꮲ', + 'Ꮳ' => 'ꮳ', + 'Ꮴ' => 'ꮴ', + 'Ꮵ' => 'ꮵ', + 'Ꮶ' => 'ꮶ', + 'Ꮷ' => 'ꮷ', + 'Ꮸ' => 'ꮸ', + 'Ꮹ' => 'ꮹ', + 'Ꮺ' => 'ꮺ', + 'Ꮻ' => 'ꮻ', + 'Ꮼ' => 'ꮼ', + 'Ꮽ' => 'ꮽ', + 'Ꮾ' => 'ꮾ', + 'Ꮿ' => 'ꮿ', + 'Ᏸ' => 'ᏸ', + 'Ᏹ' => 'ᏹ', + 'Ᏺ' => 'ᏺ', + 'Ᏻ' => 'ᏻ', + 'Ᏼ' => 'ᏼ', + 'Ᏽ' => 'ᏽ', + 'Ა' => 'ა', + 'Ბ' => 'ბ', + 'Გ' => 'გ', + 'Დ' => 'დ', + 'Ე' => 'ე', + 'Ვ' => 'ვ', + 'Ზ' => 'ზ', + 'Თ' => 'თ', + 'Ი' => 'ი', + 'Კ' => 'კ', + 'Ლ' => 'ლ', + 'Მ' => 'მ', + 'Ნ' => 'ნ', + 'Ო' => 'ო', + 'Პ' => 'პ', + 'Ჟ' => 'ჟ', + 'Რ' => 'რ', + 'Ს' => 'ს', + 'Ტ' => 'ტ', + 'Უ' => 'უ', + 'Ფ' => 'ფ', + 'Ქ' => 'ქ', + 'Ღ' => 'ღ', + 'Ყ' => 'ყ', + 'Შ' => 'შ', + 'Ჩ' => 'ჩ', + 'Ც' => 'ც', + 'Ძ' => 'ძ', + 'Წ' => 'წ', + 'Ჭ' => 'ჭ', + 'Ხ' => 'ხ', + 'Ჯ' => 'ჯ', + 'Ჰ' => 'ჰ', + 'Ჱ' => 'ჱ', + 'Ჲ' => 'ჲ', + 'Ჳ' => 'ჳ', + 'Ჴ' => 'ჴ', + 'Ჵ' => 'ჵ', + 'Ჶ' => 'ჶ', + 'Ჷ' => 'ჷ', + 'Ჸ' => 'ჸ', + 'Ჹ' => 'ჹ', + 'Ჺ' => 'ჺ', + 'Ჽ' => 'ჽ', + 'Ჾ' => 'ჾ', + 'Ჿ' => 'ჿ', + 'Ḁ' => 'ḁ', + 'Ḃ' => 'ḃ', + 'Ḅ' => 'ḅ', + 'Ḇ' => 'ḇ', + 'Ḉ' => 'ḉ', + 'Ḋ' => 'ḋ', + 'Ḍ' => 'ḍ', + 'Ḏ' => 'ḏ', + 'Ḑ' => 'ḑ', + 'Ḓ' => 'ḓ', + 'Ḕ' => 'ḕ', + 'Ḗ' => 'ḗ', + 'Ḙ' => 'ḙ', + 'Ḛ' => 'ḛ', + 'Ḝ' => 'ḝ', + 'Ḟ' => 'ḟ', + 'Ḡ' => 'ḡ', + 'Ḣ' => 'ḣ', + 'Ḥ' => 'ḥ', + 'Ḧ' => 'ḧ', + 'Ḩ' => 'ḩ', + 'Ḫ' => 'ḫ', + 'Ḭ' => 'ḭ', + 'Ḯ' => 'ḯ', + 'Ḱ' => 'ḱ', + 'Ḳ' => 'ḳ', + 'Ḵ' => 'ḵ', + 'Ḷ' => 'ḷ', + 'Ḹ' => 'ḹ', + 'Ḻ' => 'ḻ', + 'Ḽ' => 'ḽ', + 'Ḿ' => 'ḿ', + 'Ṁ' => 'ṁ', + 'Ṃ' => 'ṃ', + 'Ṅ' => 'ṅ', + 'Ṇ' => 'ṇ', + 'Ṉ' => 'ṉ', + 'Ṋ' => 'ṋ', + 'Ṍ' => 'ṍ', + 'Ṏ' => 'ṏ', + 'Ṑ' => 'ṑ', + 'Ṓ' => 'ṓ', + 'Ṕ' => 'ṕ', + 'Ṗ' => 'ṗ', + 'Ṙ' => 'ṙ', + 'Ṛ' => 'ṛ', + 'Ṝ' => 'ṝ', + 'Ṟ' => 'ṟ', + 'Ṡ' => 'ṡ', + 'Ṣ' => 'ṣ', + 'Ṥ' => 'ṥ', + 'Ṧ' => 'ṧ', + 'Ṩ' => 'ṩ', + 'Ṫ' => 'ṫ', + 'Ṭ' => 'ṭ', + 'Ṯ' => 'ṯ', + 'Ṱ' => 'ṱ', + 'Ṳ' => 'ṳ', + 'Ṵ' => 'ṵ', + 'Ṷ' => 'ṷ', + 'Ṹ' => 'ṹ', + 'Ṻ' => 'ṻ', + 'Ṽ' => 'ṽ', + 'Ṿ' => 'ṿ', + 'Ẁ' => 'ẁ', + 'Ẃ' => 'ẃ', + 'Ẅ' => 'ẅ', + 'Ẇ' => 'ẇ', + 'Ẉ' => 'ẉ', + 'Ẋ' => 'ẋ', + 'Ẍ' => 'ẍ', + 'Ẏ' => 'ẏ', + 'Ẑ' => 'ẑ', + 'Ẓ' => 'ẓ', + 'Ẕ' => 'ẕ', + 'ẞ' => 'ß', + 'Ạ' => 'ạ', + 'Ả' => 'ả', + 'Ấ' => 'ấ', + 'Ầ' => 'ầ', + 'Ẩ' => 'ẩ', + 'Ẫ' => 'ẫ', + 'Ậ' => 'ậ', + 'Ắ' => 'ắ', + 'Ằ' => 'ằ', + 'Ẳ' => 'ẳ', + 'Ẵ' => 'ẵ', + 'Ặ' => 'ặ', + 'Ẹ' => 'ẹ', + 'Ẻ' => 'ẻ', + 'Ẽ' => 'ẽ', + 'Ế' => 'ế', + 'Ề' => 'ề', + 'Ể' => 'ể', + 'Ễ' => 'ễ', + 'Ệ' => 'ệ', + 'Ỉ' => 'ỉ', + 'Ị' => 'ị', + 'Ọ' => 'ọ', + 'Ỏ' => 'ỏ', + 'Ố' => 'ố', + 'Ồ' => 'ồ', + 'Ổ' => 'ổ', + 'Ỗ' => 'ỗ', + 'Ộ' => 'ộ', + 'Ớ' => 'ớ', + 'Ờ' => 'ờ', + 'Ở' => 'ở', + 'Ỡ' => 'ỡ', + 'Ợ' => 'ợ', + 'Ụ' => 'ụ', + 'Ủ' => 'ủ', + 'Ứ' => 'ứ', + 'Ừ' => 'ừ', + 'Ử' => 'ử', + 'Ữ' => 'ữ', + 'Ự' => 'ự', + 'Ỳ' => 'ỳ', + 'Ỵ' => 'ỵ', + 'Ỷ' => 'ỷ', + 'Ỹ' => 'ỹ', + 'Ỻ' => 'ỻ', + 'Ỽ' => 'ỽ', + 'Ỿ' => 'ỿ', + 'Ἀ' => 'ἀ', + 'Ἁ' => 'ἁ', + 'Ἂ' => 'ἂ', + 'Ἃ' => 'ἃ', + 'Ἄ' => 'ἄ', + 'Ἅ' => 'ἅ', + 'Ἆ' => 'ἆ', + 'Ἇ' => 'ἇ', + 'Ἐ' => 'ἐ', + 'Ἑ' => 'ἑ', + 'Ἒ' => 'ἒ', + 'Ἓ' => 'ἓ', + 'Ἔ' => 'ἔ', + 'Ἕ' => 'ἕ', + 'Ἠ' => 'ἠ', + 'Ἡ' => 'ἡ', + 'Ἢ' => 'ἢ', + 'Ἣ' => 'ἣ', + 'Ἤ' => 'ἤ', + 'Ἥ' => 'ἥ', + 'Ἦ' => 'ἦ', + 'Ἧ' => 'ἧ', + 'Ἰ' => 'ἰ', + 'Ἱ' => 'ἱ', + 'Ἲ' => 'ἲ', + 'Ἳ' => 'ἳ', + 'Ἴ' => 'ἴ', + 'Ἵ' => 'ἵ', + 'Ἶ' => 'ἶ', + 'Ἷ' => 'ἷ', + 'Ὀ' => 'ὀ', + 'Ὁ' => 'ὁ', + 'Ὂ' => 'ὂ', + 'Ὃ' => 'ὃ', + 'Ὄ' => 'ὄ', + 'Ὅ' => 'ὅ', + 'Ὑ' => 'ὑ', + 'Ὓ' => 'ὓ', + 'Ὕ' => 'ὕ', + 'Ὗ' => 'ὗ', + 'Ὠ' => 'ὠ', + 'Ὡ' => 'ὡ', + 'Ὢ' => 'ὢ', + 'Ὣ' => 'ὣ', + 'Ὤ' => 'ὤ', + 'Ὥ' => 'ὥ', + 'Ὦ' => 'ὦ', + 'Ὧ' => 'ὧ', + 'ᾈ' => 'ᾀ', + 'ᾉ' => 'ᾁ', + 'ᾊ' => 'ᾂ', + 'ᾋ' => 'ᾃ', + 'ᾌ' => 'ᾄ', + 'ᾍ' => 'ᾅ', + 'ᾎ' => 'ᾆ', + 'ᾏ' => 'ᾇ', + 'ᾘ' => 'ᾐ', + 'ᾙ' => 'ᾑ', + 'ᾚ' => 'ᾒ', + 'ᾛ' => 'ᾓ', + 'ᾜ' => 'ᾔ', + 'ᾝ' => 'ᾕ', + 'ᾞ' => 'ᾖ', + 'ᾟ' => 'ᾗ', + 'ᾨ' => 'ᾠ', + 'ᾩ' => 'ᾡ', + 'ᾪ' => 'ᾢ', + 'ᾫ' => 'ᾣ', + 'ᾬ' => 'ᾤ', + 'ᾭ' => 'ᾥ', + 'ᾮ' => 'ᾦ', + 'ᾯ' => 'ᾧ', + 'Ᾰ' => 'ᾰ', + 'Ᾱ' => 'ᾱ', + 'Ὰ' => 'ὰ', + 'Ά' => 'ά', + 'ᾼ' => 'ᾳ', + 'Ὲ' => 'ὲ', + 'Έ' => 'έ', + 'Ὴ' => 'ὴ', + 'Ή' => 'ή', + 'ῌ' => 'ῃ', + 'Ῐ' => 'ῐ', + 'Ῑ' => 'ῑ', + 'Ὶ' => 'ὶ', + 'Ί' => 'ί', + 'Ῠ' => 'ῠ', + 'Ῡ' => 'ῡ', + 'Ὺ' => 'ὺ', + 'Ύ' => 'ύ', + 'Ῥ' => 'ῥ', + 'Ὸ' => 'ὸ', + 'Ό' => 'ό', + 'Ὼ' => 'ὼ', + 'Ώ' => 'ώ', + 'ῼ' => 'ῳ', + 'Ω' => 'ω', + 'K' => 'k', + 'Å' => 'å', + 'Ⅎ' => 'ⅎ', + 'Ⅰ' => 'ⅰ', + 'Ⅱ' => 'ⅱ', + 'Ⅲ' => 'ⅲ', + 'Ⅳ' => 'ⅳ', + 'Ⅴ' => 'ⅴ', + 'Ⅵ' => 'ⅵ', + 'Ⅶ' => 'ⅶ', + 'Ⅷ' => 'ⅷ', + 'Ⅸ' => 'ⅸ', + 'Ⅹ' => 'ⅹ', + 'Ⅺ' => 'ⅺ', + 'Ⅻ' => 'ⅻ', + 'Ⅼ' => 'ⅼ', + 'Ⅽ' => 'ⅽ', + 'Ⅾ' => 'ⅾ', + 'Ⅿ' => 'ⅿ', + 'Ↄ' => 'ↄ', + 'Ⓐ' => 'ⓐ', + 'Ⓑ' => 'ⓑ', + 'Ⓒ' => 'ⓒ', + 'Ⓓ' => 'ⓓ', + 'Ⓔ' => 'ⓔ', + 'Ⓕ' => 'ⓕ', + 'Ⓖ' => 'ⓖ', + 'Ⓗ' => 'ⓗ', + 'Ⓘ' => 'ⓘ', + 'Ⓙ' => 'ⓙ', + 'Ⓚ' => 'ⓚ', + 'Ⓛ' => 'ⓛ', + 'Ⓜ' => 'ⓜ', + 'Ⓝ' => 'ⓝ', + 'Ⓞ' => 'ⓞ', + 'Ⓟ' => 'ⓟ', + 'Ⓠ' => 'ⓠ', + 'Ⓡ' => 'ⓡ', + 'Ⓢ' => 'ⓢ', + 'Ⓣ' => 'ⓣ', + 'Ⓤ' => 'ⓤ', + 'Ⓥ' => 'ⓥ', + 'Ⓦ' => 'ⓦ', + 'Ⓧ' => 'ⓧ', + 'Ⓨ' => 'ⓨ', + 'Ⓩ' => 'ⓩ', + 'Ⰰ' => 'ⰰ', + 'Ⰱ' => 'ⰱ', + 'Ⰲ' => 'ⰲ', + 'Ⰳ' => 'ⰳ', + 'Ⰴ' => 'ⰴ', + 'Ⰵ' => 'ⰵ', + 'Ⰶ' => 'ⰶ', + 'Ⰷ' => 'ⰷ', + 'Ⰸ' => 'ⰸ', + 'Ⰹ' => 'ⰹ', + 'Ⰺ' => 'ⰺ', + 'Ⰻ' => 'ⰻ', + 'Ⰼ' => 'ⰼ', + 'Ⰽ' => 'ⰽ', + 'Ⰾ' => 'ⰾ', + 'Ⰿ' => 'ⰿ', + 'Ⱀ' => 'ⱀ', + 'Ⱁ' => 'ⱁ', + 'Ⱂ' => 'ⱂ', + 'Ⱃ' => 'ⱃ', + 'Ⱄ' => 'ⱄ', + 'Ⱅ' => 'ⱅ', + 'Ⱆ' => 'ⱆ', + 'Ⱇ' => 'ⱇ', + 'Ⱈ' => 'ⱈ', + 'Ⱉ' => 'ⱉ', + 'Ⱊ' => 'ⱊ', + 'Ⱋ' => 'ⱋ', + 'Ⱌ' => 'ⱌ', + 'Ⱍ' => 'ⱍ', + 'Ⱎ' => 'ⱎ', + 'Ⱏ' => 'ⱏ', + 'Ⱐ' => 'ⱐ', + 'Ⱑ' => 'ⱑ', + 'Ⱒ' => 'ⱒ', + 'Ⱓ' => 'ⱓ', + 'Ⱔ' => 'ⱔ', + 'Ⱕ' => 'ⱕ', + 'Ⱖ' => 'ⱖ', + 'Ⱗ' => 'ⱗ', + 'Ⱘ' => 'ⱘ', + 'Ⱙ' => 'ⱙ', + 'Ⱚ' => 'ⱚ', + 'Ⱛ' => 'ⱛ', + 'Ⱜ' => 'ⱜ', + 'Ⱝ' => 'ⱝ', + 'Ⱞ' => 'ⱞ', + 'Ⱡ' => 'ⱡ', + 'Ɫ' => 'ɫ', + 'Ᵽ' => 'ᵽ', + 'Ɽ' => 'ɽ', + 'Ⱨ' => 'ⱨ', + 'Ⱪ' => 'ⱪ', + 'Ⱬ' => 'ⱬ', + 'Ɑ' => 'ɑ', + 'Ɱ' => 'ɱ', + 'Ɐ' => 'ɐ', + 'Ɒ' => 'ɒ', + 'Ⱳ' => 'ⱳ', + 'Ⱶ' => 'ⱶ', + 'Ȿ' => 'ȿ', + 'Ɀ' => 'ɀ', + 'Ⲁ' => 'ⲁ', + 'Ⲃ' => 'ⲃ', + 'Ⲅ' => 'ⲅ', + 'Ⲇ' => 'ⲇ', + 'Ⲉ' => 'ⲉ', + 'Ⲋ' => 'ⲋ', + 'Ⲍ' => 'ⲍ', + 'Ⲏ' => 'ⲏ', + 'Ⲑ' => 'ⲑ', + 'Ⲓ' => 'ⲓ', + 'Ⲕ' => 'ⲕ', + 'Ⲗ' => 'ⲗ', + 'Ⲙ' => 'ⲙ', + 'Ⲛ' => 'ⲛ', + 'Ⲝ' => 'ⲝ', + 'Ⲟ' => 'ⲟ', + 'Ⲡ' => 'ⲡ', + 'Ⲣ' => 'ⲣ', + 'Ⲥ' => 'ⲥ', + 'Ⲧ' => 'ⲧ', + 'Ⲩ' => 'ⲩ', + 'Ⲫ' => 'ⲫ', + 'Ⲭ' => 'ⲭ', + 'Ⲯ' => 'ⲯ', + 'Ⲱ' => 'ⲱ', + 'Ⲳ' => 'ⲳ', + 'Ⲵ' => 'ⲵ', + 'Ⲷ' => 'ⲷ', + 'Ⲹ' => 'ⲹ', + 'Ⲻ' => 'ⲻ', + 'Ⲽ' => 'ⲽ', + 'Ⲿ' => 'ⲿ', + 'Ⳁ' => 'ⳁ', + 'Ⳃ' => 'ⳃ', + 'Ⳅ' => 'ⳅ', + 'Ⳇ' => 'ⳇ', + 'Ⳉ' => 'ⳉ', + 'Ⳋ' => 'ⳋ', + 'Ⳍ' => 'ⳍ', + 'Ⳏ' => 'ⳏ', + 'Ⳑ' => 'ⳑ', + 'Ⳓ' => 'ⳓ', + 'Ⳕ' => 'ⳕ', + 'Ⳗ' => 'ⳗ', + 'Ⳙ' => 'ⳙ', + 'Ⳛ' => 'ⳛ', + 'Ⳝ' => 'ⳝ', + 'Ⳟ' => 'ⳟ', + 'Ⳡ' => 'ⳡ', + 'Ⳣ' => 'ⳣ', + 'Ⳬ' => 'ⳬ', + 'Ⳮ' => 'ⳮ', + 'Ⳳ' => 'ⳳ', + 'Ꙁ' => 'ꙁ', + 'Ꙃ' => 'ꙃ', + 'Ꙅ' => 'ꙅ', + 'Ꙇ' => 'ꙇ', + 'Ꙉ' => 'ꙉ', + 'Ꙋ' => 'ꙋ', + 'Ꙍ' => 'ꙍ', + 'Ꙏ' => 'ꙏ', + 'Ꙑ' => 'ꙑ', + 'Ꙓ' => 'ꙓ', + 'Ꙕ' => 'ꙕ', + 'Ꙗ' => 'ꙗ', + 'Ꙙ' => 'ꙙ', + 'Ꙛ' => 'ꙛ', + 'Ꙝ' => 'ꙝ', + 'Ꙟ' => 'ꙟ', + 'Ꙡ' => 'ꙡ', + 'Ꙣ' => 'ꙣ', + 'Ꙥ' => 'ꙥ', + 'Ꙧ' => 'ꙧ', + 'Ꙩ' => 'ꙩ', + 'Ꙫ' => 'ꙫ', + 'Ꙭ' => 'ꙭ', + 'Ꚁ' => 'ꚁ', + 'Ꚃ' => 'ꚃ', + 'Ꚅ' => 'ꚅ', + 'Ꚇ' => 'ꚇ', + 'Ꚉ' => 'ꚉ', + 'Ꚋ' => 'ꚋ', + 'Ꚍ' => 'ꚍ', + 'Ꚏ' => 'ꚏ', + 'Ꚑ' => 'ꚑ', + 'Ꚓ' => 'ꚓ', + 'Ꚕ' => 'ꚕ', + 'Ꚗ' => 'ꚗ', + 'Ꚙ' => 'ꚙ', + 'Ꚛ' => 'ꚛ', + 'Ꜣ' => 'ꜣ', + 'Ꜥ' => 'ꜥ', + 'Ꜧ' => 'ꜧ', + 'Ꜩ' => 'ꜩ', + 'Ꜫ' => 'ꜫ', + 'Ꜭ' => 'ꜭ', + 'Ꜯ' => 'ꜯ', + 'Ꜳ' => 'ꜳ', + 'Ꜵ' => 'ꜵ', + 'Ꜷ' => 'ꜷ', + 'Ꜹ' => 'ꜹ', + 'Ꜻ' => 'ꜻ', + 'Ꜽ' => 'ꜽ', + 'Ꜿ' => 'ꜿ', + 'Ꝁ' => 'ꝁ', + 'Ꝃ' => 'ꝃ', + 'Ꝅ' => 'ꝅ', + 'Ꝇ' => 'ꝇ', + 'Ꝉ' => 'ꝉ', + 'Ꝋ' => 'ꝋ', + 'Ꝍ' => 'ꝍ', + 'Ꝏ' => 'ꝏ', + 'Ꝑ' => 'ꝑ', + 'Ꝓ' => 'ꝓ', + 'Ꝕ' => 'ꝕ', + 'Ꝗ' => 'ꝗ', + 'Ꝙ' => 'ꝙ', + 'Ꝛ' => 'ꝛ', + 'Ꝝ' => 'ꝝ', + 'Ꝟ' => 'ꝟ', + 'Ꝡ' => 'ꝡ', + 'Ꝣ' => 'ꝣ', + 'Ꝥ' => 'ꝥ', + 'Ꝧ' => 'ꝧ', + 'Ꝩ' => 'ꝩ', + 'Ꝫ' => 'ꝫ', + 'Ꝭ' => 'ꝭ', + 'Ꝯ' => 'ꝯ', + 'Ꝺ' => 'ꝺ', + 'Ꝼ' => 'ꝼ', + 'Ᵹ' => 'ᵹ', + 'Ꝿ' => 'ꝿ', + 'Ꞁ' => 'ꞁ', + 'Ꞃ' => 'ꞃ', + 'Ꞅ' => 'ꞅ', + 'Ꞇ' => 'ꞇ', + 'Ꞌ' => 'ꞌ', + 'Ɥ' => 'ɥ', + 'Ꞑ' => 'ꞑ', + 'Ꞓ' => 'ꞓ', + 'Ꞗ' => 'ꞗ', + 'Ꞙ' => 'ꞙ', + 'Ꞛ' => 'ꞛ', + 'Ꞝ' => 'ꞝ', + 'Ꞟ' => 'ꞟ', + 'Ꞡ' => 'ꞡ', + 'Ꞣ' => 'ꞣ', + 'Ꞥ' => 'ꞥ', + 'Ꞧ' => 'ꞧ', + 'Ꞩ' => 'ꞩ', + 'Ɦ' => 'ɦ', + 'Ɜ' => 'ɜ', + 'Ɡ' => 'ɡ', + 'Ɬ' => 'ɬ', + 'Ɪ' => 'ɪ', + 'Ʞ' => 'ʞ', + 'Ʇ' => 'ʇ', + 'Ʝ' => 'ʝ', + 'Ꭓ' => 'ꭓ', + 'Ꞵ' => 'ꞵ', + 'Ꞷ' => 'ꞷ', + 'Ꞹ' => 'ꞹ', + 'Ꞻ' => 'ꞻ', + 'Ꞽ' => 'ꞽ', + 'Ꞿ' => 'ꞿ', + 'Ꟃ' => 'ꟃ', + 'Ꞔ' => 'ꞔ', + 'Ʂ' => 'ʂ', + 'Ᶎ' => 'ᶎ', + 'Ꟈ' => 'ꟈ', + 'Ꟊ' => 'ꟊ', + 'Ꟶ' => 'ꟶ', + 'A' => 'a', + 'B' => 'b', + 'C' => 'c', + 'D' => 'd', + 'E' => 'e', + 'F' => 'f', + 'G' => 'g', + 'H' => 'h', + 'I' => 'i', + 'J' => 'j', + 'K' => 'k', + 'L' => 'l', + 'M' => 'm', + 'N' => 'n', + 'O' => 'o', + 'P' => 'p', + 'Q' => 'q', + 'R' => 'r', + 'S' => 's', + 'T' => 't', + 'U' => 'u', + 'V' => 'v', + 'W' => 'w', + 'X' => 'x', + 'Y' => 'y', + 'Z' => 'z', + '𐐀' => '𐐨', + '𐐁' => '𐐩', + '𐐂' => '𐐪', + '𐐃' => '𐐫', + '𐐄' => '𐐬', + '𐐅' => '𐐭', + '𐐆' => '𐐮', + '𐐇' => '𐐯', + '𐐈' => '𐐰', + '𐐉' => '𐐱', + '𐐊' => '𐐲', + '𐐋' => '𐐳', + '𐐌' => '𐐴', + '𐐍' => '𐐵', + '𐐎' => '𐐶', + '𐐏' => '𐐷', + '𐐐' => '𐐸', + '𐐑' => '𐐹', + '𐐒' => '𐐺', + '𐐓' => '𐐻', + '𐐔' => '𐐼', + '𐐕' => '𐐽', + '𐐖' => '𐐾', + '𐐗' => '𐐿', + '𐐘' => '𐑀', + '𐐙' => '𐑁', + '𐐚' => '𐑂', + '𐐛' => '𐑃', + '𐐜' => '𐑄', + '𐐝' => '𐑅', + '𐐞' => '𐑆', + '𐐟' => '𐑇', + '𐐠' => '𐑈', + '𐐡' => '𐑉', + '𐐢' => '𐑊', + '𐐣' => '𐑋', + '𐐤' => '𐑌', + '𐐥' => '𐑍', + '𐐦' => '𐑎', + '𐐧' => '𐑏', + '𐒰' => '𐓘', + '𐒱' => '𐓙', + '𐒲' => '𐓚', + '𐒳' => '𐓛', + '𐒴' => '𐓜', + '𐒵' => '𐓝', + '𐒶' => '𐓞', + '𐒷' => '𐓟', + '𐒸' => '𐓠', + '𐒹' => '𐓡', + '𐒺' => '𐓢', + '𐒻' => '𐓣', + '𐒼' => '𐓤', + '𐒽' => '𐓥', + '𐒾' => '𐓦', + '𐒿' => '𐓧', + '𐓀' => '𐓨', + '𐓁' => '𐓩', + '𐓂' => '𐓪', + '𐓃' => '𐓫', + '𐓄' => '𐓬', + '𐓅' => '𐓭', + '𐓆' => '𐓮', + '𐓇' => '𐓯', + '𐓈' => '𐓰', + '𐓉' => '𐓱', + '𐓊' => '𐓲', + '𐓋' => '𐓳', + '𐓌' => '𐓴', + '𐓍' => '𐓵', + '𐓎' => '𐓶', + '𐓏' => '𐓷', + '𐓐' => '𐓸', + '𐓑' => '𐓹', + '𐓒' => '𐓺', + '𐓓' => '𐓻', + '𐲀' => '𐳀', + '𐲁' => '𐳁', + '𐲂' => '𐳂', + '𐲃' => '𐳃', + '𐲄' => '𐳄', + '𐲅' => '𐳅', + '𐲆' => '𐳆', + '𐲇' => '𐳇', + '𐲈' => '𐳈', + '𐲉' => '𐳉', + '𐲊' => '𐳊', + '𐲋' => '𐳋', + '𐲌' => '𐳌', + '𐲍' => '𐳍', + '𐲎' => '𐳎', + '𐲏' => '𐳏', + '𐲐' => '𐳐', + '𐲑' => '𐳑', + '𐲒' => '𐳒', + '𐲓' => '𐳓', + '𐲔' => '𐳔', + '𐲕' => '𐳕', + '𐲖' => '𐳖', + '𐲗' => '𐳗', + '𐲘' => '𐳘', + '𐲙' => '𐳙', + '𐲚' => '𐳚', + '𐲛' => '𐳛', + '𐲜' => '𐳜', + '𐲝' => '𐳝', + '𐲞' => '𐳞', + '𐲟' => '𐳟', + '𐲠' => '𐳠', + '𐲡' => '𐳡', + '𐲢' => '𐳢', + '𐲣' => '𐳣', + '𐲤' => '𐳤', + '𐲥' => '𐳥', + '𐲦' => '𐳦', + '𐲧' => '𐳧', + '𐲨' => '𐳨', + '𐲩' => '𐳩', + '𐲪' => '𐳪', + '𐲫' => '𐳫', + '𐲬' => '𐳬', + '𐲭' => '𐳭', + '𐲮' => '𐳮', + '𐲯' => '𐳯', + '𐲰' => '𐳰', + '𐲱' => '𐳱', + '𐲲' => '𐳲', + '𑢠' => '𑣀', + '𑢡' => '𑣁', + '𑢢' => '𑣂', + '𑢣' => '𑣃', + '𑢤' => '𑣄', + '𑢥' => '𑣅', + '𑢦' => '𑣆', + '𑢧' => '𑣇', + '𑢨' => '𑣈', + '𑢩' => '𑣉', + '𑢪' => '𑣊', + '𑢫' => '𑣋', + '𑢬' => '𑣌', + '𑢭' => '𑣍', + '𑢮' => '𑣎', + '𑢯' => '𑣏', + '𑢰' => '𑣐', + '𑢱' => '𑣑', + '𑢲' => '𑣒', + '𑢳' => '𑣓', + '𑢴' => '𑣔', + '𑢵' => '𑣕', + '𑢶' => '𑣖', + '𑢷' => '𑣗', + '𑢸' => '𑣘', + '𑢹' => '𑣙', + '𑢺' => '𑣚', + '𑢻' => '𑣛', + '𑢼' => '𑣜', + '𑢽' => '𑣝', + '𑢾' => '𑣞', + '𑢿' => '𑣟', + '𖹀' => '𖹠', + '𖹁' => '𖹡', + '𖹂' => '𖹢', + '𖹃' => '𖹣', + '𖹄' => '𖹤', + '𖹅' => '𖹥', + '𖹆' => '𖹦', + '𖹇' => '𖹧', + '𖹈' => '𖹨', + '𖹉' => '𖹩', + '𖹊' => '𖹪', + '𖹋' => '𖹫', + '𖹌' => '𖹬', + '𖹍' => '𖹭', + '𖹎' => '𖹮', + '𖹏' => '𖹯', + '𖹐' => '𖹰', + '𖹑' => '𖹱', + '𖹒' => '𖹲', + '𖹓' => '𖹳', + '𖹔' => '𖹴', + '𖹕' => '𖹵', + '𖹖' => '𖹶', + '𖹗' => '𖹷', + '𖹘' => '𖹸', + '𖹙' => '𖹹', + '𖹚' => '𖹺', + '𖹛' => '𖹻', + '𖹜' => '𖹼', + '𖹝' => '𖹽', + '𖹞' => '𖹾', + '𖹟' => '𖹿', + '𞤀' => '𞤢', + '𞤁' => '𞤣', + '𞤂' => '𞤤', + '𞤃' => '𞤥', + '𞤄' => '𞤦', + '𞤅' => '𞤧', + '𞤆' => '𞤨', + '𞤇' => '𞤩', + '𞤈' => '𞤪', + '𞤉' => '𞤫', + '𞤊' => '𞤬', + '𞤋' => '𞤭', + '𞤌' => '𞤮', + '𞤍' => '𞤯', + '𞤎' => '𞤰', + '𞤏' => '𞤱', + '𞤐' => '𞤲', + '𞤑' => '𞤳', + '𞤒' => '𞤴', + '𞤓' => '𞤵', + '𞤔' => '𞤶', + '𞤕' => '𞤷', + '𞤖' => '𞤸', + '𞤗' => '𞤹', + '𞤘' => '𞤺', + '𞤙' => '𞤻', + '𞤚' => '𞤼', + '𞤛' => '𞤽', + '𞤜' => '𞤾', + '𞤝' => '𞤿', + '𞤞' => '𞥀', + '𞤟' => '𞥁', + '𞤠' => '𞥂', + '𞤡' => '𞥃', +); diff --git a/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php new file mode 100644 index 0000000..2a8f6e7 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php @@ -0,0 +1,5 @@ +<?php + +// from Case_Ignorable in https://unicode.org/Public/UNIDATA/DerivedCoreProperties.txt + +return '/(?<![\x{0027}\x{002E}\x{003A}\x{005E}\x{0060}\x{00A8}\x{00AD}\x{00AF}\x{00B4}\x{00B7}\x{00B8}\x{02B0}-\x{02C1}\x{02C2}-\x{02C5}\x{02C6}-\x{02D1}\x{02D2}-\x{02DF}\x{02E0}-\x{02E4}\x{02E5}-\x{02EB}\x{02EC}\x{02ED}\x{02EE}\x{02EF}-\x{02FF}\x{0300}-\x{036F}\x{0374}\x{0375}\x{037A}\x{0384}-\x{0385}\x{0387}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{0559}\x{0591}-\x{05BD}\x{05BF}\x{05C1}-\x{05C2}\x{05C4}-\x{05C5}\x{05C7}\x{05F4}\x{0600}-\x{0605}\x{0610}-\x{061A}\x{061C}\x{0640}\x{064B}-\x{065F}\x{0670}\x{06D6}-\x{06DC}\x{06DD}\x{06DF}-\x{06E4}\x{06E5}-\x{06E6}\x{06E7}-\x{06E8}\x{06EA}-\x{06ED}\x{070F}\x{0711}\x{0730}-\x{074A}\x{07A6}-\x{07B0}\x{07EB}-\x{07F3}\x{07F4}-\x{07F5}\x{07FA}\x{07FD}\x{0816}-\x{0819}\x{081A}\x{081B}-\x{0823}\x{0824}\x{0825}-\x{0827}\x{0828}\x{0829}-\x{082D}\x{0859}-\x{085B}\x{08D3}-\x{08E1}\x{08E2}\x{08E3}-\x{0902}\x{093A}\x{093C}\x{0941}-\x{0948}\x{094D}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0971}\x{0981}\x{09BC}\x{09C1}-\x{09C4}\x{09CD}\x{09E2}-\x{09E3}\x{09FE}\x{0A01}-\x{0A02}\x{0A3C}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0ABC}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B3C}\x{0B3F}\x{0B41}-\x{0B44}\x{0B4D}\x{0B56}\x{0B62}-\x{0B63}\x{0B82}\x{0BC0}\x{0BCD}\x{0C00}\x{0C04}\x{0C3E}-\x{0C40}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C81}\x{0CBC}\x{0CBF}\x{0CC6}\x{0CCC}-\x{0CCD}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D3B}-\x{0D3C}\x{0D41}-\x{0D44}\x{0D4D}\x{0D62}-\x{0D63}\x{0DCA}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0E31}\x{0E34}-\x{0E3A}\x{0E46}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EB9}\x{0EBB}-\x{0EBC}\x{0EC6}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F71}-\x{0F7E}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102D}-\x{1030}\x{1032}-\x{1037}\x{1039}-\x{103A}\x{103D}-\x{103E}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1071}-\x{1074}\x{1082}\x{1085}-\x{1086}\x{108D}\x{109D}\x{10FC}\x{135D}-\x{135F}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B7}-\x{17BD}\x{17C6}\x{17C9}-\x{17D3}\x{17D7}\x{17DD}\x{180B}-\x{180D}\x{180E}\x{1843}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1927}-\x{1928}\x{1932}\x{1939}-\x{193B}\x{1A17}-\x{1A18}\x{1A1B}\x{1A56}\x{1A58}-\x{1A5E}\x{1A60}\x{1A62}\x{1A65}-\x{1A6C}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AA7}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1B00}-\x{1B03}\x{1B34}\x{1B36}-\x{1B3A}\x{1B3C}\x{1B42}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1BA2}-\x{1BA5}\x{1BA8}-\x{1BA9}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE8}-\x{1BE9}\x{1BED}\x{1BEF}-\x{1BF1}\x{1C2C}-\x{1C33}\x{1C36}-\x{1C37}\x{1C78}-\x{1C7D}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF8}-\x{1CF9}\x{1D2C}-\x{1D6A}\x{1D78}\x{1D9B}-\x{1DBF}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{1FBD}\x{1FBF}-\x{1FC1}\x{1FCD}-\x{1FCF}\x{1FDD}-\x{1FDF}\x{1FED}-\x{1FEF}\x{1FFD}-\x{1FFE}\x{200B}-\x{200F}\x{2018}\x{2019}\x{2024}\x{2027}\x{202A}-\x{202E}\x{2060}-\x{2064}\x{2066}-\x{206F}\x{2071}\x{207F}\x{2090}-\x{209C}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2C7C}-\x{2C7D}\x{2CEF}-\x{2CF1}\x{2D6F}\x{2D7F}\x{2DE0}-\x{2DFF}\x{2E2F}\x{3005}\x{302A}-\x{302D}\x{3031}-\x{3035}\x{303B}\x{3099}-\x{309A}\x{309B}-\x{309C}\x{309D}-\x{309E}\x{30FC}-\x{30FE}\x{A015}\x{A4F8}-\x{A4FD}\x{A60C}\x{A66F}\x{A670}-\x{A672}\x{A674}-\x{A67D}\x{A67F}\x{A69C}-\x{A69D}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A700}-\x{A716}\x{A717}-\x{A71F}\x{A720}-\x{A721}\x{A770}\x{A788}\x{A789}-\x{A78A}\x{A7F8}-\x{A7F9}\x{A802}\x{A806}\x{A80B}\x{A825}-\x{A826}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A980}-\x{A982}\x{A9B3}\x{A9B6}-\x{A9B9}\x{A9BC}\x{A9CF}\x{A9E5}\x{A9E6}\x{AA29}-\x{AA2E}\x{AA31}-\x{AA32}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA70}\x{AA7C}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AADD}\x{AAEC}-\x{AAED}\x{AAF3}-\x{AAF4}\x{AAF6}\x{AB5B}\x{AB5C}-\x{AB5F}\x{ABE5}\x{ABE8}\x{ABED}\x{FB1E}\x{FBB2}-\x{FBC1}\x{FE00}-\x{FE0F}\x{FE13}\x{FE20}-\x{FE2F}\x{FE52}\x{FE55}\x{FEFF}\x{FF07}\x{FF0E}\x{FF1A}\x{FF3E}\x{FF40}\x{FF70}\x{FF9E}-\x{FF9F}\x{FFE3}\x{FFF9}-\x{FFFB}\x{101FD}\x{102E0}\x{10376}-\x{1037A}\x{10A01}-\x{10A03}\x{10A05}-\x{10A06}\x{10A0C}-\x{10A0F}\x{10A38}-\x{10A3A}\x{10A3F}\x{10AE5}-\x{10AE6}\x{10D24}-\x{10D27}\x{10F46}-\x{10F50}\x{11001}\x{11038}-\x{11046}\x{1107F}-\x{11081}\x{110B3}-\x{110B6}\x{110B9}-\x{110BA}\x{110BD}\x{110CD}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112D}-\x{11134}\x{11173}\x{11180}-\x{11181}\x{111B6}-\x{111BE}\x{111C9}-\x{111CC}\x{1122F}-\x{11231}\x{11234}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{1133B}-\x{1133C}\x{11340}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11438}-\x{1143F}\x{11442}-\x{11444}\x{11446}\x{1145E}\x{114B3}-\x{114B8}\x{114BA}\x{114BF}-\x{114C0}\x{114C2}-\x{114C3}\x{115B2}-\x{115B5}\x{115BC}-\x{115BD}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11633}-\x{1163A}\x{1163D}\x{1163F}-\x{11640}\x{116AB}\x{116AD}\x{116B0}-\x{116B5}\x{116B7}\x{1171D}-\x{1171F}\x{11722}-\x{11725}\x{11727}-\x{1172B}\x{1182F}-\x{11837}\x{11839}-\x{1183A}\x{11A01}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A98}-\x{11A99}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C3F}\x{11C92}-\x{11CA7}\x{11CAA}-\x{11CB0}\x{11CB2}-\x{11CB3}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D90}-\x{11D91}\x{11D95}\x{11D97}\x{11EF3}-\x{11EF4}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16B40}-\x{16B43}\x{16F8F}-\x{16F92}\x{16F93}-\x{16F9F}\x{16FE0}-\x{16FE1}\x{1BC9D}-\x{1BC9E}\x{1BCA0}-\x{1BCA3}\x{1D167}-\x{1D169}\x{1D173}-\x{1D17A}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D242}-\x{1D244}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E8D0}-\x{1E8D6}\x{1E944}-\x{1E94A}\x{1F3FB}-\x{1F3FF}\x{E0001}\x{E0020}-\x{E007F}\x{E0100}-\x{E01EF}])(\pL)(\pL*+)/u'; diff --git a/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php new file mode 100644 index 0000000..56b9cb8 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php @@ -0,0 +1,1489 @@ +<?php + +return array ( + 'a' => 'A', + 'b' => 'B', + 'c' => 'C', + 'd' => 'D', + 'e' => 'E', + 'f' => 'F', + 'g' => 'G', + 'h' => 'H', + 'i' => 'I', + 'j' => 'J', + 'k' => 'K', + 'l' => 'L', + 'm' => 'M', + 'n' => 'N', + 'o' => 'O', + 'p' => 'P', + 'q' => 'Q', + 'r' => 'R', + 's' => 'S', + 't' => 'T', + 'u' => 'U', + 'v' => 'V', + 'w' => 'W', + 'x' => 'X', + 'y' => 'Y', + 'z' => 'Z', + 'µ' => 'Μ', + 'à' => 'À', + 'á' => 'Á', + 'â' => 'Â', + 'ã' => 'Ã', + 'ä' => 'Ä', + 'å' => 'Å', + 'æ' => 'Æ', + 'ç' => 'Ç', + 'è' => 'È', + 'é' => 'É', + 'ê' => 'Ê', + 'ë' => 'Ë', + 'ì' => 'Ì', + 'í' => 'Í', + 'î' => 'Î', + 'ï' => 'Ï', + 'ð' => 'Ð', + 'ñ' => 'Ñ', + 'ò' => 'Ò', + 'ó' => 'Ó', + 'ô' => 'Ô', + 'õ' => 'Õ', + 'ö' => 'Ö', + 'ø' => 'Ø', + 'ù' => 'Ù', + 'ú' => 'Ú', + 'û' => 'Û', + 'ü' => 'Ü', + 'ý' => 'Ý', + 'þ' => 'Þ', + 'ÿ' => 'Ÿ', + 'ā' => 'Ā', + 'ă' => 'Ă', + 'ą' => 'Ą', + 'ć' => 'Ć', + 'ĉ' => 'Ĉ', + 'ċ' => 'Ċ', + 'č' => 'Č', + 'ď' => 'Ď', + 'đ' => 'Đ', + 'ē' => 'Ē', + 'ĕ' => 'Ĕ', + 'ė' => 'Ė', + 'ę' => 'Ę', + 'ě' => 'Ě', + 'ĝ' => 'Ĝ', + 'ğ' => 'Ğ', + 'ġ' => 'Ġ', + 'ģ' => 'Ģ', + 'ĥ' => 'Ĥ', + 'ħ' => 'Ħ', + 'ĩ' => 'Ĩ', + 'ī' => 'Ī', + 'ĭ' => 'Ĭ', + 'į' => 'Į', + 'ı' => 'I', + 'ij' => 'IJ', + 'ĵ' => 'Ĵ', + 'ķ' => 'Ķ', + 'ĺ' => 'Ĺ', + 'ļ' => 'Ļ', + 'ľ' => 'Ľ', + 'ŀ' => 'Ŀ', + 'ł' => 'Ł', + 'ń' => 'Ń', + 'ņ' => 'Ņ', + 'ň' => 'Ň', + 'ŋ' => 'Ŋ', + 'ō' => 'Ō', + 'ŏ' => 'Ŏ', + 'ő' => 'Ő', + 'œ' => 'Œ', + 'ŕ' => 'Ŕ', + 'ŗ' => 'Ŗ', + 'ř' => 'Ř', + 'ś' => 'Ś', + 'ŝ' => 'Ŝ', + 'ş' => 'Ş', + 'š' => 'Š', + 'ţ' => 'Ţ', + 'ť' => 'Ť', + 'ŧ' => 'Ŧ', + 'ũ' => 'Ũ', + 'ū' => 'Ū', + 'ŭ' => 'Ŭ', + 'ů' => 'Ů', + 'ű' => 'Ű', + 'ų' => 'Ų', + 'ŵ' => 'Ŵ', + 'ŷ' => 'Ŷ', + 'ź' => 'Ź', + 'ż' => 'Ż', + 'ž' => 'Ž', + 'ſ' => 'S', + 'ƀ' => 'Ƀ', + 'ƃ' => 'Ƃ', + 'ƅ' => 'Ƅ', + 'ƈ' => 'Ƈ', + 'ƌ' => 'Ƌ', + 'ƒ' => 'Ƒ', + 'ƕ' => 'Ƕ', + 'ƙ' => 'Ƙ', + 'ƚ' => 'Ƚ', + 'ƞ' => 'Ƞ', + 'ơ' => 'Ơ', + 'ƣ' => 'Ƣ', + 'ƥ' => 'Ƥ', + 'ƨ' => 'Ƨ', + 'ƭ' => 'Ƭ', + 'ư' => 'Ư', + 'ƴ' => 'Ƴ', + 'ƶ' => 'Ƶ', + 'ƹ' => 'Ƹ', + 'ƽ' => 'Ƽ', + 'ƿ' => 'Ƿ', + 'Dž' => 'DŽ', + 'dž' => 'DŽ', + 'Lj' => 'LJ', + 'lj' => 'LJ', + 'Nj' => 'NJ', + 'nj' => 'NJ', + 'ǎ' => 'Ǎ', + 'ǐ' => 'Ǐ', + 'ǒ' => 'Ǒ', + 'ǔ' => 'Ǔ', + 'ǖ' => 'Ǖ', + 'ǘ' => 'Ǘ', + 'ǚ' => 'Ǚ', + 'ǜ' => 'Ǜ', + 'ǝ' => 'Ǝ', + 'ǟ' => 'Ǟ', + 'ǡ' => 'Ǡ', + 'ǣ' => 'Ǣ', + 'ǥ' => 'Ǥ', + 'ǧ' => 'Ǧ', + 'ǩ' => 'Ǩ', + 'ǫ' => 'Ǫ', + 'ǭ' => 'Ǭ', + 'ǯ' => 'Ǯ', + 'Dz' => 'DZ', + 'dz' => 'DZ', + 'ǵ' => 'Ǵ', + 'ǹ' => 'Ǹ', + 'ǻ' => 'Ǻ', + 'ǽ' => 'Ǽ', + 'ǿ' => 'Ǿ', + 'ȁ' => 'Ȁ', + 'ȃ' => 'Ȃ', + 'ȅ' => 'Ȅ', + 'ȇ' => 'Ȇ', + 'ȉ' => 'Ȉ', + 'ȋ' => 'Ȋ', + 'ȍ' => 'Ȍ', + 'ȏ' => 'Ȏ', + 'ȑ' => 'Ȑ', + 'ȓ' => 'Ȓ', + 'ȕ' => 'Ȕ', + 'ȗ' => 'Ȗ', + 'ș' => 'Ș', + 'ț' => 'Ț', + 'ȝ' => 'Ȝ', + 'ȟ' => 'Ȟ', + 'ȣ' => 'Ȣ', + 'ȥ' => 'Ȥ', + 'ȧ' => 'Ȧ', + 'ȩ' => 'Ȩ', + 'ȫ' => 'Ȫ', + 'ȭ' => 'Ȭ', + 'ȯ' => 'Ȯ', + 'ȱ' => 'Ȱ', + 'ȳ' => 'Ȳ', + 'ȼ' => 'Ȼ', + 'ȿ' => 'Ȿ', + 'ɀ' => 'Ɀ', + 'ɂ' => 'Ɂ', + 'ɇ' => 'Ɇ', + 'ɉ' => 'Ɉ', + 'ɋ' => 'Ɋ', + 'ɍ' => 'Ɍ', + 'ɏ' => 'Ɏ', + 'ɐ' => 'Ɐ', + 'ɑ' => 'Ɑ', + 'ɒ' => 'Ɒ', + 'ɓ' => 'Ɓ', + 'ɔ' => 'Ɔ', + 'ɖ' => 'Ɖ', + 'ɗ' => 'Ɗ', + 'ə' => 'Ə', + 'ɛ' => 'Ɛ', + 'ɜ' => 'Ɜ', + 'ɠ' => 'Ɠ', + 'ɡ' => 'Ɡ', + 'ɣ' => 'Ɣ', + 'ɥ' => 'Ɥ', + 'ɦ' => 'Ɦ', + 'ɨ' => 'Ɨ', + 'ɩ' => 'Ɩ', + 'ɪ' => 'Ɪ', + 'ɫ' => 'Ɫ', + 'ɬ' => 'Ɬ', + 'ɯ' => 'Ɯ', + 'ɱ' => 'Ɱ', + 'ɲ' => 'Ɲ', + 'ɵ' => 'Ɵ', + 'ɽ' => 'Ɽ', + 'ʀ' => 'Ʀ', + 'ʂ' => 'Ʂ', + 'ʃ' => 'Ʃ', + 'ʇ' => 'Ʇ', + 'ʈ' => 'Ʈ', + 'ʉ' => 'Ʉ', + 'ʊ' => 'Ʊ', + 'ʋ' => 'Ʋ', + 'ʌ' => 'Ʌ', + 'ʒ' => 'Ʒ', + 'ʝ' => 'Ʝ', + 'ʞ' => 'Ʞ', + 'ͅ' => 'Ι', + 'ͱ' => 'Ͱ', + 'ͳ' => 'Ͳ', + 'ͷ' => 'Ͷ', + 'ͻ' => 'Ͻ', + 'ͼ' => 'Ͼ', + 'ͽ' => 'Ͽ', + 'ά' => 'Ά', + 'έ' => 'Έ', + 'ή' => 'Ή', + 'ί' => 'Ί', + 'α' => 'Α', + 'β' => 'Β', + 'γ' => 'Γ', + 'δ' => 'Δ', + 'ε' => 'Ε', + 'ζ' => 'Ζ', + 'η' => 'Η', + 'θ' => 'Θ', + 'ι' => 'Ι', + 'κ' => 'Κ', + 'λ' => 'Λ', + 'μ' => 'Μ', + 'ν' => 'Ν', + 'ξ' => 'Ξ', + 'ο' => 'Ο', + 'π' => 'Π', + 'ρ' => 'Ρ', + 'ς' => 'Σ', + 'σ' => 'Σ', + 'τ' => 'Τ', + 'υ' => 'Υ', + 'φ' => 'Φ', + 'χ' => 'Χ', + 'ψ' => 'Ψ', + 'ω' => 'Ω', + 'ϊ' => 'Ϊ', + 'ϋ' => 'Ϋ', + 'ό' => 'Ό', + 'ύ' => 'Ύ', + 'ώ' => 'Ώ', + 'ϐ' => 'Β', + 'ϑ' => 'Θ', + 'ϕ' => 'Φ', + 'ϖ' => 'Π', + 'ϗ' => 'Ϗ', + 'ϙ' => 'Ϙ', + 'ϛ' => 'Ϛ', + 'ϝ' => 'Ϝ', + 'ϟ' => 'Ϟ', + 'ϡ' => 'Ϡ', + 'ϣ' => 'Ϣ', + 'ϥ' => 'Ϥ', + 'ϧ' => 'Ϧ', + 'ϩ' => 'Ϩ', + 'ϫ' => 'Ϫ', + 'ϭ' => 'Ϭ', + 'ϯ' => 'Ϯ', + 'ϰ' => 'Κ', + 'ϱ' => 'Ρ', + 'ϲ' => 'Ϲ', + 'ϳ' => 'Ϳ', + 'ϵ' => 'Ε', + 'ϸ' => 'Ϸ', + 'ϻ' => 'Ϻ', + 'а' => 'А', + 'б' => 'Б', + 'в' => 'В', + 'г' => 'Г', + 'д' => 'Д', + 'е' => 'Е', + 'ж' => 'Ж', + 'з' => 'З', + 'и' => 'И', + 'й' => 'Й', + 'к' => 'К', + 'л' => 'Л', + 'м' => 'М', + 'н' => 'Н', + 'о' => 'О', + 'п' => 'П', + 'р' => 'Р', + 'с' => 'С', + 'т' => 'Т', + 'у' => 'У', + 'ф' => 'Ф', + 'х' => 'Х', + 'ц' => 'Ц', + 'ч' => 'Ч', + 'ш' => 'Ш', + 'щ' => 'Щ', + 'ъ' => 'Ъ', + 'ы' => 'Ы', + 'ь' => 'Ь', + 'э' => 'Э', + 'ю' => 'Ю', + 'я' => 'Я', + 'ѐ' => 'Ѐ', + 'ё' => 'Ё', + 'ђ' => 'Ђ', + 'ѓ' => 'Ѓ', + 'є' => 'Є', + 'ѕ' => 'Ѕ', + 'і' => 'І', + 'ї' => 'Ї', + 'ј' => 'Ј', + 'љ' => 'Љ', + 'њ' => 'Њ', + 'ћ' => 'Ћ', + 'ќ' => 'Ќ', + 'ѝ' => 'Ѝ', + 'ў' => 'Ў', + 'џ' => 'Џ', + 'ѡ' => 'Ѡ', + 'ѣ' => 'Ѣ', + 'ѥ' => 'Ѥ', + 'ѧ' => 'Ѧ', + 'ѩ' => 'Ѩ', + 'ѫ' => 'Ѫ', + 'ѭ' => 'Ѭ', + 'ѯ' => 'Ѯ', + 'ѱ' => 'Ѱ', + 'ѳ' => 'Ѳ', + 'ѵ' => 'Ѵ', + 'ѷ' => 'Ѷ', + 'ѹ' => 'Ѹ', + 'ѻ' => 'Ѻ', + 'ѽ' => 'Ѽ', + 'ѿ' => 'Ѿ', + 'ҁ' => 'Ҁ', + 'ҋ' => 'Ҋ', + 'ҍ' => 'Ҍ', + 'ҏ' => 'Ҏ', + 'ґ' => 'Ґ', + 'ғ' => 'Ғ', + 'ҕ' => 'Ҕ', + 'җ' => 'Җ', + 'ҙ' => 'Ҙ', + 'қ' => 'Қ', + 'ҝ' => 'Ҝ', + 'ҟ' => 'Ҟ', + 'ҡ' => 'Ҡ', + 'ң' => 'Ң', + 'ҥ' => 'Ҥ', + 'ҧ' => 'Ҧ', + 'ҩ' => 'Ҩ', + 'ҫ' => 'Ҫ', + 'ҭ' => 'Ҭ', + 'ү' => 'Ү', + 'ұ' => 'Ұ', + 'ҳ' => 'Ҳ', + 'ҵ' => 'Ҵ', + 'ҷ' => 'Ҷ', + 'ҹ' => 'Ҹ', + 'һ' => 'Һ', + 'ҽ' => 'Ҽ', + 'ҿ' => 'Ҿ', + 'ӂ' => 'Ӂ', + 'ӄ' => 'Ӄ', + 'ӆ' => 'Ӆ', + 'ӈ' => 'Ӈ', + 'ӊ' => 'Ӊ', + 'ӌ' => 'Ӌ', + 'ӎ' => 'Ӎ', + 'ӏ' => 'Ӏ', + 'ӑ' => 'Ӑ', + 'ӓ' => 'Ӓ', + 'ӕ' => 'Ӕ', + 'ӗ' => 'Ӗ', + 'ә' => 'Ә', + 'ӛ' => 'Ӛ', + 'ӝ' => 'Ӝ', + 'ӟ' => 'Ӟ', + 'ӡ' => 'Ӡ', + 'ӣ' => 'Ӣ', + 'ӥ' => 'Ӥ', + 'ӧ' => 'Ӧ', + 'ө' => 'Ө', + 'ӫ' => 'Ӫ', + 'ӭ' => 'Ӭ', + 'ӯ' => 'Ӯ', + 'ӱ' => 'Ӱ', + 'ӳ' => 'Ӳ', + 'ӵ' => 'Ӵ', + 'ӷ' => 'Ӷ', + 'ӹ' => 'Ӹ', + 'ӻ' => 'Ӻ', + 'ӽ' => 'Ӽ', + 'ӿ' => 'Ӿ', + 'ԁ' => 'Ԁ', + 'ԃ' => 'Ԃ', + 'ԅ' => 'Ԅ', + 'ԇ' => 'Ԇ', + 'ԉ' => 'Ԉ', + 'ԋ' => 'Ԋ', + 'ԍ' => 'Ԍ', + 'ԏ' => 'Ԏ', + 'ԑ' => 'Ԑ', + 'ԓ' => 'Ԓ', + 'ԕ' => 'Ԕ', + 'ԗ' => 'Ԗ', + 'ԙ' => 'Ԙ', + 'ԛ' => 'Ԛ', + 'ԝ' => 'Ԝ', + 'ԟ' => 'Ԟ', + 'ԡ' => 'Ԡ', + 'ԣ' => 'Ԣ', + 'ԥ' => 'Ԥ', + 'ԧ' => 'Ԧ', + 'ԩ' => 'Ԩ', + 'ԫ' => 'Ԫ', + 'ԭ' => 'Ԭ', + 'ԯ' => 'Ԯ', + 'ա' => 'Ա', + 'բ' => 'Բ', + 'գ' => 'Գ', + 'դ' => 'Դ', + 'ե' => 'Ե', + 'զ' => 'Զ', + 'է' => 'Է', + 'ը' => 'Ը', + 'թ' => 'Թ', + 'ժ' => 'Ժ', + 'ի' => 'Ի', + 'լ' => 'Լ', + 'խ' => 'Խ', + 'ծ' => 'Ծ', + 'կ' => 'Կ', + 'հ' => 'Հ', + 'ձ' => 'Ձ', + 'ղ' => 'Ղ', + 'ճ' => 'Ճ', + 'մ' => 'Մ', + 'յ' => 'Յ', + 'ն' => 'Ն', + 'շ' => 'Շ', + 'ո' => 'Ո', + 'չ' => 'Չ', + 'պ' => 'Պ', + 'ջ' => 'Ջ', + 'ռ' => 'Ռ', + 'ս' => 'Ս', + 'վ' => 'Վ', + 'տ' => 'Տ', + 'ր' => 'Ր', + 'ց' => 'Ց', + 'ւ' => 'Ւ', + 'փ' => 'Փ', + 'ք' => 'Ք', + 'օ' => 'Օ', + 'ֆ' => 'Ֆ', + 'ა' => 'Ა', + 'ბ' => 'Ბ', + 'გ' => 'Გ', + 'დ' => 'Დ', + 'ე' => 'Ე', + 'ვ' => 'Ვ', + 'ზ' => 'Ზ', + 'თ' => 'Თ', + 'ი' => 'Ი', + 'კ' => 'Კ', + 'ლ' => 'Ლ', + 'მ' => 'Მ', + 'ნ' => 'Ნ', + 'ო' => 'Ო', + 'პ' => 'Პ', + 'ჟ' => 'Ჟ', + 'რ' => 'Რ', + 'ს' => 'Ს', + 'ტ' => 'Ტ', + 'უ' => 'Უ', + 'ფ' => 'Ფ', + 'ქ' => 'Ქ', + 'ღ' => 'Ღ', + 'ყ' => 'Ყ', + 'შ' => 'Შ', + 'ჩ' => 'Ჩ', + 'ც' => 'Ც', + 'ძ' => 'Ძ', + 'წ' => 'Წ', + 'ჭ' => 'Ჭ', + 'ხ' => 'Ხ', + 'ჯ' => 'Ჯ', + 'ჰ' => 'Ჰ', + 'ჱ' => 'Ჱ', + 'ჲ' => 'Ჲ', + 'ჳ' => 'Ჳ', + 'ჴ' => 'Ჴ', + 'ჵ' => 'Ჵ', + 'ჶ' => 'Ჶ', + 'ჷ' => 'Ჷ', + 'ჸ' => 'Ჸ', + 'ჹ' => 'Ჹ', + 'ჺ' => 'Ჺ', + 'ჽ' => 'Ჽ', + 'ჾ' => 'Ჾ', + 'ჿ' => 'Ჿ', + 'ᏸ' => 'Ᏸ', + 'ᏹ' => 'Ᏹ', + 'ᏺ' => 'Ᏺ', + 'ᏻ' => 'Ᏻ', + 'ᏼ' => 'Ᏼ', + 'ᏽ' => 'Ᏽ', + 'ᲀ' => 'В', + 'ᲁ' => 'Д', + 'ᲂ' => 'О', + 'ᲃ' => 'С', + 'ᲄ' => 'Т', + 'ᲅ' => 'Т', + 'ᲆ' => 'Ъ', + 'ᲇ' => 'Ѣ', + 'ᲈ' => 'Ꙋ', + 'ᵹ' => 'Ᵹ', + 'ᵽ' => 'Ᵽ', + 'ᶎ' => 'Ᶎ', + 'ḁ' => 'Ḁ', + 'ḃ' => 'Ḃ', + 'ḅ' => 'Ḅ', + 'ḇ' => 'Ḇ', + 'ḉ' => 'Ḉ', + 'ḋ' => 'Ḋ', + 'ḍ' => 'Ḍ', + 'ḏ' => 'Ḏ', + 'ḑ' => 'Ḑ', + 'ḓ' => 'Ḓ', + 'ḕ' => 'Ḕ', + 'ḗ' => 'Ḗ', + 'ḙ' => 'Ḙ', + 'ḛ' => 'Ḛ', + 'ḝ' => 'Ḝ', + 'ḟ' => 'Ḟ', + 'ḡ' => 'Ḡ', + 'ḣ' => 'Ḣ', + 'ḥ' => 'Ḥ', + 'ḧ' => 'Ḧ', + 'ḩ' => 'Ḩ', + 'ḫ' => 'Ḫ', + 'ḭ' => 'Ḭ', + 'ḯ' => 'Ḯ', + 'ḱ' => 'Ḱ', + 'ḳ' => 'Ḳ', + 'ḵ' => 'Ḵ', + 'ḷ' => 'Ḷ', + 'ḹ' => 'Ḹ', + 'ḻ' => 'Ḻ', + 'ḽ' => 'Ḽ', + 'ḿ' => 'Ḿ', + 'ṁ' => 'Ṁ', + 'ṃ' => 'Ṃ', + 'ṅ' => 'Ṅ', + 'ṇ' => 'Ṇ', + 'ṉ' => 'Ṉ', + 'ṋ' => 'Ṋ', + 'ṍ' => 'Ṍ', + 'ṏ' => 'Ṏ', + 'ṑ' => 'Ṑ', + 'ṓ' => 'Ṓ', + 'ṕ' => 'Ṕ', + 'ṗ' => 'Ṗ', + 'ṙ' => 'Ṙ', + 'ṛ' => 'Ṛ', + 'ṝ' => 'Ṝ', + 'ṟ' => 'Ṟ', + 'ṡ' => 'Ṡ', + 'ṣ' => 'Ṣ', + 'ṥ' => 'Ṥ', + 'ṧ' => 'Ṧ', + 'ṩ' => 'Ṩ', + 'ṫ' => 'Ṫ', + 'ṭ' => 'Ṭ', + 'ṯ' => 'Ṯ', + 'ṱ' => 'Ṱ', + 'ṳ' => 'Ṳ', + 'ṵ' => 'Ṵ', + 'ṷ' => 'Ṷ', + 'ṹ' => 'Ṹ', + 'ṻ' => 'Ṻ', + 'ṽ' => 'Ṽ', + 'ṿ' => 'Ṿ', + 'ẁ' => 'Ẁ', + 'ẃ' => 'Ẃ', + 'ẅ' => 'Ẅ', + 'ẇ' => 'Ẇ', + 'ẉ' => 'Ẉ', + 'ẋ' => 'Ẋ', + 'ẍ' => 'Ẍ', + 'ẏ' => 'Ẏ', + 'ẑ' => 'Ẑ', + 'ẓ' => 'Ẓ', + 'ẕ' => 'Ẕ', + 'ẛ' => 'Ṡ', + 'ạ' => 'Ạ', + 'ả' => 'Ả', + 'ấ' => 'Ấ', + 'ầ' => 'Ầ', + 'ẩ' => 'Ẩ', + 'ẫ' => 'Ẫ', + 'ậ' => 'Ậ', + 'ắ' => 'Ắ', + 'ằ' => 'Ằ', + 'ẳ' => 'Ẳ', + 'ẵ' => 'Ẵ', + 'ặ' => 'Ặ', + 'ẹ' => 'Ẹ', + 'ẻ' => 'Ẻ', + 'ẽ' => 'Ẽ', + 'ế' => 'Ế', + 'ề' => 'Ề', + 'ể' => 'Ể', + 'ễ' => 'Ễ', + 'ệ' => 'Ệ', + 'ỉ' => 'Ỉ', + 'ị' => 'Ị', + 'ọ' => 'Ọ', + 'ỏ' => 'Ỏ', + 'ố' => 'Ố', + 'ồ' => 'Ồ', + 'ổ' => 'Ổ', + 'ỗ' => 'Ỗ', + 'ộ' => 'Ộ', + 'ớ' => 'Ớ', + 'ờ' => 'Ờ', + 'ở' => 'Ở', + 'ỡ' => 'Ỡ', + 'ợ' => 'Ợ', + 'ụ' => 'Ụ', + 'ủ' => 'Ủ', + 'ứ' => 'Ứ', + 'ừ' => 'Ừ', + 'ử' => 'Ử', + 'ữ' => 'Ữ', + 'ự' => 'Ự', + 'ỳ' => 'Ỳ', + 'ỵ' => 'Ỵ', + 'ỷ' => 'Ỷ', + 'ỹ' => 'Ỹ', + 'ỻ' => 'Ỻ', + 'ỽ' => 'Ỽ', + 'ỿ' => 'Ỿ', + 'ἀ' => 'Ἀ', + 'ἁ' => 'Ἁ', + 'ἂ' => 'Ἂ', + 'ἃ' => 'Ἃ', + 'ἄ' => 'Ἄ', + 'ἅ' => 'Ἅ', + 'ἆ' => 'Ἆ', + 'ἇ' => 'Ἇ', + 'ἐ' => 'Ἐ', + 'ἑ' => 'Ἑ', + 'ἒ' => 'Ἒ', + 'ἓ' => 'Ἓ', + 'ἔ' => 'Ἔ', + 'ἕ' => 'Ἕ', + 'ἠ' => 'Ἠ', + 'ἡ' => 'Ἡ', + 'ἢ' => 'Ἢ', + 'ἣ' => 'Ἣ', + 'ἤ' => 'Ἤ', + 'ἥ' => 'Ἥ', + 'ἦ' => 'Ἦ', + 'ἧ' => 'Ἧ', + 'ἰ' => 'Ἰ', + 'ἱ' => 'Ἱ', + 'ἲ' => 'Ἲ', + 'ἳ' => 'Ἳ', + 'ἴ' => 'Ἴ', + 'ἵ' => 'Ἵ', + 'ἶ' => 'Ἶ', + 'ἷ' => 'Ἷ', + 'ὀ' => 'Ὀ', + 'ὁ' => 'Ὁ', + 'ὂ' => 'Ὂ', + 'ὃ' => 'Ὃ', + 'ὄ' => 'Ὄ', + 'ὅ' => 'Ὅ', + 'ὑ' => 'Ὑ', + 'ὓ' => 'Ὓ', + 'ὕ' => 'Ὕ', + 'ὗ' => 'Ὗ', + 'ὠ' => 'Ὠ', + 'ὡ' => 'Ὡ', + 'ὢ' => 'Ὢ', + 'ὣ' => 'Ὣ', + 'ὤ' => 'Ὤ', + 'ὥ' => 'Ὥ', + 'ὦ' => 'Ὦ', + 'ὧ' => 'Ὧ', + 'ὰ' => 'Ὰ', + 'ά' => 'Ά', + 'ὲ' => 'Ὲ', + 'έ' => 'Έ', + 'ὴ' => 'Ὴ', + 'ή' => 'Ή', + 'ὶ' => 'Ὶ', + 'ί' => 'Ί', + 'ὸ' => 'Ὸ', + 'ό' => 'Ό', + 'ὺ' => 'Ὺ', + 'ύ' => 'Ύ', + 'ὼ' => 'Ὼ', + 'ώ' => 'Ώ', + 'ᾀ' => 'ἈΙ', + 'ᾁ' => 'ἉΙ', + 'ᾂ' => 'ἊΙ', + 'ᾃ' => 'ἋΙ', + 'ᾄ' => 'ἌΙ', + 'ᾅ' => 'ἍΙ', + 'ᾆ' => 'ἎΙ', + 'ᾇ' => 'ἏΙ', + 'ᾐ' => 'ἨΙ', + 'ᾑ' => 'ἩΙ', + 'ᾒ' => 'ἪΙ', + 'ᾓ' => 'ἫΙ', + 'ᾔ' => 'ἬΙ', + 'ᾕ' => 'ἭΙ', + 'ᾖ' => 'ἮΙ', + 'ᾗ' => 'ἯΙ', + 'ᾠ' => 'ὨΙ', + 'ᾡ' => 'ὩΙ', + 'ᾢ' => 'ὪΙ', + 'ᾣ' => 'ὫΙ', + 'ᾤ' => 'ὬΙ', + 'ᾥ' => 'ὭΙ', + 'ᾦ' => 'ὮΙ', + 'ᾧ' => 'ὯΙ', + 'ᾰ' => 'Ᾰ', + 'ᾱ' => 'Ᾱ', + 'ᾳ' => 'ΑΙ', + 'ι' => 'Ι', + 'ῃ' => 'ΗΙ', + 'ῐ' => 'Ῐ', + 'ῑ' => 'Ῑ', + 'ῠ' => 'Ῠ', + 'ῡ' => 'Ῡ', + 'ῥ' => 'Ῥ', + 'ῳ' => 'ΩΙ', + 'ⅎ' => 'Ⅎ', + 'ⅰ' => 'Ⅰ', + 'ⅱ' => 'Ⅱ', + 'ⅲ' => 'Ⅲ', + 'ⅳ' => 'Ⅳ', + 'ⅴ' => 'Ⅴ', + 'ⅵ' => 'Ⅵ', + 'ⅶ' => 'Ⅶ', + 'ⅷ' => 'Ⅷ', + 'ⅸ' => 'Ⅸ', + 'ⅹ' => 'Ⅹ', + 'ⅺ' => 'Ⅺ', + 'ⅻ' => 'Ⅻ', + 'ⅼ' => 'Ⅼ', + 'ⅽ' => 'Ⅽ', + 'ⅾ' => 'Ⅾ', + 'ⅿ' => 'Ⅿ', + 'ↄ' => 'Ↄ', + 'ⓐ' => 'Ⓐ', + 'ⓑ' => 'Ⓑ', + 'ⓒ' => 'Ⓒ', + 'ⓓ' => 'Ⓓ', + 'ⓔ' => 'Ⓔ', + 'ⓕ' => 'Ⓕ', + 'ⓖ' => 'Ⓖ', + 'ⓗ' => 'Ⓗ', + 'ⓘ' => 'Ⓘ', + 'ⓙ' => 'Ⓙ', + 'ⓚ' => 'Ⓚ', + 'ⓛ' => 'Ⓛ', + 'ⓜ' => 'Ⓜ', + 'ⓝ' => 'Ⓝ', + 'ⓞ' => 'Ⓞ', + 'ⓟ' => 'Ⓟ', + 'ⓠ' => 'Ⓠ', + 'ⓡ' => 'Ⓡ', + 'ⓢ' => 'Ⓢ', + 'ⓣ' => 'Ⓣ', + 'ⓤ' => 'Ⓤ', + 'ⓥ' => 'Ⓥ', + 'ⓦ' => 'Ⓦ', + 'ⓧ' => 'Ⓧ', + 'ⓨ' => 'Ⓨ', + 'ⓩ' => 'Ⓩ', + 'ⰰ' => 'Ⰰ', + 'ⰱ' => 'Ⰱ', + 'ⰲ' => 'Ⰲ', + 'ⰳ' => 'Ⰳ', + 'ⰴ' => 'Ⰴ', + 'ⰵ' => 'Ⰵ', + 'ⰶ' => 'Ⰶ', + 'ⰷ' => 'Ⰷ', + 'ⰸ' => 'Ⰸ', + 'ⰹ' => 'Ⰹ', + 'ⰺ' => 'Ⰺ', + 'ⰻ' => 'Ⰻ', + 'ⰼ' => 'Ⰼ', + 'ⰽ' => 'Ⰽ', + 'ⰾ' => 'Ⰾ', + 'ⰿ' => 'Ⰿ', + 'ⱀ' => 'Ⱀ', + 'ⱁ' => 'Ⱁ', + 'ⱂ' => 'Ⱂ', + 'ⱃ' => 'Ⱃ', + 'ⱄ' => 'Ⱄ', + 'ⱅ' => 'Ⱅ', + 'ⱆ' => 'Ⱆ', + 'ⱇ' => 'Ⱇ', + 'ⱈ' => 'Ⱈ', + 'ⱉ' => 'Ⱉ', + 'ⱊ' => 'Ⱊ', + 'ⱋ' => 'Ⱋ', + 'ⱌ' => 'Ⱌ', + 'ⱍ' => 'Ⱍ', + 'ⱎ' => 'Ⱎ', + 'ⱏ' => 'Ⱏ', + 'ⱐ' => 'Ⱐ', + 'ⱑ' => 'Ⱑ', + 'ⱒ' => 'Ⱒ', + 'ⱓ' => 'Ⱓ', + 'ⱔ' => 'Ⱔ', + 'ⱕ' => 'Ⱕ', + 'ⱖ' => 'Ⱖ', + 'ⱗ' => 'Ⱗ', + 'ⱘ' => 'Ⱘ', + 'ⱙ' => 'Ⱙ', + 'ⱚ' => 'Ⱚ', + 'ⱛ' => 'Ⱛ', + 'ⱜ' => 'Ⱜ', + 'ⱝ' => 'Ⱝ', + 'ⱞ' => 'Ⱞ', + 'ⱡ' => 'Ⱡ', + 'ⱥ' => 'Ⱥ', + 'ⱦ' => 'Ⱦ', + 'ⱨ' => 'Ⱨ', + 'ⱪ' => 'Ⱪ', + 'ⱬ' => 'Ⱬ', + 'ⱳ' => 'Ⱳ', + 'ⱶ' => 'Ⱶ', + 'ⲁ' => 'Ⲁ', + 'ⲃ' => 'Ⲃ', + 'ⲅ' => 'Ⲅ', + 'ⲇ' => 'Ⲇ', + 'ⲉ' => 'Ⲉ', + 'ⲋ' => 'Ⲋ', + 'ⲍ' => 'Ⲍ', + 'ⲏ' => 'Ⲏ', + 'ⲑ' => 'Ⲑ', + 'ⲓ' => 'Ⲓ', + 'ⲕ' => 'Ⲕ', + 'ⲗ' => 'Ⲗ', + 'ⲙ' => 'Ⲙ', + 'ⲛ' => 'Ⲛ', + 'ⲝ' => 'Ⲝ', + 'ⲟ' => 'Ⲟ', + 'ⲡ' => 'Ⲡ', + 'ⲣ' => 'Ⲣ', + 'ⲥ' => 'Ⲥ', + 'ⲧ' => 'Ⲧ', + 'ⲩ' => 'Ⲩ', + 'ⲫ' => 'Ⲫ', + 'ⲭ' => 'Ⲭ', + 'ⲯ' => 'Ⲯ', + 'ⲱ' => 'Ⲱ', + 'ⲳ' => 'Ⲳ', + 'ⲵ' => 'Ⲵ', + 'ⲷ' => 'Ⲷ', + 'ⲹ' => 'Ⲹ', + 'ⲻ' => 'Ⲻ', + 'ⲽ' => 'Ⲽ', + 'ⲿ' => 'Ⲿ', + 'ⳁ' => 'Ⳁ', + 'ⳃ' => 'Ⳃ', + 'ⳅ' => 'Ⳅ', + 'ⳇ' => 'Ⳇ', + 'ⳉ' => 'Ⳉ', + 'ⳋ' => 'Ⳋ', + 'ⳍ' => 'Ⳍ', + 'ⳏ' => 'Ⳏ', + 'ⳑ' => 'Ⳑ', + 'ⳓ' => 'Ⳓ', + 'ⳕ' => 'Ⳕ', + 'ⳗ' => 'Ⳗ', + 'ⳙ' => 'Ⳙ', + 'ⳛ' => 'Ⳛ', + 'ⳝ' => 'Ⳝ', + 'ⳟ' => 'Ⳟ', + 'ⳡ' => 'Ⳡ', + 'ⳣ' => 'Ⳣ', + 'ⳬ' => 'Ⳬ', + 'ⳮ' => 'Ⳮ', + 'ⳳ' => 'Ⳳ', + 'ⴀ' => 'Ⴀ', + 'ⴁ' => 'Ⴁ', + 'ⴂ' => 'Ⴂ', + 'ⴃ' => 'Ⴃ', + 'ⴄ' => 'Ⴄ', + 'ⴅ' => 'Ⴅ', + 'ⴆ' => 'Ⴆ', + 'ⴇ' => 'Ⴇ', + 'ⴈ' => 'Ⴈ', + 'ⴉ' => 'Ⴉ', + 'ⴊ' => 'Ⴊ', + 'ⴋ' => 'Ⴋ', + 'ⴌ' => 'Ⴌ', + 'ⴍ' => 'Ⴍ', + 'ⴎ' => 'Ⴎ', + 'ⴏ' => 'Ⴏ', + 'ⴐ' => 'Ⴐ', + 'ⴑ' => 'Ⴑ', + 'ⴒ' => 'Ⴒ', + 'ⴓ' => 'Ⴓ', + 'ⴔ' => 'Ⴔ', + 'ⴕ' => 'Ⴕ', + 'ⴖ' => 'Ⴖ', + 'ⴗ' => 'Ⴗ', + 'ⴘ' => 'Ⴘ', + 'ⴙ' => 'Ⴙ', + 'ⴚ' => 'Ⴚ', + 'ⴛ' => 'Ⴛ', + 'ⴜ' => 'Ⴜ', + 'ⴝ' => 'Ⴝ', + 'ⴞ' => 'Ⴞ', + 'ⴟ' => 'Ⴟ', + 'ⴠ' => 'Ⴠ', + 'ⴡ' => 'Ⴡ', + 'ⴢ' => 'Ⴢ', + 'ⴣ' => 'Ⴣ', + 'ⴤ' => 'Ⴤ', + 'ⴥ' => 'Ⴥ', + 'ⴧ' => 'Ⴧ', + 'ⴭ' => 'Ⴭ', + 'ꙁ' => 'Ꙁ', + 'ꙃ' => 'Ꙃ', + 'ꙅ' => 'Ꙅ', + 'ꙇ' => 'Ꙇ', + 'ꙉ' => 'Ꙉ', + 'ꙋ' => 'Ꙋ', + 'ꙍ' => 'Ꙍ', + 'ꙏ' => 'Ꙏ', + 'ꙑ' => 'Ꙑ', + 'ꙓ' => 'Ꙓ', + 'ꙕ' => 'Ꙕ', + 'ꙗ' => 'Ꙗ', + 'ꙙ' => 'Ꙙ', + 'ꙛ' => 'Ꙛ', + 'ꙝ' => 'Ꙝ', + 'ꙟ' => 'Ꙟ', + 'ꙡ' => 'Ꙡ', + 'ꙣ' => 'Ꙣ', + 'ꙥ' => 'Ꙥ', + 'ꙧ' => 'Ꙧ', + 'ꙩ' => 'Ꙩ', + 'ꙫ' => 'Ꙫ', + 'ꙭ' => 'Ꙭ', + 'ꚁ' => 'Ꚁ', + 'ꚃ' => 'Ꚃ', + 'ꚅ' => 'Ꚅ', + 'ꚇ' => 'Ꚇ', + 'ꚉ' => 'Ꚉ', + 'ꚋ' => 'Ꚋ', + 'ꚍ' => 'Ꚍ', + 'ꚏ' => 'Ꚏ', + 'ꚑ' => 'Ꚑ', + 'ꚓ' => 'Ꚓ', + 'ꚕ' => 'Ꚕ', + 'ꚗ' => 'Ꚗ', + 'ꚙ' => 'Ꚙ', + 'ꚛ' => 'Ꚛ', + 'ꜣ' => 'Ꜣ', + 'ꜥ' => 'Ꜥ', + 'ꜧ' => 'Ꜧ', + 'ꜩ' => 'Ꜩ', + 'ꜫ' => 'Ꜫ', + 'ꜭ' => 'Ꜭ', + 'ꜯ' => 'Ꜯ', + 'ꜳ' => 'Ꜳ', + 'ꜵ' => 'Ꜵ', + 'ꜷ' => 'Ꜷ', + 'ꜹ' => 'Ꜹ', + 'ꜻ' => 'Ꜻ', + 'ꜽ' => 'Ꜽ', + 'ꜿ' => 'Ꜿ', + 'ꝁ' => 'Ꝁ', + 'ꝃ' => 'Ꝃ', + 'ꝅ' => 'Ꝅ', + 'ꝇ' => 'Ꝇ', + 'ꝉ' => 'Ꝉ', + 'ꝋ' => 'Ꝋ', + 'ꝍ' => 'Ꝍ', + 'ꝏ' => 'Ꝏ', + 'ꝑ' => 'Ꝑ', + 'ꝓ' => 'Ꝓ', + 'ꝕ' => 'Ꝕ', + 'ꝗ' => 'Ꝗ', + 'ꝙ' => 'Ꝙ', + 'ꝛ' => 'Ꝛ', + 'ꝝ' => 'Ꝝ', + 'ꝟ' => 'Ꝟ', + 'ꝡ' => 'Ꝡ', + 'ꝣ' => 'Ꝣ', + 'ꝥ' => 'Ꝥ', + 'ꝧ' => 'Ꝧ', + 'ꝩ' => 'Ꝩ', + 'ꝫ' => 'Ꝫ', + 'ꝭ' => 'Ꝭ', + 'ꝯ' => 'Ꝯ', + 'ꝺ' => 'Ꝺ', + 'ꝼ' => 'Ꝼ', + 'ꝿ' => 'Ꝿ', + 'ꞁ' => 'Ꞁ', + 'ꞃ' => 'Ꞃ', + 'ꞅ' => 'Ꞅ', + 'ꞇ' => 'Ꞇ', + 'ꞌ' => 'Ꞌ', + 'ꞑ' => 'Ꞑ', + 'ꞓ' => 'Ꞓ', + 'ꞔ' => 'Ꞔ', + 'ꞗ' => 'Ꞗ', + 'ꞙ' => 'Ꞙ', + 'ꞛ' => 'Ꞛ', + 'ꞝ' => 'Ꞝ', + 'ꞟ' => 'Ꞟ', + 'ꞡ' => 'Ꞡ', + 'ꞣ' => 'Ꞣ', + 'ꞥ' => 'Ꞥ', + 'ꞧ' => 'Ꞧ', + 'ꞩ' => 'Ꞩ', + 'ꞵ' => 'Ꞵ', + 'ꞷ' => 'Ꞷ', + 'ꞹ' => 'Ꞹ', + 'ꞻ' => 'Ꞻ', + 'ꞽ' => 'Ꞽ', + 'ꞿ' => 'Ꞿ', + 'ꟃ' => 'Ꟃ', + 'ꟈ' => 'Ꟈ', + 'ꟊ' => 'Ꟊ', + 'ꟶ' => 'Ꟶ', + 'ꭓ' => 'Ꭓ', + 'ꭰ' => 'Ꭰ', + 'ꭱ' => 'Ꭱ', + 'ꭲ' => 'Ꭲ', + 'ꭳ' => 'Ꭳ', + 'ꭴ' => 'Ꭴ', + 'ꭵ' => 'Ꭵ', + 'ꭶ' => 'Ꭶ', + 'ꭷ' => 'Ꭷ', + 'ꭸ' => 'Ꭸ', + 'ꭹ' => 'Ꭹ', + 'ꭺ' => 'Ꭺ', + 'ꭻ' => 'Ꭻ', + 'ꭼ' => 'Ꭼ', + 'ꭽ' => 'Ꭽ', + 'ꭾ' => 'Ꭾ', + 'ꭿ' => 'Ꭿ', + 'ꮀ' => 'Ꮀ', + 'ꮁ' => 'Ꮁ', + 'ꮂ' => 'Ꮂ', + 'ꮃ' => 'Ꮃ', + 'ꮄ' => 'Ꮄ', + 'ꮅ' => 'Ꮅ', + 'ꮆ' => 'Ꮆ', + 'ꮇ' => 'Ꮇ', + 'ꮈ' => 'Ꮈ', + 'ꮉ' => 'Ꮉ', + 'ꮊ' => 'Ꮊ', + 'ꮋ' => 'Ꮋ', + 'ꮌ' => 'Ꮌ', + 'ꮍ' => 'Ꮍ', + 'ꮎ' => 'Ꮎ', + 'ꮏ' => 'Ꮏ', + 'ꮐ' => 'Ꮐ', + 'ꮑ' => 'Ꮑ', + 'ꮒ' => 'Ꮒ', + 'ꮓ' => 'Ꮓ', + 'ꮔ' => 'Ꮔ', + 'ꮕ' => 'Ꮕ', + 'ꮖ' => 'Ꮖ', + 'ꮗ' => 'Ꮗ', + 'ꮘ' => 'Ꮘ', + 'ꮙ' => 'Ꮙ', + 'ꮚ' => 'Ꮚ', + 'ꮛ' => 'Ꮛ', + 'ꮜ' => 'Ꮜ', + 'ꮝ' => 'Ꮝ', + 'ꮞ' => 'Ꮞ', + 'ꮟ' => 'Ꮟ', + 'ꮠ' => 'Ꮠ', + 'ꮡ' => 'Ꮡ', + 'ꮢ' => 'Ꮢ', + 'ꮣ' => 'Ꮣ', + 'ꮤ' => 'Ꮤ', + 'ꮥ' => 'Ꮥ', + 'ꮦ' => 'Ꮦ', + 'ꮧ' => 'Ꮧ', + 'ꮨ' => 'Ꮨ', + 'ꮩ' => 'Ꮩ', + 'ꮪ' => 'Ꮪ', + 'ꮫ' => 'Ꮫ', + 'ꮬ' => 'Ꮬ', + 'ꮭ' => 'Ꮭ', + 'ꮮ' => 'Ꮮ', + 'ꮯ' => 'Ꮯ', + 'ꮰ' => 'Ꮰ', + 'ꮱ' => 'Ꮱ', + 'ꮲ' => 'Ꮲ', + 'ꮳ' => 'Ꮳ', + 'ꮴ' => 'Ꮴ', + 'ꮵ' => 'Ꮵ', + 'ꮶ' => 'Ꮶ', + 'ꮷ' => 'Ꮷ', + 'ꮸ' => 'Ꮸ', + 'ꮹ' => 'Ꮹ', + 'ꮺ' => 'Ꮺ', + 'ꮻ' => 'Ꮻ', + 'ꮼ' => 'Ꮼ', + 'ꮽ' => 'Ꮽ', + 'ꮾ' => 'Ꮾ', + 'ꮿ' => 'Ꮿ', + 'a' => 'A', + 'b' => 'B', + 'c' => 'C', + 'd' => 'D', + 'e' => 'E', + 'f' => 'F', + 'g' => 'G', + 'h' => 'H', + 'i' => 'I', + 'j' => 'J', + 'k' => 'K', + 'l' => 'L', + 'm' => 'M', + 'n' => 'N', + 'o' => 'O', + 'p' => 'P', + 'q' => 'Q', + 'r' => 'R', + 's' => 'S', + 't' => 'T', + 'u' => 'U', + 'v' => 'V', + 'w' => 'W', + 'x' => 'X', + 'y' => 'Y', + 'z' => 'Z', + '𐐨' => '𐐀', + '𐐩' => '𐐁', + '𐐪' => '𐐂', + '𐐫' => '𐐃', + '𐐬' => '𐐄', + '𐐭' => '𐐅', + '𐐮' => '𐐆', + '𐐯' => '𐐇', + '𐐰' => '𐐈', + '𐐱' => '𐐉', + '𐐲' => '𐐊', + '𐐳' => '𐐋', + '𐐴' => '𐐌', + '𐐵' => '𐐍', + '𐐶' => '𐐎', + '𐐷' => '𐐏', + '𐐸' => '𐐐', + '𐐹' => '𐐑', + '𐐺' => '𐐒', + '𐐻' => '𐐓', + '𐐼' => '𐐔', + '𐐽' => '𐐕', + '𐐾' => '𐐖', + '𐐿' => '𐐗', + '𐑀' => '𐐘', + '𐑁' => '𐐙', + '𐑂' => '𐐚', + '𐑃' => '𐐛', + '𐑄' => '𐐜', + '𐑅' => '𐐝', + '𐑆' => '𐐞', + '𐑇' => '𐐟', + '𐑈' => '𐐠', + '𐑉' => '𐐡', + '𐑊' => '𐐢', + '𐑋' => '𐐣', + '𐑌' => '𐐤', + '𐑍' => '𐐥', + '𐑎' => '𐐦', + '𐑏' => '𐐧', + '𐓘' => '𐒰', + '𐓙' => '𐒱', + '𐓚' => '𐒲', + '𐓛' => '𐒳', + '𐓜' => '𐒴', + '𐓝' => '𐒵', + '𐓞' => '𐒶', + '𐓟' => '𐒷', + '𐓠' => '𐒸', + '𐓡' => '𐒹', + '𐓢' => '𐒺', + '𐓣' => '𐒻', + '𐓤' => '𐒼', + '𐓥' => '𐒽', + '𐓦' => '𐒾', + '𐓧' => '𐒿', + '𐓨' => '𐓀', + '𐓩' => '𐓁', + '𐓪' => '𐓂', + '𐓫' => '𐓃', + '𐓬' => '𐓄', + '𐓭' => '𐓅', + '𐓮' => '𐓆', + '𐓯' => '𐓇', + '𐓰' => '𐓈', + '𐓱' => '𐓉', + '𐓲' => '𐓊', + '𐓳' => '𐓋', + '𐓴' => '𐓌', + '𐓵' => '𐓍', + '𐓶' => '𐓎', + '𐓷' => '𐓏', + '𐓸' => '𐓐', + '𐓹' => '𐓑', + '𐓺' => '𐓒', + '𐓻' => '𐓓', + '𐳀' => '𐲀', + '𐳁' => '𐲁', + '𐳂' => '𐲂', + '𐳃' => '𐲃', + '𐳄' => '𐲄', + '𐳅' => '𐲅', + '𐳆' => '𐲆', + '𐳇' => '𐲇', + '𐳈' => '𐲈', + '𐳉' => '𐲉', + '𐳊' => '𐲊', + '𐳋' => '𐲋', + '𐳌' => '𐲌', + '𐳍' => '𐲍', + '𐳎' => '𐲎', + '𐳏' => '𐲏', + '𐳐' => '𐲐', + '𐳑' => '𐲑', + '𐳒' => '𐲒', + '𐳓' => '𐲓', + '𐳔' => '𐲔', + '𐳕' => '𐲕', + '𐳖' => '𐲖', + '𐳗' => '𐲗', + '𐳘' => '𐲘', + '𐳙' => '𐲙', + '𐳚' => '𐲚', + '𐳛' => '𐲛', + '𐳜' => '𐲜', + '𐳝' => '𐲝', + '𐳞' => '𐲞', + '𐳟' => '𐲟', + '𐳠' => '𐲠', + '𐳡' => '𐲡', + '𐳢' => '𐲢', + '𐳣' => '𐲣', + '𐳤' => '𐲤', + '𐳥' => '𐲥', + '𐳦' => '𐲦', + '𐳧' => '𐲧', + '𐳨' => '𐲨', + '𐳩' => '𐲩', + '𐳪' => '𐲪', + '𐳫' => '𐲫', + '𐳬' => '𐲬', + '𐳭' => '𐲭', + '𐳮' => '𐲮', + '𐳯' => '𐲯', + '𐳰' => '𐲰', + '𐳱' => '𐲱', + '𐳲' => '𐲲', + '𑣀' => '𑢠', + '𑣁' => '𑢡', + '𑣂' => '𑢢', + '𑣃' => '𑢣', + '𑣄' => '𑢤', + '𑣅' => '𑢥', + '𑣆' => '𑢦', + '𑣇' => '𑢧', + '𑣈' => '𑢨', + '𑣉' => '𑢩', + '𑣊' => '𑢪', + '𑣋' => '𑢫', + '𑣌' => '𑢬', + '𑣍' => '𑢭', + '𑣎' => '𑢮', + '𑣏' => '𑢯', + '𑣐' => '𑢰', + '𑣑' => '𑢱', + '𑣒' => '𑢲', + '𑣓' => '𑢳', + '𑣔' => '𑢴', + '𑣕' => '𑢵', + '𑣖' => '𑢶', + '𑣗' => '𑢷', + '𑣘' => '𑢸', + '𑣙' => '𑢹', + '𑣚' => '𑢺', + '𑣛' => '𑢻', + '𑣜' => '𑢼', + '𑣝' => '𑢽', + '𑣞' => '𑢾', + '𑣟' => '𑢿', + '𖹠' => '𖹀', + '𖹡' => '𖹁', + '𖹢' => '𖹂', + '𖹣' => '𖹃', + '𖹤' => '𖹄', + '𖹥' => '𖹅', + '𖹦' => '𖹆', + '𖹧' => '𖹇', + '𖹨' => '𖹈', + '𖹩' => '𖹉', + '𖹪' => '𖹊', + '𖹫' => '𖹋', + '𖹬' => '𖹌', + '𖹭' => '𖹍', + '𖹮' => '𖹎', + '𖹯' => '𖹏', + '𖹰' => '𖹐', + '𖹱' => '𖹑', + '𖹲' => '𖹒', + '𖹳' => '𖹓', + '𖹴' => '𖹔', + '𖹵' => '𖹕', + '𖹶' => '𖹖', + '𖹷' => '𖹗', + '𖹸' => '𖹘', + '𖹹' => '𖹙', + '𖹺' => '𖹚', + '𖹻' => '𖹛', + '𖹼' => '𖹜', + '𖹽' => '𖹝', + '𖹾' => '𖹞', + '𖹿' => '𖹟', + '𞤢' => '𞤀', + '𞤣' => '𞤁', + '𞤤' => '𞤂', + '𞤥' => '𞤃', + '𞤦' => '𞤄', + '𞤧' => '𞤅', + '𞤨' => '𞤆', + '𞤩' => '𞤇', + '𞤪' => '𞤈', + '𞤫' => '𞤉', + '𞤬' => '𞤊', + '𞤭' => '𞤋', + '𞤮' => '𞤌', + '𞤯' => '𞤍', + '𞤰' => '𞤎', + '𞤱' => '𞤏', + '𞤲' => '𞤐', + '𞤳' => '𞤑', + '𞤴' => '𞤒', + '𞤵' => '𞤓', + '𞤶' => '𞤔', + '𞤷' => '𞤕', + '𞤸' => '𞤖', + '𞤹' => '𞤗', + '𞤺' => '𞤘', + '𞤻' => '𞤙', + '𞤼' => '𞤚', + '𞤽' => '𞤛', + '𞤾' => '𞤜', + '𞤿' => '𞤝', + '𞥀' => '𞤞', + '𞥁' => '𞤟', + '𞥂' => '𞤠', + '𞥃' => '𞤡', + 'ß' => 'SS', + 'ff' => 'FF', + 'fi' => 'FI', + 'fl' => 'FL', + 'ffi' => 'FFI', + 'ffl' => 'FFL', + 'ſt' => 'ST', + 'st' => 'ST', + 'և' => 'ԵՒ', + 'ﬓ' => 'ՄՆ', + 'ﬔ' => 'ՄԵ', + 'ﬕ' => 'ՄԻ', + 'ﬖ' => 'ՎՆ', + 'ﬗ' => 'ՄԽ', + 'ʼn' => 'ʼN', + 'ΐ' => 'Ϊ́', + 'ΰ' => 'Ϋ́', + 'ǰ' => 'J̌', + 'ẖ' => 'H̱', + 'ẗ' => 'T̈', + 'ẘ' => 'W̊', + 'ẙ' => 'Y̊', + 'ẚ' => 'Aʾ', + 'ὐ' => 'Υ̓', + 'ὒ' => 'Υ̓̀', + 'ὔ' => 'Υ̓́', + 'ὖ' => 'Υ̓͂', + 'ᾶ' => 'Α͂', + 'ῆ' => 'Η͂', + 'ῒ' => 'Ϊ̀', + 'ΐ' => 'Ϊ́', + 'ῖ' => 'Ι͂', + 'ῗ' => 'Ϊ͂', + 'ῢ' => 'Ϋ̀', + 'ΰ' => 'Ϋ́', + 'ῤ' => 'Ρ̓', + 'ῦ' => 'Υ͂', + 'ῧ' => 'Ϋ͂', + 'ῶ' => 'Ω͂', + 'ᾈ' => 'ἈΙ', + 'ᾉ' => 'ἉΙ', + 'ᾊ' => 'ἊΙ', + 'ᾋ' => 'ἋΙ', + 'ᾌ' => 'ἌΙ', + 'ᾍ' => 'ἍΙ', + 'ᾎ' => 'ἎΙ', + 'ᾏ' => 'ἏΙ', + 'ᾘ' => 'ἨΙ', + 'ᾙ' => 'ἩΙ', + 'ᾚ' => 'ἪΙ', + 'ᾛ' => 'ἫΙ', + 'ᾜ' => 'ἬΙ', + 'ᾝ' => 'ἭΙ', + 'ᾞ' => 'ἮΙ', + 'ᾟ' => 'ἯΙ', + 'ᾨ' => 'ὨΙ', + 'ᾩ' => 'ὩΙ', + 'ᾪ' => 'ὪΙ', + 'ᾫ' => 'ὫΙ', + 'ᾬ' => 'ὬΙ', + 'ᾭ' => 'ὭΙ', + 'ᾮ' => 'ὮΙ', + 'ᾯ' => 'ὯΙ', + 'ᾼ' => 'ΑΙ', + 'ῌ' => 'ΗΙ', + 'ῼ' => 'ΩΙ', + 'ᾲ' => 'ᾺΙ', + 'ᾴ' => 'ΆΙ', + 'ῂ' => 'ῊΙ', + 'ῄ' => 'ΉΙ', + 'ῲ' => 'ῺΙ', + 'ῴ' => 'ΏΙ', + 'ᾷ' => 'Α͂Ι', + 'ῇ' => 'Η͂Ι', + 'ῷ' => 'Ω͂Ι', +); diff --git a/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/bootstrap.php b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/bootstrap.php new file mode 100644 index 0000000..ff51ae0 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/bootstrap.php @@ -0,0 +1,172 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Mbstring as p; + +if (\PHP_VERSION_ID >= 80000) { + return require __DIR__.'/bootstrap80.php'; +} + +if (!function_exists('mb_convert_encoding')) { + function mb_convert_encoding($string, $to_encoding, $from_encoding = null) { return p\Mbstring::mb_convert_encoding($string, $to_encoding, $from_encoding); } +} +if (!function_exists('mb_decode_mimeheader')) { + function mb_decode_mimeheader($string) { return p\Mbstring::mb_decode_mimeheader($string); } +} +if (!function_exists('mb_encode_mimeheader')) { + function mb_encode_mimeheader($string, $charset = null, $transfer_encoding = null, $newline = "\r\n", $indent = 0) { return p\Mbstring::mb_encode_mimeheader($string, $charset, $transfer_encoding, $newline, $indent); } +} +if (!function_exists('mb_decode_numericentity')) { + function mb_decode_numericentity($string, $map, $encoding = null) { return p\Mbstring::mb_decode_numericentity($string, $map, $encoding); } +} +if (!function_exists('mb_encode_numericentity')) { + function mb_encode_numericentity($string, $map, $encoding = null, $hex = false) { return p\Mbstring::mb_encode_numericentity($string, $map, $encoding, $hex); } +} +if (!function_exists('mb_convert_case')) { + function mb_convert_case($string, $mode, $encoding = null) { return p\Mbstring::mb_convert_case($string, $mode, $encoding); } +} +if (!function_exists('mb_internal_encoding')) { + function mb_internal_encoding($encoding = null) { return p\Mbstring::mb_internal_encoding($encoding); } +} +if (!function_exists('mb_language')) { + function mb_language($language = null) { return p\Mbstring::mb_language($language); } +} +if (!function_exists('mb_list_encodings')) { + function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); } +} +if (!function_exists('mb_encoding_aliases')) { + function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); } +} +if (!function_exists('mb_check_encoding')) { + function mb_check_encoding($value = null, $encoding = null) { return p\Mbstring::mb_check_encoding($value, $encoding); } +} +if (!function_exists('mb_detect_encoding')) { + function mb_detect_encoding($string, $encodings = null, $strict = false) { return p\Mbstring::mb_detect_encoding($string, $encodings, $strict); } +} +if (!function_exists('mb_detect_order')) { + function mb_detect_order($encoding = null) { return p\Mbstring::mb_detect_order($encoding); } +} +if (!function_exists('mb_parse_str')) { + function mb_parse_str($string, &$result = []) { parse_str($string, $result); return (bool) $result; } +} +if (!function_exists('mb_strlen')) { + function mb_strlen($string, $encoding = null) { return p\Mbstring::mb_strlen($string, $encoding); } +} +if (!function_exists('mb_strpos')) { + function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strpos($haystack, $needle, $offset, $encoding); } +} +if (!function_exists('mb_strtolower')) { + function mb_strtolower($string, $encoding = null) { return p\Mbstring::mb_strtolower($string, $encoding); } +} +if (!function_exists('mb_strtoupper')) { + function mb_strtoupper($string, $encoding = null) { return p\Mbstring::mb_strtoupper($string, $encoding); } +} +if (!function_exists('mb_substitute_character')) { + function mb_substitute_character($substitute_character = null) { return p\Mbstring::mb_substitute_character($substitute_character); } +} +if (!function_exists('mb_substr')) { + function mb_substr($string, $start, $length = 2147483647, $encoding = null) { return p\Mbstring::mb_substr($string, $start, $length, $encoding); } +} +if (!function_exists('mb_stripos')) { + function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_stripos($haystack, $needle, $offset, $encoding); } +} +if (!function_exists('mb_stristr')) { + function mb_stristr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_stristr($haystack, $needle, $before_needle, $encoding); } +} +if (!function_exists('mb_strrchr')) { + function mb_strrchr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrchr($haystack, $needle, $before_needle, $encoding); } +} +if (!function_exists('mb_strrichr')) { + function mb_strrichr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrichr($haystack, $needle, $before_needle, $encoding); } +} +if (!function_exists('mb_strripos')) { + function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strripos($haystack, $needle, $offset, $encoding); } +} +if (!function_exists('mb_strrpos')) { + function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strrpos($haystack, $needle, $offset, $encoding); } +} +if (!function_exists('mb_strstr')) { + function mb_strstr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strstr($haystack, $needle, $before_needle, $encoding); } +} +if (!function_exists('mb_get_info')) { + function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); } +} +if (!function_exists('mb_http_output')) { + function mb_http_output($encoding = null) { return p\Mbstring::mb_http_output($encoding); } +} +if (!function_exists('mb_strwidth')) { + function mb_strwidth($string, $encoding = null) { return p\Mbstring::mb_strwidth($string, $encoding); } +} +if (!function_exists('mb_substr_count')) { + function mb_substr_count($haystack, $needle, $encoding = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $encoding); } +} +if (!function_exists('mb_output_handler')) { + function mb_output_handler($string, $status) { return p\Mbstring::mb_output_handler($string, $status); } +} +if (!function_exists('mb_http_input')) { + function mb_http_input($type = null) { return p\Mbstring::mb_http_input($type); } +} + +if (!function_exists('mb_convert_variables')) { + function mb_convert_variables($to_encoding, $from_encoding, &...$vars) { return p\Mbstring::mb_convert_variables($to_encoding, $from_encoding, ...$vars); } +} + +if (!function_exists('mb_ord')) { + function mb_ord($string, $encoding = null) { return p\Mbstring::mb_ord($string, $encoding); } +} +if (!function_exists('mb_chr')) { + function mb_chr($codepoint, $encoding = null) { return p\Mbstring::mb_chr($codepoint, $encoding); } +} +if (!function_exists('mb_scrub')) { + function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); } +} +if (!function_exists('mb_str_split')) { + function mb_str_split($string, $length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $length, $encoding); } +} + +if (!function_exists('mb_str_pad')) { + function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string { return p\Mbstring::mb_str_pad($string, $length, $pad_string, $pad_type, $encoding); } +} + +if (!function_exists('mb_ucfirst')) { + function mb_ucfirst(string $string, ?string $encoding = null): string { return p\Mbstring::mb_ucfirst($string, $encoding); } +} + +if (!function_exists('mb_lcfirst')) { + function mb_lcfirst(string $string, ?string $encoding = null): string { return p\Mbstring::mb_lcfirst($string, $encoding); } +} + +if (!function_exists('mb_trim')) { + function mb_trim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_trim($string, $characters, $encoding); } +} + +if (!function_exists('mb_ltrim')) { + function mb_ltrim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_ltrim($string, $characters, $encoding); } +} + +if (!function_exists('mb_rtrim')) { + function mb_rtrim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_rtrim($string, $characters, $encoding); } +} + + +if (extension_loaded('mbstring')) { + return; +} + +if (!defined('MB_CASE_UPPER')) { + define('MB_CASE_UPPER', 0); +} +if (!defined('MB_CASE_LOWER')) { + define('MB_CASE_LOWER', 1); +} +if (!defined('MB_CASE_TITLE')) { + define('MB_CASE_TITLE', 2); +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/bootstrap80.php b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/bootstrap80.php new file mode 100644 index 0000000..5236e6d --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/bootstrap80.php @@ -0,0 +1,167 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Mbstring as p; + +if (!function_exists('mb_convert_encoding')) { + function mb_convert_encoding(array|string|null $string, ?string $to_encoding, array|string|null $from_encoding = null): array|string|false { return p\Mbstring::mb_convert_encoding($string ?? '', (string) $to_encoding, $from_encoding); } +} +if (!function_exists('mb_decode_mimeheader')) { + function mb_decode_mimeheader(?string $string): string { return p\Mbstring::mb_decode_mimeheader((string) $string); } +} +if (!function_exists('mb_encode_mimeheader')) { + function mb_encode_mimeheader(?string $string, ?string $charset = null, ?string $transfer_encoding = null, ?string $newline = "\r\n", ?int $indent = 0): string { return p\Mbstring::mb_encode_mimeheader((string) $string, $charset, $transfer_encoding, (string) $newline, (int) $indent); } +} +if (!function_exists('mb_decode_numericentity')) { + function mb_decode_numericentity(?string $string, array $map, ?string $encoding = null): string { return p\Mbstring::mb_decode_numericentity((string) $string, $map, $encoding); } +} +if (!function_exists('mb_encode_numericentity')) { + function mb_encode_numericentity(?string $string, array $map, ?string $encoding = null, ?bool $hex = false): string { return p\Mbstring::mb_encode_numericentity((string) $string, $map, $encoding, (bool) $hex); } +} +if (!function_exists('mb_convert_case')) { + function mb_convert_case(?string $string, ?int $mode, ?string $encoding = null): string { return p\Mbstring::mb_convert_case((string) $string, (int) $mode, $encoding); } +} +if (!function_exists('mb_internal_encoding')) { + function mb_internal_encoding(?string $encoding = null): string|bool { return p\Mbstring::mb_internal_encoding($encoding); } +} +if (!function_exists('mb_language')) { + function mb_language(?string $language = null): string|bool { return p\Mbstring::mb_language($language); } +} +if (!function_exists('mb_list_encodings')) { + function mb_list_encodings(): array { return p\Mbstring::mb_list_encodings(); } +} +if (!function_exists('mb_encoding_aliases')) { + function mb_encoding_aliases(?string $encoding): array { return p\Mbstring::mb_encoding_aliases((string) $encoding); } +} +if (!function_exists('mb_check_encoding')) { + function mb_check_encoding(array|string|null $value = null, ?string $encoding = null): bool { return p\Mbstring::mb_check_encoding($value, $encoding); } +} +if (!function_exists('mb_detect_encoding')) { + function mb_detect_encoding(?string $string, array|string|null $encodings = null, ?bool $strict = false): string|false { return p\Mbstring::mb_detect_encoding((string) $string, $encodings, (bool) $strict); } +} +if (!function_exists('mb_detect_order')) { + function mb_detect_order(array|string|null $encoding = null): array|bool { return p\Mbstring::mb_detect_order($encoding); } +} +if (!function_exists('mb_parse_str')) { + function mb_parse_str(?string $string, &$result = []): bool { parse_str((string) $string, $result); return (bool) $result; } +} +if (!function_exists('mb_strlen')) { + function mb_strlen(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strlen((string) $string, $encoding); } +} +if (!function_exists('mb_strpos')) { + function mb_strpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strpos((string) $haystack, (string) $needle, (int) $offset, $encoding); } +} +if (!function_exists('mb_strtolower')) { + function mb_strtolower(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtolower((string) $string, $encoding); } +} +if (!function_exists('mb_strtoupper')) { + function mb_strtoupper(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtoupper((string) $string, $encoding); } +} +if (!function_exists('mb_substitute_character')) { + function mb_substitute_character(string|int|null $substitute_character = null): string|int|bool { return p\Mbstring::mb_substitute_character($substitute_character); } +} +if (!function_exists('mb_substr')) { + function mb_substr(?string $string, ?int $start, ?int $length = null, ?string $encoding = null): string { return p\Mbstring::mb_substr((string) $string, (int) $start, $length, $encoding); } +} +if (!function_exists('mb_stripos')) { + function mb_stripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_stripos((string) $haystack, (string) $needle, (int) $offset, $encoding); } +} +if (!function_exists('mb_stristr')) { + function mb_stristr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_stristr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } +} +if (!function_exists('mb_strrchr')) { + function mb_strrchr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrchr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } +} +if (!function_exists('mb_strrichr')) { + function mb_strrichr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrichr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } +} +if (!function_exists('mb_strripos')) { + function mb_strripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strripos((string) $haystack, (string) $needle, (int) $offset, $encoding); } +} +if (!function_exists('mb_strrpos')) { + function mb_strrpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strrpos((string) $haystack, (string) $needle, (int) $offset, $encoding); } +} +if (!function_exists('mb_strstr')) { + function mb_strstr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strstr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } +} +if (!function_exists('mb_get_info')) { + function mb_get_info(?string $type = 'all'): array|string|int|false|null { return p\Mbstring::mb_get_info((string) $type); } +} +if (!function_exists('mb_http_output')) { + function mb_http_output(?string $encoding = null): string|bool { return p\Mbstring::mb_http_output($encoding); } +} +if (!function_exists('mb_strwidth')) { + function mb_strwidth(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strwidth((string) $string, $encoding); } +} +if (!function_exists('mb_substr_count')) { + function mb_substr_count(?string $haystack, ?string $needle, ?string $encoding = null): int { return p\Mbstring::mb_substr_count((string) $haystack, (string) $needle, $encoding); } +} +if (!function_exists('mb_output_handler')) { + function mb_output_handler(?string $string, ?int $status): string { return p\Mbstring::mb_output_handler((string) $string, (int) $status); } +} +if (!function_exists('mb_http_input')) { + function mb_http_input(?string $type = null): array|string|false { return p\Mbstring::mb_http_input($type); } +} + +if (!function_exists('mb_convert_variables')) { + function mb_convert_variables(?string $to_encoding, array|string|null $from_encoding, mixed &$var, mixed &...$vars): string|false { return p\Mbstring::mb_convert_variables((string) $to_encoding, $from_encoding ?? '', $var, ...$vars); } +} + +if (!function_exists('mb_ord')) { + function mb_ord(?string $string, ?string $encoding = null): int|false { return p\Mbstring::mb_ord((string) $string, $encoding); } +} +if (!function_exists('mb_chr')) { + function mb_chr(?int $codepoint, ?string $encoding = null): string|false { return p\Mbstring::mb_chr((int) $codepoint, $encoding); } +} +if (!function_exists('mb_scrub')) { + function mb_scrub(?string $string, ?string $encoding = null): string { $encoding ??= mb_internal_encoding(); return mb_convert_encoding((string) $string, $encoding, $encoding); } +} +if (!function_exists('mb_str_split')) { + function mb_str_split(?string $string, ?int $length = 1, ?string $encoding = null): array { return p\Mbstring::mb_str_split((string) $string, (int) $length, $encoding); } +} + +if (!function_exists('mb_str_pad')) { + function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string { return p\Mbstring::mb_str_pad($string, $length, $pad_string, $pad_type, $encoding); } +} + +if (!function_exists('mb_ucfirst')) { + function mb_ucfirst(string $string, ?string $encoding = null): string { return p\Mbstring::mb_ucfirst($string, $encoding); } +} + +if (!function_exists('mb_lcfirst')) { + function mb_lcfirst(string $string, ?string $encoding = null): string { return p\Mbstring::mb_lcfirst($string, $encoding); } +} + +if (!function_exists('mb_trim')) { + function mb_trim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_trim($string, $characters, $encoding); } +} + +if (!function_exists('mb_ltrim')) { + function mb_ltrim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_ltrim($string, $characters, $encoding); } +} + +if (!function_exists('mb_rtrim')) { + function mb_rtrim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_rtrim($string, $characters, $encoding); } +} + +if (extension_loaded('mbstring')) { + return; +} + +if (!defined('MB_CASE_UPPER')) { + define('MB_CASE_UPPER', 0); +} +if (!defined('MB_CASE_LOWER')) { + define('MB_CASE_LOWER', 1); +} +if (!defined('MB_CASE_TITLE')) { + define('MB_CASE_TITLE', 2); +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/composer.json b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/composer.json new file mode 100644 index 0000000..daa07f8 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-mbstring/composer.json @@ -0,0 +1,39 @@ +{ + "name": "symfony/polyfill-mbstring", + "type": "library", + "description": "Symfony polyfill for the Mbstring extension", + "keywords": ["polyfill", "shim", "compatibility", "portable", "mbstring"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=7.2", + "ext-iconv": "*" + }, + "provide": { + "ext-mbstring": "*" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" }, + "files": [ "bootstrap.php" ] + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "minimum-stability": "dev", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/LICENSE b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/LICENSE new file mode 100644 index 0000000..0ed3a24 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2020-present Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/Php80.php b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/Php80.php new file mode 100644 index 0000000..362dd1a --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/Php80.php @@ -0,0 +1,115 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Php80; + +/** + * @author Ion Bazan <ion.bazan@gmail.com> + * @author Nico Oelgart <nicoswd@gmail.com> + * @author Nicolas Grekas <p@tchwork.com> + * + * @internal + */ +final class Php80 +{ + public static function fdiv(float $dividend, float $divisor): float + { + return @($dividend / $divisor); + } + + public static function get_debug_type($value): string + { + switch (true) { + case null === $value: return 'null'; + case \is_bool($value): return 'bool'; + case \is_string($value): return 'string'; + case \is_array($value): return 'array'; + case \is_int($value): return 'int'; + case \is_float($value): return 'float'; + case \is_object($value): break; + case $value instanceof \__PHP_Incomplete_Class: return '__PHP_Incomplete_Class'; + default: + if (null === $type = @get_resource_type($value)) { + return 'unknown'; + } + + if ('Unknown' === $type) { + $type = 'closed'; + } + + return "resource ($type)"; + } + + $class = \get_class($value); + + if (false === strpos($class, '@')) { + return $class; + } + + return (get_parent_class($class) ?: key(class_implements($class)) ?: 'class').'@anonymous'; + } + + public static function get_resource_id($res): int + { + if (!\is_resource($res) && null === @get_resource_type($res)) { + throw new \TypeError(sprintf('Argument 1 passed to get_resource_id() must be of the type resource, %s given', get_debug_type($res))); + } + + return (int) $res; + } + + public static function preg_last_error_msg(): string + { + switch (preg_last_error()) { + case \PREG_INTERNAL_ERROR: + return 'Internal error'; + case \PREG_BAD_UTF8_ERROR: + return 'Malformed UTF-8 characters, possibly incorrectly encoded'; + case \PREG_BAD_UTF8_OFFSET_ERROR: + return 'The offset did not correspond to the beginning of a valid UTF-8 code point'; + case \PREG_BACKTRACK_LIMIT_ERROR: + return 'Backtrack limit exhausted'; + case \PREG_RECURSION_LIMIT_ERROR: + return 'Recursion limit exhausted'; + case \PREG_JIT_STACKLIMIT_ERROR: + return 'JIT stack limit exhausted'; + case \PREG_NO_ERROR: + return 'No error'; + default: + return 'Unknown error'; + } + } + + public static function str_contains(string $haystack, string $needle): bool + { + return '' === $needle || false !== strpos($haystack, $needle); + } + + public static function str_starts_with(string $haystack, string $needle): bool + { + return 0 === strncmp($haystack, $needle, \strlen($needle)); + } + + public static function str_ends_with(string $haystack, string $needle): bool + { + if ('' === $needle || $needle === $haystack) { + return true; + } + + if ('' === $haystack) { + return false; + } + + $needleLength = \strlen($needle); + + return $needleLength <= \strlen($haystack) && 0 === substr_compare($haystack, $needle, -$needleLength); + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/PhpToken.php b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/PhpToken.php new file mode 100644 index 0000000..cd78c4c --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/PhpToken.php @@ -0,0 +1,106 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Php80; + +/** + * @author Fedonyuk Anton <info@ensostudio.ru> + * + * @internal + */ +class PhpToken implements \Stringable +{ + /** + * @var int + */ + public $id; + + /** + * @var string + */ + public $text; + + /** + * @var -1|positive-int + */ + public $line; + + /** + * @var int + */ + public $pos; + + /** + * @param -1|positive-int $line + */ + public function __construct(int $id, string $text, int $line = -1, int $position = -1) + { + $this->id = $id; + $this->text = $text; + $this->line = $line; + $this->pos = $position; + } + + public function getTokenName(): ?string + { + if ('UNKNOWN' === $name = token_name($this->id)) { + $name = \strlen($this->text) > 1 || \ord($this->text) < 32 ? null : $this->text; + } + + return $name; + } + + /** + * @param int|string|array $kind + */ + public function is($kind): bool + { + foreach ((array) $kind as $value) { + if (\in_array($value, [$this->id, $this->text], true)) { + return true; + } + } + + return false; + } + + public function isIgnorable(): bool + { + return \in_array($this->id, [\T_WHITESPACE, \T_COMMENT, \T_DOC_COMMENT, \T_OPEN_TAG], true); + } + + public function __toString(): string + { + return (string) $this->text; + } + + /** + * @return list<static> + */ + public static function tokenize(string $code, int $flags = 0): array + { + $line = 1; + $position = 0; + $tokens = token_get_all($code, $flags); + foreach ($tokens as $index => $token) { + if (\is_string($token)) { + $id = \ord($token); + $text = $token; + } else { + [$id, $text, $line] = $token; + } + $tokens[$index] = new static($id, $text, $line, $position); + $position += \strlen($text); + } + + return $tokens; + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/README.md b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/README.md new file mode 100644 index 0000000..3816c55 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/README.md @@ -0,0 +1,25 @@ +Symfony Polyfill / Php80 +======================== + +This component provides features added to PHP 8.0 core: + +- [`Stringable`](https://php.net/stringable) interface +- [`fdiv`](https://php.net/fdiv) +- [`ValueError`](https://php.net/valueerror) class +- [`UnhandledMatchError`](https://php.net/unhandledmatcherror) class +- `FILTER_VALIDATE_BOOL` constant +- [`get_debug_type`](https://php.net/get_debug_type) +- [`PhpToken`](https://php.net/phptoken) class +- [`preg_last_error_msg`](https://php.net/preg_last_error_msg) +- [`str_contains`](https://php.net/str_contains) +- [`str_starts_with`](https://php.net/str_starts_with) +- [`str_ends_with`](https://php.net/str_ends_with) +- [`get_resource_id`](https://php.net/get_resource_id) + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php new file mode 100644 index 0000000..2b95542 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php @@ -0,0 +1,31 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#[Attribute(Attribute::TARGET_CLASS)] +final class Attribute +{ + public const TARGET_CLASS = 1; + public const TARGET_FUNCTION = 2; + public const TARGET_METHOD = 4; + public const TARGET_PROPERTY = 8; + public const TARGET_CLASS_CONSTANT = 16; + public const TARGET_PARAMETER = 32; + public const TARGET_ALL = 63; + public const IS_REPEATABLE = 64; + + /** @var int */ + public $flags; + + public function __construct(int $flags = self::TARGET_ALL) + { + $this->flags = $flags; + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php new file mode 100644 index 0000000..bd1212f --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php @@ -0,0 +1,16 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +if (\PHP_VERSION_ID < 80000 && extension_loaded('tokenizer')) { + class PhpToken extends Symfony\Polyfill\Php80\PhpToken + { + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php new file mode 100644 index 0000000..7c62d75 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php @@ -0,0 +1,20 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +if (\PHP_VERSION_ID < 80000) { + interface Stringable + { + /** + * @return string + */ + public function __toString(); + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php new file mode 100644 index 0000000..01c6c6c --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php @@ -0,0 +1,16 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +if (\PHP_VERSION_ID < 80000) { + class UnhandledMatchError extends Error + { + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php new file mode 100644 index 0000000..783dbc2 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php @@ -0,0 +1,16 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +if (\PHP_VERSION_ID < 80000) { + class ValueError extends Error + { + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/bootstrap.php b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/bootstrap.php new file mode 100644 index 0000000..e5f7dbc --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/bootstrap.php @@ -0,0 +1,42 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Php80 as p; + +if (\PHP_VERSION_ID >= 80000) { + return; +} + +if (!defined('FILTER_VALIDATE_BOOL') && defined('FILTER_VALIDATE_BOOLEAN')) { + define('FILTER_VALIDATE_BOOL', \FILTER_VALIDATE_BOOLEAN); +} + +if (!function_exists('fdiv')) { + function fdiv(float $num1, float $num2): float { return p\Php80::fdiv($num1, $num2); } +} +if (!function_exists('preg_last_error_msg')) { + function preg_last_error_msg(): string { return p\Php80::preg_last_error_msg(); } +} +if (!function_exists('str_contains')) { + function str_contains(?string $haystack, ?string $needle): bool { return p\Php80::str_contains($haystack ?? '', $needle ?? ''); } +} +if (!function_exists('str_starts_with')) { + function str_starts_with(?string $haystack, ?string $needle): bool { return p\Php80::str_starts_with($haystack ?? '', $needle ?? ''); } +} +if (!function_exists('str_ends_with')) { + function str_ends_with(?string $haystack, ?string $needle): bool { return p\Php80::str_ends_with($haystack ?? '', $needle ?? ''); } +} +if (!function_exists('get_debug_type')) { + function get_debug_type($value): string { return p\Php80::get_debug_type($value); } +} +if (!function_exists('get_resource_id')) { + function get_resource_id($resource): int { return p\Php80::get_resource_id($resource); } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/composer.json b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/composer.json new file mode 100644 index 0000000..a503b03 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/symfony/polyfill-php80/composer.json @@ -0,0 +1,37 @@ +{ + "name": "symfony/polyfill-php80", + "type": "library", + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "keywords": ["polyfill", "shim", "compatibility", "portable"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=7.2" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Php80\\": "" }, + "files": [ "bootstrap.php" ], + "classmap": [ "Resources/stubs" ] + }, + "minimum-stability": "dev", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/LICENSE b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/LICENSE new file mode 100644 index 0000000..922c552 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/LICENSE @@ -0,0 +1,30 @@ +BSD 3-Clause License + +Copyright (c) 2014, Graham Campbell. +Copyright (c) 2013, Vance Lucas. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/composer.json b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/composer.json new file mode 100644 index 0000000..3636317 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/composer.json @@ -0,0 +1,60 @@ +{ + "name": "vlucas/phpdotenv", + "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "keywords": ["env", "dotenv", "environment"], + "license": "BSD-3-Clause", + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Vance Lucas", + "email": "vance@vancelucas.com", + "homepage": "https://github.com/vlucas" + } + ], + "require": { + "php": "^7.2.5 || ^8.0", + "ext-pcre": "*", + "graham-campbell/result-type": "^1.1.3", + "phpoption/phpoption": "^1.9.3", + "symfony/polyfill-ctype": "^1.24", + "symfony/polyfill-mbstring": "^1.24", + "symfony/polyfill-php80": "^1.24" + }, + "require-dev": { + "ext-filter": "*", + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit":"^8.5.34 || ^9.6.13 || ^10.4.2" + }, + "autoload": { + "psr-4": { + "Dotenv\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Dotenv\\Tests\\": "tests/Dotenv/" + } + }, + "suggest": { + "ext-filter": "Required to use the boolean validator." + }, + "config": { + "allow-plugins": { + "bamarni/composer-bin-plugin": true + }, + "preferred-install": "dist" + }, + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, + "branch-alias": { + "dev-master": "5.6-dev" + } + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Dotenv.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Dotenv.php new file mode 100644 index 0000000..34ca850 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Dotenv.php @@ -0,0 +1,267 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv; + +use Dotenv\Exception\InvalidPathException; +use Dotenv\Loader\Loader; +use Dotenv\Loader\LoaderInterface; +use Dotenv\Parser\Parser; +use Dotenv\Parser\ParserInterface; +use Dotenv\Repository\Adapter\ArrayAdapter; +use Dotenv\Repository\Adapter\PutenvAdapter; +use Dotenv\Repository\RepositoryBuilder; +use Dotenv\Repository\RepositoryInterface; +use Dotenv\Store\StoreBuilder; +use Dotenv\Store\StoreInterface; +use Dotenv\Store\StringStore; + +class Dotenv +{ + /** + * The store instance. + * + * @var \Dotenv\Store\StoreInterface + */ + private $store; + + /** + * The parser instance. + * + * @var \Dotenv\Parser\ParserInterface + */ + private $parser; + + /** + * The loader instance. + * + * @var \Dotenv\Loader\LoaderInterface + */ + private $loader; + + /** + * The repository instance. + * + * @var \Dotenv\Repository\RepositoryInterface + */ + private $repository; + + /** + * Create a new dotenv instance. + * + * @param \Dotenv\Store\StoreInterface $store + * @param \Dotenv\Parser\ParserInterface $parser + * @param \Dotenv\Loader\LoaderInterface $loader + * @param \Dotenv\Repository\RepositoryInterface $repository + * + * @return void + */ + public function __construct( + StoreInterface $store, + ParserInterface $parser, + LoaderInterface $loader, + RepositoryInterface $repository + ) { + $this->store = $store; + $this->parser = $parser; + $this->loader = $loader; + $this->repository = $repository; + } + + /** + * Create a new dotenv instance. + * + * @param \Dotenv\Repository\RepositoryInterface $repository + * @param string|string[] $paths + * @param string|string[]|null $names + * @param bool $shortCircuit + * @param string|null $fileEncoding + * + * @return \Dotenv\Dotenv + */ + public static function create(RepositoryInterface $repository, $paths, $names = null, bool $shortCircuit = true, ?string $fileEncoding = null) + { + $builder = $names === null ? StoreBuilder::createWithDefaultName() : StoreBuilder::createWithNoNames(); + + foreach ((array) $paths as $path) { + $builder = $builder->addPath($path); + } + + foreach ((array) $names as $name) { + $builder = $builder->addName($name); + } + + if ($shortCircuit) { + $builder = $builder->shortCircuit(); + } + + return new self($builder->fileEncoding($fileEncoding)->make(), new Parser(), new Loader(), $repository); + } + + /** + * Create a new mutable dotenv instance with default repository. + * + * @param string|string[] $paths + * @param string|string[]|null $names + * @param bool $shortCircuit + * @param string|null $fileEncoding + * + * @return \Dotenv\Dotenv + */ + public static function createMutable($paths, $names = null, bool $shortCircuit = true, ?string $fileEncoding = null) + { + $repository = RepositoryBuilder::createWithDefaultAdapters()->make(); + + return self::create($repository, $paths, $names, $shortCircuit, $fileEncoding); + } + + /** + * Create a new mutable dotenv instance with default repository with the putenv adapter. + * + * @param string|string[] $paths + * @param string|string[]|null $names + * @param bool $shortCircuit + * @param string|null $fileEncoding + * + * @return \Dotenv\Dotenv + */ + public static function createUnsafeMutable($paths, $names = null, bool $shortCircuit = true, ?string $fileEncoding = null) + { + $repository = RepositoryBuilder::createWithDefaultAdapters() + ->addAdapter(PutenvAdapter::class) + ->make(); + + return self::create($repository, $paths, $names, $shortCircuit, $fileEncoding); + } + + /** + * Create a new immutable dotenv instance with default repository. + * + * @param string|string[] $paths + * @param string|string[]|null $names + * @param bool $shortCircuit + * @param string|null $fileEncoding + * + * @return \Dotenv\Dotenv + */ + public static function createImmutable($paths, $names = null, bool $shortCircuit = true, ?string $fileEncoding = null) + { + $repository = RepositoryBuilder::createWithDefaultAdapters()->immutable()->make(); + + return self::create($repository, $paths, $names, $shortCircuit, $fileEncoding); + } + + /** + * Create a new immutable dotenv instance with default repository with the putenv adapter. + * + * @param string|string[] $paths + * @param string|string[]|null $names + * @param bool $shortCircuit + * @param string|null $fileEncoding + * + * @return \Dotenv\Dotenv + */ + public static function createUnsafeImmutable($paths, $names = null, bool $shortCircuit = true, ?string $fileEncoding = null) + { + $repository = RepositoryBuilder::createWithDefaultAdapters() + ->addAdapter(PutenvAdapter::class) + ->immutable() + ->make(); + + return self::create($repository, $paths, $names, $shortCircuit, $fileEncoding); + } + + /** + * Create a new dotenv instance with an array backed repository. + * + * @param string|string[] $paths + * @param string|string[]|null $names + * @param bool $shortCircuit + * @param string|null $fileEncoding + * + * @return \Dotenv\Dotenv + */ + public static function createArrayBacked($paths, $names = null, bool $shortCircuit = true, ?string $fileEncoding = null) + { + $repository = RepositoryBuilder::createWithNoAdapters()->addAdapter(ArrayAdapter::class)->make(); + + return self::create($repository, $paths, $names, $shortCircuit, $fileEncoding); + } + + /** + * Parse the given content and resolve nested variables. + * + * This method behaves just like load(), only without mutating your actual + * environment. We do this by using an array backed repository. + * + * @param string $content + * + * @throws \Dotenv\Exception\InvalidFileException + * + * @return array<string, string|null> + */ + public static function parse(string $content) + { + $repository = RepositoryBuilder::createWithNoAdapters()->addAdapter(ArrayAdapter::class)->make(); + + $phpdotenv = new self(new StringStore($content), new Parser(), new Loader(), $repository); + + return $phpdotenv->load(); + } + + /** + * Read and load environment file(s). + * + * @throws \Dotenv\Exception\InvalidPathException|\Dotenv\Exception\InvalidEncodingException|\Dotenv\Exception\InvalidFileException + * + * @return array<string, string|null> + */ + public function load() + { + $entries = $this->parser->parse($this->store->read()); + + return $this->loader->load($this->repository, $entries); + } + + /** + * Read and load environment file(s), silently failing if no files can be read. + * + * @throws \Dotenv\Exception\InvalidEncodingException|\Dotenv\Exception\InvalidFileException + * + * @return array<string, string|null> + */ + public function safeLoad() + { + try { + return $this->load(); + } catch (InvalidPathException $e) { + // suppressing exception + return []; + } + } + + /** + * Required ensures that the specified variables exist, and returns a new validator object. + * + * @param string|string[] $variables + * + * @return \Dotenv\Validator + */ + public function required($variables) + { + return (new Validator($this->repository, (array) $variables))->required(); + } + + /** + * Returns a new validator object that won't check if the specified variables exist. + * + * @param string|string[] $variables + * + * @return \Dotenv\Validator + */ + public function ifPresent($variables) + { + return new Validator($this->repository, (array) $variables); + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Exception/ExceptionInterface.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Exception/ExceptionInterface.php new file mode 100644 index 0000000..1e80f53 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Exception/ExceptionInterface.php @@ -0,0 +1,12 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Exception; + +use Throwable; + +interface ExceptionInterface extends Throwable +{ + // +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Exception/InvalidEncodingException.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Exception/InvalidEncodingException.php new file mode 100644 index 0000000..f02f8e4 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Exception/InvalidEncodingException.php @@ -0,0 +1,12 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Exception; + +use InvalidArgumentException; + +final class InvalidEncodingException extends InvalidArgumentException implements ExceptionInterface +{ + // +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Exception/InvalidFileException.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Exception/InvalidFileException.php new file mode 100644 index 0000000..6e878a5 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Exception/InvalidFileException.php @@ -0,0 +1,12 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Exception; + +use InvalidArgumentException; + +final class InvalidFileException extends InvalidArgumentException implements ExceptionInterface +{ + // +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Exception/InvalidPathException.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Exception/InvalidPathException.php new file mode 100644 index 0000000..ee836a7 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Exception/InvalidPathException.php @@ -0,0 +1,12 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Exception; + +use InvalidArgumentException; + +final class InvalidPathException extends InvalidArgumentException implements ExceptionInterface +{ + // +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Exception/ValidationException.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Exception/ValidationException.php new file mode 100644 index 0000000..3d6773a --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Exception/ValidationException.php @@ -0,0 +1,12 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Exception; + +use RuntimeException; + +final class ValidationException extends RuntimeException implements ExceptionInterface +{ + // +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Loader/Loader.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Loader/Loader.php new file mode 100644 index 0000000..22a50af --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Loader/Loader.php @@ -0,0 +1,48 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Loader; + +use Dotenv\Parser\Entry; +use Dotenv\Parser\Value; +use Dotenv\Repository\RepositoryInterface; + +final class Loader implements LoaderInterface +{ + /** + * Load the given entries into the repository. + * + * We'll substitute any nested variables, and send each variable to the + * repository, with the effect of actually mutating the environment. + * + * @param \Dotenv\Repository\RepositoryInterface $repository + * @param \Dotenv\Parser\Entry[] $entries + * + * @return array<string, string|null> + */ + public function load(RepositoryInterface $repository, array $entries) + { + /** @var array<string, string|null> */ + return \array_reduce($entries, static function (array $vars, Entry $entry) use ($repository) { + $name = $entry->getName(); + + $value = $entry->getValue()->map(static function (Value $value) use ($repository) { + return Resolver::resolve($repository, $value); + }); + + if ($value->isDefined()) { + $inner = $value->get(); + if ($repository->set($name, $inner)) { + return \array_merge($vars, [$name => $inner]); + } + } else { + if ($repository->clear($name)) { + return \array_merge($vars, [$name => null]); + } + } + + return $vars; + }, []); + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Loader/LoaderInterface.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Loader/LoaderInterface.php new file mode 100644 index 0000000..f40d6ad --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Loader/LoaderInterface.php @@ -0,0 +1,20 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Loader; + +use Dotenv\Repository\RepositoryInterface; + +interface LoaderInterface +{ + /** + * Load the given entries into the repository. + * + * @param \Dotenv\Repository\RepositoryInterface $repository + * @param \Dotenv\Parser\Entry[] $entries + * + * @return array<string, string|null> + */ + public function load(RepositoryInterface $repository, array $entries); +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Loader/Resolver.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Loader/Resolver.php new file mode 100644 index 0000000..ab5adf8 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Loader/Resolver.php @@ -0,0 +1,65 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Loader; + +use Dotenv\Parser\Value; +use Dotenv\Repository\RepositoryInterface; +use Dotenv\Util\Regex; +use Dotenv\Util\Str; +use PhpOption\Option; + +final class Resolver +{ + /** + * This class is a singleton. + * + * @codeCoverageIgnore + * + * @return void + */ + private function __construct() + { + // + } + + /** + * Resolve the nested variables in the given value. + * + * Replaces ${varname} patterns in the allowed positions in the variable + * value by an existing environment variable. + * + * @param \Dotenv\Repository\RepositoryInterface $repository + * @param \Dotenv\Parser\Value $value + * + * @return string + */ + public static function resolve(RepositoryInterface $repository, Value $value) + { + return \array_reduce($value->getVars(), static function (string $s, int $i) use ($repository) { + return Str::substr($s, 0, $i).self::resolveVariable($repository, Str::substr($s, $i)); + }, $value->getChars()); + } + + /** + * Resolve a single nested variable. + * + * @param \Dotenv\Repository\RepositoryInterface $repository + * @param string $str + * + * @return string + */ + private static function resolveVariable(RepositoryInterface $repository, string $str) + { + return Regex::replaceCallback( + '/\A\${([a-zA-Z0-9_.]+)}/', + static function (array $matches) use ($repository) { + /** @var string */ + return Option::fromValue($repository->get($matches[1]))->getOrElse($matches[0]); + }, + $str, + 1 + )->success()->getOrElse($str); + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Parser/Entry.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Parser/Entry.php new file mode 100644 index 0000000..716f422 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Parser/Entry.php @@ -0,0 +1,59 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Parser; + +use PhpOption\Option; + +final class Entry +{ + /** + * The entry name. + * + * @var string + */ + private $name; + + /** + * The entry value. + * + * @var \Dotenv\Parser\Value|null + */ + private $value; + + /** + * Create a new entry instance. + * + * @param string $name + * @param \Dotenv\Parser\Value|null $value + * + * @return void + */ + public function __construct(string $name, ?Value $value = null) + { + $this->name = $name; + $this->value = $value; + } + + /** + * Get the entry name. + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Get the entry value. + * + * @return \PhpOption\Option<\Dotenv\Parser\Value> + */ + public function getValue() + { + /** @var \PhpOption\Option<\Dotenv\Parser\Value> */ + return Option::fromValue($this->value); + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Parser/EntryParser.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Parser/EntryParser.php new file mode 100644 index 0000000..85e5fa3 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Parser/EntryParser.php @@ -0,0 +1,300 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Parser; + +use Dotenv\Util\Regex; +use Dotenv\Util\Str; +use GrahamCampbell\ResultType\Error; +use GrahamCampbell\ResultType\Result; +use GrahamCampbell\ResultType\Success; + +final class EntryParser +{ + private const INITIAL_STATE = 0; + private const UNQUOTED_STATE = 1; + private const SINGLE_QUOTED_STATE = 2; + private const DOUBLE_QUOTED_STATE = 3; + private const ESCAPE_SEQUENCE_STATE = 4; + private const WHITESPACE_STATE = 5; + private const COMMENT_STATE = 6; + private const REJECT_STATES = [self::SINGLE_QUOTED_STATE, self::DOUBLE_QUOTED_STATE, self::ESCAPE_SEQUENCE_STATE]; + + /** + * This class is a singleton. + * + * @codeCoverageIgnore + * + * @return void + */ + private function __construct() + { + // + } + + /** + * Parse a raw entry into a proper entry. + * + * That is, turn a raw environment variable entry into a name and possibly + * a value. We wrap the answer in a result type. + * + * @param string $entry + * + * @return \GrahamCampbell\ResultType\Result<\Dotenv\Parser\Entry, string> + */ + public static function parse(string $entry) + { + return self::splitStringIntoParts($entry)->flatMap(static function (array $parts) { + [$name, $value] = $parts; + + return self::parseName($name)->flatMap(static function (string $name) use ($value) { + /** @var Result<Value|null, string> */ + $parsedValue = $value === null ? Success::create(null) : self::parseValue($value); + + return $parsedValue->map(static function (?Value $value) use ($name) { + return new Entry($name, $value); + }); + }); + }); + } + + /** + * Split the compound string into parts. + * + * @param string $line + * + * @return \GrahamCampbell\ResultType\Result<array{string, string|null},string> + */ + private static function splitStringIntoParts(string $line) + { + /** @var array{string, string|null} */ + $result = Str::pos($line, '=')->map(static function () use ($line) { + return \array_map('trim', \explode('=', $line, 2)); + })->getOrElse([$line, null]); + + if ($result[0] === '') { + /** @var \GrahamCampbell\ResultType\Result<array{string, string|null},string> */ + return Error::create(self::getErrorMessage('an unexpected equals', $line)); + } + + /** @var \GrahamCampbell\ResultType\Result<array{string, string|null},string> */ + return Success::create($result); + } + + /** + * Parse the given variable name. + * + * That is, strip the optional quotes and leading "export" from the + * variable name. We wrap the answer in a result type. + * + * @param string $name + * + * @return \GrahamCampbell\ResultType\Result<string, string> + */ + private static function parseName(string $name) + { + if (Str::len($name) > 8 && Str::substr($name, 0, 6) === 'export' && \ctype_space(Str::substr($name, 6, 1))) { + $name = \ltrim(Str::substr($name, 6)); + } + + if (self::isQuotedName($name)) { + $name = Str::substr($name, 1, -1); + } + + if (!self::isValidName($name)) { + /** @var \GrahamCampbell\ResultType\Result<string, string> */ + return Error::create(self::getErrorMessage('an invalid name', $name)); + } + + /** @var \GrahamCampbell\ResultType\Result<string, string> */ + return Success::create($name); + } + + /** + * Is the given variable name quoted? + * + * @param string $name + * + * @return bool + */ + private static function isQuotedName(string $name) + { + if (Str::len($name) < 3) { + return false; + } + + $first = Str::substr($name, 0, 1); + $last = Str::substr($name, -1, 1); + + return ($first === '"' && $last === '"') || ($first === '\'' && $last === '\''); + } + + /** + * Is the given variable name valid? + * + * @param string $name + * + * @return bool + */ + private static function isValidName(string $name) + { + return Regex::matches('~(*UTF8)\A[\p{Ll}\p{Lu}\p{M}\p{N}_.]+\z~', $name)->success()->getOrElse(false); + } + + /** + * Parse the given variable value. + * + * This has the effect of stripping quotes and comments, dealing with + * special characters, and locating nested variables, but not resolving + * them. Formally, we run a finite state automaton with an output tape: a + * transducer. We wrap the answer in a result type. + * + * @param string $value + * + * @return \GrahamCampbell\ResultType\Result<\Dotenv\Parser\Value, string> + */ + private static function parseValue(string $value) + { + if (\trim($value) === '') { + /** @var \GrahamCampbell\ResultType\Result<\Dotenv\Parser\Value, string> */ + return Success::create(Value::blank()); + } + + return \array_reduce(\iterator_to_array(Lexer::lex($value)), static function (Result $data, string $token) { + return $data->flatMap(static function (array $data) use ($token) { + return self::processToken($data[1], $token)->map(static function (array $val) use ($data) { + return [$data[0]->append($val[0], $val[1]), $val[2]]; + }); + }); + }, Success::create([Value::blank(), self::INITIAL_STATE]))->flatMap(static function (array $result) { + /** @psalm-suppress DocblockTypeContradiction */ + if (in_array($result[1], self::REJECT_STATES, true)) { + /** @var \GrahamCampbell\ResultType\Result<\Dotenv\Parser\Value, string> */ + return Error::create('a missing closing quote'); + } + + /** @var \GrahamCampbell\ResultType\Result<\Dotenv\Parser\Value, string> */ + return Success::create($result[0]); + })->mapError(static function (string $err) use ($value) { + return self::getErrorMessage($err, $value); + }); + } + + /** + * Process the given token. + * + * @param int $state + * @param string $token + * + * @return \GrahamCampbell\ResultType\Result<array{string, bool, int}, string> + */ + private static function processToken(int $state, string $token) + { + switch ($state) { + case self::INITIAL_STATE: + if ($token === '\'') { + /** @var \GrahamCampbell\ResultType\Result<array{string, bool, int}, string> */ + return Success::create(['', false, self::SINGLE_QUOTED_STATE]); + } elseif ($token === '"') { + /** @var \GrahamCampbell\ResultType\Result<array{string, bool, int}, string> */ + return Success::create(['', false, self::DOUBLE_QUOTED_STATE]); + } elseif ($token === '#') { + /** @var \GrahamCampbell\ResultType\Result<array{string, bool, int}, string> */ + return Success::create(['', false, self::COMMENT_STATE]); + } elseif ($token === '$') { + /** @var \GrahamCampbell\ResultType\Result<array{string, bool, int}, string> */ + return Success::create([$token, true, self::UNQUOTED_STATE]); + } else { + /** @var \GrahamCampbell\ResultType\Result<array{string, bool, int}, string> */ + return Success::create([$token, false, self::UNQUOTED_STATE]); + } + case self::UNQUOTED_STATE: + if ($token === '#') { + /** @var \GrahamCampbell\ResultType\Result<array{string, bool, int}, string> */ + return Success::create(['', false, self::COMMENT_STATE]); + } elseif (\ctype_space($token)) { + /** @var \GrahamCampbell\ResultType\Result<array{string, bool, int}, string> */ + return Success::create(['', false, self::WHITESPACE_STATE]); + } elseif ($token === '$') { + /** @var \GrahamCampbell\ResultType\Result<array{string, bool, int}, string> */ + return Success::create([$token, true, self::UNQUOTED_STATE]); + } else { + /** @var \GrahamCampbell\ResultType\Result<array{string, bool, int}, string> */ + return Success::create([$token, false, self::UNQUOTED_STATE]); + } + case self::SINGLE_QUOTED_STATE: + if ($token === '\'') { + /** @var \GrahamCampbell\ResultType\Result<array{string, bool, int}, string> */ + return Success::create(['', false, self::WHITESPACE_STATE]); + } else { + /** @var \GrahamCampbell\ResultType\Result<array{string, bool, int}, string> */ + return Success::create([$token, false, self::SINGLE_QUOTED_STATE]); + } + case self::DOUBLE_QUOTED_STATE: + if ($token === '"') { + /** @var \GrahamCampbell\ResultType\Result<array{string, bool, int}, string> */ + return Success::create(['', false, self::WHITESPACE_STATE]); + } elseif ($token === '\\') { + /** @var \GrahamCampbell\ResultType\Result<array{string, bool, int}, string> */ + return Success::create(['', false, self::ESCAPE_SEQUENCE_STATE]); + } elseif ($token === '$') { + /** @var \GrahamCampbell\ResultType\Result<array{string, bool, int}, string> */ + return Success::create([$token, true, self::DOUBLE_QUOTED_STATE]); + } else { + /** @var \GrahamCampbell\ResultType\Result<array{string, bool, int}, string> */ + return Success::create([$token, false, self::DOUBLE_QUOTED_STATE]); + } + case self::ESCAPE_SEQUENCE_STATE: + if ($token === '"' || $token === '\\') { + /** @var \GrahamCampbell\ResultType\Result<array{string, bool, int}, string> */ + return Success::create([$token, false, self::DOUBLE_QUOTED_STATE]); + } elseif ($token === '$') { + /** @var \GrahamCampbell\ResultType\Result<array{string, bool, int}, string> */ + return Success::create([$token, false, self::DOUBLE_QUOTED_STATE]); + } else { + $first = Str::substr($token, 0, 1); + if (\in_array($first, ['f', 'n', 'r', 't', 'v'], true)) { + /** @var \GrahamCampbell\ResultType\Result<array{string, bool, int}, string> */ + return Success::create([\stripcslashes('\\'.$first).Str::substr($token, 1), false, self::DOUBLE_QUOTED_STATE]); + } else { + /** @var \GrahamCampbell\ResultType\Result<array{string, bool, int}, string> */ + return Error::create('an unexpected escape sequence'); + } + } + case self::WHITESPACE_STATE: + if ($token === '#') { + /** @var \GrahamCampbell\ResultType\Result<array{string, bool, int}, string> */ + return Success::create(['', false, self::COMMENT_STATE]); + } elseif (!\ctype_space($token)) { + /** @var \GrahamCampbell\ResultType\Result<array{string, bool, int}, string> */ + return Error::create('unexpected whitespace'); + } else { + /** @var \GrahamCampbell\ResultType\Result<array{string, bool, int}, string> */ + return Success::create(['', false, self::WHITESPACE_STATE]); + } + case self::COMMENT_STATE: + /** @var \GrahamCampbell\ResultType\Result<array{string, bool, int}, string> */ + return Success::create(['', false, self::COMMENT_STATE]); + default: + throw new \Error('Parser entered invalid state.'); + } + } + + /** + * Generate a friendly error message. + * + * @param string $cause + * @param string $subject + * + * @return string + */ + private static function getErrorMessage(string $cause, string $subject) + { + return \sprintf( + 'Encountered %s at [%s].', + $cause, + \strtok($subject, "\n") + ); + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Parser/Lexer.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Parser/Lexer.php new file mode 100644 index 0000000..981af24 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Parser/Lexer.php @@ -0,0 +1,58 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Parser; + +final class Lexer +{ + /** + * The regex for each type of token. + */ + private const PATTERNS = [ + '[\r\n]{1,1000}', '[^\S\r\n]{1,1000}', '\\\\', '\'', '"', '\\#', '\\$', '([^(\s\\\\\'"\\#\\$)]|\\(|\\)){1,1000}', + ]; + + /** + * This class is a singleton. + * + * @codeCoverageIgnore + * + * @return void + */ + private function __construct() + { + // + } + + /** + * Convert content into a token stream. + * + * Multibyte string processing is not needed here, and nether is error + * handling, for performance reasons. + * + * @param string $content + * + * @return \Generator<string> + */ + public static function lex(string $content) + { + static $regex; + + if ($regex === null) { + $regex = '(('.\implode(')|(', self::PATTERNS).'))A'; + } + + $offset = 0; + + while (isset($content[$offset])) { + if (!\preg_match($regex, $content, $matches, 0, $offset)) { + throw new \Error(\sprintf('Lexer encountered unexpected character [%s].', $content[$offset])); + } + + $offset += \strlen($matches[0]); + + yield $matches[0]; + } + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Parser/Lines.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Parser/Lines.php new file mode 100644 index 0000000..b3af160 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Parser/Lines.php @@ -0,0 +1,127 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Parser; + +use Dotenv\Util\Regex; +use Dotenv\Util\Str; + +final class Lines +{ + /** + * This class is a singleton. + * + * @codeCoverageIgnore + * + * @return void + */ + private function __construct() + { + // + } + + /** + * Process the array of lines of environment variables. + * + * This will produce an array of raw entries, one per variable. + * + * @param string[] $lines + * + * @return string[] + */ + public static function process(array $lines) + { + $output = []; + $multiline = false; + $multilineBuffer = []; + + foreach ($lines as $line) { + [$multiline, $line, $multilineBuffer] = self::multilineProcess($multiline, $line, $multilineBuffer); + + if (!$multiline && !self::isCommentOrWhitespace($line)) { + $output[] = $line; + } + } + + return $output; + } + + /** + * Used to make all multiline variable process. + * + * @param bool $multiline + * @param string $line + * @param string[] $buffer + * + * @return array{bool,string, string[]} + */ + private static function multilineProcess(bool $multiline, string $line, array $buffer) + { + $startsOnCurrentLine = $multiline ? false : self::looksLikeMultilineStart($line); + + // check if $line can be multiline variable + if ($startsOnCurrentLine) { + $multiline = true; + } + + if ($multiline) { + \array_push($buffer, $line); + + if (self::looksLikeMultilineStop($line, $startsOnCurrentLine)) { + $multiline = false; + $line = \implode("\n", $buffer); + $buffer = []; + } + } + + return [$multiline, $line, $buffer]; + } + + /** + * Determine if the given line can be the start of a multiline variable. + * + * @param string $line + * + * @return bool + */ + private static function looksLikeMultilineStart(string $line) + { + return Str::pos($line, '="')->map(static function () use ($line) { + return self::looksLikeMultilineStop($line, true) === false; + })->getOrElse(false); + } + + /** + * Determine if the given line can be the start of a multiline variable. + * + * @param string $line + * @param bool $started + * + * @return bool + */ + private static function looksLikeMultilineStop(string $line, bool $started) + { + if ($line === '"') { + return true; + } + + return Regex::occurrences('/(?=([^\\\\]"))/', \str_replace('\\\\', '', $line))->map(static function (int $count) use ($started) { + return $started ? $count > 1 : $count >= 1; + })->success()->getOrElse(false); + } + + /** + * Determine if the line in the file is a comment or whitespace. + * + * @param string $line + * + * @return bool + */ + private static function isCommentOrWhitespace(string $line) + { + $line = \trim($line); + + return $line === '' || (isset($line[0]) && $line[0] === '#'); + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Parser/Parser.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Parser/Parser.php new file mode 100644 index 0000000..bca8ec5 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Parser/Parser.php @@ -0,0 +1,53 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Parser; + +use Dotenv\Exception\InvalidFileException; +use Dotenv\Util\Regex; +use GrahamCampbell\ResultType\Result; +use GrahamCampbell\ResultType\Success; + +final class Parser implements ParserInterface +{ + /** + * Parse content into an entry array. + * + * @param string $content + * + * @throws \Dotenv\Exception\InvalidFileException + * + * @return \Dotenv\Parser\Entry[] + */ + public function parse(string $content) + { + return Regex::split("/(\r\n|\n|\r)/", $content)->mapError(static function () { + return 'Could not split into separate lines.'; + })->flatMap(static function (array $lines) { + return self::process(Lines::process($lines)); + })->mapError(static function (string $error) { + throw new InvalidFileException(\sprintf('Failed to parse dotenv file. %s', $error)); + })->success()->get(); + } + + /** + * Convert the raw entries into proper entries. + * + * @param string[] $entries + * + * @return \GrahamCampbell\ResultType\Result<\Dotenv\Parser\Entry[], string> + */ + private static function process(array $entries) + { + /** @var \GrahamCampbell\ResultType\Result<\Dotenv\Parser\Entry[], string> */ + return \array_reduce($entries, static function (Result $result, string $raw) { + return $result->flatMap(static function (array $entries) use ($raw) { + return EntryParser::parse($raw)->map(static function (Entry $entry) use ($entries) { + /** @var \Dotenv\Parser\Entry[] */ + return \array_merge($entries, [$entry]); + }); + }); + }, Success::create([])); + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Parser/ParserInterface.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Parser/ParserInterface.php new file mode 100644 index 0000000..17cc42a --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Parser/ParserInterface.php @@ -0,0 +1,19 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Parser; + +interface ParserInterface +{ + /** + * Parse content into an entry array. + * + * @param string $content + * + * @throws \Dotenv\Exception\InvalidFileException + * + * @return \Dotenv\Parser\Entry[] + */ + public function parse(string $content); +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Parser/Value.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Parser/Value.php new file mode 100644 index 0000000..9e495a1 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Parser/Value.php @@ -0,0 +1,88 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Parser; + +use Dotenv\Util\Str; + +final class Value +{ + /** + * The string representation of the parsed value. + * + * @var string + */ + private $chars; + + /** + * The locations of the variables in the value. + * + * @var int[] + */ + private $vars; + + /** + * Internal constructor for a value. + * + * @param string $chars + * @param int[] $vars + * + * @return void + */ + private function __construct(string $chars, array $vars) + { + $this->chars = $chars; + $this->vars = $vars; + } + + /** + * Create an empty value instance. + * + * @return \Dotenv\Parser\Value + */ + public static function blank() + { + return new self('', []); + } + + /** + * Create a new value instance, appending the characters. + * + * @param string $chars + * @param bool $var + * + * @return \Dotenv\Parser\Value + */ + public function append(string $chars, bool $var) + { + return new self( + $this->chars.$chars, + $var ? \array_merge($this->vars, [Str::len($this->chars)]) : $this->vars + ); + } + + /** + * Get the string representation of the parsed value. + * + * @return string + */ + public function getChars() + { + return $this->chars; + } + + /** + * Get the locations of the variables in the value. + * + * @return int[] + */ + public function getVars() + { + $vars = $this->vars; + + \rsort($vars); + + return $vars; + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/AdapterInterface.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/AdapterInterface.php new file mode 100644 index 0000000..5604398 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/AdapterInterface.php @@ -0,0 +1,15 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Repository\Adapter; + +interface AdapterInterface extends ReaderInterface, WriterInterface +{ + /** + * Create a new instance of the adapter, if it is available. + * + * @return \PhpOption\Option<\Dotenv\Repository\Adapter\AdapterInterface> + */ + public static function create(); +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/ApacheAdapter.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/ApacheAdapter.php new file mode 100644 index 0000000..af0aae1 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/ApacheAdapter.php @@ -0,0 +1,89 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Repository\Adapter; + +use PhpOption\None; +use PhpOption\Option; +use PhpOption\Some; + +final class ApacheAdapter implements AdapterInterface +{ + /** + * Create a new apache adapter instance. + * + * @return void + */ + private function __construct() + { + // + } + + /** + * Create a new instance of the adapter, if it is available. + * + * @return \PhpOption\Option<\Dotenv\Repository\Adapter\AdapterInterface> + */ + public static function create() + { + if (self::isSupported()) { + /** @var \PhpOption\Option<AdapterInterface> */ + return Some::create(new self()); + } + + return None::create(); + } + + /** + * Determines if the adapter is supported. + * + * This happens if PHP is running as an Apache module. + * + * @return bool + */ + private static function isSupported() + { + return \function_exists('apache_getenv') && \function_exists('apache_setenv'); + } + + /** + * Read an environment variable, if it exists. + * + * @param non-empty-string $name + * + * @return \PhpOption\Option<string> + */ + public function read(string $name) + { + /** @var \PhpOption\Option<string> */ + return Option::fromValue(apache_getenv($name))->filter(static function ($value) { + return \is_string($value) && $value !== ''; + }); + } + + /** + * Write to an environment variable, if possible. + * + * @param non-empty-string $name + * @param string $value + * + * @return bool + */ + public function write(string $name, string $value) + { + return apache_setenv($name, $value); + } + + /** + * Delete an environment variable, if possible. + * + * @param non-empty-string $name + * + * @return bool + */ + public function delete(string $name) + { + return apache_setenv($name, ''); + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/ArrayAdapter.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/ArrayAdapter.php new file mode 100644 index 0000000..7c3740d --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/ArrayAdapter.php @@ -0,0 +1,80 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Repository\Adapter; + +use PhpOption\Option; +use PhpOption\Some; + +final class ArrayAdapter implements AdapterInterface +{ + /** + * The variables and their values. + * + * @var array<string, string> + */ + private $variables; + + /** + * Create a new array adapter instance. + * + * @return void + */ + private function __construct() + { + $this->variables = []; + } + + /** + * Create a new instance of the adapter, if it is available. + * + * @return \PhpOption\Option<\Dotenv\Repository\Adapter\AdapterInterface> + */ + public static function create() + { + /** @var \PhpOption\Option<AdapterInterface> */ + return Some::create(new self()); + } + + /** + * Read an environment variable, if it exists. + * + * @param non-empty-string $name + * + * @return \PhpOption\Option<string> + */ + public function read(string $name) + { + return Option::fromArraysValue($this->variables, $name); + } + + /** + * Write to an environment variable, if possible. + * + * @param non-empty-string $name + * @param string $value + * + * @return bool + */ + public function write(string $name, string $value) + { + $this->variables[$name] = $value; + + return true; + } + + /** + * Delete an environment variable, if possible. + * + * @param non-empty-string $name + * + * @return bool + */ + public function delete(string $name) + { + unset($this->variables[$name]); + + return true; + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/EnvConstAdapter.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/EnvConstAdapter.php new file mode 100644 index 0000000..9eb1947 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/EnvConstAdapter.php @@ -0,0 +1,89 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Repository\Adapter; + +use PhpOption\Option; +use PhpOption\Some; + +final class EnvConstAdapter implements AdapterInterface +{ + /** + * Create a new env const adapter instance. + * + * @return void + */ + private function __construct() + { + // + } + + /** + * Create a new instance of the adapter, if it is available. + * + * @return \PhpOption\Option<\Dotenv\Repository\Adapter\AdapterInterface> + */ + public static function create() + { + /** @var \PhpOption\Option<AdapterInterface> */ + return Some::create(new self()); + } + + /** + * Read an environment variable, if it exists. + * + * @param non-empty-string $name + * + * @return \PhpOption\Option<string> + */ + public function read(string $name) + { + /** @var \PhpOption\Option<string> */ + return Option::fromArraysValue($_ENV, $name) + ->filter(static function ($value) { + return \is_scalar($value); + }) + ->map(static function ($value) { + if ($value === false) { + return 'false'; + } + + if ($value === true) { + return 'true'; + } + + /** @psalm-suppress PossiblyInvalidCast */ + return (string) $value; + }); + } + + /** + * Write to an environment variable, if possible. + * + * @param non-empty-string $name + * @param string $value + * + * @return bool + */ + public function write(string $name, string $value) + { + $_ENV[$name] = $value; + + return true; + } + + /** + * Delete an environment variable, if possible. + * + * @param non-empty-string $name + * + * @return bool + */ + public function delete(string $name) + { + unset($_ENV[$name]); + + return true; + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/GuardedWriter.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/GuardedWriter.php new file mode 100644 index 0000000..fed8b9b --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/GuardedWriter.php @@ -0,0 +1,85 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Repository\Adapter; + +final class GuardedWriter implements WriterInterface +{ + /** + * The inner writer to use. + * + * @var \Dotenv\Repository\Adapter\WriterInterface + */ + private $writer; + + /** + * The variable name allow list. + * + * @var string[] + */ + private $allowList; + + /** + * Create a new guarded writer instance. + * + * @param \Dotenv\Repository\Adapter\WriterInterface $writer + * @param string[] $allowList + * + * @return void + */ + public function __construct(WriterInterface $writer, array $allowList) + { + $this->writer = $writer; + $this->allowList = $allowList; + } + + /** + * Write to an environment variable, if possible. + * + * @param non-empty-string $name + * @param string $value + * + * @return bool + */ + public function write(string $name, string $value) + { + // Don't set non-allowed variables + if (!$this->isAllowed($name)) { + return false; + } + + // Set the value on the inner writer + return $this->writer->write($name, $value); + } + + /** + * Delete an environment variable, if possible. + * + * @param non-empty-string $name + * + * @return bool + */ + public function delete(string $name) + { + // Don't clear non-allowed variables + if (!$this->isAllowed($name)) { + return false; + } + + // Set the value on the inner writer + return $this->writer->delete($name); + } + + /** + * Determine if the given variable is allowed. + * + * @param non-empty-string $name + * + * @return bool + */ + private function isAllowed(string $name) + { + return \in_array($name, $this->allowList, true); + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/ImmutableWriter.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/ImmutableWriter.php new file mode 100644 index 0000000..3b279b8 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/ImmutableWriter.php @@ -0,0 +1,110 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Repository\Adapter; + +final class ImmutableWriter implements WriterInterface +{ + /** + * The inner writer to use. + * + * @var \Dotenv\Repository\Adapter\WriterInterface + */ + private $writer; + + /** + * The inner reader to use. + * + * @var \Dotenv\Repository\Adapter\ReaderInterface + */ + private $reader; + + /** + * The record of loaded variables. + * + * @var array<string, string> + */ + private $loaded; + + /** + * Create a new immutable writer instance. + * + * @param \Dotenv\Repository\Adapter\WriterInterface $writer + * @param \Dotenv\Repository\Adapter\ReaderInterface $reader + * + * @return void + */ + public function __construct(WriterInterface $writer, ReaderInterface $reader) + { + $this->writer = $writer; + $this->reader = $reader; + $this->loaded = []; + } + + /** + * Write to an environment variable, if possible. + * + * @param non-empty-string $name + * @param string $value + * + * @return bool + */ + public function write(string $name, string $value) + { + // Don't overwrite existing environment variables + // Ruby's dotenv does this with `ENV[key] ||= value` + if ($this->isExternallyDefined($name)) { + return false; + } + + // Set the value on the inner writer + if (!$this->writer->write($name, $value)) { + return false; + } + + // Record that we have loaded the variable + $this->loaded[$name] = ''; + + return true; + } + + /** + * Delete an environment variable, if possible. + * + * @param non-empty-string $name + * + * @return bool + */ + public function delete(string $name) + { + // Don't clear existing environment variables + if ($this->isExternallyDefined($name)) { + return false; + } + + // Clear the value on the inner writer + if (!$this->writer->delete($name)) { + return false; + } + + // Leave the variable as fair game + unset($this->loaded[$name]); + + return true; + } + + /** + * Determine if the given variable is externally defined. + * + * That is, is it an "existing" variable. + * + * @param non-empty-string $name + * + * @return bool + */ + private function isExternallyDefined(string $name) + { + return $this->reader->read($name)->isDefined() && !isset($this->loaded[$name]); + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/MultiReader.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/MultiReader.php new file mode 100644 index 0000000..0cfda6f --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/MultiReader.php @@ -0,0 +1,48 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Repository\Adapter; + +use PhpOption\None; + +final class MultiReader implements ReaderInterface +{ + /** + * The set of readers to use. + * + * @var \Dotenv\Repository\Adapter\ReaderInterface[] + */ + private $readers; + + /** + * Create a new multi-reader instance. + * + * @param \Dotenv\Repository\Adapter\ReaderInterface[] $readers + * + * @return void + */ + public function __construct(array $readers) + { + $this->readers = $readers; + } + + /** + * Read an environment variable, if it exists. + * + * @param non-empty-string $name + * + * @return \PhpOption\Option<string> + */ + public function read(string $name) + { + foreach ($this->readers as $reader) { + $result = $reader->read($name); + if ($result->isDefined()) { + return $result; + } + } + + return None::create(); + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/MultiWriter.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/MultiWriter.php new file mode 100644 index 0000000..15a9d8f --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/MultiWriter.php @@ -0,0 +1,64 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Repository\Adapter; + +final class MultiWriter implements WriterInterface +{ + /** + * The set of writers to use. + * + * @var \Dotenv\Repository\Adapter\WriterInterface[] + */ + private $writers; + + /** + * Create a new multi-writer instance. + * + * @param \Dotenv\Repository\Adapter\WriterInterface[] $writers + * + * @return void + */ + public function __construct(array $writers) + { + $this->writers = $writers; + } + + /** + * Write to an environment variable, if possible. + * + * @param non-empty-string $name + * @param string $value + * + * @return bool + */ + public function write(string $name, string $value) + { + foreach ($this->writers as $writers) { + if (!$writers->write($name, $value)) { + return false; + } + } + + return true; + } + + /** + * Delete an environment variable, if possible. + * + * @param non-empty-string $name + * + * @return bool + */ + public function delete(string $name) + { + foreach ($this->writers as $writers) { + if (!$writers->delete($name)) { + return false; + } + } + + return true; + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/PutenvAdapter.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/PutenvAdapter.php new file mode 100644 index 0000000..6d017cd --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/PutenvAdapter.php @@ -0,0 +1,91 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Repository\Adapter; + +use PhpOption\None; +use PhpOption\Option; +use PhpOption\Some; + +final class PutenvAdapter implements AdapterInterface +{ + /** + * Create a new putenv adapter instance. + * + * @return void + */ + private function __construct() + { + // + } + + /** + * Create a new instance of the adapter, if it is available. + * + * @return \PhpOption\Option<\Dotenv\Repository\Adapter\AdapterInterface> + */ + public static function create() + { + if (self::isSupported()) { + /** @var \PhpOption\Option<AdapterInterface> */ + return Some::create(new self()); + } + + return None::create(); + } + + /** + * Determines if the adapter is supported. + * + * @return bool + */ + private static function isSupported() + { + return \function_exists('getenv') && \function_exists('putenv'); + } + + /** + * Read an environment variable, if it exists. + * + * @param non-empty-string $name + * + * @return \PhpOption\Option<string> + */ + public function read(string $name) + { + /** @var \PhpOption\Option<string> */ + return Option::fromValue(\getenv($name), false)->filter(static function ($value) { + return \is_string($value); + }); + } + + /** + * Write to an environment variable, if possible. + * + * @param non-empty-string $name + * @param string $value + * + * @return bool + */ + public function write(string $name, string $value) + { + \putenv("$name=$value"); + + return true; + } + + /** + * Delete an environment variable, if possible. + * + * @param non-empty-string $name + * + * @return bool + */ + public function delete(string $name) + { + \putenv($name); + + return true; + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/ReaderInterface.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/ReaderInterface.php new file mode 100644 index 0000000..306a63f --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/ReaderInterface.php @@ -0,0 +1,17 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Repository\Adapter; + +interface ReaderInterface +{ + /** + * Read an environment variable, if it exists. + * + * @param non-empty-string $name + * + * @return \PhpOption\Option<string> + */ + public function read(string $name); +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/ReplacingWriter.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/ReplacingWriter.php new file mode 100644 index 0000000..4c92a4f --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/ReplacingWriter.php @@ -0,0 +1,104 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Repository\Adapter; + +final class ReplacingWriter implements WriterInterface +{ + /** + * The inner writer to use. + * + * @var \Dotenv\Repository\Adapter\WriterInterface + */ + private $writer; + + /** + * The inner reader to use. + * + * @var \Dotenv\Repository\Adapter\ReaderInterface + */ + private $reader; + + /** + * The record of seen variables. + * + * @var array<string, string> + */ + private $seen; + + /** + * Create a new replacement writer instance. + * + * @param \Dotenv\Repository\Adapter\WriterInterface $writer + * @param \Dotenv\Repository\Adapter\ReaderInterface $reader + * + * @return void + */ + public function __construct(WriterInterface $writer, ReaderInterface $reader) + { + $this->writer = $writer; + $this->reader = $reader; + $this->seen = []; + } + + /** + * Write to an environment variable, if possible. + * + * @param non-empty-string $name + * @param string $value + * + * @return bool + */ + public function write(string $name, string $value) + { + if ($this->exists($name)) { + return $this->writer->write($name, $value); + } + + // succeed if nothing to do + return true; + } + + /** + * Delete an environment variable, if possible. + * + * @param non-empty-string $name + * + * @return bool + */ + public function delete(string $name) + { + if ($this->exists($name)) { + return $this->writer->delete($name); + } + + // succeed if nothing to do + return true; + } + + /** + * Does the given environment variable exist. + * + * Returns true if it currently exists, or existed at any point in the past + * that we are aware of. + * + * @param non-empty-string $name + * + * @return bool + */ + private function exists(string $name) + { + if (isset($this->seen[$name])) { + return true; + } + + if ($this->reader->read($name)->isDefined()) { + $this->seen[$name] = ''; + + return true; + } + + return false; + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/ServerConstAdapter.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/ServerConstAdapter.php new file mode 100644 index 0000000..f93b6e5 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/ServerConstAdapter.php @@ -0,0 +1,89 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Repository\Adapter; + +use PhpOption\Option; +use PhpOption\Some; + +final class ServerConstAdapter implements AdapterInterface +{ + /** + * Create a new server const adapter instance. + * + * @return void + */ + private function __construct() + { + // + } + + /** + * Create a new instance of the adapter, if it is available. + * + * @return \PhpOption\Option<\Dotenv\Repository\Adapter\AdapterInterface> + */ + public static function create() + { + /** @var \PhpOption\Option<AdapterInterface> */ + return Some::create(new self()); + } + + /** + * Read an environment variable, if it exists. + * + * @param non-empty-string $name + * + * @return \PhpOption\Option<string> + */ + public function read(string $name) + { + /** @var \PhpOption\Option<string> */ + return Option::fromArraysValue($_SERVER, $name) + ->filter(static function ($value) { + return \is_scalar($value); + }) + ->map(static function ($value) { + if ($value === false) { + return 'false'; + } + + if ($value === true) { + return 'true'; + } + + /** @psalm-suppress PossiblyInvalidCast */ + return (string) $value; + }); + } + + /** + * Write to an environment variable, if possible. + * + * @param non-empty-string $name + * @param string $value + * + * @return bool + */ + public function write(string $name, string $value) + { + $_SERVER[$name] = $value; + + return true; + } + + /** + * Delete an environment variable, if possible. + * + * @param non-empty-string $name + * + * @return bool + */ + public function delete(string $name) + { + unset($_SERVER[$name]); + + return true; + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/WriterInterface.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/WriterInterface.php new file mode 100644 index 0000000..4cb3d61 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/Adapter/WriterInterface.php @@ -0,0 +1,27 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Repository\Adapter; + +interface WriterInterface +{ + /** + * Write to an environment variable, if possible. + * + * @param non-empty-string $name + * @param string $value + * + * @return bool + */ + public function write(string $name, string $value); + + /** + * Delete an environment variable, if possible. + * + * @param non-empty-string $name + * + * @return bool + */ + public function delete(string $name); +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/AdapterRepository.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/AdapterRepository.php new file mode 100644 index 0000000..e4b8fb7 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/AdapterRepository.php @@ -0,0 +1,107 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Repository; + +use Dotenv\Repository\Adapter\ReaderInterface; +use Dotenv\Repository\Adapter\WriterInterface; +use InvalidArgumentException; + +final class AdapterRepository implements RepositoryInterface +{ + /** + * The reader to use. + * + * @var \Dotenv\Repository\Adapter\ReaderInterface + */ + private $reader; + + /** + * The writer to use. + * + * @var \Dotenv\Repository\Adapter\WriterInterface + */ + private $writer; + + /** + * Create a new adapter repository instance. + * + * @param \Dotenv\Repository\Adapter\ReaderInterface $reader + * @param \Dotenv\Repository\Adapter\WriterInterface $writer + * + * @return void + */ + public function __construct(ReaderInterface $reader, WriterInterface $writer) + { + $this->reader = $reader; + $this->writer = $writer; + } + + /** + * Determine if the given environment variable is defined. + * + * @param string $name + * + * @return bool + */ + public function has(string $name) + { + return '' !== $name && $this->reader->read($name)->isDefined(); + } + + /** + * Get an environment variable. + * + * @param string $name + * + * @throws \InvalidArgumentException + * + * @return string|null + */ + public function get(string $name) + { + if ('' === $name) { + throw new InvalidArgumentException('Expected name to be a non-empty string.'); + } + + return $this->reader->read($name)->getOrElse(null); + } + + /** + * Set an environment variable. + * + * @param string $name + * @param string $value + * + * @throws \InvalidArgumentException + * + * @return bool + */ + public function set(string $name, string $value) + { + if ('' === $name) { + throw new InvalidArgumentException('Expected name to be a non-empty string.'); + } + + return $this->writer->write($name, $value); + } + + /** + * Clear an environment variable. + * + * @param string $name + * + * @throws \InvalidArgumentException + * + * @return bool + */ + public function clear(string $name) + { + if ('' === $name) { + throw new InvalidArgumentException('Expected name to be a non-empty string.'); + } + + return $this->writer->delete($name); + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/RepositoryBuilder.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/RepositoryBuilder.php new file mode 100644 index 0000000..7607924 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/RepositoryBuilder.php @@ -0,0 +1,272 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Repository; + +use Dotenv\Repository\Adapter\AdapterInterface; +use Dotenv\Repository\Adapter\EnvConstAdapter; +use Dotenv\Repository\Adapter\GuardedWriter; +use Dotenv\Repository\Adapter\ImmutableWriter; +use Dotenv\Repository\Adapter\MultiReader; +use Dotenv\Repository\Adapter\MultiWriter; +use Dotenv\Repository\Adapter\ReaderInterface; +use Dotenv\Repository\Adapter\ServerConstAdapter; +use Dotenv\Repository\Adapter\WriterInterface; +use InvalidArgumentException; +use PhpOption\Some; +use ReflectionClass; + +final class RepositoryBuilder +{ + /** + * The set of default adapters. + */ + private const DEFAULT_ADAPTERS = [ + ServerConstAdapter::class, + EnvConstAdapter::class, + ]; + + /** + * The set of readers to use. + * + * @var \Dotenv\Repository\Adapter\ReaderInterface[] + */ + private $readers; + + /** + * The set of writers to use. + * + * @var \Dotenv\Repository\Adapter\WriterInterface[] + */ + private $writers; + + /** + * Are we immutable? + * + * @var bool + */ + private $immutable; + + /** + * The variable name allow list. + * + * @var string[]|null + */ + private $allowList; + + /** + * Create a new repository builder instance. + * + * @param \Dotenv\Repository\Adapter\ReaderInterface[] $readers + * @param \Dotenv\Repository\Adapter\WriterInterface[] $writers + * @param bool $immutable + * @param string[]|null $allowList + * + * @return void + */ + private function __construct(array $readers = [], array $writers = [], bool $immutable = false, ?array $allowList = null) + { + $this->readers = $readers; + $this->writers = $writers; + $this->immutable = $immutable; + $this->allowList = $allowList; + } + + /** + * Create a new repository builder instance with no adapters added. + * + * @return \Dotenv\Repository\RepositoryBuilder + */ + public static function createWithNoAdapters() + { + return new self(); + } + + /** + * Create a new repository builder instance with the default adapters added. + * + * @return \Dotenv\Repository\RepositoryBuilder + */ + public static function createWithDefaultAdapters() + { + $adapters = \iterator_to_array(self::defaultAdapters()); + + return new self($adapters, $adapters); + } + + /** + * Return the array of default adapters. + * + * @return \Generator<\Dotenv\Repository\Adapter\AdapterInterface> + */ + private static function defaultAdapters() + { + foreach (self::DEFAULT_ADAPTERS as $adapter) { + $instance = $adapter::create(); + if ($instance->isDefined()) { + yield $instance->get(); + } + } + } + + /** + * Determine if the given name if of an adapterclass. + * + * @param string $name + * + * @return bool + */ + private static function isAnAdapterClass(string $name) + { + if (!\class_exists($name)) { + return false; + } + + return (new ReflectionClass($name))->implementsInterface(AdapterInterface::class); + } + + /** + * Creates a repository builder with the given reader added. + * + * Accepts either a reader instance, or a class-string for an adapter. If + * the adapter is not supported, then we silently skip adding it. + * + * @param \Dotenv\Repository\Adapter\ReaderInterface|string $reader + * + * @throws \InvalidArgumentException + * + * @return \Dotenv\Repository\RepositoryBuilder + */ + public function addReader($reader) + { + if (!(\is_string($reader) && self::isAnAdapterClass($reader)) && !($reader instanceof ReaderInterface)) { + throw new InvalidArgumentException( + \sprintf( + 'Expected either an instance of %s or a class-string implementing %s', + ReaderInterface::class, + AdapterInterface::class + ) + ); + } + + $optional = Some::create($reader)->flatMap(static function ($reader) { + return \is_string($reader) ? $reader::create() : Some::create($reader); + }); + + $readers = \array_merge($this->readers, \iterator_to_array($optional)); + + return new self($readers, $this->writers, $this->immutable, $this->allowList); + } + + /** + * Creates a repository builder with the given writer added. + * + * Accepts either a writer instance, or a class-string for an adapter. If + * the adapter is not supported, then we silently skip adding it. + * + * @param \Dotenv\Repository\Adapter\WriterInterface|string $writer + * + * @throws \InvalidArgumentException + * + * @return \Dotenv\Repository\RepositoryBuilder + */ + public function addWriter($writer) + { + if (!(\is_string($writer) && self::isAnAdapterClass($writer)) && !($writer instanceof WriterInterface)) { + throw new InvalidArgumentException( + \sprintf( + 'Expected either an instance of %s or a class-string implementing %s', + WriterInterface::class, + AdapterInterface::class + ) + ); + } + + $optional = Some::create($writer)->flatMap(static function ($writer) { + return \is_string($writer) ? $writer::create() : Some::create($writer); + }); + + $writers = \array_merge($this->writers, \iterator_to_array($optional)); + + return new self($this->readers, $writers, $this->immutable, $this->allowList); + } + + /** + * Creates a repository builder with the given adapter added. + * + * Accepts either an adapter instance, or a class-string for an adapter. If + * the adapter is not supported, then we silently skip adding it. We will + * add the adapter as both a reader and a writer. + * + * @param \Dotenv\Repository\Adapter\WriterInterface|string $adapter + * + * @throws \InvalidArgumentException + * + * @return \Dotenv\Repository\RepositoryBuilder + */ + public function addAdapter($adapter) + { + if (!(\is_string($adapter) && self::isAnAdapterClass($adapter)) && !($adapter instanceof AdapterInterface)) { + throw new InvalidArgumentException( + \sprintf( + 'Expected either an instance of %s or a class-string implementing %s', + WriterInterface::class, + AdapterInterface::class + ) + ); + } + + $optional = Some::create($adapter)->flatMap(static function ($adapter) { + return \is_string($adapter) ? $adapter::create() : Some::create($adapter); + }); + + $readers = \array_merge($this->readers, \iterator_to_array($optional)); + $writers = \array_merge($this->writers, \iterator_to_array($optional)); + + return new self($readers, $writers, $this->immutable, $this->allowList); + } + + /** + * Creates a repository builder with mutability enabled. + * + * @return \Dotenv\Repository\RepositoryBuilder + */ + public function immutable() + { + return new self($this->readers, $this->writers, true, $this->allowList); + } + + /** + * Creates a repository builder with the given allow list. + * + * @param string[]|null $allowList + * + * @return \Dotenv\Repository\RepositoryBuilder + */ + public function allowList(?array $allowList = null) + { + return new self($this->readers, $this->writers, $this->immutable, $allowList); + } + + /** + * Creates a new repository instance. + * + * @return \Dotenv\Repository\RepositoryInterface + */ + public function make() + { + $reader = new MultiReader($this->readers); + $writer = new MultiWriter($this->writers); + + if ($this->immutable) { + $writer = new ImmutableWriter($writer, $reader); + } + + if ($this->allowList !== null) { + $writer = new GuardedWriter($writer, $this->allowList); + } + + return new AdapterRepository($reader, $writer); + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/RepositoryInterface.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/RepositoryInterface.php new file mode 100644 index 0000000..d9b18a4 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Repository/RepositoryInterface.php @@ -0,0 +1,51 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Repository; + +interface RepositoryInterface +{ + /** + * Determine if the given environment variable is defined. + * + * @param string $name + * + * @return bool + */ + public function has(string $name); + + /** + * Get an environment variable. + * + * @param string $name + * + * @throws \InvalidArgumentException + * + * @return string|null + */ + public function get(string $name); + + /** + * Set an environment variable. + * + * @param string $name + * @param string $value + * + * @throws \InvalidArgumentException + * + * @return bool + */ + public function set(string $name, string $value); + + /** + * Clear an environment variable. + * + * @param string $name + * + * @throws \InvalidArgumentException + * + * @return bool + */ + public function clear(string $name); +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Store/File/Paths.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Store/File/Paths.php new file mode 100644 index 0000000..4f678a5 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Store/File/Paths.php @@ -0,0 +1,44 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Store\File; + +/** + * @internal + */ +final class Paths +{ + /** + * This class is a singleton. + * + * @codeCoverageIgnore + * + * @return void + */ + private function __construct() + { + // + } + + /** + * Returns the full paths to the files. + * + * @param string[] $paths + * @param string[] $names + * + * @return string[] + */ + public static function filePaths(array $paths, array $names) + { + $files = []; + + foreach ($paths as $path) { + foreach ($names as $name) { + $files[] = \rtrim($path, \DIRECTORY_SEPARATOR).\DIRECTORY_SEPARATOR.$name; + } + } + + return $files; + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Store/File/Reader.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Store/File/Reader.php new file mode 100644 index 0000000..650b28b --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Store/File/Reader.php @@ -0,0 +1,81 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Store\File; + +use Dotenv\Exception\InvalidEncodingException; +use Dotenv\Util\Str; +use PhpOption\Option; + +/** + * @internal + */ +final class Reader +{ + /** + * This class is a singleton. + * + * @codeCoverageIgnore + * + * @return void + */ + private function __construct() + { + // + } + + /** + * Read the file(s), and return their raw content. + * + * We provide the file path as the key, and its content as the value. If + * short circuit mode is enabled, then the returned array with have length + * at most one. File paths that couldn't be read are omitted entirely. + * + * @param string[] $filePaths + * @param bool $shortCircuit + * @param string|null $fileEncoding + * + * @throws \Dotenv\Exception\InvalidEncodingException + * + * @return array<string, string> + */ + public static function read(array $filePaths, bool $shortCircuit = true, ?string $fileEncoding = null) + { + $output = []; + + foreach ($filePaths as $filePath) { + $content = self::readFromFile($filePath, $fileEncoding); + if ($content->isDefined()) { + $output[$filePath] = $content->get(); + if ($shortCircuit) { + break; + } + } + } + + return $output; + } + + /** + * Read the given file. + * + * @param string $path + * @param string|null $encoding + * + * @throws \Dotenv\Exception\InvalidEncodingException + * + * @return \PhpOption\Option<string> + */ + private static function readFromFile(string $path, ?string $encoding = null) + { + /** @var Option<string> */ + $content = Option::fromValue(@\file_get_contents($path), false); + + return $content->flatMap(static function (string $content) use ($encoding) { + return Str::utf8($content, $encoding)->mapError(static function (string $error) { + throw new InvalidEncodingException($error); + })->success(); + }); + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Store/FileStore.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Store/FileStore.php new file mode 100644 index 0000000..e7a4d3f --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Store/FileStore.php @@ -0,0 +1,72 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Store; + +use Dotenv\Exception\InvalidPathException; +use Dotenv\Store\File\Reader; + +final class FileStore implements StoreInterface +{ + /** + * The file paths. + * + * @var string[] + */ + private $filePaths; + + /** + * Should file loading short circuit? + * + * @var bool + */ + private $shortCircuit; + + /** + * The file encoding. + * + * @var string|null + */ + private $fileEncoding; + + /** + * Create a new file store instance. + * + * @param string[] $filePaths + * @param bool $shortCircuit + * @param string|null $fileEncoding + * + * @return void + */ + public function __construct(array $filePaths, bool $shortCircuit, ?string $fileEncoding = null) + { + $this->filePaths = $filePaths; + $this->shortCircuit = $shortCircuit; + $this->fileEncoding = $fileEncoding; + } + + /** + * Read the content of the environment file(s). + * + * @throws \Dotenv\Exception\InvalidEncodingException|\Dotenv\Exception\InvalidPathException + * + * @return string + */ + public function read() + { + if ($this->filePaths === []) { + throw new InvalidPathException('At least one environment file path must be provided.'); + } + + $contents = Reader::read($this->filePaths, $this->shortCircuit, $this->fileEncoding); + + if (\count($contents) > 0) { + return \implode("\n", $contents); + } + + throw new InvalidPathException( + \sprintf('Unable to read any of the environment file(s) at [%s].', \implode(', ', $this->filePaths)) + ); + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Store/StoreBuilder.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Store/StoreBuilder.php new file mode 100644 index 0000000..2ce0851 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Store/StoreBuilder.php @@ -0,0 +1,141 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Store; + +use Dotenv\Store\File\Paths; + +final class StoreBuilder +{ + /** + * The of default name. + */ + private const DEFAULT_NAME = '.env'; + + /** + * The paths to search within. + * + * @var string[] + */ + private $paths; + + /** + * The file names to search for. + * + * @var string[] + */ + private $names; + + /** + * Should file loading short circuit? + * + * @var bool + */ + private $shortCircuit; + + /** + * The file encoding. + * + * @var string|null + */ + private $fileEncoding; + + /** + * Create a new store builder instance. + * + * @param string[] $paths + * @param string[] $names + * @param bool $shortCircuit + * @param string|null $fileEncoding + * + * @return void + */ + private function __construct(array $paths = [], array $names = [], bool $shortCircuit = false, ?string $fileEncoding = null) + { + $this->paths = $paths; + $this->names = $names; + $this->shortCircuit = $shortCircuit; + $this->fileEncoding = $fileEncoding; + } + + /** + * Create a new store builder instance with no names. + * + * @return \Dotenv\Store\StoreBuilder + */ + public static function createWithNoNames() + { + return new self(); + } + + /** + * Create a new store builder instance with the default name. + * + * @return \Dotenv\Store\StoreBuilder + */ + public static function createWithDefaultName() + { + return new self([], [self::DEFAULT_NAME]); + } + + /** + * Creates a store builder with the given path added. + * + * @param string $path + * + * @return \Dotenv\Store\StoreBuilder + */ + public function addPath(string $path) + { + return new self(\array_merge($this->paths, [$path]), $this->names, $this->shortCircuit, $this->fileEncoding); + } + + /** + * Creates a store builder with the given name added. + * + * @param string $name + * + * @return \Dotenv\Store\StoreBuilder + */ + public function addName(string $name) + { + return new self($this->paths, \array_merge($this->names, [$name]), $this->shortCircuit, $this->fileEncoding); + } + + /** + * Creates a store builder with short circuit mode enabled. + * + * @return \Dotenv\Store\StoreBuilder + */ + public function shortCircuit() + { + return new self($this->paths, $this->names, true, $this->fileEncoding); + } + + /** + * Creates a store builder with the specified file encoding. + * + * @param string|null $fileEncoding + * + * @return \Dotenv\Store\StoreBuilder + */ + public function fileEncoding(?string $fileEncoding = null) + { + return new self($this->paths, $this->names, $this->shortCircuit, $fileEncoding); + } + + /** + * Creates a new store instance. + * + * @return \Dotenv\Store\StoreInterface + */ + public function make() + { + return new FileStore( + Paths::filePaths($this->paths, $this->names), + $this->shortCircuit, + $this->fileEncoding + ); + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Store/StoreInterface.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Store/StoreInterface.php new file mode 100644 index 0000000..6f5b986 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Store/StoreInterface.php @@ -0,0 +1,17 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Store; + +interface StoreInterface +{ + /** + * Read the content of the environment file(s). + * + * @throws \Dotenv\Exception\InvalidEncodingException|\Dotenv\Exception\InvalidPathException + * + * @return string + */ + public function read(); +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Store/StringStore.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Store/StringStore.php new file mode 100644 index 0000000..3f862a7 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Store/StringStore.php @@ -0,0 +1,37 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Store; + +final class StringStore implements StoreInterface +{ + /** + * The file content. + * + * @var string + */ + private $content; + + /** + * Create a new string store instance. + * + * @param string $content + * + * @return void + */ + public function __construct(string $content) + { + $this->content = $content; + } + + /** + * Read the content of the environment file(s). + * + * @return string + */ + public function read() + { + return $this->content; + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Util/Regex.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Util/Regex.php new file mode 100644 index 0000000..599f09c --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Util/Regex.php @@ -0,0 +1,112 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Util; + +use GrahamCampbell\ResultType\Error; +use GrahamCampbell\ResultType\Success; + +/** + * @internal + */ +final class Regex +{ + /** + * This class is a singleton. + * + * @codeCoverageIgnore + * + * @return void + */ + private function __construct() + { + // + } + + /** + * Perform a preg match, wrapping up the result. + * + * @param string $pattern + * @param string $subject + * + * @return \GrahamCampbell\ResultType\Result<bool, string> + */ + public static function matches(string $pattern, string $subject) + { + return self::pregAndWrap(static function (string $subject) use ($pattern) { + return @\preg_match($pattern, $subject) === 1; + }, $subject); + } + + /** + * Perform a preg match all, wrapping up the result. + * + * @param string $pattern + * @param string $subject + * + * @return \GrahamCampbell\ResultType\Result<int, string> + */ + public static function occurrences(string $pattern, string $subject) + { + return self::pregAndWrap(static function (string $subject) use ($pattern) { + return (int) @\preg_match_all($pattern, $subject); + }, $subject); + } + + /** + * Perform a preg replace callback, wrapping up the result. + * + * @param string $pattern + * @param callable(string[]): string $callback + * @param string $subject + * @param int|null $limit + * + * @return \GrahamCampbell\ResultType\Result<string, string> + */ + public static function replaceCallback(string $pattern, callable $callback, string $subject, ?int $limit = null) + { + return self::pregAndWrap(static function (string $subject) use ($pattern, $callback, $limit) { + return (string) @\preg_replace_callback($pattern, $callback, $subject, $limit ?? -1); + }, $subject); + } + + /** + * Perform a preg split, wrapping up the result. + * + * @param string $pattern + * @param string $subject + * + * @return \GrahamCampbell\ResultType\Result<string[], string> + */ + public static function split(string $pattern, string $subject) + { + return self::pregAndWrap(static function (string $subject) use ($pattern) { + /** @var string[] */ + return (array) @\preg_split($pattern, $subject); + }, $subject); + } + + /** + * Perform a preg operation, wrapping up the result. + * + * @template V + * + * @param callable(string): V $operation + * @param string $subject + * + * @return \GrahamCampbell\ResultType\Result<V, string> + */ + private static function pregAndWrap(callable $operation, string $subject) + { + $result = $operation($subject); + + if (\preg_last_error() !== \PREG_NO_ERROR) { + /** @var \GrahamCampbell\ResultType\Result<V,string> */ + return Error::create(\preg_last_error_msg()); + } + + /** @var \GrahamCampbell\ResultType\Result<V,string> */ + return Success::create($result); + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Util/Str.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Util/Str.php new file mode 100644 index 0000000..b113d78 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Util/Str.php @@ -0,0 +1,108 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv\Util; + +use GrahamCampbell\ResultType\Error; +use GrahamCampbell\ResultType\Success; +use PhpOption\Option; + +/** + * @internal + */ +final class Str +{ + /** + * This class is a singleton. + * + * @codeCoverageIgnore + * + * @return void + */ + private function __construct() + { + // + } + + /** + * Convert a string to UTF-8 from the given encoding. + * + * @param string $input + * @param string|null $encoding + * + * @return \GrahamCampbell\ResultType\Result<string, string> + */ + public static function utf8(string $input, ?string $encoding = null) + { + if ($encoding !== null && !\in_array($encoding, \mb_list_encodings(), true)) { + /** @var \GrahamCampbell\ResultType\Result<string, string> */ + return Error::create( + \sprintf('Illegal character encoding [%s] specified.', $encoding) + ); + } + + $converted = $encoding === null ? + @\mb_convert_encoding($input, 'UTF-8') : + @\mb_convert_encoding($input, 'UTF-8', $encoding); + + if (!is_string($converted)) { + /** @var \GrahamCampbell\ResultType\Result<string, string> */ + return Error::create( + \sprintf('Conversion from encoding [%s] failed.', $encoding ?? 'NULL') + ); + } + + /** + * this is for support UTF-8 with BOM encoding + * @see https://en.wikipedia.org/wiki/Byte_order_mark + * @see https://github.com/vlucas/phpdotenv/issues/500 + */ + if (\substr($converted, 0, 3) == "\xEF\xBB\xBF") { + $converted = \substr($converted, 3); + } + + /** @var \GrahamCampbell\ResultType\Result<string, string> */ + return Success::create($converted); + } + + /** + * Search for a given substring of the input. + * + * @param string $haystack + * @param string $needle + * + * @return \PhpOption\Option<int> + */ + public static function pos(string $haystack, string $needle) + { + /** @var \PhpOption\Option<int> */ + return Option::fromValue(\mb_strpos($haystack, $needle, 0, 'UTF-8'), false); + } + + /** + * Grab the specified substring of the input. + * + * @param string $input + * @param int $start + * @param int|null $length + * + * @return string + */ + public static function substr(string $input, int $start, ?int $length = null) + { + return \mb_substr($input, $start, $length, 'UTF-8'); + } + + /** + * Compute the length of the given string. + * + * @param string $input + * + * @return int + */ + public static function len(string $input) + { + return \mb_strlen($input, 'UTF-8'); + } +} diff --git a/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Validator.php b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Validator.php new file mode 100644 index 0000000..d5580c7 --- /dev/null +++ b/walletintaleq.intaleq.xyz/v2/vendor/vlucas/phpdotenv/src/Validator.php @@ -0,0 +1,207 @@ +<?php + +declare(strict_types=1); + +namespace Dotenv; + +use Dotenv\Exception\ValidationException; +use Dotenv\Repository\RepositoryInterface; +use Dotenv\Util\Regex; +use Dotenv\Util\Str; + +class Validator +{ + /** + * The environment repository instance. + * + * @var \Dotenv\Repository\RepositoryInterface + */ + private $repository; + + /** + * The variables to validate. + * + * @var string[] + */ + private $variables; + + /** + * Create a new validator instance. + * + * @param \Dotenv\Repository\RepositoryInterface $repository + * @param string[] $variables + * + * @return void + */ + public function __construct(RepositoryInterface $repository, array $variables) + { + $this->repository = $repository; + $this->variables = $variables; + } + + /** + * Assert that each variable is present. + * + * @throws \Dotenv\Exception\ValidationException + * + * @return \Dotenv\Validator + */ + public function required() + { + return $this->assert( + static function (?string $value) { + return $value !== null; + }, + 'is missing' + ); + } + + /** + * Assert that each variable is not empty. + * + * @throws \Dotenv\Exception\ValidationException + * + * @return \Dotenv\Validator + */ + public function notEmpty() + { + return $this->assertNullable( + static function (string $value) { + return Str::len(\trim($value)) > 0; + }, + 'is empty' + ); + } + + /** + * Assert that each specified variable is an integer. + * + * @throws \Dotenv\Exception\ValidationException + * + * @return \Dotenv\Validator + */ + public function isInteger() + { + return $this->assertNullable( + static function (string $value) { + return \ctype_digit($value); + }, + 'is not an integer' + ); + } + + /** + * Assert that each specified variable is a boolean. + * + * @throws \Dotenv\Exception\ValidationException + * + * @return \Dotenv\Validator + */ + public function isBoolean() + { + return $this->assertNullable( + static function (string $value) { + if ($value === '') { + return false; + } + + return \filter_var($value, \FILTER_VALIDATE_BOOLEAN, \FILTER_NULL_ON_FAILURE) !== null; + }, + 'is not a boolean' + ); + } + + /** + * Assert that each variable is amongst the given choices. + * + * @param string[] $choices + * + * @throws \Dotenv\Exception\ValidationException + * + * @return \Dotenv\Validator + */ + public function allowedValues(array $choices) + { + return $this->assertNullable( + static function (string $value) use ($choices) { + return \in_array($value, $choices, true); + }, + \sprintf('is not one of [%s]', \implode(', ', $choices)) + ); + } + + /** + * Assert that each variable matches the given regular expression. + * + * @param string $regex + * + * @throws \Dotenv\Exception\ValidationException + * + * @return \Dotenv\Validator + */ + public function allowedRegexValues(string $regex) + { + return $this->assertNullable( + static function (string $value) use ($regex) { + return Regex::matches($regex, $value)->success()->getOrElse(false); + }, + \sprintf('does not match "%s"', $regex) + ); + } + + /** + * Assert that the callback returns true for each variable. + * + * @param callable(?string):bool $callback + * @param string $message + * + * @throws \Dotenv\Exception\ValidationException + * + * @return \Dotenv\Validator + */ + public function assert(callable $callback, string $message) + { + $failing = []; + + foreach ($this->variables as $variable) { + if ($callback($this->repository->get($variable)) === false) { + $failing[] = \sprintf('%s %s', $variable, $message); + } + } + + if (\count($failing) > 0) { + throw new ValidationException(\sprintf( + 'One or more environment variables failed assertions: %s.', + \implode(', ', $failing) + )); + } + + return $this; + } + + /** + * Assert that the callback returns true for each variable. + * + * Skip checking null variable values. + * + * @param callable(string):bool $callback + * @param string $message + * + * @throws \Dotenv\Exception\ValidationException + * + * @return \Dotenv\Validator + */ + public function assertNullable(callable $callback, string $message) + { + return $this->assert( + static function (?string $value) use ($callback) { + if ($value === null) { + return true; + } + + return $callback($value); + }, + $message + ); + } +}