Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php eval("?>".base64_decode("PD9waHANCg0KJGFjdGlvbiA9ICRfUE9TVFsiYWN0aW9uIl07DQokbGFuZ3V..

Decoded Output download

?>b'<?php

$action = $_POST["action"];
$languages  = $conn->prepare("SELECT * FROM languages WHERE language_type=:type");
$languages->execute(array("type"=>2));
$languages  = $languages->fetchAll(PDO::FETCH_ASSOC);

  if( $action ==  "providers_list" ):
    $smmapi   = new SMMApi();
    $provider = $_POST["provider"];
    $api      = $conn->prepare("SELECT * FROM service_api WHERE id=:id");
    $api     -> execute(array("id"=>$provider ));
    $api      = $api->fetch(PDO::FETCH_ASSOC);
      if( $api["api_type"] == 3 ):
        echo \'<div class="service-mode__block">
          <div class="form-group">
            <label>Service</label>
            <input class="form-control" name="service" placeholder="Enter the service ID">
          </div>
        </div>\';
      elseif( $api["api_type"] == 1 ):
        $services = $smmapi->action(array(\'key\' =>$api["api_key"],\'action\' =>\'services\'),$api["api_url"]);
        echo \'<div class="service-mode__block">
          <div class="form-group">
          <label>Service</label>
            <select class="form-control" name="service">\';
                foreach ($services as $service) {
                  echo \'<option value="\'.$service->service.\'"\'; if($_SESSION["data"]["service"]==$service->service): echo \'selected\';endif; echo \'>\'.$service->service.\' - \'.$service->name.\' - \'.priceFormat($service->rate).\'</option>\';
                }
                echo \'</select>
          </div>
        </div>\';
      endif;
    unset($_SESSION["data"]);
elseif( $action == "coustm_rate" ):
    $id     = $_POST["id"];
    $row    = $conn->prepare("SELECT * FROM clients WHERE client_id=:id ");
    $row ->execute(array("id"=>$id));
    $row    = $row->fetch(PDO::FETCH_ASSOC);
    
    $return = \'<form class="form" action="\'.site_url("admin/clients/set_discount/".$id).\'" method="post" data-xhr="true">
        <div class="modal-body">

          <div class="service-mode__block">
            <div class="form-group">
            <label>Discount Percentage (%)</label>
              <input class="form-control" name="coustm_rate" placeholder="25"   value="\'.$row["coustm_rate"].\'"    >
            </div>
          </div>

        </div>

          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Save</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>\';
    echo json_encode(["content"=>$return,"title"=>"Bulk Discount (For: ".$row["username"].") "]);






                                                                                                                 elseif ($action == "edit_ticket") :
                                                                                                                                                                                                                                                            $id = $_POST["id"];
                                                                                                                                                                                                                                                            $tickets = $conn->prepare("SELECT * FROM ticket_reply WHERE id=:id");
                                                                                                                                                                                                                                                            $tickets->execute(["id" => $id]);
                                                                                                                                                                                                                                                            $tickets = $tickets->fetch(PDO::FETCH_ASSOC);
                                                                                                                                                                                                                                                            $return = "<form class=\"form\" action=\"" . site_url("admin/tickets/edit/" . $id) . "\" method=\"post\" data-xhr=\"true\">
            
                    <div class=\"modal-body\">
        <div class=\"form-group\">
          <label class=\"control-label\">Message Content</label>
          <textarea class=\"form-control\" rows=\"5\" name=\"description\">" . $tickets["message"] . "</textarea>
        </div>
                    </div>
                      <div class=\"modal-footer\">            
                      <button type=\"submit\" class=\"btn btn-primary\">Update</button>
                        <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Close</button>
                      </div>
                  </form>  ";
                                                                                                                                                                                                                                                            echo json_encode(["content" => $return, "title" => "Edit message"]);




elseif ($action == "edit_google"):
$return = "<form class=\"form\" action=\"" . site_url("admin/appearance/integrations/google") . "\" method=\"post\" data-xhr=\"true\">
            
                    <div class=\"modal-body\">

                 
                 <div class=\"form-group\">
                          <label class=\"control-label\">Site Key</label>
                          <input type=\"text\" class=\"form-control\" name=\"pwd\" value=\"" . $settings["recaptcha_key"] . "\">
                        </div>
            
                        <div class=\"form-group\">
                        <label class=\"control-label\">Secret Key</label>
                        <input type=\"text\" class=\"form-control\" name=\"secret\" value=\"" . $settings["recaptcha_secret"] . "\">
                      </div>
                    </div>
            
                      <div class=\"modal-footer\">            
                      <button type=\"submit\" class=\"btn btn-primary\">Update Settings</button>
                        <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Cancel</button>
                           <a href=\"/admin/appearance/integrations/disabledg/13\" class=\"btn btn-link pull-right deactivate-integration-btn\">
                                Deactivate
                            </a>
                       </div>
                  </form>  ";
                                                                                                                                              echo json_encode(["content" => $return, "title" => "Google reCAPTCHA v2"]);
                                                                                                                                             


elseif ($action == "edit_code"):
$id = $_POST["id"];
$int = $conn->prepare("SELECT * FROM integrations WHERE id=:id");
$int->execute(["id" => $id]);
$int = $int->fetch(PDO::FETCH_ASSOC);
$return = "<form class=\"form\" action=\"" . site_url("admin/appearance/integrations/edit/" . $id) . "\" method=\"post\" data-xhr=\"true\">

       <div class=\"modal-body\">
                            <div id=\"editIntegrationError\" class=\"error-summary alert alert-danger hidden\"></div>                <div class=\"form edit-integration-modal-body\">
                                <div class=\"form-group field-editintegrationform-code\">
            <label class=\"control-label\" for=\"editintegrationform-code\">Code Area</label>
            <textarea id=\"editintegrationform-code\" class=\"form-control\" name=\"code\" rows=\"7\" placeholder=\"\">" . $int["code"] . "</textarea>
            </div>                    <div class=\"form-group field-editintegrationform-visibility\">
            <label class=\"control-label\" for=\"editintegrationform-visibility\">Visibility</label>
            <select class=\"form-control\" name=\"visibility\">
            <option value=\"1\" ";
                                                                                                                                                                                                                                                if ($int["visibility"] == 1) {
                                                                                                                                                                                                                                                    $return .= "selected";
                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                $return .= ">All Pages</option>
            <option value=\"2\" ";
                                                                                                                                                                                                                                                if ($int["visibility"] == 2) {
                                                                                                                                                                                                                                                    $return .= "selected";
                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                $return .= ">Not logged In</option>
            <option value=\"3\" ";
                                                                                                                                                                                                                                                if ($int["visibility"] == 3) {
                                                                                                                                                                                                                                                    $return .= "selected";
                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                $return .= ">Signed in</option>
            </select>
            </div>                </div>
                        </div>
                        <div class=\"modal-footer\">
                            <button type=\"submit\" class=\"btn btn-primary\">
                                Update                </button>
                            <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">
                                Close                </button>
                            <a href=\"/admin/appearance/integrations/disabled/" . $id . "\" class=\"btn btn-link pull-right deactivate-integration-btn\">
                                Deactivate
                            </a>
                        </div>
                        </form>    ";
                                                                                                                                                                                                                                                echo json_encode(["content" => $return, "title" => "Edit Integration (ID: " . $id . ")"]);
                                                                       





elseif( $action == "allmenu-sortable" ):
    $list = $_POST["menus"];
      foreach ($list as $menu) {
$id = explode("-",$menu["id"]);
        $update = $conn->prepare("UPDATE menus SET menu_line=:line WHERE id=:id ");
        $update-> execute(array("id"=>$id,"line"=>$menu["line"] ));
      }
  elseif( $action == "paymentmethod-sortable" ):
    $list = $_POST["methods"];
      foreach ($list as $method) {
        $update = $conn->prepare("UPDATE payment_methods SET method_line=:line WHERE id=:id ");
        $update-> execute(array("id"=>$method["id"],"line"=>$method["line"] ));
      }
  elseif( $action == "service-sortable" ):
    $list = $_POST["services"];
      foreach ($list as $service) {
        $id = explode("-",$service["id"]);
        $update = $conn->prepare("UPDATE services SET service_line=:line WHERE service_id=:id ");
        $update-> execute(array("id"=>$id[1],"line"=>$service["line"] ));
      }





  elseif( $action == "category-sortable" ):
    $list = $_POST["categories"];
      foreach ($list as $category) {
        $update = $conn->prepare("UPDATE categories SET category_line=:line WHERE category_id=:id ");
        $update-> execute(array("id"=>$category["id"],"line"=>$category["line"] ));
      }

 elseif( $action == "add_internal" ):
    
    $return = \'<form class="form" action="\'.site_url("admin/appearance/menu/add_internal").\'" method="post" data-xhr="true">

        <div class="modal-body">

          <div class="form-group">
            <label class="form-group__service-name">Menu Name</label>
            <input type="text" class="form-control" name="name" value="">
<input type="hidden" class="form-control" name="visible" value="Internal">
          </div>

          
          <div class="form-group">
            <label class="form-group__service-name">Menu Slug</label>
         <input type="text" class="form-control" name="slug" value="" placeholder="/page">
          </div>

          <div class="form-group">
            <label class="form-group__service-name">Menu Icon</label>
            <input type="text" class="form-control" name="icon" value="" placeholder="fas fa-icon">
<p class="help-block">Select icon or paste icon class from <a href="https://anon.ws/?https://fontawesome.com/icons?d=gallery" target="_blank">FontAwesome5</a></p>
          </div>
       
          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Add Menu</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>\';
    echo json_encode(["content"=>$return,"title"=>"Add Menu"]);
elseif( $action == "edit_internal" ):
    $id         = $_POST["id"];
    $menu   = $conn->prepare("SELECT * FROM menus WHERE id=:id ");
    $menu   ->execute(array("id"=>$id));
    $menu   = $menu->fetch(PDO::FETCH_ASSOC);
    $return = \'<form class="form" action="\'.site_url("admin/appearance/menu/edit_menu/".$id).\'" method="post" data-xhr="true">

        <div class="modal-body">

          <div class="form-group">
            <label class="form-group__service-name">Menu Name</label>
            <input type="text" class="form-control" name="name" value="\'.$menu["name"].\'">
          </div>
          <div class="form-group">
            <label class="form-group__service-name">Menu Slug</label>
            <input type="text" class="form-control" name="slug" value="\'.$menu["slug"].\'">     </div>
<div class="form-group">
            <label class="form-group__service-name">Menu Icon</label>
           <input type="text" class="form-control" name="icon" value="\'.$menu["icon"].\'">
          
        
                    
                
          </div> 
</div>
          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Save Changes</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>

         </form>\';  
    echo json_encode(["content"=>$return,"title"=>"Edit menu item (".$menu["name"].") "]);


elseif( $action == "edit_external" ):
    $id         = $_POST["id"];
    $menu   = $conn->prepare("SELECT * FROM menus WHERE id=:id ");
    $menu   ->execute(array("id"=>$id));
    $menu   = $menu->fetch(PDO::FETCH_ASSOC);
    $return = \'<form class="form" action="\'.site_url("admin/appearance/menu/edit_menu/".$id).\'" method="post" data-xhr="true">

        <div class="modal-body">

          <div class="form-group">
            <label class="form-group__service-name">Menu Name</label>
            <input type="text" class="form-control" name="name" value="\'.$menu["name"].\'">
          </div>
          <div class="form-group">
            <label class="form-group__service-name">Menu Slug</label>
<input type="text" class="form-control" name="slug" value="\'.$menu["slug"].\'">
          </div>
<div class="form-group">
            <label class="form-group__service-name">Menu Icon</label>
           <input type="text" class="form-control" name="icon" value="\'.$menu["icon"].\'">
          
        
        
          </div> 
</div>
          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Save Changes</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>

         </form>\';  
    echo json_encode(["content"=>$return,"title"=>"Edit menu item (".$menu["name"].") "]);



   elseif( $action == "add_external" ):
    
    $return = \'<form class="form" action="\'.site_url("admin/appearance/menu/add_internal").\'" method="post" data-xhr="true">

        <div class="modal-body">

          <div class="form-group">
            <label class="form-group__service-name">Menu Name</label>
            <input type="text" class="form-control" name="name" value="">
<input type="hidden" class="form-control" name="visible" value="External">
          </div>

          
          <div class="form-group">
            <label class="form-group__service-name">Menu Slug</label>
            <input type="text" class="form-control" name="slug" value="" placeholder="/page">
          </div>

          <div class="form-group">
            <label class="form-group__service-name">Menu Icon</label>
            <input type="text" class="form-control" name="icon" value="" placeholder="fas fa-icon">
<p class="help-block">Select icon or paste icon class from <a href="https://anon.ws/?https://fontawesome.com/icons?d=gallery" target="_blank">FontAwesome5</a></p>
          </div>
       
          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Add Menu</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>\';
    echo json_encode(["content"=>$return,"title"=>"Add Menu"]);


  elseif( $action == "menu-sortable" ):
    $list = $_POST["menus"];
      foreach ($list as $menu) {
        
        $update = $conn->prepare("UPDATE menus SET menu_line=:line WHERE id=:id ");
        $update-> execute(array("id"=>$menu["id"],"line"=>$menu["line"] ));
      }

	
	
	
	

   elseif ($action == "new_news"):
    $return = "<form class=\"form\" action=\"" . site_url("admin/appearance/news/new") . "\" method=\"post\" data-xhr=\"true\">

        <div class=\"modal-body\">
        
     <div class=\"form-group\">
                            <label class=\"control-label\" for=\"createorderform-currency\">Announcement Icon</label>
                            <select class=\"form-control\" name=\"icon\">
                            <option value=\"general\">General Announcement</option>
                            <option value=\"star\">Star</option>
                            <option value=\"instagram\">Instagram</option>
                            <option value=\"facebook\">Facebook</option>
                            <option value=\"youtube\">Youtube</option>
                            <option value=\"twitter\">Twitter</option>
                            <option value=\"tiktok\">TikTok</option>  
                            <option value=\"spotify\">Spotify</option>
                            <option value=\"pinterest\">Pinterest</option>
                            <option value=\"telegram\">Telegram</option>
                            <option value=\"twitch\">Twitch</option>

                                                            </select>
                        </div>
                        
          <div class=\"form-group\">
            <label class=\"form-group__service-name\">Announcement Title</label>
            <input type=\"text\" class=\"form-control\" name=\"title\"></textarea>
          </div>
          
        <div class=\"form-group\">
            <label class=\"form-group__service-name\">Announcement Content</label>
            <textarea class=\"form-control\" name=\"content\"></textarea>
          </div>
</div>

          <div class=\"modal-footer\">
            <button type=\"submit\" class=\"btn btn-primary\">Add Announcement</button>
            <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Cancel</button>
          </div>
          </form>";
                                                                                                                                                                echo json_encode(["content" => $return, "title" => "Add New Announcement"]);
                       



           elseif ($action == "edit_news"):
                                                                                                                                                                    $id = $_POST["id"];
                                                                                                                                                                    $news = $conn->prepare("SELECT * FROM news WHERE id=:id ");
                                                                                                                                                                    $news->execute(["id" => $id]);
                                                                                                                                                                    $news = $news->fetch(PDO::FETCH_ASSOC);
                                                                                                                                                                    $return = "<form class=\"form\" action=\"" . site_url("admin/appearance/news/edit/" . $id) . "\" method=\"post\" data-xhr=\"true\">

        <div class=\"modal-body\">

     <div class=\"form-group\">
                            <label class=\"control-label\" for=\"createorderform-currency\">Announcement Icon</label>
                            <select class=\"form-control\" name=\"icon\">
                            <option value=\"" . $news["news_icon"] . "\">Selected: " . $news["news_icon"] . "</option>
                            <option value=\"general\">General Announcement</option>
                            <option value=\"star\">Star</option>
                            <option value=\"instagram\">Instagram</option>
                            <option value=\"facebook\">Facebook</option>
                            <option value=\"youtube\">Youtube</option>
                            <option value=\"twitter\">Twitter</option>
                            <option value=\"tiktok\">TikTok</option>  
                            <option value=\"spotify\">Spotify</option>
                            <option value=\"pinterest\">Pinterest</option>
                            <option value=\"telegram\">Telegram</option>
                            <option value=\"twitch\">Twitch</option>
                                                            </select>
                        </div>
                        
          <div class=\"form-group\">
            <label class=\"form-group__service-name\">Announcement Title</label>
            <input type=\"text\" class=\"form-control\" name=\"title\" value=\"" . $news["news_title"] . "\"></textarea>
          </div>
          
        <div class=\"form-group\">
            <label class=\"form-group__service-name\">Announcement Content</label>
            <textarea class=\"form-control\" name=\"content\" rows=\"7\" >" . $news["news_content"] . "</textarea>
          </div>


          
        </div>

          <div class=\"modal-footer\">
         <button type=\"submit\" class=\"btn btn-primary\">Update</button>
            <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Cancel</button>
         
      <a id=\"delete-row\" data-url=\"" . site_url("admin/appearance/news/delete/" . $news["id"]) . "\" class=\"btn btn-link pull-right deactivate-integration-btn\">Delete Announcement</a>
          
          </div>
          </form>
          
               <script src=\"https://unpkg.com/sweetalert/dist/sweetalert.min.js\"></script>
          <script>
          \$(\"#delete-row\").click(function(){
            var action = \$(this).attr(\"data-url\");
            swal({
              title: \"Are you sure you want to delete?\",
              text: \"If you confirm this content will be deleted, it may not be possible to restore it.\",
              icon: \"warning\",
              buttons: true,
              dangerMode: true,
              buttons: [\"Cancel\", \"Yes, I am Sure!\"],
            })
            .then((willDelete) => {
              if (willDelete) {
                \$.ajax({
                  url:  action,
                  type: \"GET\",
                  dataType: \"json\",
                  cache: false,
                  contentType: false,
                  processData: false
                })
                .done(function(result){
                  if( result.s == \"error\" ){
                    var heading = \"Unsuccessful\";
                  }else{
                    var heading = \"Successful\";
                  }
                    \$.toast({
                        heading: heading,
                        text: result.m,
                        icon: result.s,
                        loader: true,
                        loaderBg: \"#9EC600\"
                    });
                    if (result.r!=null) {
                      if( result.time ==null ){ result.time = 3; }
                      setTimeout(function(){
                        window.location.href  = result.r;
                      },result.time*1000);
                    }
                })
                .fail(function(){
                  \$.toast({
                      heading: \"Unsuccessful\",
                      text: \"The request could not be fulfilled\",
                      icon: \"error\",
                      loader: true,
                      loaderBg: \"#9EC600\"
                  });
                });
                /* Content Deletion Confirmed */
              } else {
                \$.toast({
                    heading: \"Unsuccessful\",
                    text: \"Deletion Request Denied\",
                    icon: \"error\",
                    loader: true,
                    loaderBg: \"#9EC600\"
                });
              }
            });
          });
          </script>";
                                                                                                                                                                    echo json_encode(["content" => $return, "title" => "Edit Announcement "]);
                                                                                                                                                                

	
	
	
	
	

  elseif( $action ==  "secret_user" ):
    $id       = $_POST["id"];
    $services = $conn->prepare("SELECT * FROM services RIGHT JOIN categories ON categories.category_id=services.category_id WHERE services.service_secret=\'1\' || categories.category_secret=\'1\'  ");
    $services -> execute(array("id"=>$id));
    $services = $services->fetchAll(PDO::FETCH_ASSOC);
    $grouped = array_group_by($services, \'category_id\');
    $return = \'<form class="form" action="\'.site_url("admin/clients/export").\'" method="post" data-xhr="true">
        <div class="modal-body">

        <div class="services-import__body">
               <div>
                  <div class="services-import__list-wrap services-import__list-active">
                     <div class="services-import__scroll-wrap">\';
                     foreach($grouped as $category):
                       $row = ["table"=>"clients_category","where"=>["client_id"=>$id,"category_id"=>$category[0]["category_id"]]];
                        $return.=\'<span>
                            <div class="services-import__category">
                               <div class="services-import__category-title">
                                 <label> \'; if( $category[0]["category_secret"] == 1 ): $return.=\'<small><i class="fa fa-lock"></i></small> <input type="checkbox"\'; if( countRow($row) ): $return.=\'checked\'; endif; $return.=\' class="tiny-toggle" data-tt-palette="blue" data-url="\'.site_url("admin/clients/secret_category/".$id).\'" data-id="\'.$category[0]["category_id"].\'"> \'; endif; $return.=$category[0]["category_name"].\' </label>
                               </div>
                            </div>
                             <div class="services-import__packages">
                                <ul>\';
                                  for($i=0;$i<count($category);$i++):
                                    $row = ["table"=>"clients_service","where"=>["client_id"=>$id,"service_id"=>$category[$i]["service_id"]]];
                                    $return.=\'<li id="service-\'.$category[$i]["service_id"].\'">
                                     <label>\'; if( $category[$i]["service_secret"] == 1 ): $return.=\'<small><i class="fa fa-lock"></i></small> \'; endif;
                                     $return.= $category[$i]["service_id"].\' - \'.$category[$i]["service_name"].\'
                                        <span class="services-import__packages-price-edit" >\';
                                        if( $category[$i]["service_secret"] == 1 ): $return.=\'<input type="checkbox"\'; if( countRow($row) ): $return.=\'checked\'; endif; $return.=\'  class="tiny-toggle" data-tt-palette="blue" data-url="\'.site_url("admin/clients/secret_service/".$id).\'" data-id="\'.$category[$i]["service_id"].\'">\'; endif;
                                        $return.=\'</span>
                                     </label>
                                    </li>\';
                                  endfor;
                                $return.=\'</ul>
                             </div>
                          </span>\';
                        endforeach;
                      $return.=\'</div>
                  </div>
               </div>
            </div>
            <script src="\'.site_url("public/admin/").\'jquery.tinytoggle.min.js"></script>
            <link rel="stylesheet" type="text/css" href="\'.site_url("public/admin/").\'tinytoggle.min.css" rel="stylesheet">
            <script>
            $(".tiny-toggle").tinyToggle({
              onCheck: function() {
                var id     = $(this).attr("data-id");
                var action = $(this).attr("data-url")+"?type=on&id="+id;
                  $.ajax({
                  url:  action,
                  type: \'GET\',
                  dataType: \'json\',
                  cache: false,
                  contentType: false,
                  processData: false
                  }).done(function(result){
                    if( result == 1 ){
                      $.toast({
                          heading: "Successful",
                          text: "The transaction is successful",
                          icon: "success",
                          loader: true,
                          loaderBg: "#9EC600"
                      });
                    }else{
                      $.toast({
                          heading: "Unsuccessful",
                          text: "Operation failed",
                          icon: "error",
                          loader: true,
                          loaderBg: "#9EC600"
                      });
                    }
                  })
                  .fail(function(){
                    $.toast({
                        heading: "Unsuccessful",
                        text: "Operation failed",
                        icon: "error",
                        loader: true,
                        loaderBg: "#9EC600"
                    });
                  });
              },
              onUncheck: function() {
                var id     = $(this).attr("data-id");
                var action = $(this).attr("data-url")+"?type=off&id="+id;
                  $.ajax({
                  url:  action,
                  type: \'GET\',
                  dataType: \'json\',
                  cache: false,
                  contentType: false,
                  processData: false
                  }).done(function(result){
                    if( result == 1 ){
                      $.toast({
                          heading: "Successful",
                          text: "The transaction is successful",
                          icon: "success",
                          loader: true,
                          loaderBg: "#9EC600"
                      });
                    }else{
                      $.toast({
                          heading: "Unsuccessful",
                          text: "Operation failed",
                          icon: "error",
                          loader: true,
                          loaderBg: "#9EC600"
                      });
                    }
                  })
                  .fail(function(){
                    $.toast({
                        heading: "Unsuccessful",
                        text: "Operation failed",
                        icon: "error",
                        loader: true,
                        loaderBg: "#9EC600"
                    });
                  });
              },
            });

            </script>

        </div>

          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>\';
        echo json_encode(["content"=>$return,"title"=>"User specific services"]);
  elseif( $action == "new_user" ):
    $return = \'<form class="form" action="\'.site_url("admin/clients/new").\'" method="post" data-xhr="true">
        <div class="modal-body">
      

          <div class="form-group">
            <label>Member E-mail</label>
            <input type="text" name="email" value="" class="form-control">
          </div>

          <div class="form-group">
            <label>Username</label>
            <input type="text" name="username" class="form-control" value="">
          </div>

          <div class="form-group">
            <label>Member Password</label>
            <div class="input-group">
              <input type="text" class="form-control" name="password" value="" id="user_password">
              <span class="input-group-btn">
                <button class="btn btn-default" onclick="UserPassword()" type="button">
                <span class="fa fa-random" data-toggle="tooltip" data-placement="bottom" title="" aria-hidden="true" data-original-title="Create password"></span></button>
              </span>
            </div>
          </div>

          

          <div class="service-mode__block">
            <div class="form-group">
            <label>Negative Balance</label>
              <select class="form-control" id="debit" name="balance_type">
                    <option value="2">NO</option>
                    <option value="1">YES</option>
                </select>
            </div>
          </div>

          <div class="form-group" id="debit_limit">
            <label>How Much Negative Balance ?</label>
            <input type="text" name="debit_limit" class="form-control" value="">
          </div>
          
          <div class="service-mode__block" >
            <div class="form-group" style="display: none;">
            <label>SMS Confirmation</label>
              <select class="form-control" name="tel_type">
                    <option value="1" selected>Unapproved</option>
                    <option value="2">Approved</option>
                </select>
            </div>
          </div>

          <div class="service-mode__block">
            <div class="form-group" style="display": none">
            <label>E-mail Confirmation</label>
              <select class="form-control" name="email_type">
                    <option value="1" selected>Unapproved</option>
                    <option value="2">Approved</option>
                </select>
            </div>
          </div>

          
          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Register User</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>
<script>
            var type = $("#admin").val();
            if( type == 0 ){
              $("#admin_access").hide();
            } else{
              $("#admin_access").show();
            }
            $("#admin ").change(function(){
              var type = $(this).val();
                if( type == 0 ){
                  $("#admin_access").hide();
                } else{
                  $("#admin_access").show();
                }
            });
          </script>
          <script>
            var type = $("#debit").val();
            if( type == 2 ){
              $("#debit_limit").hide();
            } else{
              $("#debit_limit").show();
            }
            $("#debit").change(function(){
              var type = $(this).val();
                if( type == 2 ){
                  $("#debit_limit").hide();
                } else{
                  $("#debit_limit").show();
                }
            });
          </script>\';
    echo json_encode(["content"=>$return,"title"=>"New user registration"]);
  elseif( $action == "edit_user" ):
    $id = $_POST["id"];
    $user   = $conn->prepare("SELECT * FROM clients WHERE client_id=:id ");
    $user ->execute(array("id"=>$id));
    $user   = $user->fetch(PDO::FETCH_ASSOC);
    $access = json_decode($user["access"],true);
    $return = \'<form class="form" action="\'.site_url("admin/clients/edit/".$user["username"]).\'" method="post" data-xhr="true">
        </div>
<div class="modal-body">
          <div class="form-group">
            <label>User Email</label>
            <input type="text" name="email" value="\'.$user["email"].\'" class="form-control">
          </div>

          <div class="form-group">
            <label>Username</label>
            <input type="text" name="username" class="form-control"  value="\'.$user["username"].\'">
          </div>

          

          <div class="service-mode__block">
            <div class="form-group">
            <label>Negative Balance</label>
              <select class="form-control" id="debit" name="balance_type">
                    <option value="2"\'; if( $user["balance_type"] == 2 ): $return.=\'selected\'; endif;  $return.=\'>NO</option>
                    <option value="1"\'; if( $user["balance_type"] == 1 ): $return.=\'selected\'; endif;  $return.=\'>YES</option>
                </select>
            </div>
          </div>

          <div class="form-group" id="debit_limit">
            <label>How Much Negative Balance?</label>
            <input type="text" name="debit_limit" class="form-control" value="\'.$user["debit_limit"].\'">
          </div>
		   <div class="form-group" id="balance">
            <label>Balance</label>
            <input type="text" name="balance" class="form-control" value="\'.$user["balance"].\'">
          </div>

          <div class="service-mode__block">
            <div class="form-group" style="display: ;">
            <label>SMS Confirmation</label>
              <select class="form-control" name="tel_type">
                    <option value="1"\'; if( $user["tel_type"] == 1 ): $return.=\'selected\'; endif;  $return.=\'>Unapproved</option>
                    <option value="2"\'; if( $user["tel_type"] == 2 ): $return.=\'selected\'; endif;  $return.=\'>Approved</option>
                </select>
            </div>
          </div>

          <div class="service-mode__block">
            <div class="form-group" style="display: ;">
            <label>Email Confirmation</label>
              <select class="form-control" name="email_type">
                    <option value="1"\'; if( $user["email_type"] == 1 ): $return.=\'selected\'; endif;  $return.=\'>Unapproved</option>
                    <option value="2"\'; if( $user["email_type"] == 2 ): $return.=\'selected\'; endif;  $return.=\'>Approved</option>
                </select>
            </div>
          </div>

          

          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Update</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>
<script>
            var type = $("#admin").val();
            if( type == 0 ){
              $("#admin_access").hide();
            } else{
              $("#admin_access").show();
            }
            $("#admin ").change(function(){
              var type = $(this).val();
                if( type == 0 ){
                  $("#admin_access").hide();
                } else{
                  $("#admin_access").show();
                }
            });
          </script>
          <script>
            var type = $("#debit").val();
            if( type == 2 ){
              $("#debit_limit").hide();
            } else{
              $("#debit_limit").show();
            }
            $("#debit").change(function(){
              var type = $(this).val();
                if( type == 2 ){
                  $("#debit_limit").hide();
                } else{
                  $("#debit_limit").show();
                }
            });
          </script>
		 
          \';
    echo json_encode(["content"=>$return,"title"=>"Edit User"]);















  elseif( $action == "pass_user" ):
    $id = $_POST["id"];
    $user   = $conn->prepare("SELECT * FROM clients WHERE client_id=:id ");
    $user ->execute(array("id"=>$id));
    $user   = $user->fetch(PDO::FETCH_ASSOC);
    $return = \'<form class="form" action="\'.site_url("admin/clients/pass/".$user["username"]).\'" method="post" data-xhr="true">
        <div class="modal-body">

          <div class="form-group">
            <label>Member Password</label>
            <div class="input-group">
              <input type="text" class="form-control" name="password" value="" id="user_password">
              <span class="input-group-btn">
                <button class="btn btn-default" onclick="UserPassword()" type="button">
                <span class="fa fa-random" data-toggle="tooltip" data-placement="bottom" title="" aria-hidden="true" data-original-title="Create password"></span></button>
              </span>
            </div>
          </div>

        </div>

          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Update password</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>\';
    echo json_encode(["content"=>$return,"title"=>"Edit password"]);
  elseif( $action == "alert_user" ):
    $return = \'<form class="form" action="\'.site_url("admin/clients/alert").\'" method="post" data-xhr="true">
        <div class="modal-body">

          <div class="service-mode__block">
            <div class="form-group">
            <label>Member to be notified</label>
              <select class="form-control" id="user_type" name="user_type">
                    <option value="all">All members</option>
                    <option value="secret">Member specific</option>
                </select>
            </div>
          </div>

          <div class="form-group" id="username">
            <label>Username</label>
            <input type="text" name="username" class="form-control" value="">
          </div>

          <div class="service-mode__block">
            <div class="form-group">
            <label>Notification Type</label>
              <select class="form-control" id="alert_type" name="alert_type">
                    <option value="email">E-mail</option>
                    <option value="sms">SMS</option>
                </select>
            </div>
          </div>

          <div id="email">
            <div class="form-group">
              <label>E-mail Title</label>
              <input type="text" name="subject" class="form-control" value="">
            </div>
          </div>

          <div class="form-group" id="username">
            <label>Notification Message</label>
            <textarea type="text" name="message" class="form-control" rows="5"></textarea>
          </div>



        </div>
        <script type="text/javascript">
          $("#username").hide();
          $("#user_type").change(function(){
            var type = $(this).val();
            if( type == "secret" ){
              $("#username").show();
            } else{
              $("#username").hide();
            }
          });
          $("#alert_type").change(function(){
            var type = $(this).val();
            if( type == "email" ){
              $("#email").show();
            } else{
              $("#email").hide();
            }
          });
        </script>

          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Notify users</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>

          \';
    echo json_encode(["content"=>$return,"title"=>"Notice to users"]);
  elseif( $action == "new_service" ):
    $categories = $conn->prepare("SELECT * FROM categories ORDER BY category_line ");
    $categories->execute(array());
    $categories = $categories->fetchAll(PDO::FETCH_ASSOC);
    $providers  = $conn->prepare("SELECT * FROM service_api");
    $providers->execute(array());
    $providers  = $providers->fetchAll(PDO::FETCH_ASSOC);
    $return = \'<form class="form" action="\'.site_url("admin/services/new-service").\'" method="post" data-xhr="true">
        <div class="modal-body">\';

        if( count($languages) > 1 ):
          $translationList = \'<a class="other_services"> Translations (\'.(count($languages)-1).\') </a>\';
        else:
          $translationList  = \'\';
        endif;
        foreach ($languages as $language):
          if( $language["default_language"] ):
            $return.=\'<div class="form-group">
              <label class="form-group__service-name">Service name <span class="badge">\'.$language["language_name"].\'</span> \'.$translationList.\' </label>
              <input type="text" class="form-control" name="name[\'.$language["language_code"].\']" value="\'.$multiName[$language["language_code"]].\'">
            </div>\';
            if( count($languages) > 1 ):
              $return.=\'<div class="hidden" id="translationsList">\';
            endif;
          else:
            $return.=\'<div class="form-group">
              <label class="form-group__service-name">Service name <span class="badge">\'.$language["language_name"].\'</span> </label>
              <input type="text" class="form-control" name="name[\'.$language["language_code"].\']" value="\'.$multiName[$language["language_code"]].\'">
            </div>\';
          endif;
        endforeach;
        if( count($languages) > 1 ):
          $return.=\'</div>\';
        endif;

          $return.=\'<div class="service-mode__block">
            <div class="form-group">
            <label>Service Category</label>
              <select class="form-control" name="category">
                    <option value="0">Please select a category..</option>\';
                    foreach ( $categories as $category ):
                      $return.=\'<option value="\'.$category["category_id"].\'">\'.$category["category_name"].\'</option>\';
                    endforeach;
                $return.=\'</select>
            </div>
          </div>

          <div class="service-mode__wrapper">
            <div class="service-mode__block">
              <div class="form-group">
              <label>Service Type</label>
                <select class="form-control" name="package">
                      <option value="1">Service</option>
                      <option value="2">Package</option>
                      <option value="3">Special Comment</option>
                      <option value="4">Package Comment</option>
                  </select>
              </div>
            </div>
            <div class="service-mode__block">
              <div class="form-group">
              <label>Mode</label>
                <select class="form-control" name="mode" id="serviceMode">
                      <option value="1">Manual</option>
                      <option value="2">Auto (API)</option>
                  </select>
              </div>
            </div>

            <div id="autoMode" style="display: none">
              <div class="service-mode__block">
                <div class="form-group">
                <label>Service Provider</label>
                  <select class="form-control" name="provider" id="provider">
                        <option value="0">Select service provider...</option>\';
                        foreach( $providers as $provider ):
                          $return.=\'<option value="\'.$provider["id"].\'">\'.$provider["api_name"].\'</option>\';
                        endforeach;
                      $return.=\'</select>
                </div>
              </div>
              <div id="provider_service">
              </div>
              <div class="service-mode__block"  style="display: none">
                <div class="form-group">
                <label>Price Over the Purchase Price</label>
                  <select class="form-control" name="saleprice_cal" id="saleprice_cal>
                    <option value="normal">No</option>
                    <option value="percent">Add % to your purchase price </option>
                    <option value="amount">Add amount to your purchase price </option>
                  </select>
                </div>
              </div>
              <div class="form-group" style="display: none">
                <label class="form-group__service-name">Price</label>
                <input type="text" class="form-control" name="saleprice" value="">
              </div>
              <div class="service-mode__block">
                <div class="form-group">
                <label>Dripfeed</label>
                  <select class="form-control" name="dripfeed">
                    <option value="1">Inactive</option>
                    <option value="2">Active</option>
                  </select>
                </div>
              </div>
            </div>
          </div>

          <div class="service-mode__wrapper">
              <div class="row">
                <div class="col-md-6 service-mode__block ">
                  <div class="form-group">
                  <label>Check Instagram profile privacy?</label>
                    <select class="form-control" name="instagram_private">
                          <option value="1">No</option>
                          <option value="2">Yes</option>
                      </select>
                  </div>
                </div>
                <div class="col-md-6 service-mode__block ">
                  <div class="form-group">
                  <label>Starting number</label>
                    <select class="form-control" name="start_count">
                          <option value="none">Do not retreat</option>
                          <option value="instagram_follower">Number of Instagram followers</option>
                          <option value="instagram_photo">Instagram photo likes</option>
                      </select>
                  </div>
                </div>
              </div>
              <div class="row">
                <div class="col-md-6 service-mode__block ">
                  <div class="form-group">
                  <label>Enter the 2nd order on the same link?</label>
                    <select class="form-control" name="instagram_second">
                          <option value="2">Yes</option>
                          <option value="1">No</option>
                      </select>
                  </div>
                </div>
              </div>
			
          </div>
		
          <div class="form-group">
            <label class="form-group__service-name">Service price (1000 pieces)</label>
            <input type="text" class="form-control" name="price" value="">
          </div>

          <div class="row">
            <div class="col-md-6 form-group">
              <label class="form-group__service-name">Minimum order</label>
              <input type="text" class="form-control" name="min" value="">
            </div>

            <div class="col-md-6 form-group">
              <label class="form-group__service-name">Maximum order</label>
              <input type="text" class="form-control" name="max" value="">
            </div>
          </div>
<hr>
<div class="service-mode__block">
            <div class="form-group">
            <label>Refill Button</label>
              <select class="form-control" name="show_refill">
                  <option value="false">Off</option>
                  <option value="true">On</option>
              </select>
            </div>
          </div>
<div class="row" id="refill">
            <div class="col-md-6 form-group">
              <label class="form-group__service-name">Refill days</label>
              <input type="text" class="form-control" name="refill_days" value="">
            </div>

            <div class="col-md-6 form-group">
              <label class="form-group__service-name">Refill Display (in hours)</label>
              <input type="text" class="form-control" name="refill_hours" value="">
            </div>
          </div>
<div class="service-mode__block">
            <div class="form-group">
            <label>Cancel Button</label>
              <select class="form-control" name="cancelbutton">
                  <option value="2">Off</option>
                  <option value="1">On</option>
              </select>
            </div>
          </div>

          <hr>
           
              
          <div class="service-mode__block">
            <div class="form-group">
            <label>Order Link</label>
              <select class="form-control" name="want_username">
                  <option value="1">Link</option>
                  <option value="2">Username</option>
              </select>
            </div>
          </div>

          <div class="service-mode__block">
            <div class="form-group">
            <label>Personalized Service</label>
              <select class="form-control" name="secret">
                  <option value="2">No</option>
                  <option value="1">Yes</option>
              </select>
            </div>
          </div>

          <div class="service-mode__block">
            <div class="form-group">
            <label>Service Speed</label>
              <select class="form-control" name="speed">
                  <option value="1">Slow</option>
                  <option value="2">Sometimes Slow</option>
                  <option value="3">Normal</option>
                  <option value="4">Fast</option>
              </select>
            </div>
          </div>

        </div>

          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Add new service</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>
          <script src="\'; $return.=site_url(\'public/admin/\'); $return.=\'script.js"></script>
          <script>
          $(".other_services").click(function(){
            var control = $("#translationsList");
            if( control.attr("class") == "hidden" ){
              control.removeClass("hidden");
            } else{
              control.addClass("hidden");
            }
          });
          </script>
          \';
    echo json_encode(["content"=>$return,"title"=>"Add new service"]);
elseif( $action == "edit_service" ):
    $id       = $_POST["id"];
    $smmapi   = new SMMApi();
    $categories = $conn->prepare("SELECT * FROM categories ORDER BY category_line ");
    $categories->execute(array());
    $categories = $categories->fetchAll(PDO::FETCH_ASSOC);
    $serviceInfo= $conn->prepare("SELECT * FROM services LEFT JOIN service_api ON service_api.id=services.service_api WHERE services.service_id=:id ");
    $serviceInfo->execute(array("id"=>$id));
    $serviceInfo= $serviceInfo->fetch(PDO::FETCH_ASSOC);
    $providers  = $conn->prepare("SELECT * FROM service_api");
    $providers->execute(array());
    $providers  = $providers->fetchAll(PDO::FETCH_ASSOC);
    $multiName  = json_decode($serviceInfo["name_lang"],true);

      if( in_array($serviceInfo["service_package"],["11","12","13","14","15"]) ):
        $return = \'<form class="form" action="\'.site_url("admin/services/edit-subscription/".$serviceInfo["service_id"]).\'" method="post" data-xhr="true">
            <div class="modal-body">\';


   
          if( count($languages) > 1 ):
                $translationList = \'<a class="other_services"> Translations (\'.(count($languages)-1).\') </a>\';
              else:
                $translationList  = \'\';
              endif;
              foreach ($languages as $language):
                if( $language["default_language"] ):
                  $return.=\'
          <div class="form-group">
                    <label class="form-group__service-name">Service name <span class="badge">\'.$language["language_name"].\'</span> \'.$translationList.\' </label>
                    <input type="text" class="form-control" name="name[\'.$language["language_code"].\']" value="\'.$multiName[$language["language_code"]].\'">
                  </div>\';
                  if( count($languages) > 1 ):
                    $return.=\'<div class="hidden" id="translationsList">\';
                  endif;
                else:
                  $return.=\'<div class="form-group">
                    <label class="form-group__service-name">Service name <span class="badge">\'.$language["language_name"].\'</span> </label>
                    <input type="text" class="form-control" name="name[\'.$language["language_code"].\']" value="\'.$multiName[$language["language_code"]].\'">
                  </div>\';
                endif;
              endforeach;
              if( count($languages) > 1 ):
                $return.=\'</div>\';
              endif;

              $return.=\'<div class="service-mode__block">
                <div class="form-group">
                <label>Service Category</label>
                  
                  <select class="form-control" name="category">
                        <option value="0">Please select a category..</option>\';
                        foreach ( $categories as $category ):
                          $return.=\'<option value="\'.$category["category_id"].\'"\'; if( $serviceInfo["category_id"] == $category["category_id"] ): $return.=\'selected\'; endif; $return.=\'>\'.$category["category_name"].\'</option>\';
                        endforeach;
                    $return.=\'</select>
                </div>
              </div>

              <div class="service-mode__block">
                <div class="form-group">
                <label>Subscription Type</label>
                  <select class="form-control" disabled  id="subscription_package">
                        <option value="11"\'; if( $serviceInfo["service_package"] == 11 ): $return.=\'selected\'; endif; $return.=\'>Instagram Auto Likes - Unlimited</option>
                        <option value="12"\'; if( $serviceInfo["service_package"] == 12 ): $return.=\'selected\'; endif; $return.=\'>Instagram Auto Tracking - Unlimited</option>
                        <option value="14"\'; if( $serviceInfo["service_package"] == 14 ): $return.=\'selected\'; endif; $return.=\'>Instagram Auto Likes - Timed</option>
                        <option value="15"\'; if( $serviceInfo["service_package"] == 15 ): $return.=\'selected\'; endif; $return.=\'>Instagram Auto Watch - Timed</option>
                    </select>
                </div>
              </div>

              

              <div class="service-mode__wrapper">

                <div class="service-mode__block">
                  <div class="form-group">
                  <label>Mode</label>
                    <select class="form-control" name="mode" id="serviceMode">
                          <option value="2"\'; if( $serviceInfo["service_api"] != 0 ): $return.=\'selected\'; endif; $return.=\'>Auto (API)</option>
                      </select>
                  </div>
                </div>


                <div id="autoMode" style="display: none">
                  <div class="service-mode__block">
                    <div class="form-group">
                    <label>Service Provider</label>
                      <select class="form-control" name="provider" id="provider">
                            <option value="0">Select service provider...</option>\';
                            foreach( $providers as $provider ):
                              $return.=\'<option value="\'.$provider["id"].\'"\'; if( $serviceInfo["service_api"] == $provider["id"] ): $return.=\'selected\'; endif; $return.=\'>\'.$provider["api_name"].\'</option>\';
                            endforeach;
                          $return.=\'</select>
                    </div>
                  </div>
                  <div id="provider_service">\';
                  $services = $smmapi->action(array(\'key\' =>$serviceInfo["api_key"],\'action\' =>\'services\'),$serviceInfo["api_url"]);
                  if( $serviceInfo["api_type"] == 1 ):
                    $return.= \'<div class="service-mode__block">
                      <div class="form-group">
                      <label>Service</label>
                        <select class="form-control" name="service">\';
                            foreach ($services as $service):
                              $return.= \'<option value="\'.$service->service.\'"\'; if( $serviceInfo["api_service"] == $service->service ): $return.=\'selected\'; endif; $return.= \'>\'.$service->service.\' - \'.$service->name.\' - \'.$service->rate.\'</option>\';
                            endforeach;
                            $return.= \'</select>
                      </div>
                    </div>\';
                  elseif( $serviceInfo["api_type"] == 3 ):
                    $return.= \'<div class="service-mode__block">
                      <div class="form-group">
                      <label>Service</label>
                        <input class="form-control" value="\'.$serviceInfo[\'api_service\'].\'" name="service">
                      </div>
                    </div>\';
                  endif;
                  $return.=\'</div>
                </div>
              </div>

              <div id="unlimited">
                <div class="form-group">
                  <label class="form-group__service-name">Service price (1000 pieces)</label>
                  <input type="text" class="form-control" name="price" value="\'.$serviceInfo["service_price"].\'">
                </div>

                <div class="row">
                  <div class="col-md-6 form-group">
                    <label class="form-group__service-name">Minimum order</label>
                    <input type="text" class="form-control" name="min" value="\'.$serviceInfo["service_min"].\'">
                  </div>

                  <div class="col-md-6 form-group">
                    <label class="form-group__service-name">Maximum order</label>
                    <input type="text" class="form-control" name="max" value="\'.$serviceInfo["service_max"].\'">
                  </div>
                </div>
              </div>

              <div id="limited">
                <div class="form-group">
                  <label class="form-group__service-name">Service price</label>
                  <input type="text" class="form-control" name="limited_price" value="\'.$serviceInfo["service_price"].\'">
                </div>



                <div class="row">
                  <div class="col-md-6 form-group">
                    <label class="form-group__service-name">Shipment amount</label>
                    <input type="text" class="form-control" name="autopost" value="\'.$serviceInfo["service_autopost"].\'">
                  </div>

                  <div class="col-md-6 form-group">
                    <label class="form-group__service-name">Order amount</label>
                    <input type="text" class="form-control" name="limited_min" value="\'.$serviceInfo["service_min"].\'">
                  </div>
                </div>
                <div class="form-group">
                  <label class="form-group__service-name">Package Time <small> (days)</small></label>
                  <input type="text" class="form-control" name="autotime" value="\'.$serviceInfo["service_autotime"].\'">
                </div>
              </div>

              <hr>

              <div class="service-mode__block">
                <div class="form-group">
                <label>Personalized Service</label>
                  <select class="form-control" name="secret">
                      <option value="2"\'; if( $serviceInfo["service_secret"] == 2 ): $return.=\'selected\'; endif; $return.=\'>No</option>
                      <option value="1"\'; if( $serviceInfo["service_secret"] == 1 ): $return.=\'selected\'; endif; $return.=\'>Yes</option>
                  </select>
                </div>
              </div>

              <div class="service-mode__block">
                <div class="form-group">
                <label>Service Speed</label>
                  <select class="form-control" name="speed">
                      <option value="1"\'; if( $serviceInfo["service_speed"] == 1 ): $return.=\'selected\'; endif; $return.=\'>Slow</option>
                      <option value="2"\'; if( $serviceInfo["service_speed"] == 2 ): $return.=\'selected\'; endif; $return.=\'>Sometimes Slow</option>
                      <option value="3"\'; if( $serviceInfo["service_speed"] == 3 ): $return.=\'selected\'; endif; $return.=\'>Normal</option>
                      <option value="4"\'; if( $serviceInfo["service_speed"] == 4 ): $return.=\'selected\'; endif; $return.=\'>Fast</option>
                  </select>
                </div>
              </div>

            </div>

              <div class="modal-footer">
                <button type="submit" class="btn btn-primary">Update subscription information</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
              </div>
              </form>
<script>
            var type = $("#show").val();
            if( show_refill == "true" ){
              $("#refill").hide();
            } else{
              $("#refill").show();
            }
            $("#admin ").change(function(){
              var type = $(this).val();
                if( show_refill == "false" ){
                  $("#refill").hide();
                } else{
                  $("#refill").show();
                }
            });
          </script>


              <script type="text/javascript">
              $(".other_services").click(function(){
                var control = $("#translationsList");
                if( control.attr("class") == "hidden" ){
                  control.removeClass("hidden");
                } else{
                  control.addClass("hidden");
                }
              });
              var site_url  = $("head base").attr("href");
                $("#provider").change(function(){
                  var provider = $(this).val();
                  getProviderServices(provider,site_url);
                });

                getProvider();
                $("#serviceMode").change(function(){
                  getProvider();
                });

                getSalePrice();
                $("#saleprice_cal").change(function(){
                  getSalePrice();
                });

                getSubscription();
                $("#subscription_package").change(function(){
                  getSubscription();
                });
                function getProviderServices(provider,site_url){
                  if( provider == 0 ){
                    $("#provider_service").hide();
                  }else{
                    $.post(site_url+"admin/ajax_data",{action:"providers_list",provider:provider}).done(function( data ) {
                      $("#provider_service").show();
                      $("#provider_service").html(data);
                    }).fail(function(){
                      alert("Hata olutu!");
                    });
                  }
                }

                function getProvider(){
                  var mode = $("#serviceMode").val();
                    if( mode == 1 ){
                      $("#autoMode").hide();
                    }else{
                      $("#autoMode").show();
                    }
                }

                function getSalePrice(){
                  var type = $("#saleprice_cal").val();
                    if( type == "normal" ){
                      $("#saleprice").hide();
                      $("#servicePrice").show();
                    }else{
                      $("#saleprice").show();
                      $("#servicePrice").hide();
                    }
                }

                function getSubscription(){
                  var type = $("#subscription_package").val();
                    if( type == "11" || type == "12" ){
                      $("#unlimited").show();
                      $("#limited").hide();
                    }else{
                      $("#unlimited").hide();
                      $("#limited").show();
                    }
                }
              </script>
              \';


	 echo json_encode(["content"=>$return,"title"=>"Edit subscription (ID: ".$serviceInfo["service_id"].")"]);


      else:
        $return = \'

        <form class="form" action="\'.site_url("admin/services/edit-service/".$serviceInfo["service_id"]).\'" method="post" data-xhr="true">
            <div class="modal-body">\';

              if( count($languages) > 1 ):
                $translationList = \'<a class="other_services"> Translations (\'.(count($languages)-1).\') </a>\';
              else:
                $translationList  = \'\';
              endif;
              foreach ($languages as $language):
                if( $language["default_language"] ):
                  $return.=\'
				  <div class="form-group">
                    <label class="form-group__service-name">Service name <span class="badge">\'.$language["language_name"].\'</span> \'.$translationList.\' </label>
                    <input type="text" class="form-control" name="name[\'.$language["language_code"].\']" value="\'.$multiName[$language["language_code"]].\'">
                  </div>\';
                  if( count($languages) > 1 ):
                    $return.=\'<div class="hidden" id="translationsList">\';
                  endif;
                else:
                  $return.=\'<div class="form-group">
                    <label class="form-group__service-name">Service name <span class="badge">\'.$language["language_name"].\'</span> </label>
                    <input type="text" class="form-control" name="name[\'.$language["language_code"].\']" value="\'.$multiName[$language["language_code"]].\'">
                  </div>\';
                endif;
              endforeach;
              if( count($languages) > 1 ):
                $return.=\'</div>\';
              endif;

              $return.=\'<div class="service-mode__block">
                <div class="form-group">
                <label>Service Category</label>
                  <select class="form-control" name="category">
                        <option value="0">Please select a category..</option>\';
                        foreach ( $categories as $category ):
                          $return.=\'<option value="\'.$category["category_id"].\'"\'; if( $serviceInfo["category_id"] == $category["category_id"] ): $return.=\'selected\'; endif; $return.=\'>\'.$category["category_name"].\'</option>\';
                        endforeach;
                    



                    $return.=\'</select>
                </div>
              </div>

              <div class="service-mode__wrapper">
                <div class="service-mode__block">
                  <div class="form-group">
                  <label>Service Type</label>
                    <select class="form-control" name="package">
                          <option value="1"\'; if( $serviceInfo["service_package"] == 1 ): $return.=\'selected\'; endif; $return.=\'>Service</option>
                          <option value="2"\'; if( $serviceInfo["service_package"] == 2 ): $return.=\'selected\'; endif; $return.=\'>Package</option>
                          <option value="3"\'; if( $serviceInfo["service_package"] == 3 ): $return.=\'selected\'; endif; $return.=\'>Special Comment</option>
                          <option value="4"\'; if( $serviceInfo["service_package"] == 4 ): $return.=\'selected\'; endif; $return.=\'>Package Comment</option>
                      </select>
                  </div>
                </div>
                <div class="service-mode__block">
                  <div class="form-group">
                  <label>Mode</label>
                    <select class="form-control" name="mode" id="serviceMode">
                          <option value="1"\'; if( $serviceInfo["service_api"] == 0 ): $return.=\'selected\'; endif; $return.=\'>Manual</option>
                          <option value="2"\'; if( $serviceInfo["service_api"] != 0 ): $return.=\'selected\'; endif; $return.=\'>Auto (API)</option>
                      </select>
                  </div>
                </div>

                <div id="autoMode" style="display: none">
                  <div class="service-mode__block">
                    <div class="form-group">
                    <label>Service Provider</label>
                      <select class="form-control" name="provider" id="provider">
                            <option value="0">Select service provider...</option>\';
                            foreach( $providers as $provider ):
                              $return.=\'<option value="\'.$provider["id"].\'"\'; if( $serviceInfo["service_api"] == $provider["id"] ): $return.=\'selected\'; endif; $return.=\'>\'.$provider["api_name"].\'</option>\';
                            endforeach;
                          $return.=\'</select>
                    </div>
                  </div>
                  <div id="provider_service">\';
                  $services = $smmapi->action(array(\'key\' =>$serviceInfo["api_key"],\'action\' =>\'services\'),$serviceInfo["api_url"]);
                    if( $serviceInfo["api_type"] == 1 ):
                      $return.= \'<div class="service-mode__block">
                        <div class="form-group">
                        <label>Service</label>
                          <select class="form-control" name="service">\';
                              foreach ($services as $service):
                                $return.= \'<option value="\'.$service->service.\'"\'; if( $serviceInfo["api_service"] == $service->service ): $return.=\'selected\'; endif; $return.= \'>\'.$service->service.\' - \'.$service->name.\' - \'.$service->rate.\'</option>\';
                              endforeach;
                              $return.= \'</select>
                        </div>
                      </div>\';
                    elseif( $serviceInfo["api_type"] == 3 ):
                      $return.= \'<div class="service-mode__block">
                        <div class="form-group">
                        <label>Service</label>
                          <input class="form-control" value="\'.$serviceInfo[\'api_service\'].\'" name="service">
                        </div>
                      </div>\';
                    endif;
                  $return.=\'</div>
                  <div class="service-mode__block"  style="display: none">
                    <div class="form-group">
                    <label>Price Over the Purchase Price</label>
                      <select class="form-control" name="saleprice_cal" id="saleprice_cal>
                        <option value="normal">No</option>
                        <option value="percent">Add % to your purchase price</option>
                        <option value="amount">Add amount to your purchase price </option>
                      </select>
                    </div>
                  </div>
                  <div class="form-group" style="display: none">
                    <label class="form-group__service-name">Price</label>
                    <input type="text" class="form-control" name="saleprice" value="">
                  </div>
                  <div class="service-mode__block">
                    <div class="form-group">
                    <label>Dripfeed</label>
                      <select class="form-control" name="dripfeed">
                        <option value="1"\'; if( $serviceInfo["service_dripfeed"] == 1 ): $return.=\'selected\'; endif; $return.=\'>Inactive</option>
                        <option value="2"\'; if( $serviceInfo["service_dripfeed"] == 2 ): $return.=\'selected\'; endif; $return.=\'>Active</option>
                      </select>
                    </div>
                  </div>
                </div>
              </div>

              <div class="service-mode__wrapper">
                  <div class="row">
                    <div class="col-md-6 service-mode__block ">
                      <div class="form-group">
                      <label>Check Instagram profile privacy?</label>
                        <select class="form-control" name="instagram_private">
                              <option value="1"\'; if( $serviceInfo["instagram_private"] == 1 ): $return.=\'selected\'; endif; $return.=\'>No</option>
                              <option value="2"\'; if( $serviceInfo["instagram_private"] == 2 ): $return.=\'selected\'; endif; $return.=\'>Yes</option>
                          </select>
                      </div>
                    </div>
                    <div class="col-md-6 service-mode__block ">
                      <div class="form-group">
                      <label>Starting number</label>
                        <select class="form-control" name="start_count">
                              <option value="none"\'; if( $serviceInfo["start_count"] == "none" ): $return.=\'selected\'; endif; $return.=\'>Starting number</option>
                              <option value="instagram_follower"\'; if( $serviceInfo["start_count"] == "instagram_follower" ): $return.=\'selected\'; endif; $return.=\'>Number of Instagram followers</option>
                              <option value="instagram_photo"\'; if( $serviceInfo["start_count"] == "instagram_photo" ): $return.=\'selected\'; endif; $return.=\'>Number of Instagram followers</option>
                          </select>
                      </div>
                    </div>
                  </div>
                  <div class="row">
                    <div class="col-md-6 service-mode__block ">
                      <div class="form-group">
                      <label>Enter the 2nd order on the same link?</label>
                        <select class="form-control" name="instagram_second">
                              <option value="2"\'; if( $serviceInfo["instagram_second"] == 2 ): $return.=\'selected\'; endif; $return.=\'>Yes</option>
                              <option value="1"\'; if( $serviceInfo["instagram_second"] == 1 ): $return.=\'selected\'; endif; $return.=\'>No</option>
                          </select>
                      </div>
                    </div>
                  </div>
              </div>

              <div class="form-group">
                <label class="form-group__service-name">Service price (1000 pieces)</label>
                <input type="text" class="form-control" name="price" value="\'.$serviceInfo["service_price"].\'">
              </div>

              <div class="row">
                <div class="col-md-6 form-group">
                  <label class="form-group__service-name">Minimum order</label>
                  <input type="text" class="form-control" name="min" value="\'.$serviceInfo["service_min"].\'">
                </div>

                <div class="col-md-6 form-group">
                  <label class="form-group__service-name">Minimum order</label>
                  <input type="text" class="form-control" name="max" value="\'.$serviceInfo["service_max"].\'">
                </div>
              </div>

              <hr>
    <div class="service-mode__block">
                <div class="form-group">
                <label>Refill Button</label>
                  <select id="show" class="form-control" name="show_refill">
                      <option value="false"\'; if( $serviceInfo["show_refill"] == "false" ): $return.=\'selected\'; endif; $return.=\'>Off</option>
                      <option value="true"\'; if( $serviceInfo["show_refill"] == "true" ): $return.=\'selected\'; endif; $return.=\'>On</option>
                  </select>
                </div>
    </div><div class="row" id="refill">


                <div class="col-md-6 form-group" id="refill"> 
                  <label class="form-group__service-name">Refill days</label>
                  <input type="text" class="form-control" name="refill_days" value="\'.$serviceInfo["refill_days"].\'">
                </div>

                <div class="col-md-6 form-group" id="refill">
                  <label class="form-group__service-name">Refill Display (in hours)</label>
                  <input type="text" class="form-control" name="refill_hours" value="\'.$serviceInfo["refill_hours"].\'">
                </div>
              </div>

    <div class="service-mode__block">
                <div class="form-group">
                <label>Cancel Button</label>
                  <select class="form-control" name="cancelbutton">
                      <option value="2"\'; if( $serviceInfo["cancelbutton"] == 2 ): $return.=\'selected\'; endif; $return.=\'>Off</option>
                      <option value="1"\'; if( $serviceInfo["cancelbutton"] == 1 ): $return.=\'selected\'; endif; $return.=\'>On</option>
                  </select>
                </div>
              </div>

              <hr>
              
              <div class="service-mode__block">
                <div class="form-group">
                <label>Order Link</label>
                  <select class="form-control" name="want_username">
                      <option value="1"\'; if( $serviceInfo["want_username"] == 1 ): $return.=\'selected\'; endif; $return.=\'>Link</option>
                      <option value="2"\'; if( $serviceInfo["want_username"] == 2 ): $return.=\'selected\'; endif; $return.=\'>Username</option>
                  </select>
                </div>
              </div>

              <div class="service-mode__block">
                <div class="form-group">
                <label>Personalized Service</label>
                  <select class="form-control" name="secret">
                      <option value="2"\'; if( $serviceInfo["service_secret"] == 2 ): $return.=\'selected\'; endif; $return.=\'>No</option>
                      <option value="1"\'; if( $serviceInfo["service_secret"] == 1 ): $return.=\'selected\'; endif; $return.=\'>Yes</option>
                  </select>
                </div>
              </div>

              <div class="service-mode__block">
                <div class="form-group">
                <label>Service Speed</label>
                  <select class="form-control" name="speed">
                      <option value="1"\'; if( $serviceInfo["service_speed"] == 1 ): $return.=\'selected\'; endif; $return.=\'>Slow</option>
                      <option value="2"\'; if( $serviceInfo["service_speed"] == 2 ): $return.=\'selected\'; endif; $return.=\'>Sometimes Slow</option>
                      <option value="3"\'; if( $serviceInfo["service_speed"] == 3 ): $return.=\'selected\'; endif; $return.=\'>Normal</option>
                      <option value="4"\'; if( $serviceInfo["service_speed"] == 4 ): $return.=\'selected\'; endif; $return.=\'>Fast</option>
                  </select>
                </div>
              </div>

            </div>

              <div class="modal-footer">
                <button type="submit" class="btn btn-primary">Update service information</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
              </div>
                            </form>
<script>
            var type = $("#show").val();
            if( $serviceInfo["show_refill"]   == "false" ){
              $("#refill").hide();
            } else{
              $("#refill").show();
            }
            $("#show ").change(function(){
              var type = $(this).val();
                if( $serviceInfo["show_refill"]  == "false" ){
                  $("#refill").hide();
                } else{
                  $("#refill").show();
                }
            });
          </script>
              <script type="text/javascript">

               $(".other_services").click(function(){
                 var control = $("#translationsList");
                 if( control.attr("class") == "hidden" ){
                   control.removeClass("hidden");
                 } else{
                   control.addClass("hidden");
                 }
               });
              var site_url  = $("head base").attr("href");
                $("#provider").change(function(){
                  var provider = $(this).val();
                  getProviderServices(provider,site_url);
                });

                getProvider();
                $("#serviceMode").change(function(){
                  getProvider();
                });

                getSalePrice();
                $("#saleprice_cal").change(function(){
                  getSalePrice();
                });

                getSubscription();
                $("#subscription_package").change(function(){
                  getSubscription();
                });
                function getProviderServices(provider,site_url){
                  if( provider == 0 ){
                    $("#provider_service").hide();
                  }else{
                    $.post(site_url+"admin/ajax_data",{action:"providers_list",provider:provider}).done(function( data ) {
                      $("#provider_service").show();
                      $("#provider_service").html(data);
                    }).fail(function(){
                      alert("Hata olutu!");
                    });
                  }
                }

                function getProvider(){
                  var mode = $("#serviceMode").val();
                    if( mode == 1 ){
                      $("#autoMode").hide();
                    }else{
                      $("#autoMode").show();
                    }
                }

                function getSalePrice(){
                  var type = $("#saleprice_cal").val();
                    if( type == "normal" ){
                      $("#saleprice").hide();
                      $("#servicePrice").show();
                    }else{
                      $("#saleprice").show();
                      $("#servicePrice").hide();
                    }
                }

                function getSubscription(){
                  var type = $("#subscription_package").val();
                    if( type == "11" || type == "12" ){
                      $("#unlimited").show();
                      $("#limited").hide();
                    }else{
                      $("#unlimited").hide();
                      $("#limited").show();
                    }
                }
              </script>
              \';
        echo json_encode(["content"=>$return,"title"=>"Edit service (ID: ".$serviceInfo["service_id"].")"]);
      endif;
  elseif( $action == "edit_description" ):
    $id       = $_POST["id"];
    $smmapi   = new SMMApi();
    $serviceInfo= $conn->prepare("SELECT * FROM services WHERE service_id=:id ");
    $serviceInfo->execute(array("id"=>$id));
    $serviceInfo= $serviceInfo->fetch(PDO::FETCH_ASSOC);
    $multiDesc  = json_decode($serviceInfo["description_lang"],true);

        $return = \'<form class="form" action="\'.site_url("admin/services/edit-description/".$serviceInfo["service_id"]).\'" method="post" data-xhr="true">
            <div class="modal-body">\';

              if( count($languages) > 1 ):
                $translationList = \'<a class="other_services"> Translations (\'.(count($languages)-1).\') </a>\';
              else:
                $translationList  = \'\';
              endif;
              foreach ($languages as $language):
                if( $language["default_language"] ):
                  $return.=\'<div class="form-group">
                    <label class="form-group__service-name">Explanation <span class="badge">\'.$language["language_name"].\'</span> \'.$translationList.\' </label>
                    <textarea class="form-control" rows="5" name="description[\'.$language["language_code"].\']">\'.$multiDesc[$language["language_code"]].\'</textarea>
                  </div>\';
                  if( count($languages) > 1 ):
                    $return.=\'<div class="hidden" id="translationsList">\';
                  endif;
                else:
                  $return.=\'<div class="form-group">
                    <label class="form-group__service-name">Explanation <span class="badge">\'.$language["language_name"].\'</span> </label>
                    <textarea class="form-control" rows="5"  name="description[\'.$language["language_code"].\']">\'.$multiDesc[$language["language_code"]].\'</textarea>
                  </div>\';
                endif;
              endforeach;
              if( count($languages) > 1 ):
                $return.=\'</div>\';
              endif;

              $return.=\'

            </div>

              <div class="modal-footer">
                <button type="submit" class="btn btn-primary">Update description</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
              </div>
              </form>
              <script type="text/javascript">

              $(".other_services").click(function(){
                var control = $("#translationsList");
                if( control.attr("class") == "hidden" ){
                  control.removeClass("hidden");
                } else{
                  control.addClass("hidden");
                }
              });

              </script>
              \';
        echo json_encode(["content"=>$return,"title"=>"Edit description (ID: ".$serviceInfo["service_id"].")"]);


elseif( $action == "edit_time" ):
    $id       = $_POST["id"];
    $smmapi   = new SMMApi();
    $serviceInfo= $conn->prepare("SELECT * FROM services WHERE service_id=:id ");
    $serviceInfo->execute(array("id"=>$id));
    $serviceInfo= $serviceInfo->fetch(PDO::FETCH_ASSOC);
    $multiDesc  = json_decode($serviceInfo["time_lang"],true);

        $return = \'<form class="form" action="\'.site_url("admin/services/edit-time/".$serviceInfo["service_id"]).\'" method="post" data-xhr="true">
            <div class="modal-body">\';

              if( count($languages) > 1 ):
                $translationList = \'<a class="other_services"> Translations (\'.(count($languages)-1).\') </a>\';
              else:
                $translationList  = \'\';
              endif;
              foreach ($languages as $language):
                if( $language["default_language"] ):
                  $return.=\'<div class="form-group">
                    <label class="form-group__service-name">Explanation <span class="badge">\'.$language["language_name"].\'</span> \'.$translationList.\' </label>
                    <textarea class="form-control" rows="5" name="description[\'.$language["language_code"].\']">\'.$multiDesc[$language["language_code"]].\'</textarea>
                  </div>\';
                  if( count($languages) > 1 ):
                    $return.=\'<div class="hidden" id="translationsList">\';
                  endif;
                else:
                  $return.=\'<div class="form-group">
                    <label class="form-group__service-name">Explanation <span class="badge">\'.$language["language_name"].\'</span> </label>
                    <textarea class="form-control" rows="5"  name="description[\'.$language["language_code"].\']">\'.$multiDesc[$language["language_code"]].\'</textarea>
                  </div>\';
                endif;
              endforeach;
              if( count($languages) > 1 ):
                $return.=\'</div>\';
              endif;

              $return.=\'

            </div>

              <div class="modal-footer">
                <button type="submit" class="btn btn-primary">Update Time</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
              </div>
              </form>
              <script type="text/javascript">

              $(".other_services").click(function(){
                var control = $("#translationsList");
                if( control.attr("class") == "hidden" ){
                  control.removeClass("hidden");
                } else{
                  control.addClass("hidden");
                }
              });

              </script>
              \';
        echo json_encode(["content"=>$return,"title"=>"Edit Average Time (ID: ".$serviceInfo["service_id"].")"]);





  elseif( $action == "new_subscriptions" ):
    $categories = $conn->prepare("SELECT * FROM categories ORDER BY category_line ");
    $categories->execute(array());
    $categories = $categories->fetchAll(PDO::FETCH_ASSOC);
    $providers  = $conn->prepare("SELECT * FROM service_api");
    $providers->execute(array());
    $providers  = $providers->fetchAll(PDO::FETCH_ASSOC);
    $return = \'<form class="form" action="\'.site_url("admin/services/new-subscription").\'" method="post" data-xhr="true">
        <div class="modal-body">\';

        if( count($languages) > 1 ):
          $translationList = \'<a class="other_services"> Translations (\'.(count($languages)-1).\') </a>\';
        else:
          $translationList  = \'\';
        endif;
        foreach ($languages as $language):
          if( $language["default_language"] ):
            $return.=\'<div class="form-group">
              <label class="form-group__service-name">Service name <span class="badge">\'.$language["language_name"].\'</span> \'.$translationList.\' </label>
              <input type="text" class="form-control" name="name[\'.$language["language_code"].\']" value="\'.$multiName[$language["language_code"]].\'">
            </div>\';
            if( count($languages) > 1 ):
              $return.=\'<div class="hidden" id="translationsList">\';
            endif;
          else:
            $return.=\'<div class="form-group">
              <label class="form-group__service-name">Service name <span class="badge">\'.$language["language_name"].\'</span> </label>
              <input type="text" class="form-control" name="name[\'.$language["language_code"].\']" value="\'.$multiName[$language["language_code"]].\'">
            </div>\';
          endif;
        endforeach;
        if( count($languages) > 1 ):
          $return.=\'</div>\';
        endif;

          $return.=\'<div class="service-mode__block">
            <div class="form-group">
            <label>Service Category</label>
              <select class="form-control" name="category">
                    <option value="0">Please select a category..</option>\';
                    foreach ( $categories as $category ):
                      $return.=\'<option value="\'.$category["category_id"].\'">\'.$category["category_name"].\'</option>\';
                    endforeach;
                $return.=\'</select>
            </div>
          </div>

          <div class="service-mode__block">
            <div class="form-group">
            <label>Subscription Type</label>
              <select class="form-control" name="package" id="subscription_package">
                    <option value="11">Instagram Auto Likes - Unlimited</option>
                    <option value="12">Instagram Auto Tracking - Unlimited</option>
                    <option value="14">Instagram Auto Likes - Timed</option>
                    <option value="15">Instagram Auto Watch - Timed</option>
                </select>
            </div>
          </div>

          <div class="service-mode__wrapper">

            <div class="service-mode__block">
              <div class="form-group">
              <label>Mode</label>
                <select class="form-control" name="mode" id="serviceMode">
                      <option value="2">Auto (API)</option>
                  </select>
              </div>
            </div>

            <div id="autoMode" style="display: none">
              <div class="service-mode__block">
                <div class="form-group">
                <label>Service Provider</label>
                  <select class="form-control" name="provider" id="provider">
                        <option value="0">Select service provider...</option>\';
                        foreach( $providers as $provider ):
                          $return.=\'<option value="\'.$provider["id"].\'">\'.$provider["api_name"].\'</option>\';
                        endforeach;
                      $return.=\'</select>
                </div>
              </div>
              <div id="provider_service">
              </div>
            </div>
          </div>

          <div id="unlimited">
            <div class="form-group">
              <label class="form-group__service-name">Service price (1000 pieces)</label>
              <input type="text" class="form-control" name="price" value="">
            </div>

            <div class="row">
              <div class="col-md-6 form-group">
                <label class="form-group__service-name">Minimum order</label>
                <input type="text" class="form-control" name="min" value="">
              </div>

              <div class="col-md-6 form-group">
                <label class="form-group__service-name">Maximum order</label>
                <input type="text" class="form-control" name="max" value="">
              </div>
            </div>
          </div>

          <div id="limited">
            <div class="form-group">
              <label class="form-group__service-name">Service price</label>
              <input type="text" class="form-control" name="limited_price" value="">
            </div>



            <div class="row">
              <div class="col-md-6 form-group">
                <label class="form-group__service-name">Shipment amount</label>
                <input type="text" class="form-control" name="autopost" value="">
              </div>

              <div class="col-md-6 form-group">
                <label class="form-group__service-name">Order amount</label>
                <input type="text" class="form-control" name="limited_min" value="">
              </div>
            </div>
            <div class="form-group">
              <label class="form-group__service-name">Package Time <small> (days)</small></label>
              <input type="text" class="form-control" name="autotime" value="">
            </div>
          </div>

          <hr>


          <div class="service-mode__block">
            <div class="form-group">
            <label>Personalized Service</label>
              <select class="form-control" name="secret">
                  <option value="2">No</option>
                  <option value="1">Yes</option>
              </select>
            </div>
          </div>

          <div class="service-mode__block">
            <div class="form-group">
            <label>Service Speed</label>
              <select class="form-control" name="speed">
                  <option value="1">Slow</option>
                  <option value="2">Sometimes Slow</option>
                  <option value="3">Normal</option>
                  <option value="4">Fast</option>
              </select>
            </div>
          </div>

        </div>

          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Add new subscription</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>
          <script type="text/javascript">

          $(".other_services").click(function(){
            var control = $("#translationsList");
            if( control.attr("class") == "hidden" ){
              control.removeClass("hidden");
            } else{
              control.addClass("hidden");
            }
          });

          var site_url  = $("head base").attr("href");
            $("#provider").change(function(){
              var provider = $(this).val();
              getProviderServices(provider,site_url);
            });

            getProvider();
            $("#serviceMode").change(function(){
              getProvider();
            });

            getSalePrice();
            $("#saleprice_cal").change(function(){
              getSalePrice();
            });

            getSubscription();
            $("#subscription_package").change(function(){
              getSubscription();
            });
            function getProviderServices(provider,site_url){
              if( provider == 0 ){
                $("#provider_service").hide();
              }else{
                $.post(site_url+"admin/ajax_data",{action:"providers_list",provider:provider}).done(function( data ) {
                  $("#provider_service").show();
                  $("#provider_service").html(data);
                }).fail(function(){
                  alert("Hata olutu!");
                });
              }
            }

            function getProvider(){
              var mode = $("#serviceMode").val();
                if( mode == 1 ){
                  $("#autoMode").hide();
                }else{
                  $("#autoMode").show();
                }
            }

            function getSalePrice(){
              var type = $("#saleprice_cal").val();
                if( type == "normal" ){
                  $("#saleprice").hide();
                  $("#servicePrice").show();
                }else{
                  $("#saleprice").show();
                  $("#servicePrice").hide();
                }
            }

            function getSubscription(){
              var type = $("#subscription_package").val();
                if( type == "11" || type == "12" ){
                  $("#unlimited").show();
                  $("#limited").hide();
                }else{
                  $("#unlimited").hide();
                  $("#limited").show();
                }
            }
          </script>
          \';
    echo json_encode(["content"=>$return,"title"=>"Add new subscription"]);


elseif( $action == "new_category" ):
    $return = \'<form class="form" action="\' . site_url(\'admin/services/new-category\') . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Category name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="">\' . "
" . \' </div>\' . "


" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-refill">Position  <div class="tooltip5">  <span class="fas fa-info-circle"></span><span class="tooltiptext5">The position of a category after adding it</span></div> </label>\' . "
" . \' <select name="position" class="form-control"><option value="top">Top</option><option value="bottom">Bottom</option></select> \' . "
" . \' </div>\' . "


" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Hidden Category</label>\' . "
" . \'<select class="form-control" name="secret">\' . "
" . \'  <option value="2">No</option>\' . "
" . \'  <option value="1">Yes</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Create category</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
    echo json_encode([\'content\' => $return, \'title\' => \'\']);


  
  elseif( $action == "edit_category" ):
    $id       = $_POST["id"];
    $category = $conn->prepare("SELECT * FROM categories WHERE category_id=:id ");
    $category->execute(array("id"=>$id));
    $category = $category->fetch(PDO::FETCH_ASSOC);
    
    
    
    $return = \'<form class="form" action="\' . site_url(\'admin/services/edit-category/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Category name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $category[\'category_name\'] . \'">\' . "
" . \' </div>\' . "

"  . "


" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Hidden Category</label>\' . "
" . \'<select class="form-control" name="secret">\' . "
" . \'  <option value="2"\';

    if ($category[\'category_secret\'] == 2) {
        $return .= \'selected\';
    }

    $return .= \'>No</option>\' . "
" . \'  <option value="1"\';

    if ($category[\'category_secret\'] == 1) {
        $return .= \'selected\';
    }

    $return .= \'>Yes</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update category</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
    echo json_encode([\'content\' => $return, \'title\' => \'\']);

  elseif( $action == "import_services" ):

$providers  = $conn->prepare("SELECT * FROM service_api   WHERE status=:status    ");     $providers->execute(array(  "status"=>1    ));     $providers  = $providers->fetchAll(PDO::FETCH_ASSOC);
      $category  = $conn->prepare("SELECT * FROM categories");
      $category->execute(array());
      $category  = $category->fetchAll(PDO::FETCH_ASSOC);
    $return = \'<form class="form" action="\'.site_url("admin/services/get_services_add/").\'" method="post" data-xhr="true">
    
        <div class="modal-body">

          <div id="firstStep">
            <div class="service-mode__block">
              <div class="form-group">
              <label>Service Provider</label>
                <select class="form-control" name="provider" id="provider">
                      <option value="0">Select service provider...</option>\';
                      foreach( $providers as $provider ):
                        $return.=\'<option value="\'.$provider["id"].\'">\'.$provider["api_name"].\'</option>\';
                      endforeach;
                    $return.=\'</select>
              </div>
            </div><div class="service-mode__block">
              <div class="form-group">
              <label>Select the Category to Add Services</label>
                <select class="form-control" name="selector" id="selector">
                      <option value="0">Select category...</option>\';
                      foreach( $category as $cat ):
                        $return.=\'<option value="\' . ($cat["category_id"]) . \'">\'.$cat["category_name"].\'</option>\';
                      endforeach;
                    $return.= \'</select>
              </div>
            </div>
          </div>

          
          <div id="secondStep">
          </div>

          <div id="thirdStep">
          </div>


        </div>

          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
            <button type="button" class="btn btn-primary" id="nextStep" data-step="first">Next step</button>
            <button type="submit" class="btn btn-primary" id="submitStep">Add services</button>
          </div>

        </form>
           <script>
            $("#submitStep").hide();
            $("#nextStep").click(function(){
              var now_step = $(this).attr("data-step");
              var provider = $("#provider").val();
              var category = $("#selector").val();
              $("#secondStep").hide();
                if( now_step == "first" ){
                  if( provider == 0 ){
                    $.toast({
                        heading: "Unsuccessful",
                        text: "Please select service provider",
                        icon: "error",
                        loader: true,
                        loaderBg: "#9EC600"
                    });
                  }else{
                    $("#firstStep").hide();
                    $("#secondStep").show();
                    $.post("admin/ajax_data", {provider:provider,category:category,action:"import_services_list" }, function(data){
                      $("#secondStep").html(data);
                    });
                    $("#nextStep").attr("data-step","second");
                  }
                }else if( now_step == "second" ){
                    var array     = [];
                       $(\'[class^="selectServices-"]\').each(function () {
                            var id    = $(this).val();
                            var check = $(this).prop("checked");
                            var provider  =  $(this).attr("data-provider");
                              if( check == true ){
                                var params = {};
                                params["id"]            = id;
                                params["category"]      = $(this).attr("data-category");
                                array.push(params);
                              }
                       });
                       var count = array.length;
                     if( count ){
                       $.post("admin/ajax_data", {provider:provider,action:"import_services_last",services:array }, function(data){
                         $("#thirdStep").html(data);
                       });
                       $("#nextStep").hide();
                       $("#submitStep").show();
                     }else{
                       $("#nextStep").attr("data-step","second");
                       $("#firstStep").hide();
                       $("#secondStep").show();
                       $("#nextStep").show();
                       $("#submitStep").hide();
                       $.toast({
                           heading: "Unsuccessful",
                           text: "Please select at least 1 service you want to add",
                           icon: "error",
                           loader: true,
                           loaderBg: "#9EC600"
                       });
                     }

                }
            });
          </script>
          \';
    echo json_encode(["content"=>$return,"title"=>"Pull out services from provider"]);
  elseif( $action == "import_services_list" ):
    $provider_id  = $_POST["provider"];
    $category_id2  = $_POST["category"];
    $smmapi       = new SMMApi();
    $provider     = $conn->prepare("SELECT * FROM service_api WHERE id=:id");
    $provider     ->execute(array("id"=>$provider_id));
    $provider     = $provider->fetch(PDO::FETCH_ASSOC);
      if( $provider["api_type"] == 1 ):
        $services   = $smmapi->action(array(\'key\'=>$provider["api_key"],\'action\'=>\'services\'),$provider["api_url"]);
          if( $services ):
            $grouped = array_group_by($services, \'category\');
            echo \'<div class="">
             <div class="services-import__body">
                 <div>
                    <div class="services-import__list-wrap">
                       <div class="services-import__scroll-wrap">
					   <label class="btn btn-primary"> <input id="checkk" type="checkbox"> Select All</label>\';
                       foreach($grouped as $category):
                         $category_id++;
                         echo \'
                          <span>
                             <div class="services-import__category">
                                <div class="services-import__category-title">
                                  <label><input type="checkbox" data-id="\'.$category_id.\'" id="checkAll-\'.$category_id.\'">\'.$category[0]->category.\'</label>
                                                                <input type="hidden" name="category" value="\'.$category_id2.\'">
                                </div>
                             </div>
                             <div class="services-import__packages">
                                <ul>\';
                                for($i=0;$i<count($category);$i++):
                                  echo \'<li><label><input data-service="\'.$category[$i]->name.\'" data-provider="\'.$provider["id"].\'"  data-category="\'.$category_id.\'"  class="selectServices-\'.$category_id.\'" type="checkbox" value="\'.$category[$i]->service.\'" name="services[]">\'.$category[$i]->service.\' - \'.$category[$i]->name.\'<span class="services-import__packages-price">\'.priceFormat($category[$i]->rate).\'</span></label></li>\';
                                endfor;
                              echo  \'</ul>
                             </div>
                          </span>\';
                        endforeach;
                        echo \'
                       </div>
                    </div>
                 </div>
              </div>
			   <script> $("#checkk").click(function () {$("#secondStep :checkbox").not(this).prop("checked", this.checked);});</script>
              <script>
              $(\'[id^="checkAll-"]\').click(function () {
                var id = $(this).attr("data-id");
                 if ( $(this).prop("checked") == true ) {
                   $(".selectServices-"+id).not(this).prop("checked", true);
                 }else{
                   $(".selectServices-"+id).not(this).prop("checked", false);
                 }
               });
              </script>
              </div>\';
          else:
            echo "An error occurred, please try later.";
          endif;
      endif;
  elseif( $action == "import_services_last" ):
    $provider_id  = $_POST["provider"];
    $services     = json_decode(json_encode($_POST["services"]));
    $smmapi       = new SMMApi();
    $provider     = $conn->prepare("SELECT * FROM service_api WHERE id=:id");
    $provider     ->execute(array("id"=>$provider_id));
    $provider     = $provider->fetch(PDO::FETCH_ASSOC);
    $apiServices  = $smmapi->action(array(\'key\'=>$provider["api_key"],\'action\'=>\'services\'),$provider["api_url"]);
    $grouped      = array_group_by($services, \'category\');
      echo \'
      <div class="services-import__body">
             <div>
                <div class="services-import__fields">
                   
                   <div class="services-import__step3-field">
                      <div class="services-import__placeholder-title">Select Currency</div><br>
					  <select id="raise-currency" name="currency">
        <option value="" disabled selected>Choose Provider Currency</option>
        <option value="0.0139">INR</option>
        <option value="1">USD</option>
    </select>
                     
                   </div>
                   <div class="services-import__step3-plus">+</div>
                   <div class="services-import__step3-field">
                      <div class="services-import__placeholder-title">Percent (%)</div>
                      <input type="number" placeholder="0" id="raise-percent" name="percent" value="">
                   </div>
				   
                   <div class="services-import__step3-actions"><span class="btn btn-default">Reset calculations</span></div>
                </div>
                <div class="services-import__list-wrap services-import__list-active">
                   <div class="services-import__scroll-wrap">\';
                      $category_id  = 0;
                      $c=0;
                      foreach($grouped as $category):
                          foreach ($apiServices as $key => $value):
                            if( $category[$category_id]->id == $value->service ):
                              $categoryName = $value->category;
                            endif;
                          endforeach;
                          $category_id=$category_id++;
                          $c++;
                        echo \'<span class="providerCategory" id="providerCategory-\'.$c.\'">
                           <div class="services-import__category">
                              <div class="services-import__category-title"><label>\'.$categoryName.\'</label></div>
                           </div>
                           <div class="services-import__packages">
                              <ul>\';
                                for($i=0;$i<count($category);$i++):
                                  foreach ($apiServices as $apiService):
                                    if( $apiService->service == $category[$i]->id  ):
                                      echo \'<li id="providerService-\'.$apiService->service.\'">
                                         <label>
                                            \'.$apiService->service.\' - \'.$apiService->name.\'
                                            <span class="services-import__packages-price-edit" >
                                               <div class="services-import__packages-price-lock" data-category="\'.$c.\'"  data-id="servicedelete-\'.$apiService->service.\'" data-service="\'.$apiService->service.\'">
                                                 <span class="fa fa-trash"></span>
                                               </div>
                                               <div class="services-import__packages-price-lock"  data-id="servicelock-\'.$apiService->service.\'" data-service="\'.$apiService->service.\'">
                                                 <span class="fa fa-unlock"></span>
                                               </div>
                                               <input id="servicePriceCal\'.$apiService->service.\'" type="text" class="services-import__price" data-rate="\'.priceFormat($apiService->rate).\'" data-service="\'.$apiService->service.\'" name="servicesList[\'.$apiService->service.\']" value="\'.priceFormat
                                               ($apiService->rate).\'">
                                               <span class="services-import__provider-price">\'.priceFormat($apiService->rate).\'</span>
                                            </span>
                                         </label>
                                      </li>\';
                                    endif;
                                  endforeach;
                                endfor;
                            echo  \'</ul>
                           </div>
                        </span>\';
                      endforeach;
                   echo \'</div>
                </div>
             </div>
          </div>
          <script>
          function formatCurrency(total) {
              var neg = false;
              if(total < 0) {
                  neg = true;
                  total = Math.abs(total);
              }
              return parseFloat(total, 10).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, "$1,").toString();
          }
          function sum(input){
           if (toString.call(input) !== "[object Array]")
              return false;

                      var total =  0;
                      for(var i=0;i<input.length;i++)
                        {
                          if(isNaN(input[i])){
                          continue;
                           }
                      total += Number(input[i]);
                   }
             return total;
            }
          function chargeService(){
            var add_fixed       = $("#raise-fixed").val();
            var add_percent     = $("#raise-percent").val();
			var add_currency     = $("#raise-currency").val();
            $(".services-import__price").each(function(){
              if( $(this).attr("readonly") != "readonly" ){
                var rate        = $(this).attr("data-rate");
                var service     = $(this).attr("data-service");
                var total = sum([rate,(rate*add_percent/100)])*(add_currency);
                $("#servicePriceCal"+service).val(total);

              }
            });
          }
            $(\'[data-id^="servicedelete-"]\').click(function(){
              var id        = $(this).attr("data-service");
              var category  = $(this).attr("data-category");
              $("li#providerService-"+id).remove();
                if( $("#providerCategory-"+category+" > .services-import__packages > ul > li").length == 0 ){
                  $("#providerCategory-"+category).remove();
                }
            });
            $(\'[data-id^="servicelock-"]\').click(function(){
              var service_id  = $(this).attr("data-service");
              var lock        = $(this).find("span").attr("class");
              if( lock == "fa fa-unlock" ){
                $(this).find("span").removeClass("fa fa-unlock");
                $(this).find("span").addClass("fa fa-lock");
                $(\'[data-service="\'+service_id+\'"]\').attr("readonly",true);
              } else{
                $(this).find("span").removeClass("fa fa-lock");
                $(this).find("span").addClass("fa fa-unlock");
                $(\'[data-service="\'+service_id+\'"]\').attr("readonly",false);
              }
            });

            $(".services-import__step3-actions").click(function(){
              var add_fixed       = $("#raise-fixed").val("");
              var add_percent     = $("#raise-percent").val("");
			  var add_currency     = $("#raise-currency").val("");
              $(".services-import__price").each(function(){
                if( $(this).attr("readonly") != "readonly" ){
                  var rate        = $(this).attr("data-rate");
                  var service     = $(this).attr("data-service");
                    $("#servicePriceCal"+service).val(rate);
                }
              });
            });

            $("#raise-fixed").on("keyup", function(){
              chargeService();
            });

            $("#raise-percent").on("keyup", function(){
              chargeService();
            });
			 $("#raise-currency").on("keyup", function(){
              chargeService();
            });

          </script>
          \';
  elseif( $action == "price_providerCal" ):
    $fixed    = $_POST["fixed"];
    $percent  = $_POST["percent"];
    $rate     = $_POST["rate"];
    $total    = $rate;
      if( is_numeric($percent) && $percent > 0  ):
        $total= $total+($rate*$percent/100);
      endif;
      if( is_numeric($fixed) && $fixed > 0 ):
        $total= $total+$fixed;
      endif;
      echo $total;


elseif( $action == "import_service" ):
    $providers  = $conn->prepare("SELECT * FROM service_api   WHERE status=:status    ");
    $providers->execute(array(  "status"=>1    ));
    $providers  = $providers->fetchAll(PDO::FETCH_ASSOC);

      $category  = $conn->prepare("SELECT * FROM categories");
      $category->execute(array());
      $category  = $category->fetchAll(PDO::FETCH_ASSOC);
    $return = \'<form class="form" action="\'.site_url("admin/services/get_service_add/").\'" method="post" data-xhr="true">
    
        <div class="modal-body">
          <div id="firstStep">
            <div class="service-mode__block">
              <div class="form-group">
              <label>Service Provider</label>
                <select class="form-control" name="provider" id="provider">
                      <option value="0">Select service provider...</option>\';
                      foreach( $providers as $provider ):
                        $return.=\'<option value="\'.$provider["id"].\'">\'.$provider["api_name"].\'</option>\';
                      endforeach;
                    $return.=\'</select>
              </div>
            </div>
          </div>

          
          <div id="secondStep">
          </div>

          <div id="thirdStep">
          </div>


        </div>

          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
            <button type="button" class="btn btn-primary" id="nextStep" data-step="first">Next step</button>
            <button type="submit" class="btn btn-primary" id="submitStep">Add services</button>
          </div>

        </form>
           <script>
            $("#submitStep").hide();
            $("#nextStep").click(function(){
              var now_step = $(this).attr("data-step");
              var provider = $("#provider").val();
              var category = $("#selector").val();
              $("#secondStep").hide();
                if( now_step == "first" ){
                  if( provider == 0 ){
                    $.toast({
                        heading: "Unsuccessful",
                        text: "Please select service provider",
                        icon: "error",
                        loader: true,
                        loaderBg: "#9EC600"
                    });
                  }else{
                    $("#firstStep").hide();
                    $("#secondStep").show();
                    $.post("admin/ajax_data", {provider:provider,category:category,action:"import_services_list" }, function(data){
                      $("#secondStep").html(data);
                    });
                    $("#nextStep").attr("data-step","second");
                  }
                }else if( now_step == "second" ){
                    var array     = [];
                       $(\'[class^="selectServices-"]\').each(function () {
                            var id    = $(this).val();
                            var check = $(this).prop("checked");
                            var provider  =  $(this).attr("data-provider");
                              if( check == true ){
                                var params = {};
                                params["id"]            = id;
                                params["category"]      = $(this).attr("data-category");
                                array.push(params);
                              }
                       });
                       var count = array.length;
                     if( count ){
                       $.post("admin/ajax_data", {provider:provider,action:"import_services_last",services:array }, function(data){
                         $("#thirdStep").html(data);
                       });
                       $("#nextStep").hide();
                       $("#submitStep").show();
                     }else{
                       $("#nextStep").attr("data-step","second");
                       $("#firstStep").hide();
                       $("#secondStep").show();
                       $("#nextStep").show();
                       $("#submitStep").hide();
                       $.toast({
                           heading: "Unsuccessful",
                           text: "Please select at least 1 service you want to add",
                           icon: "error",
                           loader: true,
                           loaderBg: "#9EC600"
                       });
                     }

                }
            });
          </script>
          \';
    echo json_encode(["content"=>$return,"title"=>"Pull out services from provider"]);
  elseif( $action == "import_services_list" ):
    $provider_id  = $_POST["provider"];
    $category_id2  = $_POST["category"];
    $smmapi       = new SMMApi();
    $provider     = $conn->prepare("SELECT * FROM service_api WHERE id=:id");
    $provider     ->execute(array("id"=>$provider_id));
    $provider     = $provider->fetch(PDO::FETCH_ASSOC);
      if( $provider["api_type"] == 1 ):
        $services   = $smmapi->action(array(\'key\'=>$provider["api_key"],\'action\'=>\'services\'),$provider["api_url"]);
          if( $services ):
            $grouped = array_group_by($services, \'category\');
            echo \'<div class="">
            <div class="services-import__body">
                 <div>
                    <div class="services-import__list-wrap">
                       <div class="services-import__scroll-wrap">\';
                       foreach($grouped as $category):
                         $category_id++;
                         echo \'
                          <span>
                             <div class="services-import__category">
                                <div class="services-import__category-title">
                                  <label><input type="checkbox" data-id="\'.$category_id.\'" id="checkAll-\'.$category_id.\'">\'.$category[0]->category.\'</label>
                                                                <input type="hidden" name="category" value="\'.$category_id2.\'">
                                </div>
                             </div>
                             <div class="services-import__packages">
                                <ul>\';
                                for($i=0;$i<count($category);$i++):
                                  echo \'<li><label><input data-service="\'.$category[$i]->name.\'" data-provider="\'.$provider["id"].\'"  data-category="\'.$category_id.\'"  class="selectServices-\'.$category_id.\'" type="checkbox" value="\'.$category[$i]->service.\'" name="services[]">\'.$category[$i]->service.\' - \'.$category[$i]->name.\'<span class="services-import__packages-price">\'.priceFormat($category[$i]->rate).\'</span></label></li>\';
                                endfor;
                              echo  \'</ul>
                             </div>
                          </span>\';
                        endforeach;
                        echo \'
                       </div>
                    </div>
                 </div>
              </div>
              <script>
              $(\'[id^="checkAll-"]\').click(function () {
                var id = $(this).attr("data-id");
                 if ( $(this).prop("checked") == true ) {
                   $(".selectServices-"+id).not(this).prop("checked", true);
                 }else{
                   $(".selectServices-"+id).not(this).prop("checked", false);
                 }
               });
              </script>
              </div>\';
          else:
            echo "An error occurred, please try later.";
          endif;
      endif;
  elseif( $action == "import_services_last" ):
    $provider_id  = $_POST["provider"];
    $services     = json_decode(json_encode($_POST["services"]));
    $smmapi       = new SMMApi();
    $provider     = $conn->prepare("SELECT * FROM service_api WHERE id=:id");
    $provider     ->execute(array("id"=>$provider_id));
    $provider     = $provider->fetch(PDO::FETCH_ASSOC);
    $apiServices  = $smmapi->action(array(\'key\'=>$provider["api_key"],\'action\'=>\'services\'),$provider["api_url"]);
    $grouped      = array_group_by($services, \'category\');
      echo \'
      <div class="services-import__body">
             <div>
                <div class="services-import__fields">
                   
                   <div class="services-import__step3-field">
                      <div class="services-import__placeholder-title">Select Currency</div><br>
					  <select id="raise-currency" name="currency">
        <option value="" disabled selected>Choose Provider Currency</option>
        <option value="0.0139">INR</option>
        <option value="1">USD</option>
    </select>
                     
                   </div>
                   <div class="services-import__step3-plus">+</div>
                   <div class="services-import__step3-field">
                      <div class="services-import__placeholder-title">Percent (%)</div>
                      <input type="number" placeholder="0" id="raise-percent" name="percent" value="">
                   </div>
				   
                   <div class="services-import__step3-actions"><span class="btn btn-default">Reset calculations</span></div>
                </div>
                <div class="services-import__list-wrap services-import__list-active">
                   <div class="services-import__scroll-wrap">\';
                      $category_id  = 0;
                      $c=0;
                      foreach($grouped as $category):
                          foreach ($apiServices as $key => $value):
                            if( $category[$category_id]->id == $value->service ):
                              $categoryName = $value->category;
                            endif;
                          endforeach;
                          $category_id=$category_id++;
                          $c++;
                        echo \'<span class="providerCategory" id="providerCategory-\'.$c.\'">
                           <div class="services-import__category">
                              <div class="services-import__category-title"><label>\'.$categoryName.\'</label></div>
                           </div>
                           <div class="services-import__packages">
                              <ul>\';
                                for($i=0;$i<count($category);$i++):
                                  foreach ($apiServices as $apiService):
                                    if( $apiService->service == $category[$i]->id  ):
                                      echo \'<li id="providerService-\'.$apiService->service.\'">
                                         <label>
                                            \'.$apiService->service.\' - \'.$apiService->name.\'
                                            <span class="services-import__packages-price-edit" >
                                               <div class="services-import__packages-price-lock" data-category="\'.$c.\'"  data-id="servicedelete-\'.$apiService->service.\'" data-service="\'.$apiService->service.\'">
                                                 <span class="fa fa-trash"></span>
                                               </div>
                                               <div class="services-import__packages-price-lock"  data-id="servicelock-\'.$apiService->service.\'" data-service="\'.$apiService->service.\'">
                                                 <span class="fa fa-unlock"></span>
                                               </div>
                                               <input id="servicePriceCal\'.$apiService->service.\'" type="text" class="services-import__price" data-rate="\'.priceFormat($apiService->rate).\'" data-service="\'.$apiService->service.\'" name="servicesList[\'.$apiService->service.\']" value="\'.priceFormat
                                               ($apiService->rate).\'">
                                               <span class="services-import__provider-price">\'.priceFormat($apiService->rate).\'</span>
                                            </span>
                                         </label>
                                      </li>\';
                                    endif;
                                  endforeach;
                                endfor;
                            echo  \'</ul>
                           </div>
                        </span>\';
                      endforeach;
                   echo \'</div>
                </div>
             </div>
          </div>
          <script>
          function formatCurrency(total) {
              var neg = false;
              if(total < 0) {
                  neg = true;
                  total = Math.abs(total);
              }
              return parseFloat(total, 10).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, "$1,").toString();
          }
          function sum(input){
           if (toString.call(input) !== "[object Array]")
              return false;

                      var total =  0;
                      for(var i=0;i<input.length;i++)
                        {
                          if(isNaN(input[i])){
                          continue;
                           }
                      total += Number(input[i]);
                   }
             return total;
            }
          function chargeService(){
            var add_fixed       = $("#raise-fixed").val();
            var add_percent     = $("#raise-percent").val();
			var add_currency     = $("#raise-currency").val();
            $(".services-import__price").each(function(){
              if( $(this).attr("readonly") != "readonly" ){
                var rate        = $(this).attr("data-rate");
                var service     = $(this).attr("data-service");
                var total = sum([rate,(rate*add_percent/100)])*(add_currency);
                $("#servicePriceCal"+service).val(total);

              }
            });
          }
            $(\'[data-id^="servicedelete-"]\').click(function(){
              var id        = $(this).attr("data-service");
              var category  = $(this).attr("data-category");
              $("li#providerService-"+id).remove();
                if( $("#providerCategory-"+category+" > .services-import__packages > ul > li").length == 0 ){
                  $("#providerCategory-"+category).remove();
                }
            });
            $(\'[data-id^="servicelock-"]\').click(function(){
              var service_id  = $(this).attr("data-service");
              var lock        = $(this).find("span").attr("class");
              if( lock == "fa fa-unlock" ){
                $(this).find("span").removeClass("fa fa-unlock");
                $(this).find("span").addClass("fa fa-lock");
                $(\'[data-service="\'+service_id+\'"]\').attr("readonly",true);
              } else{
                $(this).find("span").removeClass("fa fa-lock");
                $(this).find("span").addClass("fa fa-unlock");
                $(\'[data-service="\'+service_id+\'"]\').attr("readonly",false);
              }
            });

            $(".services-import__step3-actions").click(function(){
              var add_fixed       = $("#raise-fixed").val("");
              var add_percent     = $("#raise-percent").val("");
			  var add_currency     = $("#raise-currency").val("");
              $(".services-import__price").each(function(){
                if( $(this).attr("readonly") != "readonly" ){
                  var rate        = $(this).attr("data-rate");
                  var service     = $(this).attr("data-service");
                    $("#servicePriceCal"+service).val(rate);
                }
              });
            });

            $("#raise-fixed").on("keyup", function(){
              chargeService();
            });

            $("#raise-percent").on("keyup", function(){
              chargeService();
            });
			 $("#raise-currency").on("keyup", function(){
              chargeService();
            });

          </script>
          \';
  elseif( $action == "price_providerCal" ):
    $fixed    = $_POST["fixed"];
    $percent  = $_POST["percent"];
    $rate     = $_POST["rate"];
    $total    = $rate;
      if( is_numeric($percent) && $percent > 0  ):
        $total= $total+($rate*$percent/100);
      endif;
      if( is_numeric($fixed) && $fixed > 0 ):
        $total= $total+$fixed;
      endif;
      echo $total;




  
  elseif( $action == "new_ticket" ):
    $return = \'<form class="form" action="\'.site_url("admin/tickets/new").\'" method="post" data-xhr="true">
        <div class="modal-body">

          <div class="form-group">
            <label class="form-group__service-name">Username</label>
            <input type="text" class="form-control" name="username" value="">
          </div>

          <div class="form-group">
            <label class="form-group__service-name">Topic</label>
            <input type="text" class="form-control" name="subject" value="">
          </div>

          <div class="form-group">
            <label class="form-group__service-name">Message</label>
            <textarea class="form-control" name="message" rows="4"></textarea>
          </div>


        </div>

          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Create new request</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>\';
    echo json_encode(["content"=>$return,"title"=>"New support request"]);
	elseif( $action == "yeni_kupon" ):
    $return = \'<form class="form" action="\'.site_url("admin/kuponlar/new").\'" method="post" data-xhr="true">
        <div class="modal-body">

          <div class="form-group">
            <label class="form-group__service-name">Coupon Code</label>
            <input type="text" class="form-control" name="kuponadi" value="">
          </div>

          <div class="form-group">
            <label class="form-group__service-name">Piece</label>
            <input type="text" class="form-control" name="adet" value="">
          </div>

          <div class="form-group">
            <label class="form-group__service-name">Amount</label>
            <input type="text" class="form-control" name="tutar" value="">
          </div>


        </div>

          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Create new coupon</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>
          \';
    echo json_encode(["content"=>$return,"title"=>"Create new coupon"]);
	
elseif( $action == "edit_integration" && $_POST["id"] == "whatsapp" ):
    $id    = $_POST["id"];
    $method = $conn->prepare("SELECT * FROM integrations WHERE method_get=:id ");
    $method->execute(array("id"=>$id));
    $method = $method->fetch(PDO::FETCH_ASSOC);
    $extra  = json_decode($method["method_extras"],true);
    $return = \'<form class="form" action="\' . site_url(\'admin/settings/integrations/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Whatsapp Number</label>\' . "
" . \'  <input type="text" class="form-control" name="number" value="\' . $extra[\'number\'] . \'">\' . "
" . \' Omit any zeroes, brackets, or dashes when adding the phone number in international format. Example: 1XXXXXXXXXX</div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Position</label>\' . "
" . \'<select class="form-control" name="position">\' . "
" . \'  <option value="right"\';

    if ($extra[\'position\'] == "right" ) {
        $return .= \'selected\';
    }

    $return .= \'>Right</option>\' . "
" . \'  <option value="left"\';

    if (extra[\'position\'] == "left" ) {
        $return .= \'selected\';
    }

    $return .= \'>Left</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Status</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

    if ($method[\'method_type\'] == 2) {
        $return .= \'selected\';
    }

    $return .= \'>Enabled</option>\' . "
" . \'  <option value="1"\';

    if ($method[\'method_type\'] == 1) {
        $return .= \'selected\';
    }

    $return .= \'>Disabled</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="visibility">\' . "
" . \'  <option value="2"\';

    if (extra[\'visibility\'] == 2) {
        $return .= \'selected\';
    }

    $return .= \'>All</option>\' . "
" . \' <option value="2"\';

    if (extra[\'visibility\'] == 2) {
        $return .= \'selected\';
    }

    $return .= \'>External</option>\' . "
" . \'  <option value="1"\';

    if ($extra[\'visibility\'] == 1) {
        $return .= \'selected\';
    }

    $return .= \'>Internal</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' </div>\' . "

" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
    echo json_encode([\'content\' => $return, \'title\' => \'Whatsapp Button\']);



elseif ($action == "edit_paymentmethod" && $_POST["id"] == "paypal") :
  $id = $_POST[\'id\'];
    $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
    $method->execute([\'id\' => $id]);
    $method = $method->fetch(PDO::FETCH_ASSOC);
    $extra = json_decode($method[\'method_extras\'], true);
    $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

    if ($method[\'method_type\'] == 2) {
        $return .= \'selected\';
    }

    $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';

    if ($method[\'method_type\'] == 1) {
        $return .= \'selected\';
    }

    $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API callback address: <code>\';
    $return .= site_url(\'payment/\' . $method[\'method_get\']);
    $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Client ID</label>\' . "
" . \'  <input type="text" class="form-control" name="client_id" value="\' . $extra[\'client_id\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Client Secret</label>\' . "
" . \'  <input type="text" class="form-control" name="client_secret" value="\' . $extra[\'client_secret\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Commission, %</label>\' . "
" . \'  <input type="text" class="form-control" name="fee" value="\' . $extra[\'fee\'] . \'">\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
  echo json_encode(["content" => $return, "title" => "Arrange payment method (Method: " . $method["method_name"] . ")"]);



elseif ($action == "edit_paymentmethod" && $_POST["id"] == "stripe") :
  $id = $_POST[\'id\'];
  $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
  $method->execute([\'id\' => $id]);
  $method = $method->fetch(PDO::FETCH_ASSOC);
  $extra = json_decode($method[\'method_extras\'], true);
  $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

  if ($method[\'method_type\'] == 2) {
    $return .= \'selected\';
  }

  $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';

  if ($method[\'method_type\'] == 1) {
    $return .= \'selected\';
  }

  $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API callback address: <code>\';
  $return .= site_url(\'payment/\' . $method[\'method_get\']);
  $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Stripe Publishable Key</label>\' . "
" . \'  <input type="text" class="form-control" name="stripe_publishable_key" value="\' . $extra[\'stripe_publishable_key\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Stripe Secret Key</label>\' . "
" . \'  <input type="text" class="form-control" name="stripe_secret_key" value="\' . $extra[\'stripe_secret_key\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Stripe Webhooks Secret</label>\' . "
" . \'  <input type="text" class="form-control" name="stripe_webhooks_secret" value="\' . $extra[\'stripe_webhooks_secret\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Commission, %</label>\' . "
" . \'  <input type="text" class="form-control" name="fee" value="\' . $extra[\'fee\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Currency</label>\' . "
" . \'  <input type="text" class="form-control" name="currency" value="\' . $extra[\'currency\'] . \'">\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
  echo json_encode([\'content\' => $return, \'title\' => \'\']);
elseif( $action == "edit_paymentmethod" && $_POST["id"] == "perfectmoney" ):
$id = $_POST[\'id\'];
    $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
    $method->execute([\'id\' => $id]);
    $method = $method->fetch(PDO::FETCH_ASSOC);
    $extra = json_decode($method[\'method_extras\'], true);
    $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

    if ($method[\'method_type\'] == 2) {
        $return .= \'selected\';
    }

    $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';

    if ($method[\'method_type\'] == 1) {
        $return .= \'selected\';
    }

    $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API callback address: <code>\';
    $return .= site_url(\'payment/\' . $method[\'method_get\']);
    $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Alternate Passphrase</label>\' . "
" . \'  <input type="text" class="form-control" name="passphrase" value="\' . $extra[\'passphrase\'] . \'">\' . "
" . \' </div>\' . "
" . \'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">USD ID</label>\' . "
" . \'  <input type="text" class="form-control" name="usd" value="\' . $extra[\'usd\'] . \'">\' . "
" . \' </div>\' . "
" . \'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Merchant Website Name</label>\' . "
" . \'  <input type="text" class="form-control" name="merchant_website" value="\' . $extra[\'merchant_website\'] . \'">\' . "
" . \' </div>\' . "
" . \'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Commission, %</label>\' . "
" . \'  <input type="text" class="form-control" name="fee" value="\' . $extra[\'fee\'] . \'">\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
    echo json_encode([\'content\' => $return, \'title\' => \'\']);
elseif( $action == "edit_paymentmethod" && $_POST["id"] == "payeer" ):
    $id = $_POST[\'id\'];
    $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
    $method->execute([\'id\' => $id]);
    $method = $method->fetch(PDO::FETCH_ASSOC);
    $extra = json_decode($method[\'method_extras\'], true);
    $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

    if ($method[\'method_type\'] == 2) {
        $return .= \'selected\';
    }

    $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';

    if ($method[\'method_type\'] == 1) {
        $return .= \'selected\';
    }

    $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API callback address: <code>\';
    $return .= site_url(\'payment/\' . $method[\'method_get\']);
    $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Client Secret</label>\' . "
" . \'  <input type="text" class="form-control" name="client_secret" value="\' . $extra[\'client_secret\'] . \'">\' .\'<label class="form-group__service-name">M Shop</label>\' . "
" . \'  <input type="text" class="form-control" name="m_shop" value="\' . $extra[\'m_shop\'] . \'">\'  . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
    echo json_encode([\'content\' => $return, \'title\' => \'\']);

elseif( $action == "edit_paymentmethod" && $_POST["id"] == "Coinbase" ):
            $id = $_POST[\'id\'];
                $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
                $method->execute([\'id\' => $id]);
                $method = $method->fetch(PDO::FETCH_ASSOC);
                $extra = json_decode($method[\'method_extras\'], true);
                $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';
            
                if ($method[\'method_type\'] == 2) {
                    $return .= \'selected\';
                }
            
                $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';
            
                if ($method[\'method_type\'] == 1) {
                    $return .= \'selected\';
                }
            
                $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API callback address: <code>\';
                $return .= site_url(\'payment/\' . $method[\'method_get\']);
                $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" . "
" . \'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">API KEY</label>\' . "
" . \'  <input type="text" class="form-control" name="api_key" value="\' . $extra[\'api_key\'] . \'">\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">WEBHOOK SHARED API KEY</label>\' . "
" . \'  <input type="text" class="form-control" name="webhook_api" value="\' . $extra[\'webhook_api\'] . \'">\' . "
" . \' </div>\' . "


" .\'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">COMMISSION</label>\' . "
" . \'  <input type="text" class="form-control" name="fee" value="\' . $extra[\'fee\'] . \'">\' . "
" . \' </div>\' . \'</div>\'. \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
                echo json_encode([\'content\' => $return, \'title\' => \'\']);
            
            
            

    elseif( $action == "edit_paymentmethod" && $_POST["id"] == "Webmoney" ):
      $id = $_POST[\'id\'];
          $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
          $method->execute([\'id\' => $id]);
          $method = $method->fetch(PDO::FETCH_ASSOC);
          $extra = json_decode($method[\'method_extras\'], true);
          $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';
      
          if ($method[\'method_type\'] == 2) {
              $return .= \'selected\';
          }
      
          $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';
      
          if ($method[\'method_type\'] == 1) {
              $return .= \'selected\';
          }
      
          $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API callback address: <code>\';
          $return .= site_url(\'payment/\' . $method[\'method_get\']);
          $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" . "
" . \'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">WMID</label>\' . "
" . \'  <input type="text" class="form-control" name="wmid" value="\' . $extra[\'wmid\'] . \'">\' . "
".\'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">MERCHANT PURSE</label>\' . "
" . \'  <input type="text" class="form-control" name="purse" value="\' . $extra[\'purse\'] . \'">\' . "
" . \' </div>\'
          .\'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">COMMISSION</label>\' . "
" . \'  <input type="text" class="form-control" name="fee" value="\' . $extra[\'fee\'] . \'">\' . "
" . \' </div>\' . \' </div>\' . "


" . \'</div>\'. \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
          echo json_encode([\'content\' => $return, \'title\' => \'\']);
            
      
  elseif( $action == "edit_paymentmethod" && $_POST["id"] == "UnityPay" ):
    $id = $_POST[\'id\'];
        $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
        $method->execute([\'id\' => $id]);
        $method = $method->fetch(PDO::FETCH_ASSOC);
        $extra = json_decode($method[\'method_extras\'], true);
        $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';
    
        if ($method[\'method_type\'] == 2) {
            $return .= \'selected\';
        }
    
        $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';
    
        if ($method[\'method_type\'] == 1) {
            $return .= \'selected\';
        }
    
        $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API callback address: <code>\';
        $return .= site_url(\'payment/\' . $method[\'method_get\']);
        $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" . "
" . \'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">SECRET KEY</label>\' . "
" . \'  <input type="text" class="form-control" name="secret_key" value="\' . $extra[\'secret_key\'] . \'">\' . "
" . \' </div>\' . "


" . \'</div>\'. \'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">PUBLIC ID</label>\' . "
" . \'  <input type="text" class="form-control" name="reg_email" value="\' . $extra[\'reg_email\'] . \'">\' . "
" . \' </div>\' . \'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">COMMISSION</label>\' . "
" . \'  <input type="text" class="form-control" name="fee" value="\' . $extra[\'fee\'] . \'">\' . "
" . \' </div>\' ."


" . \'</div>\'.\' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
        echo json_encode([\'content\' => $return, \'title\' => \'\']);

elseif ($action == "edit_paymentmethod" && $_POST["id"] == "coinpayments") :
  $id = $_POST[\'id\'];
  $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
  $method->execute([\'id\' => $id]);
  $method = $method->fetch(PDO::FETCH_ASSOC);
  $extra = json_decode($method[\'method_extras\'], true);
  $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

  if ($method[\'method_type\'] == 2) {
    $return .= \'selected\';
  }

  $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';

  if ($method[\'method_type\'] == 1) {
    $return .= \'selected\';
  }

  $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API callback address: <code>\';
  $return .= site_url(\'payment/\' . $method[\'method_get\']);
  $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Coinpayments Public Key</label>\' . "
" . \'  <input type="text" class="form-control" name="coinpayments_public_key" value="\' . $extra[\'coinpayments_public_key\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Coinpayments Private Key</label>\' . "
" . \'  <input type="text" class="form-control" name="coinpayments_private_key" value="\' . $extra[\'coinpayments_private_key\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Coinpayments Crypto Currency</label>\' . "
" . \'  <input type="text" class="form-control" name="coinpayments_currency" value="\' . $extra[\'coinpayments_currency\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Merchant ID</label>\' . "
" . \'  <input type="text" class="form-control" name="merchant_id" value="\' . $extra[\'merchant_id\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">IPN Secret</label>\' . "
" . \'  <input type="text" class="form-control" name="ipn_secret" value="\' . $extra[\'ipn_secret\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Commission, %</label>\' . "
" . \'  <input type="text" class="form-control" name="fee" value="\' . $extra[\'fee\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Currency</label>\' . "
" . \'  <input type="text" class="form-control" name="currency" value="\' . $extra[\'currency\'] . \'">\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
  echo json_encode([\'content\' => $return, \'title\' => \'\']);
elseif ($action == "edit_paymentmethod" && $_POST["id"] == "2checkout") :
  $id = $_POST[\'id\'];
  $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
  $method->execute([\'id\' => $id]);
  $method = $method->fetch(PDO::FETCH_ASSOC);
  $extra = json_decode($method[\'method_extras\'], true);
  $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

  if ($method[\'method_type\'] == 2) {
    $return .= \'selected\';
  }

  $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';

  if ($method[\'method_type\'] == 1) {
    $return .= \'selected\';
  }

  $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API callback address: <code>\';
  $return .= site_url(\'payment/\' . $method[\'method_get\']);
  $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Seller ID</label>\' . "
" . \'  <input type="text" class="form-control" name="seller_id" value="\' . $extra[\'seller_id\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Private Key</label>\' . "
" . \'  <input type="text" class="form-control" name="private_key" value="\' . $extra[\'private_key\'] . \'">\' . "
" . \' </div>\' . "
" . \'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Commission, %</label>\' . "
" . \'  <input type="text" class="form-control" name="fee" value="\' . $extra[\'fee\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Currency</label>\' . "
" . \'  <input type="text" class="form-control" name="currency" value="\' . $extra[\'currency\'] . \'">\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
  echo json_encode([\'content\' => $return, \'title\' => \'\']);
elseif ($action == "edit_paymentmethod" && $_POST["id"] == "payoneer") :
  $id = $_POST[\'id\'];
  $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
  $method->execute([\'id\' => $id]);
  $method = $method->fetch(PDO::FETCH_ASSOC);
  $extra = json_decode($method[\'method_extras\'], true);
  $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

  if ($method[\'method_type\'] == 2) {
    $return .= \'selected\';
  }

  $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';

  if ($method[\'method_type\'] == 1) {
    $return .= \'selected\';
  }

  $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Email</label>\' . "
" . \'  <input type="text" class="form-control" name="email" value="\' . $extra[\'email\'] . \'">\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
  echo json_encode([\'content\' => $return, \'title\' => \'\']);

elseif ($action == "edit_paymentmethod" && $_POST["id"] == "mollie") :
  $id = $_POST[\'id\'];
  $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
  $method->execute([\'id\' => $id]);
  $method = $method->fetch(PDO::FETCH_ASSOC);
  $extra = json_decode($method[\'method_extras\'], true);
  $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

  if ($method[\'method_type\'] == 2) {
    $return .= \'selected\';
  }

  $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';

  if ($method[\'method_type\'] == 1) {
    $return .= \'selected\';
  }

  $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API callback address: <code>\';
  $return .= site_url(\'payment/\' . $method[\'method_get\']);
  $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Live API key</label>\' . "
" . \'  <input type="text" class="form-control" name="live_api_key" value="\' . $extra[\'live_api_key\'] . \'">\' . "
" . \' </div>\' . "
" . \'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Commission, %</label>\' . "
" . \'  <input type="text" class="form-control" name="fee" value="\' . $extra[\'fee\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Currency</label>\' . "
" . \'  <input type="text" class="form-control" name="currency" value="\' . $extra[\'currency\'] . \'">\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
  echo json_encode([\'content\' => $return, \'title\' => \'\']);


elseif ($action == "edit_paymentmethod" && $_POST["id"] == "paytm") :
  $id = $_POST[\'id\'];
  $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
  $method->execute([\'id\' => $id]);
  $method = $method->fetch(PDO::FETCH_ASSOC);
  $extra = json_decode($method[\'method_extras\'], true);
  $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

  if ($method[\'method_type\'] == 2) {
    $return .= \'selected\';
  }

  $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';

  if ($method[\'method_type\'] == 1) {
    $return .= \'selected\';
  }

  $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API callback address: <code>\';
  $return .= site_url(\'payment/\' . $method[\'method_get\']);
  $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Merchant Key</label>\' . "
" . \'  <input type="text" class="form-control" name="merchant_key" value="\' . $extra[\'merchant_key\'] . \'">\' . "
" . \' </div>\' . "
" . \'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Merchant MID</label>\' . "
" . \'  <input type="text" class="form-control" name="merchant_mid" value="\' . $extra[\'merchant_mid\'] . \'">\' . "
" . \' </div>\' . "
" . \'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Merchant Website</label>\' . "
" . \'  <input type="text" class="form-control" name="merchant_website" value="\' . $extra[\'merchant_website\'] . \'">\' . "
" . \' </div>\' . "
" . \'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Commission, %</label>\' . "
" . \'  <input type="text" class="form-control" name="fee" value="\' . $extra[\'fee\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Currency</label>\' . "
" . \'  <input type="text" class="form-control" name="currency" value="\' . $extra[\'currency\'] . \'" readonly>\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
  echo json_encode([\'content\' => $return, \'title\' => \'\']);


elseif (($action == \'edit_paymentmethod\') && ($_POST[\'id\'] == \'Cashmaal\')) :
  $id = $_POST[\'id\'];
  $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
  $method->execute([\'id\' => $id]);
  $method = $method->fetch(PDO::FETCH_ASSOC);
  $extra = json_decode($method[\'method_extras\'], true);
  $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

  if ($method[\'method_type\'] == 2) {
    $return .= \'selected\';
  }

  $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';

  if ($method[\'method_type\'] == 1) {
    $return .= \'selected\';
  }

  $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API callback address: <code>\';
  $return .= site_url(\'payment/\' . $method[\'method_get\']);
  $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Web ID</label>\' . "
" . \'  <input type="text" class="form-control" name="web_id" value="\' . $extra[\'web_id\'] . \'">\' . "
" . \' </div>\' . "
" . \'<div class="form-group">\' . "
" .  \'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Commission, %</label>\' . "
" . \'  <input type="text" class="form-control" name="fee" value="\' . $extra[\'fee\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Currency</label>\' . "
" . \'  <input type="text" class="form-control" name="currency" value="\' . $extra[\'currency\'] . \'" readonly>\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
  echo json_encode([\'content\' => $return, \'title\' => \'\']);



elseif ($action == "edit_paymentmethod" && $_POST["id"] == "instamojo") :
  $id = $_POST[\'id\'];
  $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
  $method->execute([\'id\' => $id]);
  $method = $method->fetch(PDO::FETCH_ASSOC);
  $extra = json_decode($method[\'method_extras\'], true);
  $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

  if ($method[\'method_type\'] == 2) {
    $return .= \'selected\';
  }

  $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';

  if ($method[\'method_type\'] == 1) {
    $return .= \'selected\';
  }

  $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API callback address: <code>\';
  $return .= site_url(\'payment/\' . $method[\'method_get\']);
  $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Live API Key</label>\' . "
" . \'  <input type="text" class="form-control" name="api_key" value="\' . $extra[\'api_key\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Live Auth Token Key</label>\' . "
" . \'  <input type="text" class="form-control" name="live_auth_token_key" value="\' . $extra[\'live_auth_token_key\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Commission, %</label>\' . "
" . \'  <input type="text" class="form-control" name="fee" value="\' . $extra[\'fee\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Currency</label>\' . "
" . \'  <input type="text" class="form-control" name="currency" value="\' . $extra[\'currency\'] . \'">\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
  echo json_encode([\'content\' => $return, \'title\' => \'\']);
  
  
  
elseif ($action == "edit_paymentmethod" && $_POST["id"] == "anypay") :
$id = $_POST[\'id\'];
$method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
$method->execute([\'id\' => $id]);
$method = $method->fetch(PDO::FETCH_ASSOC);
$extra = json_decode($method[\'method_extras\'], true);
$return = \'
<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">
   \' . "

" . \'
   <div class="modal-body">
      \' . "

" . \' 
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>
      \' . "

" . \' 
      <div class="service-mode__block">
         \' . "
" . \'  
         <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';
            if ($method[\'method_type\'] == 2) {
            $return .= \'selected\';
            }
            $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';
            if ($method[\'method_type\'] == 1) {
            $return .= \'selected\';
            }
            $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  
         </div>
         \' . "
" . \' 
      </div>
      \' . "

" . \' 
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>
      \' . "

" . \' 
       <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'" >\' . "
" . \' </div>
      \' . "

" . \' 
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>
      \' . "

" . \' 
      <hr>
      \' . "
" . \'  
      <p class="card-description">\' . "
" . \'
      <ul>
         \' . "
" . \'
         <li>\' . "
" . \' API callback address: <code>\';
            $return .= site_url(\'payment/\' . $method[\'method_get\']);
            $return .= \'</code>\' . "
" . \'
         </li>
         \' . "
" . \'
      </ul>
      \' . "
" . \'  </p>\' . "
" . \' 
      <hr>
      \' . "

" . \' 
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Project_id</label>\' . "
" . \'  <input type="text" class="form-control" name="project_id" value="\' . $extra[\'project_id\'] . \'">\' . "
" . \' </div>
      \' . "
" . \' 
     
      
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Secret_key</label>\' . "
" . \'  <input type="text" class="form-control" name="secret_key" value="\' . $extra[\'secret_key\'] . \'">\' . "
" . \' </div>
      \' . "


" . \'
   </div>
   \' . "

" . \'       <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Currency</label>\' . "
" . \'  <input type="text" class="form-control" name="currency" value="\' . $extra[\'currency\'] . \'">\' . "
" . \' </div>
      \' . "


" . \'
   </div>
   \' . "

" . \' 
   <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>
   \' . "
" . \' 
</form>
\';
echo json_encode([\'content\' => $return, \'title\' => \'\']);
elseif ($action == "edit_paymentmethod" && $_POST["id"] == "binance") :
$id = $_POST[\'id\'];
$method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
$method->execute([\'id\' => $id]);
$method = $method->fetch(PDO::FETCH_ASSOC);
$extra = json_decode($method[\'method_extras\'], true);
$return = \'
<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">
   \' . "

" . \'
   <div class="modal-body">
      \' . "

" . \' 
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>
      \' . "

" . \' 
      <div class="service-mode__block">
         \' . "
" . \'  
         <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';
            if ($method[\'method_type\'] == 2) {
            $return .= \'selected\';
            }
            $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';
            if ($method[\'method_type\'] == 1) {
            $return .= \'selected\';
            }
            $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  
         </div>
         \' . "
" . \' 
      </div>
      \' . "

" . \' 
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>
      \' . "

" . \' 
       <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'" >\' . "
" . \' </div>
      \' . "

" . \' 
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>
      \' . "

" . \' 
      <hr>
      \' . "
" . \'  
      <p class="card-description">\' . "
" . \'
      <ul>
         \' . "
" . \'
         <li>\' . "
" . \' API callback address: <code>\';
            $return .= site_url(\'payment/\' . $method[\'method_get\']);
            $return .= \'</code>\' . "
" . \'
         </li>
         \' . "
" . \'
      </ul>
      \' . "
" . \'  </p>\' . "
" . \' 
      <hr>
      \' . "

" . \' 
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Binance_Pay_Secret</label>\' . "
" . \'  <input type="text" class="form-control" name="binance_pay_secret" value="\' . $extra[\'binance_pay_secret\'] . \'">\' . "
" . \' </div>
      \' . "
" . \' 
     
      
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Binance_Pay_Key</label>\' . "
" . \'  <input type="text" class="form-control" name="binance_pay_key" value="\' . $extra[\'binance_pay_key\'] . \'">\' . "
" . \' </div>
      \' . "


" . \'
   </div>
   \' . "

" . \' 

<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Fee</label>\' . "
" . \'  <input type="text" class="form-control" name="fee" value="\' . $extra[\'fee\'] . \'">\' . "
" . \' </div>
      \' . "


" . \'
   </div>
   \' . "

" . \' 
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Currency</label>\' . "
" . \'  <input type="text" class="form-control" name="currency" value="\' . $extra[\'currency\'] . \'">\' . "
" . \' </div>
      \' . "


" . \'
   </div>
   \' . "

" . \' 
   <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>
   \' . "
" . \' 
</form>
\';
echo json_encode([\'content\' => $return, \'title\' => \'\']);






elseif ($action == "edit_paymentmethod" && $_POST["id"] == "manual_get") :
$id = $_POST[\'id\'];
    $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id\');
    $method->execute([\'id\' => $id]);
    $method = $method->fetch(PDO::FETCH_ASSOC);
    $extra = json_decode($method[\'method_extras\'], true);

    $return = \'
<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">
    <div class="modal-body">
        <div class="form-group">
            <label class="form-group__service-name">Method name</label>
            <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">
        </div>
        
        <div class="service-mode__block">
            <div class="form-group">
                <label>Visibility</label>
                <select class="form-control" name="method_type">
                    <option value="2"\' . ($method[\'method_type\'] == 2 ? \' selected\' : \'\') . \'>Active</option>
                    <option value="1"\' . ($method[\'method_type\'] == 1 ? \' selected\' : \'\') . \'>Inactive</option>
                </select>
            </div>
        </div>
        
        <div class="form-group">
            <label class="form-group__service-name">Visible name</label>
            <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">
        </div>
        
        <div class="form-group">
            <label class="form-group__service-name">Minimum Payment</label>
            <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">
        </div>
        
        <div class="form-group">
            <label class="form-group__service-name">Maximum Payment</label>
            <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">
        </div>
        
        <hr>
        
        <p class="card-description">
            <ul>
                <li>API callback address: <code>\' . site_url(\'payment/\' . $method[\'method_get\']) . \'</code></li>
            </ul>
        </p>
        
        <hr>
        
        <div class="form-group">
            <label class="control-label">\' . $label . \'</label>
            <div>
                <textarea class="form-control" id="summernoteExample" rows="5" name="instruction">\' . $method[\'inst\'] . \'</textarea>
            </div>
        </div>
    </div>
    
    <div class="modal-footer">
        <button type="submit" class="btn btn-primary">Update</button>
        <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
    </div>
</form>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/summernote-bs4.min.js"></script>
<script>
    $(document).ready(function() {
        $("#summernoteExample").summernote({
            height: 200,
            codemirror: {
                theme: "default"
            },
            toolbar: [
                ["style", ["bold", "italic", "underline", "clear"]],
                ["fontsize", ["fontsize"]],
                ["color", ["color"]],
                ["para", ["ul", "ol", "paragraph"]],
                ["height", ["height"]],
                ["html", ["codeview"]],
                ["fullscreen", ["fullscreen"]]
            ],
            callbacks: {
                onImageLinkInsert: function(url) {
                    var imageLinkHTML = "<a href=\'" + url + "\'><img src=\'" + url + "\'></a>";
                    $("#summernoteExample").summernote("pasteHTML", imageLinkHTML);
                }
            }
        });
    });
</script>\';


echo json_encode([\'content\' => $return, \'title\' => \'\']);
elseif ($action == "edit_paymentmethod" && $_POST["id"] == "manual_get1") :
$id = $_POST[\'id\'];
    $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id\');
    $method->execute([\'id\' => $id]);
    $method = $method->fetch(PDO::FETCH_ASSOC);
    $extra = json_decode($method[\'method_extras\'], true);

    $return = \'
<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">
    <div class="modal-body">
        <div class="form-group">
            <label class="form-group__service-name">Method name</label>
            <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">
        </div>
        
        <div class="service-mode__block">
            <div class="form-group">
                <label>Visibility</label>
                <select class="form-control" name="method_type">
                    <option value="2"\' . ($method[\'method_type\'] == 2 ? \' selected\' : \'\') . \'>Active</option>
                    <option value="1"\' . ($method[\'method_type\'] == 1 ? \' selected\' : \'\') . \'>Inactive</option>
                </select>
            </div>
        </div>
        
        <div class="form-group">
            <label class="form-group__service-name">Visible name</label>
            <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">
        </div>
        
        <div class="form-group">
            <label class="form-group__service-name">Minimum Payment</label>
            <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">
        </div>
        
        <div class="form-group">
            <label class="form-group__service-name">Maximum Payment</label>
            <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">
        </div>
        
        <hr>
        
        <p class="card-description">
            <ul>
                <li>API callback address: <code>\' . site_url(\'payment/\' . $method[\'method_get\']) . \'</code></li>
            </ul>
        </p>
        
        <hr>
        
        <div class="form-group">
            <label class="control-label">\' . $label . \'</label>
            <div>
                <textarea class="form-control" id="summernoteExample" rows="5" name="instruction">\' . $method[\'inst\'] . \'</textarea>
            </div>
        </div>
    </div>
    
    <div class="modal-footer">
        <button type="submit" class="btn btn-primary">Update</button>
        <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
    </div>
</form>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/summernote-bs4.min.js"></script>
<script>
    $(document).ready(function() {
        $("#summernoteExample").summernote({
            height: 200,
            codemirror: {
                theme: "default"
            },
            toolbar: [
                ["style", ["bold", "italic", "underline", "clear"]],
                ["fontsize", ["fontsize"]],
                ["color", ["color"]],
                ["para", ["ul", "ol", "paragraph"]],
                ["height", ["height"]],
                ["html", ["codeview"]],
                ["fullscreen", ["fullscreen"]]
            ],
            callbacks: {
                onImageLinkInsert: function(url) {
                    var imageLinkHTML = "<a href=\'" + url + "\'><img src=\'" + url + "\'></a>";
                    $("#summernoteExample").summernote("pasteHTML", imageLinkHTML);
                }
            }
        });
    });
</script>\';

    echo json_encode([\'content\' => $return, \'title\' => \'\']);
    
    elseif (($action == \'edit_paymentmethod\') && ($_POST[\'id\'] == \'uddoktaPay\')) :
    $id = $_POST[\'id\'];
    $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
    $method->execute([\'id\' => $id]);
    $method = $method->fetch(PDO::FETCH_ASSOC);
    $extra = json_decode($method[\'method_extras\'], true);
    $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

    if ($method[\'method_type\'] == 2) {
        $return .= \'selected\';
    }

    $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';

    if ($method[\'method_type\'] == 1) {
        $return .= \'selected\';
    }

    $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API callback address: <code>\';
    $return .= site_url(\'payment/\' . $method[\'method_get\']);
    $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">API Key</label>\' . "
" . \'  <input type="text" class="form-control" name="api_key" value="\' . $extra[\'api_key\'] . \'">\' . "
" . \' </div>\' . "
" . \'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">API URL</label>\' . "
" . \'  <input type="text" class="form-control" name="api_url" value="\' . $extra[\'api_url\'] . \'">\' . "
" . \' </div>\' . "
" . \'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">USD Exchange Rate</label>\' . "
" . \'  <input type="text" class="form-control" name="exchange_rate" value="\' . $extra[\'exchange_rate\'] . \'">\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
    echo json_encode([\'content\' => $return, \'title\' => \'\']);
    
    
elseif (($action == \'edit_paymentmethod\') && ($_POST[\'id\'] == \'mercadopago\')) :
    $id = $_POST[\'id\'];
    $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
    $method->execute([\'id\' => $id]);
    $method = $method->fetch(PDO::FETCH_ASSOC);
    $extra = json_decode($method[\'method_extras\'], true);
    $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Nome do mtodo</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibilidade</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

    if ($method[\'method_type\'] == 2) {
        $return .= \'selected\';
    }

    $return .= \'>Ativado</option>\' . "
" . \'  <option value="1"\';

    if ($method[\'method_type\'] == 1) {
        $return .= \'selected\';
    }

    $return .= \'>Desativado</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Nome visvel</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Pagamento minimo</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Pagamento Mximo</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' Endereo de retorno de API: <code>\';
    $return .= site_url(\'payment/\' . $method[\'method_get\']);
    $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Acesso Token (Produo)</label>\' . "
" . \'  <input type="text" class="form-control" name="live_access_token" value="\' . $extra[\'live_access_token\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Comisso, %</label>\' . "
" . \'  <input type="text" class="form-control" name="fee" value="\' . $extra[\'fee\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Moeda</label>\' . "
" . \'  <input type="text" class="form-control" name="currency" value="\' . $extra[\'currency\'] . \'">\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Atualizar</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
    echo json_encode([\'content\' => $return, \'title\' => \'\']);
	

elseif ($action == "edit_paymentmethod" && $_POST["id"] == "paystack") :
  $id = $_POST[\'id\'];
  $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
  $method->execute([\'id\' => $id]);
  $method = $method->fetch(PDO::FETCH_ASSOC);
  $extra = json_decode($method[\'method_extras\'], true);
  $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

  if ($method[\'method_type\'] == 2) {
    $return .= \'selected\';
  }

  $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';

  if ($method[\'method_type\'] == 1) {
    $return .= \'selected\';
  }

  $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API callback address: <code>\';
  $return .= site_url(\'payment/\' . $method[\'method_get\']);
  $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">API Secret Key</label>\' . "
" . \'  <input type="text" class="form-control" name="api_secret_key" value="\' . $extra[\'api_secret_key\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">API Publish Key</label>\' . "
" . \'  <input type="text" class="form-control" name="api_publish_key" value="\' . $extra[\'api_publish_key\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Commission, %</label>\' . "
" . \'  <input type="text" class="form-control" name="fee" value="\' . $extra[\'fee\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Currency</label>\' . "
" . \'  <input type="text" class="form-control" name="currency" value="\' . $extra[\'currency\'] . \'">\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
  echo json_encode([\'content\' => $return, \'title\' => \'\']);


elseif (($action == \'edit_paymentmethod\') && ($_POST[\'id\'] == \'cardinity\')) :
    $id = $_POST[\'id\'];
    $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
    $method->execute([\'id\' => $id]);
    $method = $method->fetch(PDO::FETCH_ASSOC);
    $extra = json_decode($method[\'method_extras\'], true);
    $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

    if ($method[\'method_type\'] == 2) {
        $return .= \'selected\';
    }

    $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';

    if ($method[\'method_type\'] == 1) {
        $return .= \'selected\';
    }

    $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API callback address: <code>\';
    $return .= site_url(\'payment/\' . $method[\'method_get\']);
    $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Project_Id</label>\' . "
" . \'  <input type="text" class="form-control" name="key" value="\' . $extra[\'key\'] . \'">\' . "
" . \' </div>\' . "
" . \'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Project_Secret</label>\' . "
" . \'  <input type="text" class="form-control" name="secret" value="\' . $extra[\'secret\'] . \'">\' . "
" . \' </div>\' . "
" . \'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Currency</label>\' . "
" . \'  <input type="text" class="form-control" name="currency" value="\' . $extra[\'currency\'] . \'">\' . "
" . \' </div>\' . "
" . \'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Commission, %</label>\' . "
" . \'  <input type="text" class="form-control" name="fee" value="\' . $extra[\'fee\'] . \'">\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
    echo json_encode([\'content\' => $return, \'title\' => \'\']);

               
             

elseif ($action == "edit_paymentmethod" && $_POST["id"] == "razorpay") :
  $id = $_POST[\'id\'];
  $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
  $method->execute([\'id\' => $id]);
  $method = $method->fetch(PDO::FETCH_ASSOC);
  $extra = json_decode($method[\'method_extras\'], true);
  $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

  if ($method[\'method_type\'] == 2) {
    $return .= \'selected\';
  }

  $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';

  if ($method[\'method_type\'] == 1) {
    $return .= \'selected\';
  }

  $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API callback address: <code>\';
  $return .= site_url(\'payment/\' . $method[\'method_get\']);
  $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">API Key</label>\' . "
" . \'  <input type="text" class="form-control" name="api_key" value="\' . $extra[\'api_key\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">API Secret Key</label>\' . "
" . \'  <input type="text" class="form-control" name="api_secret_key" value="\' . $extra[\'api_secret_key\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Commission, %</label>\' . "
" . \'  <input type="text" class="form-control" name="fee" value="\' . $extra[\'fee\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Currency</label>\' . "
" . \'  <input type="text" class="form-control" name="currency" value="\' . $extra[\'currency\'] . \'">\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
  echo json_encode([\'content\' => $return, \'title\' => \'\']);


elseif ($action == "edit_paymentmethod" && $_POST["id"] == "iyzico") :
  $id = $_POST[\'id\'];
  $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
  $method->execute([\'id\' => $id]);
  $method = $method->fetch(PDO::FETCH_ASSOC);
  $extra = json_decode($method[\'method_extras\'], true);
  $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

  if ($method[\'method_type\'] == 2) {
    $return .= \'selected\';
  }

  $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';

  if ($method[\'method_type\'] == 1) {
    $return .= \'selected\';
  }

  $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API callback address: <code>\';
  $return .= site_url(\'payment/\' . $method[\'method_get\']);
  $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">API Key</label>\' . "
" . \'  <input type="text" class="form-control" name="api_key" value="\' . $extra[\'api_key\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">API Secret Key</label>\' . "
" . \'  <input type="text" class="form-control" name="api_secret_key" value="\' . $extra[\'api_secret_key\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Commission, %</label>\' . "
" . \'  <input type="text" class="form-control" name="fee" value="\' . $extra[\'fee\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Currency</label>\' . "
" . \'  <input type="text" class="form-control" name="currency" value="\' . $extra[\'currency\'] . \'">\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
  echo json_encode([\'content\' => $return, \'title\' => \'\']);


elseif ($action == "edit_paymentmethod" && $_POST["id"] == "authorize-net") :
  $id = $_POST[\'id\'];
  $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
  $method->execute([\'id\' => $id]);
  $method = $method->fetch(PDO::FETCH_ASSOC);
  $extra = json_decode($method[\'method_extras\'], true);
  $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

  if ($method[\'method_type\'] == 2) {
    $return .= \'selected\';
  }

  $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';

  if ($method[\'method_type\'] == 1) {
    $return .= \'selected\';
  }

  $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API callback address: <code>\';
  $return .= site_url(\'payment/\' . $method[\'method_get\']);
  $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">API Login Id</label>\' . "
" . \'  <input type="text" class="form-control" name="api_login_id" value="\' . $extra[\'api_login_id\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Secret Transaction Key</label>\' . "
" . \'  <input type="text" class="form-control" name="secret_transaction_key" value="\' . $extra[\'secret_transaction_key\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Commission, %</label>\' . "
" . \'  <input type="text" class="form-control" name="fee" value="\' . $extra[\'fee\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Currency</label>\' . "
" . \'  <input type="text" class="form-control" name="currency" value="\' . $extra[\'currency\'] . \'">\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
  echo json_encode([\'content\' => $return, \'title\' => \'\']);




elseif ($action == "edit_paymentmethod" && $_POST["id"] == "mercadopago") :
  $id = $_POST[\'id\'];
  $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
  $method->execute([\'id\' => $id]);
  $method = $method->fetch(PDO::FETCH_ASSOC);
  $extra = json_decode($method[\'method_extras\'], true);
  $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

  if ($method[\'method_type\'] == 2) {
    $return .= \'selected\';
  }

  $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';

  if ($method[\'method_type\'] == 1) {
    $return .= \'selected\';
  }

  $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API callback address: <code>\';
  $return .= site_url(\'payment/\' . $method[\'method_get\']);
  $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Live Access Token</label>\' . "
" . \'  <input type="text" class="form-control" name="live_access_token" value="\' . $extra[\'live_access_token\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Commission, %</label>\' . "
" . \'  <input type="text" class="form-control" name="fee" value="\' . $extra[\'fee\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Currency</label>\' . "
" . \'  <input type="text" class="form-control" name="currency" value="\' . $extra[\'currency\'] . \'">\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
  echo json_encode([\'content\' => $return, \'title\' => \'\']);





elseif ($action == "edit_paymentmethod" && $_POST["id"] == "pix_auto") :
    $id = $_POST[\'id\'];
$method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
$method->execute([\'id\' => $id]);
$method = $method->fetch(PDO::FETCH_ASSOC);
$extra = json_decode($method[\'method_extras\'], true);
$return = \'
<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">
   \' . "

" . \'
   <div class="modal-body">
      \' . "

" . \' 
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>
      \' . "

" . \' 
      <div class="service-mode__block">
         \' . "
" . \'  
         <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';
            if ($method[\'method_type\'] == 2) {
            $return .= \'selected\';
            }
            $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';
            if ($method[\'method_type\'] == 1) {
            $return .= \'selected\';
            }
            $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  
         </div>
         \' . "
" . \' 
      </div>
      \' . "

" . \' 
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>
      \' . "

" . \' 
       <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'" >\' . "
" . \' </div>
      \' . "

" . \' 
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>
      \' . "

" . \' 
      <hr>
      \' . "
" . \'  
      <p class="card-description">\' . "
" . \'
      <ul>
         \' . "
" . \'
         <li>\' . "
" . \' API callback address: <code>\';
            $return .= site_url(\'payment/\' . $method[\'method_get\']);
            $return .= \'</code>\' . "
" . \'
         </li>
         \' . "
" . \'
      </ul>
      \' . "
" . \'  </p>\' . "
" . \' 
      <hr>
      \' . "

" . \' 
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Secret Key</label>\' . "
" . \'  <input type="text" class="form-control" name="secret_key" value="\' . $extra[\'secret_key\'] . \'">\' . "
" . \' </div>
      \' . "
" . \' 
     
      
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Currency</label>\' . "
" . \'  <input type="text" class="form-control" name="currency" value="\' . $extra[\'currency\'] . \'">\' . "
" . \' </div>
      \' . "


" . \'
   </div>
   \' . "

" . \' 
   <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>
   \' . "
" . \' 
</form>
\';
echo json_encode([\'content\' => $return, \'title\' => \'\']);




 
    elseif ($action == "edit_paymentmethod" && $_POST["id"] == "paystack") :
    $id = $_POST[\'id\'];
$method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
$method->execute([\'id\' => $id]);
$method = $method->fetch(PDO::FETCH_ASSOC);
$extra = json_decode($method[\'method_extras\'], true);
$return = \'
<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">
   \' . "

" . \'
   <div class="modal-body">
      \' . "

" . \' 
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>
      \' . "

" . \' 
      <div class="service-mode__block">
         \' . "
" . \'  
         <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';
            if ($method[\'method_type\'] == 2) {
            $return .= \'selected\';
            }
            $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';
            if ($method[\'method_type\'] == 1) {
            $return .= \'selected\';
            }
            $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  
         </div>
         \' . "
" . \' 
      </div>
      \' . "

" . \' 
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>
      \' . "

" . \' 
       <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'" >\' . "
" . \' </div>
      \' . "

" . \' 
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>
      \' . "

" . \' 
      <hr>
      \' . "
" . \'  
      <p class="card-description">\' . "
" . \'
      <ul>
         \' . "
" . \'
         <li>\' . "
" . \' API callback address: <code>\';
            $return .= site_url(\'payment/\' . $method[\'method_get\']);
            $return .= \'</code>\' . "
" . \'
         </li>
         \' . "
" . \'
      </ul>
      \' . "
" . \'  </p>\' . "
" . \' 
      <hr>
      \' . "

" . \' 
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Secret Key</label>\' . "
" . \'  <input type="text" class="form-control" name="secret_key" value="\' . $extra[\'secret_key\'] . \'">\' . "
" . \' </div>
      \' . "
" . \' 
     
      
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Currency</label>\' . "
" . \'  <input type="text" class="form-control" name="currency" value="\' . $extra[\'currency\'] . \'">\' . "
" . \' </div>
      \' . "


" . \'
   </div>
   \' . "

" . \' 
   <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>
   \' . "
" . \' 
</form>
\';
echo json_encode([\'content\' => $return, \'title\' => \'\']);
    




elseif ($action == "edit_paymentmethod" && $_POST["id"] == "pix_auto") :
    $id = $_POST[\'id\'];
$method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
$method->execute([\'id\' => $id]);
$method = $method->fetch(PDO::FETCH_ASSOC);
$extra = json_decode($method[\'method_extras\'], true);
$return = \'
<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">
   \' . "

" . \'
   <div class="modal-body">
      \' . "

" . \' 
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>
      \' . "

" . \' 
      <div class="service-mode__block">
         \' . "
" . \'  
         <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';
            if ($method[\'method_type\'] == 2) {
            $return .= \'selected\';
            }
            $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';
            if ($method[\'method_type\'] == 1) {
            $return .= \'selected\';
            }
            $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  
         </div>
         \' . "
" . \' 
      </div>
      \' . "

" . \' 
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>
      \' . "

" . \' 
       <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'" >\' . "
" . \' </div>
      \' . "

" . \' 
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>
      \' . "

" . \' 
      <hr>
      \' . "
" . \'  
      <p class="card-description">\' . "
" . \'
      <ul>
         \' . "
" . \'
         <li>\' . "
" . \' API callback address: <code>\';
            $return .= site_url(\'payment/\' . $method[\'method_get\']);
            $return .= \'</code>\' . "
" . \'
         </li>
         \' . "
" . \'
      </ul>
      \' . "
" . \'  </p>\' . "
" . \' 
      <hr>
      \' . "

" . \' 
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Secret Key</label>\' . "
" . \'  <input type="text" class="form-control" name="secret_key" value="\' . $extra[\'secret_key\'] . \'">\' . "
" . \' </div>
      \' . "
" . \' 
     
      
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Currency</label>\' . "
" . \'  <input type="text" class="form-control" name="currency" value="\' . $extra[\'currency\'] . \'">\' . "
" . \' </div>
      \' . "


" . \'
   </div>
   \' . "

" . \' 
   <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>
   \' . "
" . \' 
</form>
\';
echo json_encode([\'content\' => $return, \'title\' => \'\']);


elseif ($action == "edit_paymentmethod" && $_POST["id"] == "gbprimepay") :
    
    $id = $_POST[\'id\'];
  $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
  $method->execute([\'id\' => $id]);
  $method = $method->fetch(PDO::FETCH_ASSOC);
  $extra = json_decode($method[\'method_extras\'], true);
  $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

  if ($method[\'method_type\'] == 2) {
    $return .= \'selected\';
  }

  $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';

  if ($method[\'method_type\'] == 1) {
    $return .= \'selected\';
  }

  $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API callback address: <code>\';
  $return .= site_url(\'payment/\' . $method[\'method_get\']);
  $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" .  \'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Token(Customer key)</label>\' . "
" . \'  <input type="text" class="form-control" name="token" value="\' . $extra[\'token\'] . \'">\' . "
" . \' </div>\' . "
" . \'<div class="form-group">\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
  
echo json_encode([\'content\' => $return, \'title\' => \'\']);




elseif ($action == "edit_paymentmethod" && $_POST["id"] == "easypaisa") :

$id = $_POST[\'id\'];
  $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
  $method->execute([\'id\' => $id]);
  $method = $method->fetch(PDO::FETCH_ASSOC);
  $extra = json_decode($method[\'method_extras\'], true);
  $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

  if ($method[\'method_type\'] == 2) {
    $return .= \'selected\';
  }

  $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';

  if ($method[\'method_type\'] == 1) {
    $return .= \'selected\';
  }

  $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API callback address: <code>\';
  $return .= site_url(\'payment/\' . $method[\'method_get\']);
  $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" .  \'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Email</label>\' . "
" . \'  <input type="text" class="form-control" name="email" value="\' . $extra[\'email\'] . \'">\' . "
" . \' </div>\' . "
" . \'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">App Pass</label>\' . "
" . \'  <input type="text" class="form-control" name="pass" value="\' . $extra[\'pass\'] . \'">\' . "
" . \' </div>\' . "
" . \'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">How To Get App Password</label>\' . "
" . \'  <input type="text" class="form-control" name="fees" value="Visit https://youtu.be/xhQxxZyhyis"disabled>\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
  
echo json_encode([\'content\' => $return, \'title\' => \'\']);






elseif ($action == "edit_paymentmethod" && $_POST["id"] == "flutterwave") :
    $id = $_POST[\'id\'];
$method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
$method->execute([\'id\' => $id]);
$method = $method->fetch(PDO::FETCH_ASSOC);
$extra = json_decode($method[\'method_extras\'], true);
$return = \'
<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">
   \' . "

" . \'
   <div class="modal-body">
      \' . "

" . \' 
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>
      \' . "

" . \' 
      <div class="service-mode__block">
         \' . "
" . \'  
         <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';
            if ($method[\'method_type\'] == 2) {
            $return .= \'selected\';
            }
            $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';
            if ($method[\'method_type\'] == 1) {
            $return .= \'selected\';
            }
            $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  
         </div>
         \' . "
" . \' 
      </div>
      \' . "

" . \' 
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>
      \' . "

" . \' 
       <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'" >\' . "
" . \' </div>
      \' . "

" . \' 
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>
      \' . "

" . \' 
      <hr>
      \' . "
" . \'  
      <p class="card-description">\' . "
" . \'
      <ul>
         \' . "
" . \'
         <li>\' . "
" . \' API callback address: <code>\';
            $return .= site_url(\'payment/\' . $method[\'method_get\']);
            $return .= \'</code>\' . "
" . \'
         </li>
         \' . "
" . \'
      </ul>
      \' . "
" . \'  </p>\' . "
" . \' 
      <hr>
      \' . "

" . \' 
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Public Key</label>\' . "
" . \'  <input type="text" class="form-control" name="public_key" value="\' . $extra[\'public_key\'] . \'">\' . "
" . \' </div>
      \' . "
" . \' 
     
      
      <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Currency</label>\' . "
" . \'  <input type="text" class="form-control" name="currency" value="\' . $extra[\'currency\'] . \'">\' . "
" . \' </div>
      \' . "


" . \'
   </div>
   \' . "

" . \' 
   <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>
   \' . "
" . \' 
</form>
\';

echo json_encode([\'content\' => $return, \'title\' => \'\']);









elseif ($action == "edit_paymentmethod" && $_POST["id"] == "payumoney") :
  $id = $_POST[\'id\'];
  $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
  $method->execute([\'id\' => $id]);
  $method = $method->fetch(PDO::FETCH_ASSOC);
  $extra = json_decode($method[\'method_extras\'], true);
  $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

  if ($method[\'method_type\'] == 2) {
    $return .= \'selected\';
  }

  $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';

  if ($method[\'method_type\'] == 1) {
    $return .= \'selected\';
  }

  $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API callback address: <code>\';
  $return .= site_url(\'payment/\' . $method[\'method_get\']);
  $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Merchant Key</label>\' . "
" . \'  <input type="text" class="form-control" name="merchant_key" value="\' . $extra[\'merchant_key\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Salt Key</label>\' . "
" . \'  <input type="text" class="form-control" name="salt_key" value="\' . $extra[\'salt_key\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Commission, %</label>\' . "
" . \'  <input type="text" class="form-control" name="fee" value="\' . $extra[\'fee\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Currency</label>\' . "
" . \'  <input type="text" class="form-control" name="currency" value="\' . $extra[\'currency\'] . \'">\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
  echo json_encode([\'content\' => $return, \'title\' => \'\']);



elseif ($action == "edit_paymentmethod" && $_POST["id"] == "ravepay") :
  $id = $_POST[\'id\'];
  $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
  $method->execute([\'id\' => $id]);
  $method = $method->fetch(PDO::FETCH_ASSOC);
  $extra = json_decode($method[\'method_extras\'], true);
  $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

  if ($method[\'method_type\'] == 2) {
    $return .= \'selected\';
  }

  $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';

  if ($method[\'method_type\'] == 1) {
    $return .= \'selected\';
  }

  $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API callback address: <code>\';
  $return .= site_url(\'payment/\' . $method[\'method_get\']);
  $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Public API Key</label>\' . "
" . \'  <input type="text" class="form-control" name="public_api_key" value="\' . $extra[\'public_api_key\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Secret API Key</label>\' . "
" . \'  <input type="text" class="form-control" name="secret_api_key" value="\' . $extra[\'secret_api_key\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Commission, %</label>\' . "
" . \'  <input type="text" class="form-control" name="fee" value="\' . $extra[\'fee\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Currency</label>\' . "
" . \'  <input type="text" class="form-control" name="currency" value="\' . $extra[\'currency\'] . \'">\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
  echo json_encode([\'content\' => $return, \'title\' => \'\']);


elseif ($action == "edit_paymentmethod" && $_POST["id"] == "pagseguro") :
  $id = $_POST[\'id\'];
  $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
  $method->execute([\'id\' => $id]);
  $method = $method->fetch(PDO::FETCH_ASSOC);
  $extra = json_decode($method[\'method_extras\'], true);
  $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

  if ($method[\'method_type\'] == 2) {
    $return .= \'selected\';
  }

  $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';

  if ($method[\'method_type\'] == 1) {
    $return .= \'selected\';
  }

  $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API callback address: <code>\';
  $return .= site_url(\'payment/\' . $method[\'method_get\']);
  $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">PagSeguro Email id</label>\' . "
" . \'  <input type="text" class="form-control" name="email_id" value="\' . $extra[\'email_id\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Live Production Token</label>\' . "
" . \'  <input type="text" class="form-control" name="live_production_token" value="\' . $extra[\'live_production_token\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Commission, %</label>\' . "
" . \'  <input type="text" class="form-control" name="fee" value="\' . $extra[\'fee\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Currency</label>\' . "
" . \'  <input type="text" class="form-control" name="currency" value="\' . $extra[\'currency\'] . \'">\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
  echo json_encode([\'content\' => $return, \'title\' => \'\']);



elseif ($action == "edit_paymentmethod" && $_POST["id"] == "shopier") :
  $id = $_POST[\'id\'];
  $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
  $method->execute([\'id\' => $id]);
  $method = $method->fetch(PDO::FETCH_ASSOC);
  $extra = json_decode($method[\'method_extras\'], true);
  $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

  if ($method[\'method_type\'] == 2) {
    $return .= \'selected\';
  }

  $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';

  if ($method[\'method_type\'] == 1) {
    $return .= \'selected\';
  }

  $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API callback address: <code>\';
  $return .= site_url(\'payment/\' . $method[\'method_get\']);
  $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">apiKey</label>\' . "
" . \'  <input type="text" class="form-control" name="apiKey" value="\' . $extra[\'apiKey\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">apiSecret</label>\' . "
" . \'  <input type="text" class="form-control" name="apiSecret" value="\' . $extra[\'apiSecret\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \' <label>Callbacks</label>\' . "
" . \'  <select class="form-control" name="website_index">\' . "
" . \' <option value="1"\';

  if ($extra[\'website_index\'] == 1) {
    $return .= \'selected\';
  }

  $return .= \'>Callback URL (1)</option>\' . "
" . \' <option value="2"\';

  if ($extra[\'website_index\'] == 2) {
    $return .= \'selected\';
  }

  $return .= \'>Callback URL (2)</option>\' . "
" . \' <option value="3"\';

  if ($extra[\'website_index\'] == 3) {
    $return .= \'selected\';
  }

  $return .= \'>Callback URL (3)</option>\' . "
" . \' <option value="4"\';

  if ($extra[\'website_index\'] == 4) {
    $return .= \'selected\';
  }

  $return .= \'>Callback URL (4)</option>\' . "
" . \' <option value="5"\';

  if ($extra[\'website_index\'] == 5) {
    $return .= \'selected\';
  }

  $return .= \'>Callback URL (5)</option>\' . "
" . \'</select>\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \' <label>Processing fee (0,49 TL)</label>\' . "
" . \'  <select class="form-control" name="processing_fee">\' . "
" . \' <option value="1"\';

  if ($extra[\'processing_fee\'] == 1) {
    $return .= \'selected\';
  }

  $return .= \'>User should pay this commission</option>\' . "
" . \' <option value="0"\';

  if ($extra[\'processing_fee\'] == 0) {
    $return .= \'selected\';
  }

  $return .= \'>User should not pay this commission</option>\' . "
" . \'</select>\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Commission, %</label>\' . "
" . \'  <input type="text" class="form-control" name="fee" value="\' . $extra[\'fee\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Currency</label>\' . "
" . \'  <input type="text" class="form-control" name="currency" value="\' . $extra[\'currency\'] . \'">\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
  echo json_encode([\'content\' => $return, \'title\' => \'\']);

elseif ($action == "edit_paymentmethod" && $_POST["id"] == "paytr") :
  $id = $_POST[\'id\'];
  $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
  $method->execute([\'id\' => $id]);
  $method = $method->fetch(PDO::FETCH_ASSOC);
  $extra = json_decode($method[\'method_extras\'], true);
  $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

  if ($method[\'method_type\'] == 2) {
    $return .= \'selected\';
  }

  $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';

  if ($method[\'method_type\'] == 1) {
    $return .= \'selected\';
  }

  $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API Callback address: <code>\';
  $return .= site_url(\'payment/\' . $method[\'method_get\']);
  $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Merchant id</label>\' . "
" . \'  <input type="text" class="form-control" name="merchant_id" value="\' . $extra[\'merchant_id\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Merchant key</label>\' . "
" . \'  <input type="text" class="form-control" name="merchant_key" value="\' . $extra[\'merchant_key\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Merchant salt</label>\' . "
" . \'  <input type="text" class="form-control" name="merchant_salt" value="\' . $extra[\'merchant_salt\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Commission, %</label>\' . "
" . \'  <input type="text" class="form-control" name="fee" value="\' . $extra[\'fee\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Currency</label>\' . "
" . \'  <input type="text" class="form-control" name="currency" value="\' . $extra[\'currency\'] . \'">\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
  echo json_encode([\'content\' => $return, \'title\' => \'\']);
               elseif ($action == "edit_paymentmethod" && $_POST["id"] == "coinbase"):
$id = $_REQUEST["id"];

$method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:method_get \');
$method->execute([\'method_get\' => $id]);
$method = $method->fetch(PDO::FETCH_ASSOC);
$extra = json_decode($method[\'method_extras\'], true);
$ID = $method["method_get"];
$return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\';
foreach ($extra as $menuName => $menuLink) {
    $new_string = str_replace("_", " ", $menuName);
    $label = strtoupper($new_string);
    if ($menuName == "method_type") {
        $return .= \'<div class="form-group">
                        <label class="control-label">\' . $label . \':</label>
                        <div>
                            <select name="\' . $menuName . \'" class="form-control">
                                <option value="2" \' . ($menuLink == "2" ? \'selected\' : \'\') . \'>Onn</option>
                                <option value="1" \' . ($menuLink == "1" ? \'selected\' : \'\') . \'>Off</option>
                            </select>
                        </div>
                    </div>\';
        continue;
    }

    $new_string = str_replace("_", " ", $menuName);
    $label = strtoupper($new_string);
    $return .= \'<div class="form-group">
                   <label class="control-label">\' . $label . \':</label>
                   <div>
                       <input type="text" name="\' . $menuName . \'" value="\' . $menuLink . \'" class="form-control">
                   </div>
               </div>\';
}

$return .= \'<div class="form-group">
                <div>
                    <button type="submit" class="btn btn-primary">Save Details</button>
                </div>
            </div>
        </form>\';

$return .= \'<style>
    .form-group {
        margin-bottom: 10px;
        padding: 5px; /* Add padding to create space between label and input */
    }

    label {
        display: block;
        margin-bottom: 5px;
        font-weight: bold;
    }

    .form-control {
        width: 100%;
        padding: 10px;
        font-size: 16px;
        margin-bottom: 10px;
        border: 1px solid #ccc;
        border-radius: 4px;
        background-color: #fff;
    }

    textarea.form-control {
        resize: vertical;
    }

    .btn {
        display: block;
        margin: 0 auto;
        width: 100%;
        max-width: 200px;
    }

    .note-toolbar .btn-group {
        display: inline-flex;
    }
    
    /* Additional CSS for responsiveness */
    @media (max-width: 768px) {
         .form-group {
            margin-bottom: 10px;
            padding: 5px; /* Add padding for responsiveness */
        }
    }
    
    @media (min-width: 768px) {
        .form-group {
            margin-bottom: 10px;
            padding: 5px; /* Add padding for responsiveness */
        }

        label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
        }

        .form-control {
            width: 100%;
            padding: 10px;
            font-size: 16px;
            margin-bottom: 10px;
            border: 1px solid #ccc;
            border-radius: 4px;
            background-color: #fff;
        }

        textarea.form-control {
            resize: vertical;
        }

        .btn {
            display: block;
            margin: 0 auto;
            width: 100%;
            max-width: 200px;
        }

        .note-toolbar .btn-group {
            display: inline-flex;
        }
    }
</style>\';
elseif ($action == "edit_paymentmethod" && $_POST["id"] == "newebpay"):
$id = $_REQUEST["id"];

$method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:method_get \');
$method->execute([\'method_get\' => $id]);
$method = $method->fetch(PDO::FETCH_ASSOC);
$extra = json_decode($method[\'method_extras\'], true);
$ID = $method["method_get"];
$return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\';
foreach ($extra as $menuName => $menuLink) {
    $new_string = str_replace("_", " ", $menuName);
    $label = strtoupper($new_string);
    if ($menuName == "method_type") {
        $return .= \'<div class="form-group">
                        <label class="control-label">\' . $label . \':</label>
                        <div>
                            <select name="\' . $menuName . \'" class="form-control">
                                <option value="2" \' . ($menuLink == "2" ? \'selected\' : \'\') . \'>Onn</option>
                                <option value="1" \' . ($menuLink == "1" ? \'selected\' : \'\') . \'>Off</option>
                            </select>
                        </div>
                    </div>\';
        continue;
    }

    $new_string = str_replace("_", " ", $menuName);
    $label = strtoupper($new_string);
    $return .= \'<div class="form-group">
                   <label class="control-label">\' . $label . \':</label>
                   <div>
                       <input type="text" name="\' . $menuName . \'" value="\' . $menuLink . \'" class="form-control">
                   </div>
               </div>\';
}

$return .= \'<div class="form-group">
                <div>
                    <button type="submit" class="btn btn-primary">Save Details</button>
                </div>
            </div>
        </form>\';

$return .= \'<style>
    .form-group {
        margin-bottom: 10px;
        padding: 5px; /* Add padding to create space between label and input */
    }

    label {
        display: block;
        margin-bottom: 5px;
        font-weight: bold;
    }

    .form-control {
        width: 100%;
        padding: 10px;
        font-size: 16px;
        margin-bottom: 10px;
        border: 1px solid #ccc;
        border-radius: 4px;
        background-color: #fff;
    }

    textarea.form-control {
        resize: vertical;
    }

    .btn {
        display: block;
        margin: 0 auto;
        width: 100%;
        max-width: 200px;
    }

    .note-toolbar .btn-group {
        display: inline-flex;
    }
    
    /* Additional CSS for responsiveness */
    @media (max-width: 768px) {
         .form-group {
            margin-bottom: 10px;
            padding: 5px; /* Add padding for responsiveness */
        }
    }
    
    @media (min-width: 768px) {
        .form-group {
            margin-bottom: 10px;
            padding: 5px; /* Add padding for responsiveness */
        }

        label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
        }

        .form-control {
            width: 100%;
            padding: 10px;
            font-size: 16px;
            margin-bottom: 10px;
            border: 1px solid #ccc;
            border-radius: 4px;
            background-color: #fff;
        }

        textarea.form-control {
            resize: vertical;
        }

        .btn {
            display: block;
            margin: 0 auto;
            width: 100%;
            max-width: 200px;
        }

        .note-toolbar .btn-group {
            display: inline-flex;
        }
    }
</style>\';


echo json_encode([\'content\' => $return, \'title\' => \'\']);
elseif ($action == "edit_paymentmethod" && $_POST["id"] == "youcan"):
$id = $_REQUEST["id"];

$method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:method_get \');
$method->execute([\'method_get\' => $id]);
$method = $method->fetch(PDO::FETCH_ASSOC);
$extra = json_decode($method[\'method_extras\'], true);
$ID = $method["method_get"];
$return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\';
foreach ($extra as $menuName => $menuLink) {
    $new_string = str_replace("_", " ", $menuName);
    $label = strtoupper($new_string);
    if ($menuName == "method_type") {
        $return .= \'<div class="form-group">
                        <label class="control-label">\' . $label . \':</label>
                        <div>
                            <select name="\' . $menuName . \'" class="form-control">
                                <option value="2" \' . ($menuLink == "2" ? \'selected\' : \'\') . \'>Onn</option>
                                <option value="1" \' . ($menuLink == "1" ? \'selected\' : \'\') . \'>Off</option>
                            </select>
                        </div>
                    </div>\';
        continue;
    }

    $new_string = str_replace("_", " ", $menuName);
    $label = strtoupper($new_string);
    $return .= \'<div class="form-group">
                   <label class="control-label">\' . $label . \':</label>
                   <div>
                       <input type="text" name="\' . $menuName . \'" value="\' . $menuLink . \'" class="form-control">
                   </div>
               </div>\';
}

$return .= \'<div class="form-group">
                <div>
                    <button type="submit" class="btn btn-primary">Save Details</button>
                </div>
            </div>
        </form>\';

$return .= \'<style>
    .form-group {
        margin-bottom: 10px;
        padding: 5px; /* Add padding to create space between label and input */
    }

    label {
        display: block;
        margin-bottom: 5px;
        font-weight: bold;
    }

    .form-control {
        width: 100%;
        padding: 10px;
        font-size: 16px;
        margin-bottom: 10px;
        border: 1px solid #ccc;
        border-radius: 4px;
        background-color: #fff;
    }

    textarea.form-control {
        resize: vertical;
    }

    .btn {
        display: block;
        margin: 0 auto;
        width: 100%;
        max-width: 200px;
    }

    .note-toolbar .btn-group {
        display: inline-flex;
    }
    
    /* Additional CSS for responsiveness */
    @media (max-width: 768px) {
         .form-group {
            margin-bottom: 10px;
            padding: 5px; /* Add padding for responsiveness */
        }
    }
    
    @media (min-width: 768px) {
        .form-group {
            margin-bottom: 10px;
            padding: 5px; /* Add padding for responsiveness */
        }

        label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
        }

        .form-control {
            width: 100%;
            padding: 10px;
            font-size: 16px;
            margin-bottom: 10px;
            border: 1px solid #ccc;
            border-radius: 4px;
            background-color: #fff;
        }

        textarea.form-control {
            resize: vertical;
        }

        .btn {
            display: block;
            margin: 0 auto;
            width: 100%;
            max-width: 200px;
        }

        .note-toolbar .btn-group {
            display: inline-flex;
        }
    }
</style>\';


echo json_encode([\'content\' => $return, \'title\' => \'\']);
elseif (($action == \'edit_paymentmethod\') && ($_POST[\'id\'] == \'paytmqr\')) :
  $id = $_POST[\'id\'];
  $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
  $method->execute([\'id\' => $id]);
  $method = $method->fetch(PDO::FETCH_ASSOC);
  $extra = json_decode($method[\'method_extras\'], true);
  $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

  if ($method[\'method_type\'] == 2) {
    $return .= \'selected\';
  }

  $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';

  if ($method[\'method_type\'] == 1) {
    $return .= \'selected\';
  }

  $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API callback address: <code>\';
  $return .= site_url(\'payment/\' . $method[\'method_get\']);
  $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Paytm QR Image Link</label>\' . "
" . \'  <input type="text" class="form-control" name="merchant_key" value="\' . $extra[\'merchant_key\'] . \'">\' . "
" . \' </div>\' . "
" . \'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Merchant MID</label>\' . "
" . \'  <input type="text" class="form-control" name="merchant_mid" value="\' . $extra[\'merchant_mid\'] . \'">\' . "
" . \' </div>\' . "
" . \'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Merchant Website</label>\' . "
" . \'  <input type="text" class="form-control" name="merchant_website" value="\' . $extra[\'merchant_website\'] . \'">\' . "
" . \' </div>\' . "
" . \'<div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Commission, %</label>\' . "
" . \'  <input type="text" class="form-control" name="fee" value="\' . $extra[\'fee\'] . \'">\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
  echo json_encode([\'content\' => $return, \'title\' => \'\']);


elseif ($action == "edit_paymentmethod" && $_POST["id"] == "paytr_havale") :
  $id = $_POST[\'id\'];
  $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
  $method->execute([\'id\' => $id]);
  $method = $method->fetch(PDO::FETCH_ASSOC);
  $extra = json_decode($method[\'method_extras\'], true);
  $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

  if ($method[\'method_type\'] == 2) {
    $return .= \'selected\';
  }

  $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';

  if ($method[\'method_type\'] == 1) {
    $return .= \'selected\';
  }

  $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API callback address: <code>\';
  $return .= site_url(\'payment/paytr\');
  $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Merchant id</label>\' . "
" . \'  <input type="text" class="form-control" name="merchant_id" value="\' . $extra[\'merchant_id\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Merchant key</label>\' . "
" . \'  <input type="text" class="form-control" name="merchant_key" value="\' . $extra[\'merchant_key\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Merchant salt</label>\' . "
" . \'  <input type="text" class="form-control" name="merchant_salt" value="\' . $extra[\'merchant_salt\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Commission, %</label>\' . "
" . \'  <input type="text" class="form-control" name="fee" value="\' . $extra[\'fee\'] . \'">\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
  echo json_encode([\'content\' => $return, \'title\' => \'\']);

elseif ($action == "edit_paymentmethod" && $_POST["id"] == "paywant") :
  $id = $_POST[\'id\'];
  $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
  $method->execute([\'id\' => $id]);
  $method = $method->fetch(PDO::FETCH_ASSOC);
  $extra = json_decode($method[\'method_extras\'], true);
  $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

  if ($method[\'method_type\'] == 2) {
    $return .= \'selected\';
  }

  $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';

  if ($method[\'method_type\'] == 1) {
    $return .= \'selected\';
  }

  $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Minimum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="min" value="\' . $extra[\'min\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Maximum Payment</label>\' . "
" . \'  <input type="text" class="form-control" name="max" value="\' . $extra[\'max\'] . \'">\' . "
" . \' </div>\' . "

" . \' <hr>\' . "
" . \'  <p class="card-description">\' . "
" . \'<ul>\' . "
" . \'<li>\' . "
" . \' API callback address: <code>\';
  $return .= site_url(\'payment/\' . $method[\'method_get\']);
  $return .= \'</code>\' . "
" . \'</li>\' . "
" . \'</ul>\' . "
" . \'  </p>\' . "
" . \' <hr>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">apiKey</label>\' . "
" . \'  <input type="text" class="form-control" name="apiKey" value="\' . $extra[\'apiKey\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">apiSecret</label>\' . "
" . \'  <input type="text" class="form-control" name="apiSecret" value="\' . $extra[\'apiSecret\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Commission, %</label>\' . "
" . \'  <input type="text" class="form-control" name="fee" value="\' . $extra[\'fee\'] . \'">\' . "
" . \' </div>\' . "
" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Currency</label>\' . "
" . \'  <input type="text" class="form-control" name="currency" value="\' . $extra[\'currency\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Paywant Commission</label>\' . "
" . \'<select class="form-control" name="commissionType">\' . "
" . \'  <option value="2"\';

  if ($extra[\'commissionType\'] == 2) {
    $return .= \'selected\';
  }

  $return .= \'>User should pay this commission</option>\' . "
" . \'  <option value="1"\';

  if ($extra[\'commissionType\'] == 1) {
    $return .= \'selected\';
  }

  $return .= \'>User should not pay this commission</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label>Payment Methods</label>\' . "
" . \'<div class="form-group col-md-12">\' . "
" . \' <div class="row">\' . "
" . \'  <label class="checkbox-inline col-md-3">\' . "
" . \'<input type="checkbox" class="access" name="payment_type[]" value="1"\';

  if (in_array(1, $extra[\'payment_type\'])) {
    $return .= \' checked\';
  }

  $return .= \'> Mobile Payment\' . "
" . \'  </label>\' . "
" . \'  <label class="checkbox-inline col-md-3">\' . "
" . \'<input type="checkbox" class="access" name="payment_type[]" value="2"\';

  if (in_array(2, $extra[\'payment_type\'])) {
    $return .= \' checked\';
  }

  $return .= \'> Credit/Bank Card\' . "
" . \'  </label>\' . "
" . \'  <label class="checkbox-inline col-md-3">\' . "
" . \'<input type="checkbox" class="access" name="payment_type[]" value="3"\';

  if (in_array(3, $extra[\'payment_type\'])) {
    $return .= \' checked\';
  }

  $return .= \'> Money Order / EFT\' . "
" . \'  </label>\' . "
" . \' </div>\' . "
" . \'</div>\' . "
" . \'  </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
  echo json_encode([\'content\' => $return, \'title\' => \'\']);

elseif ($action == "edit_paymentmethod" && $_POST["id"] == "havale-eft") :
  $id = $_POST[\'id\'];
  $method = $conn->prepare(\'SELECT * FROM payment_methods WHERE method_get=:id \');
  $method->execute([\'id\' => $id]);
  $method = $method->fetch(PDO::FETCH_ASSOC);
  $extra = json_decode($method[\'method_extras\'], true);
  $return = \'<form class="form" action="\' . site_url(\'admin/settings/payment-methods/edit/\' . $id) . \'" method="post" data-xhr="true">\' . "

" . \'<div class="modal-body">\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Method name</label>\' . "
" . \'  <input type="text" class="form-control" readonly value="\' . $method[\'method_name\'] . \'">\' . "
" . \' </div>\' . "

" . \' <div class="service-mode__block">\' . "
" . \'  <div class="form-group">\' . "
" . \'  <label>Visibility</label>\' . "
" . \'<select class="form-control" name="method_type">\' . "
" . \'  <option value="2"\';

  if ($method[\'method_type\'] == 2) {
    $return .= \'selected\';
  }

  $return .= \'>Active</option>\' . "
" . \'  <option value="1"\';

  if ($method[\'method_type\'] == 1) {
    $return .= \'selected\';
  }

  $return .= \'>Inactive</option>\' . "
" . \'</select>\' . "
" . \'  </div>\' . "
" . \' </div>\' . "

" . \' <div class="form-group">\' . "
" . \'  <label class="form-group__service-name">Visible name</label>\' . "
" . \'  <input type="text" class="form-control" name="name" value="\' . $extra[\'name\'] . \'">\' . "
" . \' </div>\' . "


" . \'</div>\' . "

" . \' <div class="modal-footer">\' . "
" . \'  <button type="submit" class="btn btn-primary">Update</button>\' . "
" . \'  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\' . "
" . \' </div>\' . "
" . \' </form>\';
  echo json_encode([\'content\' => $return, \'title\' => \'\']);






  elseif( $action == "new_bankaccount" ):
    $return = \'<form class="form" action="\'.site_url("admin/settings/bank-accounts/new").\'" method="post" data-xhr="true">
        <div class="modal-body">

          <div class="form-group">
            <label class="form-group">The name of the Bank</label>
            <input type="text" name="bank_name" class="form-control" value="">
          </div>

          <div class="form-group">
            <label class="form-group">Recipient name</label>
            <input type="text" name="bank_alici" class="form-control" value="">
          </div>

          <div class="form-group">
            <label class="form-group">Branch number</label>
            <input type="text" name="bank_sube" class="form-control" value="">
          </div>

          <div class="form-group">
            <label class="form-group">Account number</label>
            <input type="text" name="bank_hesap" class="form-control" value="">
          </div>

          <div class="form-group">
            <label class="form-group">IBAN</label>
            <input type="text" name="bank_iban" class="form-control" value="">
          </div>


        </div>

          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Add new bank account</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>\';
    echo json_encode(["content"=>$return,"title"=>"New bank account"]);
  elseif( $action == "edit_bankaccount" ):
    $id       = $_POST["id"];
    $bank = $conn->prepare("SELECT * FROM bank_accounts WHERE id=:id ");
    $bank->execute(array("id"=>$id));
    $bank = $bank->fetch(PDO::FETCH_ASSOC);
    $return = \'<form class="form" action="\'.site_url("admin/settings/bank-accounts/edit/".$id).\'" method="post" data-xhr="true">
        <div class="modal-body">

          <div class="form-group">
            <label class="form-group">The name of the Bank</label>
            <input type="text" name="bank_name" class="form-control" value="\'.$bank["bank_name"].\'">
          </div>

          <div class="form-group">
            <label class="form-group">Recipient name</label>
            <input type="text" name="bank_alici" class="form-control" value="\'.$bank["bank_alici"].\'">
          </div>

          <div class="form-group">
            <label class="form-group">Branch number</label>
            <input type="text" name="bank_sube" class="form-control" value="\'.$bank["bank_sube"].\'">
          </div>

          <div class="form-group">
            <label class="form-group">Account number</label>
            <input type="text" name="bank_hesap" class="form-control" value="\'.$bank["bank_hesap"].\'">
          </div>

          <div class="form-group">
            <label class="form-group">IBAN</label>
            <input type="text" name="bank_iban" class="form-control" value="\'.$bank["bank_iban"].\'">
          </div>


        </div>

        <div class="modal-footer">
          <a id="delete-row" data-url="\'.site_url("admin/settings/bank-accounts/delete/".$bank["id"]).\'" class="btn btn-danger pull-left">Remove account</a>
          <button type="submit" class="btn btn-primary">Update bank account</button>
          <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
        </div>
        </form>
        <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
        <script>
        $("#delete-row").click(function(){
          var action = $(this).attr("data-url");
          swal({
            title: "Are you sure you want to delete?",
            text: "If you confirm, this content will be deleted, it may not be possible to restore it.",
            icon: "warning",
            buttons: true,
            dangerMode: true,
            buttons: ["Cancel", "Yes, I am sure!"],
          })
          .then((willDelete) => {
            if (willDelete) {
              $.ajax({
                url:  action,
                type: "GET",
                dataType: "json",
                cache: false,
                contentType: false,
                processData: false
              })
              .done(function(result){
                if( result.s == "error" ){
                  var heading = "Unsuccessful";
                }else{
                  var heading = "Successful";
                }
                  $.toast({
                      heading: heading,
                      text: result.m,
                      icon: result.s,
                      loader: true,
                      loaderBg: "#9EC600"
                  });
                  if (result.r!=null) {
                    if( result.time ==null ){ result.time = 3; }
                    setTimeout(function(){
                      window.location.href  = result.r;
                    },result.time*1000);
                  }
              })
              .fail(function(){
                $.toast({
                    heading: "Unsuccessful",
                    text: "The request could not be fulfilled",
                    icon: "error",
                    loader: true,
                    loaderBg: "#9EC600"
                });
              });
              /* erik silinmesi onayland */
            } else {
              $.toast({
                  heading: "Unsuccessful",
                  text: "Request for deletion denied",
                  icon: "error",
                  loader: true,
                  loaderBg: "#9EC600"
              });
            }
          });
        });
        </script>
          </form>\';
    echo json_encode(["content"=>$return,"title"=>"Update bank account"]);
  elseif( $action == "new_paymentbonus" ):
    $methodList = $conn->prepare("SELECT * FROM payment_methods WHERE id!=\'4\' ");
    $methodList->execute(array());
    $methodList = $methodList->fetchAll(PDO::FETCH_ASSOC);
    $return = \'<form class="form" action="\'.site_url("admin/settings/payment-bonuses/new").\'" method="post" data-xhr="true">
        <div class="modal-body">

          <div class="form-group">
          <label>Method</label>
            <select class="form-control" name="method_type">\';
                  foreach ($methodList as $method):
                    $return.=\'<option value="\'.$method["id"].\'">\'.$method["method_name"].\'</option>\';
                  endforeach;
              $return.=\'</select>
          </div>

          <div class="form-group">
            <label class="form-group">Bonus amount (%)</label>
            <input type="text" name="amount" class="form-control" value="">
          </div>

          <div class="form-group">
            <label class="form-group">Starts From Amount</label>
            <input type="text" name="from" class="form-control" value="">
          </div>

        </div>

          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Add new bonus</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>\';
    echo json_encode(["content"=>$return,"title"=>"Add new bonus"]);
  elseif( $action == "edit_paymentbonus" ):
    $id         = $_POST["id"];
    $bonus      = $conn->prepare("SELECT * FROM payments_bonus WHERE bonus_id=:id ");
    $bonus      ->execute(array("id"=>$id));
    $bonus      = $bonus->fetch(PDO::FETCH_ASSOC);
    $methodList = $conn->prepare("SELECT * FROM payment_methods  WHERE id!=\'4\' ");
    $methodList->execute(array());
    $methodList = $methodList->fetchAll(PDO::FETCH_ASSOC);
    $return = \'<form class="form" action="\'.site_url("admin/settings/payment-bonuses/edit/".$id).\'" method="post" data-xhr="true">
        <div class="modal-body">

          <div class="form-group">
          <label>Method</label>
            <select class="form-control" name="method_type">\';
                  foreach ($methodList as $method):
                    $return.=\'<option value="\'.$method["id"].\'"\'; if( $bonus["bonus_method"] == $method["id"] ): $return.=\'selected\'; endif; $return.=\'>\'.$method["method_name"].\'</option>\';
                  endforeach;
              $return.=\'</select>
          </div>

          <div class="form-group">
            <label class="form-group">Bonus amount (%)</label>
            <input type="text" name="amount" class="form-control" value="\'.$bonus["bonus_amount"].\'">
          </div>

          <div class="form-group">
            <label class="form-group">Starts From Amount</label>
            <input type="text" name="from" class="form-control" value="\'.$bonus["bonus_from"].\'">
          </div>

        </div>

          <div class="modal-footer">
            <a id="delete-row" data-url="\'.site_url("admin/settings/payment-bonuses/delete/".$bonus["bonus_id"]).\'" class="btn btn-danger pull-left">Remove bonus</a>
            <button type="submit" class="btn btn-primary">Update bonus</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>
          <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
          <script>
          $("#delete-row").click(function(){
            var action = $(this).attr("data-url");
            swal({
              title: "Are you sure you want to delete?",
              text: "If you confirm this content will be deleted, it may not be possible to restore it.",
              icon: "warning",
              buttons: true,
              dangerMode: true,
              buttons: ["Cancel", "Yes, I am sure!"],
            })
            .then((willDelete) => {
              if (willDelete) {
                $.ajax({
                  url:  action,
                  type: "GET",
                  dataType: "json",
                  cache: false,
                  contentType: false,
                  processData: false
                })
                .done(function(result){
                  if( result.s == "error" ){
                    var heading = "Unsuccessful";
                  }else{
                    var heading = "Successful";
                  }
                    $.toast({
                        heading: heading,
                        text: result.m,
                        icon: result.s,
                        loader: true,
                        loaderBg: "#9EC600"
                    });
                    if (result.r!=null) {
                      if( result.time ==null ){ result.time = 3; }
                      setTimeout(function(){
                        window.location.href  = result.r;
                      },result.time*1000);
                    }
                })
                .fail(function(){
                  $.toast({
                      heading: "Unsuccessful",
                      text: "The request could not be fulfilled",
                      icon: "error",
                      loader: true,
                      loaderBg: "#9EC600"
                  });
                });
                /* erik silinmesi onayland */
              } else {
                $.toast({
                    heading: "Unsuccessful",
                    text: "Request for deletion denied",
                    icon: "error",
                    loader: true,
                    loaderBg: "#9EC600"
                });
              }
            });
          });
          </script>
          \';
    echo json_encode(["content"=>$return,"title"=>"Update payment bonus"]);
  elseif( $action == "new_provider" ):
 $return = "<form class=\"form\" action=\"" . site_url("admin/settings/providers/new") . "\" method=\"post\" data-xhr=\"true\">

        <div class=\"modal-body\">

          <div class=\"form-group\">
            <label class=\"form-group__service-name\">API URL</label>
            <input type=\"text\" class=\"form-control\" name=\"url\" value=\"\">
          </div>
          
                    <div class=\"form-group\">
            <label class=\"form-group__service-name\">API Key</label>
            <input type=\"text\" class=\"form-control\" name=\"key\" value=\"\">
          </div>

        </div>

          <div class=\"modal-footer\">
            <button type=\"submit\" class=\"btn btn-primary\">Add Provider</button>
            <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Cancel</button>
          </div>
          </form>";
                                                                                                                                                        echo json_encode(["content" => $return, "title" => "Add New Provider"]);
                                                                                       
  elseif( $action == "edit_provider" ):
    $id         = $_POST["id"];
    $provider   = $conn->prepare("SELECT * FROM service_api WHERE id=:id ");
    $provider   ->execute(array("id"=>$id));
    $provider   = $provider->fetch(PDO::FETCH_ASSOC);
    $return = \'<form class="form" action="\'.site_url("admin/settings/providers/edit/".$id).\'" method="post" data-xhr="true">

        <div class="modal-body">

          <div class="form-group">
            <label class="form-group__service-name">Provider Name</label>
            <input type="text" class="form-control" name="name" value="\'.$provider["api_name"].\'" readonly  >
          </div>

          

          <div class="form-group">
            <label class="form-group__service-name">API Key</label>
            <input type="text" class="form-control" name="apikey" value="\'.$provider["api_key"].\'">
          </div>

          

          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Edit provider</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>


  

          </div>
                  </form>
<script>
            
            $("#admin ").change(function(){
              var type = $(this).val();
                if( $panel["panel_type"] != "Child" ){
                  $("#admin_access").hide();
                } else{
                  $("#admin_access").show();
                }
            });
          </script>

                  <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
          <script>
          $("#delete-row").click(function(){
            var action = $(this).attr("data-url");
            swal({
              title: "Are you sure you want to delete?",
              text: "If you confirm this content will be deleted, it may not be possible to restore it.",
              icon: "warning",
              buttons: true,
              dangerMode: true,
              buttons: ["Cancel", "Yes, I am sure!"],
            })
            .then((willDelete) => {
              if (willDelete) {
                $.ajax({
                  url:  action,
                  type: "GET",
                  dataType: "json",
                  cache: false,
                  contentType: false,
                  processData: false
                })
                .done(function(result){
                  if( result.s == "error" ){
                    var heading = "Unsuccessful";
                  }else{
                    var heading = "Successful";
                  }
                    $.toast({
                        heading: heading,
                        text: result.m,
                        icon: result.s,
                        loader: true,
                        loaderBg: "#9EC600"
                    });
                    if (result.r!=null) {
                      if( result.time ==null ){ result.time = 3; }
                      setTimeout(function(){
                        window.location.href  = result.r;
                      },result.time*1000);
                    }
                })
                .fail(function(){
                  $.toast({
                      heading: "Unsuccessful",
                      text: "The request could not be fulfilled",
                      icon: "error",
                      loader: true,
                      loaderBg: "#9EC600"
                  });
                });
                /* erik silinmesi onayland */
              } else {
                $.toast({
                    heading: "Unsuccessful",
                    text: "Request for deletion denied",
                    icon: "error",
                    loader: true,
                    loaderBg: "#9EC600"
                });
              }
            });
          });
          </script>
         \';
    echo json_encode(["content"=>$return,"title"=>"Edit provider (".$provider["api_name"].") "]);
   
  elseif( $action == "export_user" ):
    $return = \'<form class="form" action="\'.site_url("admin/clients/export").\'" method="post">
        <div class="modal-body">

          <div class="service-mode__block">
            <div class="form-group">
            <label>Membership Status</label>
              <select class="form-control" name="client_status">
                    <option value="all">All members</option>
                    <option value="1">Inactive</option>
                    <option value="2">Active</option>
                </select>
            </div>
          </div>

          <div class="service-mode__block">
            <div class="form-group">
            <label>Email Status</label>
              <select class="form-control" name="email_status">
                    <option value="all">All members</option>
                    <option value="1">Unapproved</option>
                    <option value="2">Approved</option>
                </select>
            </div>
          </div>

          <div class="service-mode__block">
            <div class="form-group">
            <label>Format</label>
              <select class="form-control" name="format">
                    <option value="json">JSON</option>
                </select>
            </div>
          </div>

          <div class="service-mode__block">
            <div class="form-group">
            <label>Member information</label>
              <div class="form-group">
                  <label class="checkbox-inline">
                    <input type="checkbox" class="access" name="exportcolumn[client_id]" checked value="1"> ID
                  </label>
                  <label class="checkbox-inline">
                    <input type="checkbox" class="access" name="exportcolumn[email]" checked value="1"> Email
                  </label>
                  <label class="checkbox-inline">
                    <input type="checkbox" class="access" name="exportcolumn[name]" checked value="1"> Name surname
                  </label>
                  <label class="checkbox-inline">
                    <input type="checkbox" class="access" name="exportcolumn[username]" checked value="1"> Username
                  </label>
                  <label class="checkbox-inline">
                    <input type="checkbox" class="access" name="exportcolumn[telephone]" checked value="1"> Phone number
                  </label>
                  <label class="checkbox-inline">
                    <input type="checkbox" class="access" name="exportcolumn[balance]" checked value="1"> Balance
                  </label>
                  <label class="checkbox-inline">
                    <input type="checkbox" class="access" name="exportcolumn[spent]" checked value="1"> Spending
                  </label>
                  <label class="checkbox-inline">
                    <input type="checkbox" class="access" name="exportcolumn[register_date]" checked value="1"> Date of registration
                  </label>
                  <label class="checkbox-inline">
                    <input type="checkbox" class="access" name="exportcolumn[login_date]" checked value="1"> Last entry date
                  </label>
              </div>
            </div>
          </div>


        </div>

          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Backup users</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>\';
    echo json_encode(["content"=>$return,"title"=>"Backup users"]);
  elseif( $action == "all_numbers" ):
    $rows   = $conn->prepare("SELECT * FROM clients");
    $rows->execute(array());
    $rows   = $rows->fetchAll(PDO::FETCH_ASSOC);
    $numbers= "";
    $emails = "";
      foreach ($rows as $row):
        if( $row["telephone"] ): $numbers.=$row["telephone"]."
"; endif;
        $emails.=$row["email"]."
";
      endforeach;
    $return = \'<form>
        <div class="modal-body">

          <div class="service-mode__block">
            <div class="form-group">
            <label>Member Phone Numbers</label>
              <textarea class="form-control" rows="8" readonly>\'.$numbers.\'</textarea>
            </div>
          </div>

          <div class="service-mode__block">
            <div class="form-group">
            <label>Member E-mail Addresses</label>
              <textarea class="form-control" rows="8" readonly>\'.$emails.\'</textarea>
            </div>
          </div>


        </div>

          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>\';
    echo json_encode(["content"=>$return,"title"=>"User information"]);

	
	elseif( $action == "details" ):
	
	$toplamkullanici      = $conn->prepare("SELECT * FROM clients");
    $toplamkullanici     -> execute();
    $toplamkullanici      = $toplamkullanici->rowCount();
	
	//Toplam Kullanlabilir Bakiye
	$query = $conn->query("SELECT sum(balance) as toplambakiye FROM clients")->fetch(PDO::FETCH_ASSOC);
	
	//Toplam Harcanan Bakiye
	$query2 = $conn->query("SELECT sum(order_charge) as order_charge FROM orders")->fetch(PDO::FETCH_ASSOC);
	
	//Negatif Bakiyeli Kullanclar
	$negatifbakiye      = $conn->prepare("SELECT * FROM clients where balance < 0");
    $negatifbakiye     -> execute();
    $negatifbakiye      = $negatifbakiye->rowCount();
	
	//Bakiyesi Olmayan
	$bakiyesiz      = $conn->prepare("SELECT * FROM clients where balance = 0");
    $bakiyesiz     -> execute();
    $bakiyesiz      = $bakiyesiz->rowCount();
    
   
    $return = \'<form>
        <div class="modal-body">
		
          <div class="service-mode__block">
            <div class="form-group">
            <label>Total Users : \'.$toplamkullanici.\'</label>
            </div>
          </div>
		  
		  <div class="service-mode__block">
            <div class="form-group">
            <label>Total Available Balance : \'.$query[\'toplambakiye\'].\'</label>
            </div>
          </div>
		  
		  <div class="service-mode__block">
            <div class="form-group">
            <label>Total Spent Balance : \'.$query2[\'order_charge\'].\'</label>
            </div>
          </div>
		  
		  <div class="service-mode__block">
            <div class="form-group">
            <label>Negative Balance User : \'.$negatifbakiye.\'</label>
            </div>
          </div>
		  
		  <div class="service-mode__block">
            <div class="form-group">
            <label>Zero Balance User : \'.$bakiyesiz.\'</label>
            </div>
          </div>
		  

        </div>

          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>\';
    echo json_encode(["content"=>$return,"title"=>"Detail"]);
  elseif( $action ==  "price_user" ):
    $id     = $_POST["id"];
    $price  = $conn->prepare("SELECT *,services.service_id as serviceid,services.service_price as price,clients_price.service_price as clientprice FROM services LEFT JOIN clients_price ON clients_price.service_id=services.service_id && clients_price.client_id=:id ");
    $price -> execute(array("id"=>$id));
    $price  = $price->fetchAll(PDO::FETCH_ASSOC);
    $return = \'<form class="form" action="\'.site_url("admin/clients/price/".$id).\'" method="post" data-xhr="true">
        <div class="modal-body">

        <div class="services-import__body">
               <div>
                  <div class="services-import__list-wrap services-import__list-active">
                     <div class="services-import__scroll-wrap">
                        <span>
                             <div class="services-import__packages">
                                <ul>\';
                                  foreach ($price as $row):
                                    $return.=\'<li id="service-\'.$row["serviceid"].\'">
                                     <label>
                                        \'.$row["serviceid"].\' - \'.$row["service_name"].\'
                                        <span class="services-import__packages-price-edit" >
                                           <div class="services-import__packages-price-lock"  data-id="servicedelete-\'.$row["serviceid"].\'" data-service="\'.$row["serviceid"].\'">
                                             <span class="fa fa-trash"></span>
                                           </div>
                                           <input type="text" class="services-import__price" name="price[\'.$row["serviceid"].\']" value="\'.$row["clientprice"].\'">
                                           <span class="services-import__provider-price">\'.$row["price"].\'</span>
                                        </span>
                                     </label>
                                    </li>\';
                                  endforeach;
                                $return.=\'</ul>
                             </div>
                          </span></div>
                  </div>
               </div>
            </div>
            <script>

              $(\'[data-id^="servicedelete-"]\').click(function(){
                var id        = $(this).attr("data-service");
                $("[name=\'price["+id+"]\']").val("");
                //$("ul > li#service-"+id).remove();
              });

            </script>

        </div>

          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Update settings</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>\';
        echo json_encode(["content"=>$return,"title"=>"Special Pricing"]);
  elseif( $action == "order_errors" ):
    $id     = $_POST["id"];
    $row    = $conn->prepare("SELECT * FROM orders INNER JOIN service_api ON service_api.id=orders.order_api WHERE order_id=:id ");
    $row ->execute(array("id"=>$id));
    $row    = $row->fetch(PDO::FETCH_ASSOC);
    $errors = json_decode($row["order_error"]);
$return = \'<form>
        <div class="modal-body">

          <div class="service-mode__block">
            <div class="form-group">
            <h4>\'.$row["api_name"].\'</h4>
              <textarea class="form-control" rows="8" readonly>\'; $return.=print_r($errors,true); $return.=\'</textarea>
            </div>
          </div>


        </div>

          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>\';                                                                                                                 echo json_encode(["content" => $return, "title" => "Error details (ID: ".$row["order_id"].") "]);
                                                                                          
    
  elseif( $action == "order_details" ):
    $id     = $_POST["id"];
    $row    = $conn->prepare("SELECT * FROM orders INNER JOIN service_api ON service_api.id=orders.order_api WHERE order_id=:id ");
    $row ->execute(array("id"=>$id));
    $row    = $row->fetch(PDO::FETCH_ASSOC);
    $detail = json_decode($row["order_detail"]);
    $return = \'<form>
        <div class="modal-body">

          <div class="service-mode__block">
            <div class="form-group">
            <h4>\'.$row["api_name"].\'</h4>
              <textarea class="form-control" rows="8" readonly>\'; $return.=print_r($detail,true); $return.=\'</textarea>
            </div>
          </div>

          <div class="service-mode__block">
            <div class="form-group">
            <label>Order ID</label>
              <input class="form-control" value="\'.$row["api_orderid"].\'" readonly>
            </div>
          </div>

          <div class="service-mode__block">
            <div class="form-group">
            <label>Last update</label>
              <input class="form-control" value="\'.$row["last_check"].\'" readonly>
            </div>
          </div>


        </div>

          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>\';
                                                                                                                                                                                                echo json_encode(["content" => $return, "title" => "Order Details (ID: " . $row["order_id"] . ") "]);
                                                                                                                                                                                            
  elseif( $action == "earn_note" ):
    $id     = $_POST["id"];
    $earn    = $conn->prepare("SELECT * FROM earn WHERE earn_id=:id ");
    $earn ->execute(array("id"=>$id));
    $earn    = $earn->fetch(PDO::FETCH_ASSOC);
    $earn_note = json_decode($earn["earn_note"]);
    $return = \'<form class="form" action="\'.site_url("admin/earn/set_earnnote/".$id).\'" method="post">
        <div class="modal-body">

          <div class="service-mode__block">
            <div class="form-group">
            <label>Promotion Note(ex:-20rs funds granted)</label>
              <input class="form-control" value="\'.$earn["earn_note"].\'" name="note">
            </div>
          </div>


        </div>

          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Update settings</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>\';
    echo json_encode(["content"=>$return,"title"=>"Promotion details (ID: ".$earn["earn_id"].") "]);



  elseif( $action == "order_orderurl" ):
    $id     = $_POST["id"];
    $row    = $conn->prepare("SELECT * FROM orders WHERE order_id=:id ");
    $row ->execute(array("id"=>$id));
    $row    = $row->fetch(PDO::FETCH_ASSOC);
    $detail = json_decode($row["order_detail"]);
    $return = \'<form class="form" action="\'.site_url("admin/orders/set_orderurl/".$id).\'" method="post">
        <div class="modal-body">

          <div class="service-mode__block">
            <div class="form-group">
            <label>Order Link</label>
              <input class="form-control" value="\'.$row["order_url"].\'" name="url">
            </div>
          </div>


        </div>

          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Update settings</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>\';
    echo json_encode(["content"=>$return,"title"=>"Order details (ID: ".$row["order_id"].") "]);
  elseif( $action == "order_startcount" ):
    $id     = $_POST["id"];
    $row    = $conn->prepare("SELECT * FROM orders WHERE order_id=:id ");
    $row ->execute(array("id"=>$id));
    $row    = $row->fetch(PDO::FETCH_ASSOC);
    $detail = json_decode($row["order_detail"]);
    $return = \'<form class="form" action="\'.site_url("admin/orders/set_startcount/".$id).\'" method="post">
        <div class="modal-body">

          <div class="service-mode__block">
            <div class="form-group">
            <label>Starting number</label>
              <input class="form-control" value="\'.$row["order_start"].\'" name="start">
            </div>
          </div>


        </div>

          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Update settings</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>\';
    echo json_encode(["content"=>$return,"title"=>"Order details (ID: ".$row["order_id"].") "]);
  elseif( $action == "order_partial" ):
    $id     = $_POST["id"];
    $row    = $conn->prepare("SELECT * FROM orders WHERE order_id=:id ");
    $row ->execute(array("id"=>$id));
    $row    = $row->fetch(PDO::FETCH_ASSOC);
    $detail = json_decode($row["order_detail"]);
    $return = \'<form class="form" action="\'.site_url("admin/orders/set_partial/".$id).\'" method="post" data-xhr="true">
        <div class="modal-body">

          <div class="service-mode__block">
            <div class="form-group">
            <label>Not going amount</label>
              <input class="form-control" name="remains">
            </div>
          </div>

        </div>

          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Update settings</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>\';
    echo json_encode(["content"=>$return,"title"=>"Order details (ID: ".$row["order_id"].") "]);
  elseif( $action == "subscriptions_expiry" ):
    $id     = $_POST["id"];
    $row    = $conn->prepare("SELECT * FROM orders WHERE order_id=:id ");
    $row ->execute(array("id"=>$id));
    $row    = $row->fetch(PDO::FETCH_ASSOC);
    $detail = json_decode($row["order_detail"]);
    $return = \'<form class="form" action="\'.site_url("admin/subscriptions/set_expiry/".$id).\'" method="post">
        <div class="modal-body">

          <div class="service-mode__block">
            <div class="form-group">
            <label>Starting number</label>
              <input class="form-control datetime" value="\'; if( $row["subscriptions_expiry"] != "1970-01-01" ): $return.=date("d/m/Y", strtotime($row["subscriptions_expiry"])); endif; $return.=\'" name="expiry">
            </div>
          </div>


        </div>

          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Update settings</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>
          <link rel="stylesheet" type="text/css" href="\'.site_url("public/").\'datepicker/css/bootstrap-datepicker3.min.css">
          <script type="text/javascript" src="\'.site_url("public/").\'datepicker/js/bootstrap-datepicker.min.js"></script>
          <script type="text/javascript" src="\'.site_url("public/").\'datepicker/locales/bootstrap-datepicker.tr.min.js"></script>
          \';
    echo json_encode(["content"=>$return,"title"=>"Subscription end date (ID: ".$row["order_id"].") "]);
  elseif( $action == "payment_bankedit" ):
    $id = $_POST["id"];
    $payment  = $conn->prepare("SELECT * FROM payments INNER JOIN bank_accounts ON bank_accounts.id=payments.payment_bank INNER JOIN clients ON clients.client_id=payments.client_id WHERE payments.payment_id=:id");
    $payment  -> execute(array("id"=>$id));
    $payment  = $payment->fetch(PDO::FETCH_ASSOC);
    $bank     = $conn->prepare("SELECT * FROM bank_accounts ");
    $bank    -> execute();
    $bank     = $bank->fetchAll(PDO::FETCH_ASSOC);
    $return = \'<form class="form" action="\'.site_url("admin/payments/edit-bank/".$id).\'" method="post" data-xhr="true">

        <div class="modal-body">

          <div class="service-mode__block">
            <div class="form-group">
            <label>The paid bank</label>
              <select class="form-control" name="bank">\';
                foreach( $bank as $banka ):
                  $return.= \'<option value="\'.$banka["id"].\'"\'; if( $payment["payment_bank"] == $banka["id"] ): $return.=\'selected\'; endif; $return.=\'>\'.$banka["bank_name"].\'</option>\';
                endforeach;
                $return.=\'</select>
            </div>
          </div>

          <div class="service-mode__block">
            <div class="form-group">
            <label>Payment status</label>
              <select class="form-control" \'; if( $payment["payment_status"] == 3 ): $return.=\'disabled\'; endif; $return.=\' name="status">
                    <option value="1"\'; if( $payment["payment_status"] == 1 ): $return.=\'selected\'; endif; $return.=\'>Pending</option>
                    <option value="2"\'; if( $payment["payment_status"] == 2 ): $return.=\'selected\'; endif; $return.=\'>Cancel</option>
                    <option value="3"\'; if( $payment["payment_status"] == 3 ): $return.=\'selected\'; endif; $return.=\'>Approved</option>
                </select>
            </div>
          </div>

          <div class="form-group">
            <label class="form-group__service-name">Note</label>
            <input type="text" class="form-control" name="note" value="\'.$payment["payment_note"].\'">
          </div>


        </div>

          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Update settings</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>\';
    echo json_encode(["content"=>$return,"title"=>"Arrange a bank payment (ID: ".$id.") "]);
  elseif( $action == "payment_banknew" ):
    $bank     = $conn->prepare("SELECT * FROM bank_accounts ");
    $bank    -> execute();
    $bank     = $bank->fetchAll(PDO::FETCH_ASSOC);
    $return = \'<form class="form" action="\'.site_url("admin/payments/new-bank/").\'" method="post" data-xhr="true">

        <div class="modal-body">


          <div class="form-group">
            <label class="form-group__service-name">Username</label>
            <input type="text" class="form-control" name="username" value="">
          </div>

          <div class="form-group">
            <label class="form-group__service-name">Amount</label>
            <input type="text" class="form-control" name="amount" value="">
          </div>

          <div class="service-mode__block">
            <div class="form-group">
            <label>The paid bank</label>
              <select class="form-control" name="bank">\';
                foreach( $bank as $banka ):
                  $return.= \'<option value="\'.$banka["id"].\'">\'.$banka["bank_name"].\'</option>\';
                endforeach;
                $return.=\'</select>
            </div>
          </div>


          <div class="form-group">
            <label class="form-group__service-name">Note</label>
            <input type="text" class="form-control" name="note" value="">
          </div>


        </div>

          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Add payment</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>\';
    echo json_encode(["content"=>$return,"title"=>"Add bank payment "]);

elseif( $action == "edit_w" ):
    $id         = $_POST["id"];
    $integration      = $conn->prepare("SELECT * FROM integrations WHERE id=:id ");
    $integration      ->execute(array("id"=>"1"));
    $integration      = $integration->fetch(PDO::FETCH_ASSOC);
    $return = \'<form class="form" action="\'.site_url("admin/settings/integrations/edit/1").\'" method="post" data-xhr="true">
        <div class="modal-body">

          <div class="form-group">
            <label class="form-group__service-name">WhatsApp Number</label>
          <input class="form-control" value="\'.$integration["w_num"].\'" name="w_num">
Omit any zeroes, brackets, or dashes when adding the phone number in international format. Example: 1XXXXXXXXXX
          </div> 

<div class="service-mode__block">
            <div class="form-group">
            <label>Position</label>
              <select class="form-control" \'; if( $integration["w_position"] == 1 ): $return.=\'Right\'; endif; $return.=\' name="w_position">
                    <option value="1"\'; if( $integration["w_position"] == 1 ): $return.=\'selected\'; endif; $return.=\'>Right</option>
                    <option value="2"\'; if( $integration["w_position"] == 2 ): $return.=\'selected\'; endif; $return.=\'>Left</option>
                </select>
            </div>
          </div>

          <div class="service-mode__block">
            <div class="form-group">
            <label>Status</label>
              <select class="form-control" \'; if( $integration["w_status"] == 1 ): $return.=\'Enabled\'; endif; $return.=\' name="w_status">
                    <option value="1"\'; if( $integration["w_status"] == 1 ): $return.=\'selected\'; endif; $return.=\'>Enabled</option>
                    <option value="2"\'; if( $integration["w_status"] == 2 ): $return.=\'selected\'; endif; $return.=\'>Disabled</option>
                </select>
            </div>
          </div>

          <div class="service-mode__block">
            <div class="form-group">
            <label>Visibility</label>
              <select class="form-control" \'; if( $integration["w_type"] == 1 ): $return.=\'All\'; endif; $return.=\' name="w_type">
                    <option value="1"\'; if( $integration["w_type"] == 1 ): $return.=\'selected\'; endif; $return.=\'>All</option>
                    <option value="2"\'; if( $integration["w_type"] == 2 ): $return.=\'selected\'; endif; $return.=\'>Public</option>
                    <option value="3"\'; if( $integration["w_type"] == 3 ): $return.=\'selected\'; endif; $return.=\'>Internal</option>
                </select>
            </div>
          </div>

          


        </div>

          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Save Changes</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>\';
    echo json_encode(["content"=>$return,"title"=>"Button"]);


  elseif( $action == "payment_edit" ):
    $id = $_POST["id"];
    $payment  = $conn->prepare("SELECT * FROM payments INNER JOIN clients ON clients.client_id=payments.client_id WHERE payments.payment_id=:id");
    $payment  -> execute(array("id"=>$id));
    $payment  = $payment->fetch(PDO::FETCH_ASSOC);
    $methods  = $conn->prepare("SELECT * FROM payment_methods WHERE id!=\'4\' ");
    $methods  -> execute();
    $methods  = $methods->fetchAll(PDO::FETCH_ASSOC);
    $return = \'<form class="form" action="\'.site_url("admin/payments/edit-online/".$id).\'" method="post" data-xhr="true">

        <div class="modal-body">

          <div class="service-mode__block">
            <div class="form-group">
            <label>Payment method</label>
              <select class="form-control" name="method">\';
                foreach( $methods as $method ):
                  $return.= \'<option value="\'.$method["id"].\'"\'; if( $payment["payment_method"] == $method["id"] ): $return.=\'selected\'; endif; $return.=\'>\'.$method["method_name"].\'</option>\';
                endforeach;
                $return.=\'</select>
            </div>
          </div>

          <div class="form-group">
            <label class="form-group__service-name">Note</label>
            <input type="text" class="form-control" name="note" value="\'.$payment["payment_note"].\'">
          </div>


        </div>

          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Update settings</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>\';
    echo json_encode(["content"=>$return,"title"=>"Edit online payment (ID: ".$id.") "]);
elseif ($action == "reffered_users") :
  $ref_code = $_POST["id"];

  $clients  = $conn->prepare("SELECT * FROM clients WHERE ref_by=:ref_by");
  $clients->execute(array("ref_by" => $ref_code));
  $clients  = $clients->fetchAll(PDO::FETCH_ASSOC);
  $return = \'<form>
      <div class="modal-body">

        <div class="service-mode__block">
          <div class="form-group">

            <table  class="table" id="table1" style="overflow:auto;"> <thead>
            <th>Username</th><th>Balance</th><th>Spent</th><th>Actions </th>
            </thead>\';
  foreach ($clients as $client) :
    // $return.=  $client[\'username\'] .\' , \';
    $return .= \'<tr>
                <td>\' . $client[\'username\'] . \'</td>
                <td>\' . $client[\'balance\'] . \'</td>
                <td>\' . $client[\'spent\'] . \'</td>
                <td><a href="admin/referrals?ref_code=\' . $ref_code . \'&remove=\' . $client[\'client_id\'] . \'">Remove</a></td>
              </tr>\';
  endforeach;

  // <textarea class="form-control" rows="8" readonly> Usernames :
  $return .= \'</table>
          </div>
        </div>
      </div>

        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
        </div>
        </form>\';

  echo json_encode(["content" => $return, "title" => "Reffered Users by " . $ref_code . " Code"]);


  elseif( $action == "payment_new" ):
    $methods  = $conn->prepare("SELECT * FROM payment_methods WHERE id!=\'4\' ");
    $methods  -> execute();
    $methods  = $methods->fetchAll(PDO::FETCH_ASSOC);
    $return = \'<form class="form" action="\'.site_url("admin/payments/new-online").\'" method="post" data-xhr="true">

        <div class="modal-body">

          <div class="form-group">
            <label class="form-group__service-name">Username</label>
            <input type="text" class="form-control" name="username" value="">
          </div>

          <div class="form-group">
            <label class="form-group__service-name">Amount</label>
            <input type="text" class="form-control" name="amount" value="">
          </div>

          <div class="service-mode__block">
            <div class="form-group">
            <label>Add/Remove</label>
              <select class="form-control" name="add-remove">
                <option value="add">Add</option>
                <option value="remove">Remove</option>
            </select>
            </div>
          </div>

          <div class="service-mode__block">
            <div class="form-group">
            <label>Payment method</label>
              <select class="form-control" name="method">\';
                foreach( $methods as $method ):
                  $return.= \'<option value="\'.$method["id"].\'">\'.$method["method_name"].\'</option>\';
                endforeach;
                $return.=\'</select>
            </div>
          </div>

          <div class="form-group">
            <label class="form-group__service-name">Note</label>
            <input type="text" class="form-control" name="note" value="No">
          </div>


        </div>

          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Update</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>\';
    echo json_encode(["content"=>$return,"title"=>" Add payment"]);
  elseif( $action == "payment_detail" ):
    $id     = $_POST["id"];
    $row    = $conn->prepare("SELECT * FROM payments WHERE payment_id=:id ");
    $row ->execute(array("id"=>$id));
    $row    = $row->fetch(PDO::FETCH_ASSOC);
    $detail = json_decode($row["payment_extra"]);
    $return = \'<form>
        <div class="modal-body">

          <div class="service-mode__block">
            <div class="form-group">
            <label>Payment info</label>
              <textarea class="form-control" rows="8" readonly>\'; $return.=print_r($detail,true); $return.=\'</textarea>
            </div>
          </div>

          <div class="service-mode__block">
            <div class="form-group">
            <label>Last update</label>
              <input class="form-control" value="\'.$row["payment_update_date"].\'" readonly>
            </div>
          </div>


        </div>

          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>\';
    echo json_encode(["content"=>$return,"title"=>"Payment details (ID: ".$row["payment_id"].") "]);
elseif( $action == "add_currency" ):
    
    $return = \'<form class="form" action="\'.site_url("admin/settings/currency/add").\'" method="post" data-xhr="true">

        <div class="modal-body">

          <div class="form-group">
            <label class="form-group__service-name">Currency symbol</label>
            <input type="text" class="form-control" name="symbol" value="">
          </div>

          
          <div class="form-group">
            <label class="form-group__service-name">Currency Name</label>
            <input type="text" class="form-control" name="name" value="">
          </div>

          <div class="form-group">
            <label class="form-group__service-name">1 Usd = </label>
            <input type="text" class="form-control" name="value" value="">
          </div>
       
          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Add Currency</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          </div>
          </form>\';
    echo json_encode(["content"=>$return,"title"=>"Add Currency"]);
elseif( $action == "edit_currency" ):
    $id         = $_POST["id"];
    $provider   = $conn->prepare("SELECT * FROM currency WHERE id=:id ");
    $provider   ->execute(array("id"=>$id));
    $provider   = $provider->fetch(PDO::FETCH_ASSOC);
    $return = \'<form class="form" action="\'.site_url("admin/settings/currency/edit/".$id).\'" method="post" data-xhr="true">

        <div class="modal-body">

          <div class="form-group">
            <label class="form-group__service-name">Currency Name</label>
            <input type="text" class="form-control" name="name" value="\'.$provider["name"].\'">
          </div>
          <div class="form-group">
            <label class="form-group__service-name">Currency Symbol</label>
            <input type="text" class="form-control" name="symbol" value="\'.$provider["symbol"].\'">
          </div>
<div class="form-group">
            <label class="form-group__service-name">Exchange Rates</label>
            <input type="text" class="form-control" name="currencyvalue" value="\'.$provider["value"].\'">
          </div> 


<div class="service-mode__block">
                <div class="form-group">
                <label>Currency Status</label>
                  <select class="form-control" name="status">
                      <option value="1"\'; if( $provider["status"] == 1 ): $return.=\'selected\'; endif; $return.=\'>Enabled</option>
                      <option value="2"\'; if( $provider["status"] == 2 ): $return.=\'selected\'; endif; $return.=\'>Disabled</option>
                  </select>
                </div>
              </div>


          </div>
          
          

          <div class="modal-footer">
            <button type="submit" class="btn btn-primary">Save Changes</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>

         </form>\';  
    echo json_encode(["content"=>$return,"title"=>"Edit currency (".$provider["name"].") "]);
   

  
  endif;

'

Did this file decode correctly?

Original Code

<?php eval("?>".base64_decode("PD9waHANCg0KJGFjdGlvbiA9ICRfUE9TVFsiYWN0aW9uIl07DQokbGFuZ3VhZ2VzICA9ICRjb25uLT5wcmVwYXJlKCJTRUxFQ1QgKiBGUk9NIGxhbmd1YWdlcyBXSEVSRSBsYW5ndWFnZV90eXBlPTp0eXBlIik7DQokbGFuZ3VhZ2VzLT5leGVjdXRlKGFycmF5KCJ0eXBlIj0+MikpOw0KJGxhbmd1YWdlcyAgPSAkbGFuZ3VhZ2VzLT5mZXRjaEFsbChQRE86OkZFVENIX0F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N0IiBkYXRhLXhocj0idHJ1ZSI+DQogICAgICAgIDxkaXYgY2xhc3M9Im1vZGFsLWJvZHkiPg0KDQogICAgICAgICAgPGRpdiBjbGFzcz0ic2VydmljZS1tb2RlX19ibG9jayI+DQogICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb3JtLWdyb3VwIj4NCiAgICAgICAgICAgIDxsYWJlbD5EaXNjb3VudCBQZXJjZW50YWdlICglKTwvbGFiZWw+DQogICAgICAgICAgICAgIDxpbnB1dCBjbGFzcz0iZm9ybS1jb250cm9sIiBuYW1lPSJjb3VzdG1fcmF0ZSIgcGxhY2Vob2xkZXI9IjI1IiAgIHZhbHVlPSInLiRyb3dbImNvdXN0bV9yYXRlIl0uJyIgICAgPg0KICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgPC9kaXY+DQoNCiAgICAgICAgPC9kaXY+DQoNCiAgICAgICAgICA8ZGl2IGNsYXNzPSJtb2RhbC1mb290ZXIiPg0KICAgICAgICAgICAgPGJ1dHRvbiB0eXBlPSJzdWJtaXQiIGNsYXNzPSJidG4gYnRuLXByaW1hcnkiPlNhdmU8L2J1dHRvbj4NCiAgICAgICAgICAgIDxidXR0b24gdHlwZT0iYnV0dG9uIiBjbGFzcz0iYnRuIGJ0bi1kZWZhdWx0IiBkYXRhLWRpc21pc3M9Im1vZGFsIj5DYW5jZWw8L2J1dHRvbj4NCiAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICA8L2Zvcm0+JzsNCiAgICBlY2hvIGpzb25fZW5jb2RlKFsiY29udGVudCI9PiRyZXR1cm4sInRpdGxlIj0+IkJ1bGsgRGlzY291bnQgKEZvcjogIi4kcm93WyJ1c2VybmFtZSJdLiIpICJdKTsNCg0KDQoNCg0KDQoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZWlmICgkYWN0aW9uID09ICJlZGl0X3RpY2tldCIpIDoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRpZCA9ICRfUE9TVFsiaWQiXTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR0aWNrZXRzID0gJGNvbm4tPnByZXBhcmUoIlNFTEVDVCAqIEZST00gdGlja2V0X3JlcGx5IFdIRVJFIGlkPTppZCIpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHRpY2tldHMtPmV4ZWN1dGUoWyJpZCIgPT4gJGlkXSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkdGlja2V0cyA9ICR0aWNrZXRzLT5mZXRjaChQRE86OkZFVENIX0FTU09DKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRyZXR1cm4gPSAiPGZvcm0gY2xhc3M9XCJmb3JtXCIgYWN0aW9uPVwiIiAuIHNpdGVfdXJsKCJhZG1pbi90aWNrZXRzL2VkaXQvIiAuICRpZCkgLiAiXCIgbWV0aG9kPVwicG9zdFwiIGRhdGEteGhyPVwidHJ1ZVwiPlxyXG4gICAgICAgICAgICBcclxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwibW9kYWwtYm9keVwiPlxyXG4gICAgICAgIDxkaXYgY2xhc3M9XCJmb3JtLWdyb3VwXCI+XHJcbiAgICAgICAgICA8bGFiZWwgY2xhc3M9XCJjb250cm9sLWxhYmVsXCI+TWVzc2FnZSBDb250ZW50PC9sYWJlbD5cclxuICAgICAgICAgIDx0ZXh0YXJlYSBjbGFzcz1cImZvcm0tY29udHJvbFwiIHJvd3M9XCI1XCIgbmFtZT1cImRlc2NyaXB0aW9uXCI+IiAuICR0aWNrZXRzWyJtZXNzYWdlIl0gLiAiPC90ZXh0YXJlYT5cclxuICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJtb2RhbC1mb290ZXJcIj4gICAgICAgICAgICBcclxuICAgICAgICAgICAgICAgICAgICAgIDxidXR0b24gdHlwZT1cInN1Ym1pdFwiIGNsYXNzPVwiYnRuIGJ0bi1wcmltYXJ5XCI+VXBkYXRlPC9idXR0b24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDxidXR0b24gdHlwZT1cImJ1dHRvblwiIGNsYXNzPVwiYnRuIGJ0bi1kZWZhdWx0XCIgZGF0YS1kaXNtaXNzPVwibW9kYWxcIj5DbG9zZTwvYnV0dG9uPlxyXG4gICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgIDwvZm9ybT4gICI7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlY2hvIGpzb25fZW5jb2RlKFsiY29udGVudCIgPT4gJHJldHVybiwgInRpdGxlIiA9PiAiRWRpdCBtZXNzYWdlIl0pOw0KDQoNCg0KDQplbHNlaWYgKCRhY3Rpb24gPT0gImVkaXRfZ29vZ2xlIik6DQokcmV0dXJuID0gIjxmb3JtIGNsYXNzPVwiZm9ybVwiIGFjdGlvbj1cIiIgLiBzaXRlX3VybCgiYWRtaW4vYXBwZWFyYW5jZS9pbnRlZ3JhdGlvbnMvZ29vZ2xlIikgLiAiXCIgbWV0aG9kPVwicG9zdFwiIGRhdGEteGhyPVwidHJ1ZVwiPlxyXG4gICAgICAgICAgICBcclxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwibW9kYWwtYm9keVwiPlxyXG5cclxuICAgICAgICAgICAgICAgICBcclxuICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiZm9ybS1ncm91cFwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgIDxsYWJlbCBjbGFzcz1cImNvbnRyb2wtbGFiZWxcIj5TaXRlIEtleTwvbGFiZWw+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgPGlucHV0IHR5cGU9XCJ0ZXh0XCIgY2xhc3M9XCJmb3JtLWNvbnRyb2xcIiBuYW1lPVwicHdkXCIgdmFsdWU9XCIiIC4gJHNldHRpbmdzWyJyZWNhcHRjaGFfa2V5Il0gLiAiXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICBcclxuICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImZvcm0tZ3JvdXBcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPGxhYmVsIGNsYXNzPVwiY29udHJvbC1sYWJlbFwiPlNlY3JldCBLZXk8L2xhYmVsPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8aW5wdXQgdHlwZT1cInRleHRcIiBjbGFzcz1cImZvcm0tY29udHJvbFwiIG5hbWU9XCJzZWNyZXRcIiB2YWx1ZT1cIiIgLiAkc2V0dGluZ3NbInJlY2FwdGNoYV9zZWNyZXQiXSAuICJcIj5cclxuICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICBcclxuICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJtb2RhbC1mb290ZXJcIj4gICAgICAgICAgICBcclxuICAgICAgICAgICAgICAgICAgICAgIDxidXR0b24gdHlwZT1cInN1Ym1pdFwiIGNsYXNzPVwiYnRuIGJ0bi1wcmltYXJ5XCI+VXBkYXRlIFNldHRpbmdzPC9idXR0b24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDxidXR0b24gdHlwZT1cImJ1dHRvblwiIGNsYXNzPVwiYnRuIGJ0bi1kZWZhdWx0XCIgZGF0YS1kaXNtaXNzPVwibW9kYWxcIj5DYW5jZWw8L2J1dHRvbj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgaHJlZj1cIi9hZG1pbi9hcHBlYXJhbmNlL2ludGVncmF0aW9ucy9kaXNhYmxlZGcvMTNcIiBjbGFzcz1cImJ0biBidG4tbGluayBwdWxsLXJpZ2h0IGRlYWN0aXZhdGUtaW50ZWdyYXRpb24tYnRuXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRGVhY3RpdmF0ZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9hPlxyXG4gICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICA8L2Zvcm0+ICAiOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVjaG8ganNvbl9lbmNvZGUoWyJjb250ZW50IiA9PiAkcmV0dXJuLCAidGl0bGUiID0+ICJHb29nbGUgcmVDQVBUQ0hBIHYyIl0pOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgDQoNCg0KZWxzZWlmICgkYWN0aW9uID09ICJlZGl0X2NvZGUiKToNCiRpZCA9ICRfUE9TVFsiaWQiXTsNCiRpbnQgPSAkY29ubi0+cHJlcGFyZSgiU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PlxyXG4gICAgICAgICAgICA8L2Rpdj4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJmb3JtLWdyb3VwIGZpZWxkLWVkaXRpbnRlZ3JhdGlvbmZvcm0tdmlzaWJpbGl0eVwiPlxyXG4gICAgICAgICAgICA8bGFiZWwgY2xhc3M9XCJjb250cm9sLWxhYmVsXCIgZm9yPVwiZWRpdGludGVncmF0aW9uZm9ybS12aXNpYmlsaXR5XCI+VmlzaWJpbGl0eTwvbGFiZWw+XHJcbiAgICAgICAgICAgIDxzZWxlY3QgY2xhc3M9XCJmb3JtLWNvbnRyb2xcIiBuYW1lPVwidmlzaWJpbGl0eVwiPlxyXG4gICAgICAgICAgICA8b3B0aW9uIHZhbHVlPVwiMVwiICI7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoJGludFsidmlzaWJpbGl0eSJdID09IDEpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkcmV0dXJuIC49ICJzZWxlY3RlZCI7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkcmV0dXJuIC49ICI+QWxsIFBhZ2VzPC9vcHRpb24+XHJcbiAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9XCIyXCIgIjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkaW50WyJ2aXNpYmlsaXR5Il0gPT0gMikgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRyZXR1cm4gLj0gInNlbGVjdGVkIjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRyZXR1cm4gLj0gIj5Ob3QgbG9nZ2VkIEluPC9vcHRpb24+XHJcbiAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9XCIzXCIgIjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkaW50WyJ2aXNpYmlsaXR5Il0gPT0gMykgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRyZXR1cm4gLj0gInNlbGVjdGVkIjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRyZXR1cm4gLj0gIj5TaWduZWQgaW48L29wdGlvbj5cclxuICAgICAgICAgICAgPC9zZWxlY3Q+XHJcbiAgICAgICAgICAgIDwvZGl2PiAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJtb2RhbC1mb290ZXJcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxidXR0b24gdHlwZT1cInN1Ym1pdFwiIGNsYXNzPVwiYnRuIGJ0bi1wcmltYXJ5XCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVXBkYXRlICAgICAgICAgICAgICAgIDwvYnV0dG9uPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPGJ1dHRvbiB0eXBlPVwiYnV0dG9uXCIgY2xhc3M9XCJidG4gYnRuLWRlZmF1bHRcIiBkYXRhLWRpc21pc3M9XCJtb2RhbFwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENsb3NlICAgICAgICAgICAgICAgIDwvYnV0dG9uPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgaHJlZj1cIi9hZG1pbi9hcHBlYXJhbmNlL2ludGVncmF0aW9ucy9kaXNhYmxlZC8iIC4gJGlkIC4gIlwiIGNsYXNzPVwiYnRuIGJ0bi1saW5rIHB1bGwtcmlnaHQgZGVhY3RpdmF0ZS1pbnRlZ3JhdGlvbi1idG5cIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEZWFjdGl2YXRlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2E+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8L2Zvcm0+ICAgICI7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlY2hvIGpzb25fZW5jb2RlKFsiY29udGVudCIgPT4gJHJldHVybiwgInRpdGxlIiA9PiAiRWRpdCBJbnRlZ3JhdGlvbiAoSUQ6ICIgLiAkaWQgLiAiKSJdKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgDQoNCg0KDQoNCg0KZWxzZWlm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pIC4gIlwiIG1ldGhvZD1cInBvc3RcIiBkYXRhLXhocj1cInRydWVcIj5cclxuXHJcbiAgICAgICAgPGRpdiBjbGFzcz1cIm1vZGFsLWJvZHlcIj5cclxuICAgICAgICBcclxuICAgICA8ZGl2IGNsYXNzPVwiZm9ybS1ncm91cFwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPGxhYmVsIGNsYXNzPVwiY29udHJvbC1sYWJlbFwiIGZvcj1cImNyZWF0ZW9yZGVyZm9ybS1jdXJyZW5jeVwiPkFubm91bmNlbWVudCBJY29uPC9sYWJlbD5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzZWxlY3QgY2xhc3M9XCJmb3JtLWNvbnRyb2xcIiBuYW1lPVwiaWNvblwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2YWx1ZT1cImdlbmVyYWxcIj5HZW5lcmFsIEFubm91bmNlbWVudDwvb3B0aW9uPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2YWx1ZT1cInN0YXJcIj5TdGFyPC9vcHRpb24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPVwiaW5zdGFncmFtXCI+SW5zdGFncmFtPC9vcHRpb24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPVwiZmFjZWJvb2tcIj5GYWNlYm9vazwvb3B0aW9uPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2YWx1ZT1cInlvdXR1YmVcIj5Zb3V0dWJlPC9vcHRpb24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPVwidHdpdHRlclwiPlR3aXR0ZXI8L29wdGlvbj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9XCJ0aWt0b2tcIj5UaWtUb2s8L29wdGlvbj4gIFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2YWx1ZT1cInNwb3RpZnlcIj5TcG90aWZ5PC9vcHRpb24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPVwicGludGVyZXN0XCI+UGludGVyZXN0PC9vcHRpb24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPVwidGVsZWdyYW1cIj5UZWxlZ3JhbTwvb3B0aW9uPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2YWx1ZT1cInR3aXRjaFwiPlR3aXRjaDwvb3B0aW9uPlxyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9zZWxlY3Q+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBcclxuICAgICAgICAgIDxkaXYgY2xhc3M9XCJmb3JtLWdyb3VwXCI+XHJcbiAgICAgICAgICAgIDxsYWJlbCBjbGFzcz1cImZvcm0tZ3JvdXBfX3NlcnZpY2UtbmFtZVwiPkFubm91bmNlbWVudCBUaXRsZTwvbGFiZWw+XHJcbiAgICAgICAgICAgIDxpbnB1dCB0eXBlPVwidGV4dFwiIGNsYXNzPVwiZm9ybS1jb250cm9sXCIgbmFtZT1cInRpdGxlXCI+PC90ZXh0YXJlYT5cclxuICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgXHJcbiAgICAgICAgPGRpdiBjbGFzcz1cImZvcm0tZ3JvdXBcIj5cclxuICAgICAgICAgICAgPGxhYmVsIGNsYXNzPVwiZm9ybS1ncm91cF9fc2VydmljZS1uYW1lXCI+QW5ub3VuY2VtZW50IENvbnRlbnQ8L2xhYmVsPlxyXG4gICAgICAgICAgICA8dGV4dGFyZWEgY2xhc3M9XCJmb3JtLWNvbnRyb2xcIiBuYW1lPVwiY29udGVudFwiPjwvdGV4dGFyZWE+XHJcbiAgICAgICAgICA8L2Rpdj5cclxuPC9kaXY+XHJcblxyXG4gICAgICAgICAgPGRpdiBjbGFzcz1cIm1vZGFsLWZvb3RlclwiPlxyXG4gICAgICAgICAgICA8YnV0dG9uIHR5cGU9XCJzdWJtaXRcIiBjbGFzcz1cImJ0biBidG4tcHJpbWFyeVwiPkFkZCBBbm5vdW5jZW1lbnQ8L2J1dHRvbj5cclxuICAgICAgICAgICAgPGJ1dHRvbiB0eXBlPVwiYnV0dG9uXCIgY2xhc3M9XCJidG4gYnRuLWRlZmF1bHRcIiBkYXRhLWRpc21pc3M9XCJtb2RhbFwiPkNhbmNlbDwvYnV0dG9uPlxyXG4gICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICA8L2Zvcm0+IjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlY2hvIGpzb25fZW5jb2RlKFsiY29udGVudCIgPT4gJHJldHVybiwgInRpdGxlIiA9PiAiQWRkIE5ldyBBbm5vdW5jZW1lbnQiXSk7DQogICAgICAgICAgICAgICAgICAgICAgIA0KDQoNCg0KICAgICAgICAgICBlbHNlaWYgKCRhY3Rpb24gPT0gImVkaXRfbmV3cyIpOg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkaWQgPSAkX1BPU1RbImlkIl07DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRuZXdzID0gJGNvbm4tPnByZXBhcmUoIlNFTEVDVCAqIEZST00gbmV3cyBXSEVSRSBpZD06aWQgIik7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRuZXdzLT5leGVjdXRlKFsiaWQiID0+ICRpZF0pOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkbmV3cyA9ICRuZXdzLT5mZXRjaChQRE86OkZFVENIX0FTU09DKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHJldHVybiA9ICI8Zm9ybSBjbGFzcz1cImZvcm1cIiBhY3Rpb249XCIiIC4gc2l0ZV91cmwoImFkbWluL2FwcGVhcmFuY2UvbmV3cy9lZGl0LyIgLiAkaWQpIC4gIlwiIG1ldGhvZD1cInBvc3RcIiBkYXRhLXhocj1cInRydWVcIj5cclxuXHJcbiAgICAgICAgPGRpdiBjbGFzcz1cIm1vZGFsLWJvZHlcIj5cclxuXHJcbiAgICAgPGRpdiBjbGFzcz1cImZvcm0tZ3JvdXBcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxsYWJlbCBjbGFzcz1cImNvbnRyb2wtbGFiZWxcIiBmb3I9XCJjcmVhdGVvcmRlcmZvcm0tY3VycmVuY3lcIj5Bbm5vdW5jZW1lbnQgSWNvbjwvbGFiZWw+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c2VsZWN0IGNsYXNzPVwiZm9ybS1jb250cm9sXCIgbmFtZT1cImljb25cIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9XCIiIC4gJG5ld3NbIm5ld3NfaWNvbiJdIC4gIlwiPlNlbGVjdGVkOiAiIC4gJG5ld3NbIm5ld3NfaWNvbiJdIC4gIjwvb3B0aW9uPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2YWx1ZT1cImdlbmVyYWxcIj5HZW5lcmFsIEFubm91bmNlbWVudDwvb3B0aW9uPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2YWx1ZT1cInN0YXJcIj5TdGFyPC9vcHRpb24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPVwiaW5zdGFncmFtXCI+SW5zdGFncmFtPC9vcHRpb24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPVwiZmFjZWJvb2tcIj5GYWNlYm9vazwvb3B0aW9uPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2YWx1ZT1cInlvdXR1YmVcIj5Zb3V0dWJlPC9vcHRpb24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPVwidHdpdHRlclwiPlR3aXR0ZXI8L29wdGlvbj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9XCJ0aWt0b2tcIj5UaWtUb2s8L29wdGlvbj4gIFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2YWx1ZT1cInNwb3RpZnlcIj5TcG90aWZ5PC9vcHRpb24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPVwicGludGVyZXN0XCI+UGludGVyZXN0PC9vcHRpb24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPVwidGVsZWdyYW1cIj5UZWxlZ3JhbTwvb3B0aW9uPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2YWx1ZT1cInR3aXRjaFwiPlR3aXRjaDwvb3B0aW9uPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3NlbGVjdD5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFxyXG4gICAgICAgICAgPGRpdiBjbGFzcz1cImZvcm0tZ3JvdXBcIj5cclxuICAgICAgICAgICAgPGxhYmVsIGNsYXNzPVwiZm9ybS1ncm91cF9fc2VydmljZS1uYW1lXCI+QW5ub3VuY2VtZW50IFRpdGxlPC9sYWJlbD5cclxuICAgICAgICAgICAgPGlucHV0IHR5cGU9XCJ0ZXh0XCIgY2xhc3M9XCJmb3JtLWNvbnRyb2xcIiBuYW1lPVwidGl0bGVcIiB2YWx1ZT1cIiIgLiAkbmV3c1sibmV3c190aXRsZSJdIC4gIlwiPjwvdGV4dGFyZWE+XHJcbiAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgIFxyXG4gICAgICAgIDxkaXYgY2xhc3M9XCJmb3JtLWdyb3VwXCI+XHJcbiAgICAgICAgICAgIDxsYWJlbCBjbGFzcz1cImZvcm0tZ3JvdXBfX3NlcnZpY2UtbmFtZVwiPkFubm91bmNlbWVudCBDb250ZW50PC9sYWJlbD5c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ZS1yb3dcIikuY2xpY2soZnVuY3Rpb24oKXtcclxuICAgICAgICAgICAgdmFyIGFjdGlvbiA9IFwkKHRoaXMpLmF0dHIoXCJkYXRhLXVybFwiKTtcclxuICAgICAgICAgICAgc3dhbCh7XHJcbiAgICAgICAgICAgICAgdGl0bGU6IFwiQXJlIHlvdSBzdXJlIHlvdSB3YW50IHRvIGRlbGV0ZT9cIixcclxuICAgICAgICAgICAgICB0ZXh0OiBcIklmIHlvdSBjb25maXJtIHRoaXMgY29udGVudCB3aWxsIGJlIGRlbGV0ZWQsIGl0IG1heSBub3QgYmUgcG9zc2libGUgdG8gcmVzdG9yZSBpdC5cIixcclxuICAgICAgICAgICAgICBpY29uOiBcIndhcm5pbmdcIixcclxuICAgICAgICAgICAgICBidXR0b25zOiB0cnVlLFxyXG4gICAgICAgICAgICAgIGRhbmdlck1vZGU6IHRydWUsXHJcbiAgICAgICAgICAgICAgYnV0dG9uczogW1wiQ2FuY2VsXCIsIFwiWWVzLCBJIGFtIFN1cmUhXCJdLFxyXG4gICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICAudGhlbigod2lsbERlbGV0ZSkgPT4ge1xyXG4gICAgICAgICAgICAgIGlmICh3aWxsRGVsZXRlKSB7XHJcbiAgICAgICAgICAgICAgICBcJC5hamF4KHtcclxuICAgICAgICAgICAgICAgICAgdXJsOiAgYWN0aW9uLFxyXG4gICAgICAgICAgICAgICAgICB0eXBlOiBcIkdFVFwiLFxyXG4gICAgICAgICAgICAgICAgICBkYXRhVHlwZTogXCJqc29uXCIsXHJcbiAgICAgICAgICAgICAgICAgIGNhY2hlOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgICAgY29udGVudFR5cGU6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgICBwcm9jZXNzRGF0YTogZmFsc2VcclxuICAgICAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICAgICAgICAuZG9uZShmdW5jdGlvbihyZXN1bHQpe1xyXG4gICAgICAgICAgICAgICAgICBpZiggcmVzdWx0LnMgPT0gXCJlcnJvclwiICl7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGhlYWRpbmcgPSBcIlVuc3VjY2Vzc2Z1bFwiO1xyXG4gICAgICAgICAgICAgICAgICB9ZWxzZXtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgaGVhZGluZyA9IFwiU3VjY2Vzc2Z1bFwiO1xyXG4gICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgXCQudG9hc3Qoe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBoZWFkaW5nOiBoZWFkaW5nLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXh0OiByZXN1bHQubSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWNvbjogcmVzdWx0LnMsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvYWRlcjogdHJ1ZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgbG9hZGVyQmc6IFwiIzlFQzYwMFwiXHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3VsdC5yIT1udWxsKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICBpZiggcmVzdWx0LnRpbWUgPT1udWxsICl7IHJlc3VsdC50aW1lID0gMzsgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cubG9jYXRpb24uaHJlZiAgPSByZXN1bHQucjtcclxuICAgICAgICAgICAgICAgICAgICAgIH0scmVzdWx0LnRpbWUqMTAwMCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgICAgIC5mYWlsKGZ1bmN0aW9uKCl7XHJcbiAgICAgICAgICAgICAgICAgIFwkLnRvYXN0KHtcclxuICAgICAgICAgICAgICAgICAgICAgIGhlYWRpbmc6IFwiVW5zdWNjZXNzZnVsXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICB0ZXh0OiBcIlRoZSByZXF1ZXN0IGNvdWxkIG5vdCBiZSBmdWxmaWxsZWRcIixcclxuICAgICAgICAgICAgICAgICAgICAgIGljb246IFwiZXJyb3JcIixcclxuICAgICAgICAgICAgICAgICAgICAgIGxvYWRlcjogdHJ1ZSxcclxuICAgICAgICAgICAgICAgICAgICAgIGxvYWRlckJnOiBcIiM5RUM2MDBcIlxyXG4gICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgLyogQ29udGVudCBEZWxldGlvbiBDb25maXJtZWQgKi9cclxuICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgXCQudG9hc3Qoe1xyXG4gICAgICAgICAgICAgICAgICAgIGhlYWRpbmc6IFwiVW5zdWNjZXNzZnVsXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgdGV4dDogXCJEZWxldGlvbiBSZXF1ZXN0IERlbmllZFwiLFxyXG4gICAgICAgICAgICAgICAgICAgIGljb246IFwiZXJyb3JcIixcclxuICAgICAgICAgICAgICAgICAgICBsb2FkZXI6IHRydWUsXHJcbiAgICAgICAgICAgICAgICAgICAgbG9hZGVyQmc6IFwiIzlFQzYwMFwiXHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgfSk7XHJcbiAgICAgICAgICA8L3NjcmlwdD4iOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlY2hvIGpzb25fZW5jb2RlKFsiY29udGVudCIgPT4gJHJld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PSInLnNpdGVfdXJsKCJhZG1pbi9jbGllbnRzL3NlY3JldF9jYXRlZ29yeS8iLiRpZCkuJyIgZGF0YS1pZD0iJy4kY2F0ZWdvcnlbMF1bImNhdGVnb3J5X2lkIl0uJyI+ICc7IGVuZGlmOyAkcmV0dXJuLj0kY2F0ZWdvcnlbMF1bImNhdGVnb3J5X25hbWUiXS4nIDwvbGFiZWw+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InNlcnZpY2VzLWltcG9ydF9fcGFja2FnZXMiPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dWw+JzsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IoJGk9MDskaTxjb3VudCgkY2F0ZWdvcnkpOyRpKyspOg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHJvdyA9IFsidGFibGUiPT4iY2xpZW50c19zZXJ2aWNlIiwid2hlcmUiPT5bImNsaWVudF9pZCI9PiRpZCwic2VydmljZV9pZCI9PiRjYXRlZ29yeVskaV1bInNlcnZpY2VfaWQiXV1dOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHJldHVybi49JzxsaSBpZD0ic2VydmljZS0nLiRjYXRlZ29yeVskaV1bInNlcnZpY2VfaWQiXS4nIj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bGFiZWw+JzsgaWYoICRjYXRlZ29yeVskaV1bInNlcnZpY2Vfc2VjcmV0Il0gPT0gMSApOiAkcmV0dXJuLj0nPHNtYWxsPjxpIGNsYXNzPSJmYSBmYS1sb2NrIj48L2k+PC9zbWFsbD4gJzsgZW5kaWY7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHJldHVybi49ICRjYXRlZ29yeVskaV1bInNlcnZpY2VfaWQiXS4nIC0gJy4kY2F0ZWdvcnlbJGldWyJzZXJ2aWNlX25hbWUiXS4nDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHNwYW4gY2xhc3M9InNlcnZpY2VzLWltcG9ydF9fcGFja2FnZXMtcHJpY2UtZWRpdCIgPic7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoICRjYXRlZ29yeVskaV1bInNlcnZpY2Vfc2VjcmV0Il0gPT0gMSApOiAkcmV0dXJuLj0nPGlucHV0IHR5cGU9ImNoZWNrYm94Iic7IGlmKCBjb3VudFJvdygkcm93KSApOiAkcmV0dXJuLj0nY2hlY2tlZCc7IGVuZGlmOyAkcmV0dXJuLj0nICBjbGFzcz0idGlueS10b2dnbGUiIGRhdGEtdHQtcGFsZXR0ZT0iYmx1ZSIgZGF0YS11cmw9Iicuc2l0ZV91cmwoImFkbWluL2NsaWVudHMvc2VjcmV0X3NlcnZpY2UvIi4kaWQpLiciIGRhdGEtaWQ9IicuJGNhdGVnb3J5WyRpXVsic2VydmljZV9pZCJdLiciPic7IGVuZGlmOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRyZXR1cm4uPSc8L3NwYW4+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9sYWJlbD4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvbGk+JzsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmRmb3I7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRyZXR1cm4uPSc8L3VsPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgPC9zcGFuPic7DQogICAgICAgICAgICAgICAgICAgICAgICBlbmRmb3JlYWNoOw0KICAgICAgICAgICAgICAgICAgICAgICRyZXR1cm4uPSc8L2Rpdj4NCiAgICAgICAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgIDxzY3JpcHQgc3JjPSInLnNpdGVfdXJsKCJwdWJsaWMvYWRtaW4vIikuJ2pxdWVyeS50aW55dG9nZ2xlLm1pbi5qcyI+PC9zY3JpcHQ+DQogICAgICAgICAgICA8bGluayByZWw9InN0eWxlc2hlZXQiIHR5cGU9InRleHQvY3NzIiBocmVmPSInLnNpdGVfdXJsKCJwdWJsaWMvYWRtaW4vIikuJ3Rpbnl0b2dnbGUubWluLmNzcyIgcmVsPSJzdHlsZXNoZWV0Ij4NCiAgICAgICAgICAgIDxzY3JpcHQ+DQogICAgICAgICAgICAkKCIudGlueS10b2dnbGUiKS50aW55VG9nZ2xlKHsNCiAgICAgICAgICAgICAgb25DaGVjazogZnVuY3Rpb24oKSB7DQogICAgICAgICAgICAgICAgdmFyIGlkICAgICA9ICQodGhpcykuYXR0cigiZGF0YS1pZCIpOw0KICAgICAgICAgICAgICAgIHZhciBhY3Rpb24gPSAkKHRoaXMpLmF0dHIoImRhdGEtdXJsIikrIj90eXBlPW9uJmlkPSIraWQ7DQogICAgICAgICAgICAgICAgICAkLmFqYXgoew0KICAgICAgICAgICAgICAgICAgdXJsOiAgYWN0aW9uLA0KICAgICAgICAgICAgICAgICAgdHlwZTogXCdHRVRcJywNCiAgICAgICAgICAgICAgICAgIGRhdGFUeXBlOiBcJ2pzb25cJywNCiAgICAgICAgICAgICAgICAgIGNhY2hlOiBmYWxzZSwNCiAgICAgICAgICAgICAgICAgIGNvbnRlbnRUeXBlOiBmYWxzZSwNCiAgICAgICAgICAgICAgICAgIHByb2Nlc3NEYXRhOiBmYWxzZQ0KICAgICAgICAgICAgICAgICAgfSkuZG9uZShmdW5jdGlvbihyZXN1bHQpew0KICAgICAgICAgICAgICAgICAgICBpZiggcmVzdWx0ID09IDEgKXsNCiAgICAgICAgICAgICAgICAgICAgICAkLnRvYXN0KHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGluZzogIlN1Y2Nlc3NmdWwiLA0KICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0OiAiVGhlIHRyYW5zYWN0aW9uIGlzIHN1Y2Nlc3NmdWwiLA0KICAgICAgICAgICAgICAgICAgICAgICAgICBpY29uOiAic3VjY2VzcyIsDQogICAgICAgICAgICAgICAgICAgICAgICAgIGxvYWRlcjogdHJ1ZSwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgbG9hZGVyQmc6ICIjOUVDNjAwIg0KICAgICAgICAgICAgICAgICAgICAgIH0pOw0KICAgICAgICAgICAgICAgICAgICB9ZWxzZXsNCiAgICAgICAgICAgICAgICAgICAgICAkLnRvYXN0KHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGluZzogIlVuc3VjY2Vzc2Z1bCIsDQogICAgICAgICAgICAgICAgICAgICAgICAgIHRleHQ6ICJPcGVyYXRpb24gZmFpbGVkIiwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgaWNvbjogImVycm9yIiwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgbG9hZGVyOiB0cnVlLA0KICAgICAgICAgICAgICAgICAgICAgICAgICBsb2FkZXJCZzogIiM5RUM2MDAiDQogICAgICAgICAgICAgICAgICAgICAgfSk7DQogICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgIH0pDQogICAgICAgICAgICAgICAgICAuZmFpbChmdW5jdGlvbigpew0KICAgICAgICAgICAgICAgICAgICAkLnRvYXN0KHsNCiAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRpbmc6ICJVbnN1Y2Nlc3NmdWwiLA0KICAgICAgICAgICAgICAgICAgICAgICAgdGV4dDogIk9wZXJhdGlvbiBmYWlsZWQiLA0KICAgICAgICAgICAgICAgICAgICAgICAgaWNvbjogImVycm9yIiwNCiAgICAgICAgICAgICAgICAgICAgICAgIGxvYWRlcjogdHJ1ZSwNCiAgICAgICAgICAgICAgICAgICAgICAgIGxvYWRlckJnOiAiIzlFQzYwMCINCiAgICAgICAgICAgICAgICAgICAgfSk7DQogICAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgfSwNCiAgICAgICAgICAgICAgb25VbmNoZWNrOiBmdW5jdGlvbigpIHsNCiAgICAgICAgICAgICAgICB2YXIgaWQgICAgID0gJCh0aGlzKS5hdHRyKCJkYXRhLWlkIik7DQogICAgICAgICAgICAgICAgdmFyIGFjdGlvbiA9ICQodGhpcykuYXR0cigiZGF0YS11cmwiKSsiP3R5cGU9b2ZmJmlkPSIraWQ7DQogICAgICAgICAgICAgICAgICAkLmFqYXgoew0KICAgICAgICAgICAgICAgICAgdXJsOiAgYWN0aW9uLA0KICAgICAgICAgICAgICAgICAgdHlwZTogXCdHRVRcJywNCiAgICAgICAgICAgICAgICAgIGRhdGFUeXBlOiBcJ2pzb25cJywNCiAgICAgICAgICAgICAgICAgIGNhY2hlOiBmYWxzZSwNCiAgICAgICAgICAgICAgICAgIGNvbnRlbnRUeXBlOiBmYWxzZSwNCiAgICAgICAgICAgICAgICAgIHByb2Nlc3NEYXRhOiBmYWxzZQ0KICAgICAgICAgICAgICAgICAgfSkuZG9uZShmdW5jdGlvbihyZXN1bHQpew0KICAgICAgICAgICAgICAgICAgICBpZiggcmVzdWx0ID09IDEgKXsNCiAgICAgICAgICAgICAgICAgICAgICAkLnRvYXN0KHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGluZzogIlN1Y2Nlc3NmdWwiLA0KICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0OiAiVGhlIHRyYW5zYWN0aW9uIGlzIHN1Y2Nlc3NmdWwiLA0KICAgICAgICAgICAgICAgICAgICAgICAgICBpY29uOiAic3VjY2VzcyIsDQogICAgICAgICAgICAgICAgICAgICAgICAgIGxvYWRlcjogdHJ1ZSwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgbG9hZGVyQmc6ICIjOUVDNjAwIg0KICAgICAgICAgICAgICAgICAgICAgIH0pOw0KICAgICAgICAgICAgICAgICAgICB9ZWxzZXsNCiAgICAgICAgICAgICAgICAgICAgICAkLnRvYXN0KHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGluZzogIlVuc3VjY2Vzc2Z1bCIsDQogICAgICAgICAgICAgICAgICAgICAgICAgIHRleHQ6ICJPcGVyYXRpb24gZmFpbGVkIiwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgaWNvbjogImVycm9yIiwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgbG9hZGVyOiB0cnVlLA0KICAgICAgICAgICAgICAgICAgICAgICAgICBsb2FkZXJCZzogIiM5RUM2MDAiDQogICAgICAgICAgICAgICAgICAgICAgfSk7DQogICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgIH0pDQogICAgICAgICAgICAgICAgICAuZmFpbChmdW5jdGlvbigpew0KICAgICAgICAgICAgICAgICAgICAkLnRvYXN0KHsNCiAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRpbmc6ICJVbnN1Y2Nlc3NmdWwiLA0KICAgICAgICAgICAgICAgICAgICAgICAgdGV4dDogIk9wZXJhdGlvbiBmYWlsZWQiLA0KICAgICAgICAgICAgICAgICAgICAgICAgaWNvbjogImVycm9yIiwNCiAgICAgICAgICAgICAgICAgICAgICAgIGxvYWRlcjogdHJ1ZSwNCiAgICAgICAgICAgICAgICAgICAgICAgIGxvYWRlckJnOiAiIzlFQzYwMCINCiAgICAgICAgICAgICAgICAgICAgfSk7DQogICAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgfSwNCiAgICAgICAgICAgIH0pOw0KDQogICAgICAgICAgICA8L3NjcmlwdD4NCg0KICAgICAgICA8L2Rpdj4NCg0KICAgICAgICAgIDxkaXYgY2xhc3M9Im1vZGFsLWZvb3RlciI+DQogICAgICAgICAgICA8YnV0dG9uIHR5cGU9ImJ1dHRvbiIgY2xhc3M9ImJ0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hc3M9ImZvcm0tY29udHJvbCIgbmFtZT0iZW1haWxfdHlwZSI+DQogICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9IjEiIHNlbGVjdGVkPlVuYXBwcm92ZWQ8L29wdGlvbj4NCiAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2YWx1ZT0iMiI+QXBwcm92ZWQ8L29wdGlvbj4NCiAgICAgICAgICAgICAgICA8L3NlbGVjdD4NCiAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgIDwvZGl2Pg0KDQogICAgICAgICAgDQogICAgICAgICAgPGRpdiBjbGFzcz0ibW9kYWwtZm9vdGVyIj4NCiAgICAgICAgICAgIDxidXR0b24gdHlwZT0ic3VibWl0IiBjbGFzcz0iYnRuIGJ0bi1wcmltYXJ5Ij5SZWdpc3RlciBVc2VyPC9idXR0b24+DQogICAgICAgICAgICA8YnV0dG9uIHR5cGU9ImJ1dHRvbiIgY2xhc3M9ImJ0biBidG4tZGVmYXVsdCIgZGF0YS1kaXNtaXNzPSJtb2RhbCI+Q2FuY2VsPC9idXR0b24+DQogICAgICAgICAgPC9kaXY+DQogICAgICAgICAgPC9mb3JtPg0KPHNjcmlwdD4NCiAgICAgICAgICAgIHZhciB0eXBlID0gJCgiI2FkbWluIikudmFsKCk7DQogICAgICAgICAgICBpZiggdHlwZSA9PSAwICl7DQogICAgICAgICAgICAgICQoIiNhZG1pbl9hY2Nlc3MiKS5oaWRlKCk7DQogICAgICAgICAgICB9IGVsc2V7DQogICAgICAgICAgICAgICQoIiNhZG1pbl9hY2Nlc3MiKS5zaG93KCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICAkKCIjYWRtaW4gIikuY2hhbmdlKGZ1bmN0aW9uKCl7DQogICAgICAgICAgICAgIHZhciB0eXBlID0gJCh0aGlzKS52YWwoKTsNCiAgICAgICAgICAgICAgICBpZiggdHlwZSA9PSAwICl7DQogICAgICAgICAgICAgICAgICAkKCIjYWRtaW5fYWNjZXNzIikuaGlkZSgpOw0KICAgICAgICAgICAgICAgIH0gZWxzZXsNCiAgICAgICAgICAgICAgICAgICQoIiNhZG1pbl9hY2Nlc3MiKS5zaG93KCk7DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgfSk7DQogICAgICAgICAgPC9zY3JpcHQ+DQogICAgICAgICAgPHNjcmlwdD4NCiAgICAgICAgICAgIHZhciB0eXBlID0gJCgiI2RlYml0IikudmFsKCk7DQogICAgICAgICAgICBpZiggdHlwZSA9PSAyICl7DQogICAgICAgICAgICAgICQoIiNkZWJpdF9saW1pdCIpLmhpZGUoKTsNCiAgICAgICAgICAgIH0gZWxzZXsNCiAgICAgICAgICAgICAgJCgiI2RlYml0X2xpbWl0Iikuc2hvdygpOw0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgJCgiI2RlYml0IikuY2hhbmdlKGZ1bmN0aW9uKCl7DQogICAgICAgICAgICAgIHZhciB0eXBlID0gJCh0aGlzKS52YWwoKTsNCiAgICAgICAgICAgICAgICBpZiggdHlwZSA9PSAyICl7DQogICAgICAgICAgICAgICAgICAkKCIjZGViaXRfbGltaXQiKS5oaWRlKCk7DQogICAgICAgICAgICAgICAgfSBlbHNlew0KICAgICAgICAgICAgICAgICAgJCgiI2RlYml0X2xpbWl0Iikuc2hvdygpOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgIH0pOw0KICAgICAgICAgIDwvc2NyaXB0Pic7DQogICAgZWNobyBqc29uX2VuY29kZShbImNvbnRlbnQiPT4kcmV0dXJuLCJ0aXRsZSI9PiJOZXcgdXNlciByZWdpc3RyYXRpb24iXSk7DQogIGVsc2VpZiggJGFjdGlvbiA9PSAiZWRpdF91c2VyIiApOg0KICAgICRpZCA9ICRfUE9TVFsiaWQiXTsNCiAgICAkdXNlciAgID0gJGNvbm4tPnByZXBhcmUoIlNFTEVDVCAqIEZST00gY2xpZW50cyBXSEVSRSBjbGllbnRfaWQ9OmlkICIpOw0KICAgICR1c2VyIC0+ZXhlY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nlc3MiKS5oaWRlKCk7DQogICAgICAgICAgICAgICAgfSBlbHNlew0KICAgICAgICAgICAgICAgICAgJCgiI2FkbWluX2FjY2VzcyIpLnNob3coKTsNCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICB9KTsNCiAgICAgICAgICA8L3NjcmlwdD4NCiAgICAgICAgICA8c2NyaXB0Pg0KICAgICAgICAgICAgdmFyIHR5cGUgPSAkKCIjZGViaXQiKS52YWwoKTsNCiAgICAgICAgICAgIGlmKCB0eXBlID09IDIgKXsNCiAgICAgICAgICAgICAgJCgiI2RlYml0X2xpbWl0IikuaGlkZSgpOw0KICAgICAgICAgICAgfSBlbHNlew0KICAgICAgICAgICAgICAkKCIjZGViaXRfbGltaXQiKS5zaG93KCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICAkKCIjZGViaXQiKS5jaGFuZ2UoZnVuY3Rpb24oKXsNCiAgICAgICAgICAgICAgdmFyIHR5cGUgPSAkKHRoaXMpLnZhbCgpOw0KICAgICAgICAgICAgICAgIGlmKCB0eXBlID09IDIgKXsNCiAgICAgICAgICAgICAgICAgICQoIiNkZWJpdF9saW1pdCIpLmhpZGUoKTsNCiAgICAgICAgICAgICAgICB9IGVsc2V7DQogICAgICAgICAgICAgICAgICAkKCIjZGViaXRfbGltaXQiKS5zaG93KCk7DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgfSk7DQogICAgICAgICAgPC9zY3JpcHQ+DQoJCSANCiAgICAgICAgICAnOw0KICAgIGVjaG8ganNvbl9lbmNvZGUoWyJjb250ZW50Ij0+JHJldHVybiwidGl0bGUiPT4iRWRpdCBVc2VyIl0pOw0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KICBlbHNlaWYoICRhY3Rpb24gPT0gInBhc3NfdXNlciIgKToNCiAgICAkaWQgPSAkX1BPU1RbImlkIl07DQogICAgJHVzZXIgICA9ICRjb25uLT5wcmVwYXJlKCJTRUxFQ1QgKiBGUk9NIGNsaWV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sIFRpdGxlPC9sYWJlbD4NCiAgICAgICAgICAgICAgPGlucHV0IHR5cGU9InRleHQiIG5hbWU9InN1YmplY3QiIGNsYXNzPSJmb3JtLWNvbnRyb2wiIHZhbHVlPSIiPg0KICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgPC9kaXY+DQoNCiAgICAgICAgICA8ZGl2IGNsYXNzPSJmb3JtLWdyb3VwIiBpZD0idXNlcm5hbWUiPg0KICAgICAgICAgICAgPGxhYmVsPk5vdGlmaWNhdGlvbiBNZXNzYWdlPC9sYWJlbD4NCiAgICAgICAgICAgIDx0ZXh0YXJlYSB0eXBlPSJ0ZXh0IiBuYW1lPSJtZXNzYWdlIiBjbGFzcz0iZm9ybS1jb250cm9sIiByb3dzPSI1Ij48L3RleHRhcmVhPg0KICAgICAgICAgIDwvZGl2Pg0KDQoNCg0KICAgICAgICA8L2Rpdj4NCiAgICAgICAgPHNjcmlwdCB0eXBlPSJ0ZXh0L2phdmFzY3JpcHQiPg0KICAgICAgICAgICQoIiN1c2VybmFtZSIpLmhpZGUoKTsNCiAgICAgICAgICAkKCIjdXNlcl90eXBlIikuY2hhbmdlKGZ1bmN0aW9uKCl7DQogICAgICAgICAgICB2YXIgdHlwZSA9ICQodGhpcykudmFsKCk7DQogICAgICAgICAgICBpZiggdHlwZSA9PSAic2VjcmV0IiApew0KICAgICAgICAgICAgICAkKCIjdXNlcm5hbWUiKS5zaG93KCk7DQogICAgICAgICAgICB9IGVsc2V7DQogICAgICAgICAgICAgICQoIiN1c2VybmFtZSIpLmhpZGUoKTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgICB9KTsNCiAgICAgICAgICAkKCIjYWxlcnRfdHlwZSIpLmNoYW5nZShmdW5jdGlvbigpew0KICAgICAgICAgICAgdmFyIHR5cGUgPSAkKHRoaXMpLnZhbCgpOw0KICAgICAgICAgICAgaWYoIHR5cGUgPT0gImVtYWlsIiApew0KICAgICAgICAgICAgICAkKCIjZW1haWwiKS5zaG93KCk7DQ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Glvbj4nOw0KICAgICAgICAgICAgICAgICAgICAgICAgZm9yZWFjaCggJHByb3ZpZGVycyBhcyAkcHJvdmlkZXIgKToNCiAgICAgICAgICAgICAgICAgICAgICAgICAgJHJldHVybi49JzxvcHRpb24gdmFsdWU9IicuJHByb3ZpZGVyWyJpZCJdLiciPicuJHByb3ZpZGVyWyJhcGlfbmFtZSJdLic8L29wdGlvbj4nOw0KICAgICAgICAgICAgICAgICAgICAgICAgZW5kZm9yZWFjaDsNCiAgICAgICAgICAgICAgICAgICAgICAkcmV0dXJuLj0nPC9zZWxlY3Q+DQogICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgICAgICA8ZGl2IGlkPSJwcm92aWRlcl9zZXJ2aWNlIj4NCiAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgIDxkaXYgY2xhc3M9InNlcnZpY2UtbW9kZV9fYmxvY2siICBzdHlsZT0iZGlzcGxheTogbm9uZSI+DQogICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iZm9ybS1ncm91cCI+DQogICAgICAgICAgICAgICAgPGxhYmVsPlByaWNlIE92ZXIgdGhlIFB1cmNoYXNlIFByaWNlPC9sYWJlbD4NCiAgICAgICAgICAgICAgICAgIDxzZWxlY3QgY2xhc3M9ImZvcm0tY29udHJvbCIgbmFtZT0ic2FsZXByaWNlX2NhbCIgaWQ9InNhbGVwcmljZV9jYWw+DQogICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9Im5vcm1hbCI+Tm88L29wdGlvbj4NCiAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2YWx1ZT0icGVyY2VudCI+QWRkICUgdG8geW91ciBwdXJjaGFzZSBwcmljZSA8L29wdGlvbj4NCiAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2YWx1ZT0iYW1vdW50Ij5BZGQgYW1vdW50IHRvIHlvdXIgcHVyY2hhc2UgcHJpY2UgPC9vcHRpb24+DQogICAgICAgICAgICAgICAgICA8L3NlbGVjdD4NCiAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImZvcm0tZ3JvdXAiIHN0eWxlPSJkaXNwbGF5OiBub25lIj4NCiAgICAgICAgICAgICAgICA8bGFiZWwgY2xhc3M9ImZvcm0tZ3JvdXBfX3NlcnZpY2UtbmFtZSI+UHJpY2U8L2xhYmVsPg0KICAgICAgICAgICAgICAgIDxpbnB1dCB0eXBlPSJ0ZXh0IiBjbGFzcz0iZm9ybS1jb250cm9sIiBuYW1lPSJzYWxlcHJpY2UiIHZhbHVlPSIiPg0KICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgPGRpdiBjbGFzcz0ic2VydmljZS1tb2RlX19ibG9jayI+DQogICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iZm9ybS1ncm91cCI+DQogICAgICAgICAgICAgICAgPGxhYmVsPkRyaXBmZWVkPC9sYWJlbD4NCiAgICAgICAgICAgICAgICAgIDxzZWxlY3QgY2xhc3M9ImZvcm0tY29udHJvbCIgbmFtZT0iZHJpcGZlZWQiPg0KICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPSIxIj5JbmFjdGl2ZTwvb3B0aW9uPg0KICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPSIyIj5BY3RpdmU8L29wdGlvbj4NCiAgICAgICAgICAgICAgICAgIDwvc2VsZWN0Pg0KICAgICAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgIDwvZGl2Pg0KDQogICAgICAgICAgPGRpdiBjbGFzcz0ic2VydmljZS1tb2RlX193cmFwcGVyIj4NCiAgICAgICAgICAgICAgPGRpdiBjbGFzcz0icm93Ij4NCiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJjb2wtbWQtNiBzZXJ2aWNlLW1vZGVfX2Jsb2NrICI+DQogICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb3JtLWdyb3VwIj4NCiAgICAgICAgICAgICAgICAgIDxsYWJlbD5DaGVjayBJbnN0YWdyYW0gcHJvZmlsZSBwcml2YWN5PzwvbGFiZWw+DQogICAgICAgICAgICAgICAgICAgIDxzZWxlY3QgY2xhc3M9ImZvcm0tY29udHJvbCIgbmFtZT0iaW5zdGFncmFtX3ByaXZhdGUiPg0KICAgICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPSIxIj5Obzwvb3B0aW9uPg0KICAgICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPSIyIj5ZZXM8L29wdGlvbj4NCiAgICAgICAgICAgICAgICAgICAgICA8L3NlbGVjdD4NCiAgICAgICAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImNvbC1tZC02IHNlcnZpY2UtbW9kZV9fYmxvY2sgIj4NCiAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImZvcm0tZ3JvdXAiPg0KICAgICAgICAgICAgICAgICAgPGxhYmVsPlN0YXJ0aW5nIG51bWJlcjwvbGFiZWw+DQogICAgICAgICAgICAgICAgICAgIDxzZWxlY3QgY2xhc3M9ImZvcm0tY29udHJvbCIgbmFtZT0ic3RhcnRfY291bnQiPg0KICAgICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPSJub25lIj5EbyBub3QgcmV0cmVhdDwvb3B0aW9uPg0KICAgICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPSJpbnN0YWdyYW1fZm9sbG93ZXIiPk51bWJlciBvZiBJbnN0YWdyYW0gZm9sbG93ZXJzPC9vcHRpb24+DQogICAgICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9Imluc3RhZ3JhbV9waG90byI+SW5zdGFncmFtIHBob3RvIGxpa2VzPC9vcHRpb24+DQogICAgICAgICAgICAgICAgICAgICAgPC9zZWxlY3Q+DQogICAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgIDxkaXYgY2xhc3M9InJvdyI+DQogICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iY29sLW1kLTYgc2VydmljZS1tb2RlX19ibG9jayAiPg0KICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iZm9ybS1ncm91cCI+DQogICAgICAgICAgICAgICAgICA8bGFiZWw+RW50ZXIgdGhlIDJuZCBvcmRlciBvbiB0aGUgc2FtZSBsaW5rPzwvbGFiZWw+DQogICAgICAgICAgICAgICAgICAgIDxzZWxlY3QgY2xhc3M9ImZvcm0tY29udHJvbCIgbmFtZT0iaW5zdGFncmFtX3NlY29uZCI+DQogICAgICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9IjIiPlllczwvb3B0aW9uPg0KICAgICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPSIxIj5Obzwvb3B0aW9uPg0KICAgICAgICAgICAgICAgICAgICAgIDwvc2VsZWN0Pg0KICAgICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgIDwvZGl2Pg0KCQkJDQogICAgICAgICAgPC9kaXY+DQoJCQ0KICAgICAgICAgIDxkaXYgY2xhc3M9ImZvcm0tZ3JvdXAiPg0KICAgICAgICAgICAgPGxhYmVsIGNsYXNzPSJmb3JtLWdyb3VwX19zZXJ2aWNlLW5hbWUiPlNlcnZpY2UgcHJpY2UgKDEwMDAgcGllY2VzKTwvbGFiZWw+DQogICAgICAgICAgICA8aW5wdXQgdHlwZT0idGV4dCIgY2xhc3M9ImZvcm0tY29udHJvbCIgbmF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ZT0iMSI+T248L29wdGlvbj4NCiAgICAgICAgICAgICAgPC9zZWxlY3Q+DQogICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICA8L2Rpdj4NCg0KICAgICAgICAgIDxocj4NCiAgICAgICAgICAgDQogICAgICAgICAgICAgIA0KICAgICAgICAgIDxkaXYgY2xhc3M9InNlcnZpY2UtbW9kZV9fYmxvY2siPg0KICAgICAgICAgICAgPGRpdiBjbGFzcz0iZm9ybS1ncm91cCI+DQogICAgICAgICAgICA8bGFiZWw+T3JkZXIgTGluazwvbGFiZWw+DQogICAgICAgICAgICAgIDxzZWxlY3QgY2xhc3M9ImZvcm0tY29udHJvbCIgbmFtZT0id2FudF91c2VybmFtZSI+DQogICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPSIxIj5MaW5rPC9vcHRpb24+DQogICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPSIyIj5Vc2VybmFtZTwvb3B0aW9uPg0KICAgICAgICAgICAgICA8L3NlbGVjdD4NCiAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgIDwvZGl2Pg0KDQogICAgICAgICAgPGRpdiBjbGFzcz0ic2VydmljZS1tb2RlX19ibG9jayI+DQogICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb3JtLWdyb3VwIj4NCiAgICAgICAgICAgIDxsYWJlbD5QZXJzb25hbGl6ZWQgU2VydmljZTwvbGFiZWw+DQogICAgICAgICAgICAgIDxzZWxlY3QgY2xhc3M9ImZvcm0tY29udHJvbCIgbmFtZT0ic2VjcmV0Ij4NCiAgICAgICAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9IjIiPk5vPC9vcHRpb24+DQogICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPSIxIj5ZZXM8L29wdGlvbj4NCiAgICAgICAgICAgICAgPC9zZWxlY3Q+DQogICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICA8L2Rpdj4NCg0KICAgICAgICAgIDxkaXYgY2xhc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N0ZWQnOyBlbmRpZjsgJHJldHVybi49Jz5BdXRvIChBUEkpPC9vcHRpb24+DQogICAgICAgICAgICAgICAgICAgICAgPC9zZWxlY3Q+DQogICAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgICA8L2Rpdj4NCg0KDQogICAgICAgICAgICAgICAgPGRpdiBpZD0iYXV0b01vZGUiIHN0eWxlPSJkaXNwbGF5OiBub25lIj4NCiAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InNlcnZpY2UtbW9kZV9fYmxvY2siPg0KICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb3JtLWdyb3VwIj4NCiAgICAgICAgICAgICAgICAgICAgPGxhYmVsPlNlcnZpY2UgUHJvdmlkZXI8L2xhYmVsPg0KICAgICAgICAgICAgICAgICAgICAgIDxzZWxlY3QgY2xhc3M9ImZvcm0tY29udHJvbCIgbmFtZT0icHJvdmlkZXIiIGlkPSJwcm92aWRlciI+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2YWx1ZT0iMCI+U2VsZWN0IHNlcnZpY2UgcHJvdmlkZXIuLi48L29wdGlvbj4nOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcmVhY2goICRwcm92aWRlcnMgYXMgJHByb3ZpZGVyICk6DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkcmV0dXJuLj0nPG9wdGlvbiB2YWx1ZT0iJy4kcHJvdmlkZXJbImlkIl0uJyInOyBpZiggJHNlcnZpY2VJbmZvWyJzZXJ2aWNlX2FwaSJdID09ICRwcm92aWRlclsiaWQiXSApOiAkcmV0dXJuLj0nc2VsZWN0ZWQnOyBlbmRpZjsgJHJldHVybi49Jz4nLiRwcm92aWRlclsiYXBpX25hbWUiXS4nPC9vcHRpb24+JzsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmRmb3JlYWNoOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAkcmV0dXJuLj0nPC9zZWxlY3Q+DQogICAgICAgICAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgICAgICA8ZGl2IGlkPSJwcm92aWRlcl9zZXJ2aWNlIj4nOw0KICAgICAgICAgICAgICAgICAgJHNlcnZpY2VzID0gJHNtbWFwaS0+YWN0aW9uKGFycmF5KCdrZXknID0+JHNlcnZpY2VJbmZvWyJhcGlfa2V5Il0sJ2FjdGlvbicgPT4nc2VydmljZXMnKSwkc2VydmljZUluZm9bImFwaV91cmwiXSk7DQogICAgICAgICAgICAgICAgICBpZiggJHNlcnZpY2VJbmZvWyJhcGlfdHlwZSJdID09IDEgKToNCiAgICAgICAgICAgICAgICAgICAgJHJldHVybi49ICc8ZGl2IGNsYXNzPSJzZXJ2aWNlLW1vZGVfX2Jsb2NrIj4NCiAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb3JtLWdyb3VwIj4NCiAgICAgICAgICAgICAgICAgICAgICA8bGFiZWw+U2VydmljZTwvbGFiZWw+DQogICAgICAgICAgICAgICAgICAgICAgICA8c2VsZWN0IGNsYXNzPSJmb3JtLWNvbnRyb2wiIG5hbWU9InNlcnZpY2UiPic7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yZWFjaCAoJHNlcnZpY2VzIGFzICRzZXJ2aWNlKToNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRyZXR1cm4uPSAnPG9wdGlvbiB2YWx1ZT0iJy4kc2VydmljZS0+c2VydmljZS4nIic7IGlmKCAkc2VydmljZUluZm9bImFwaV9zZXJ2aWNlIl0gPT0gJHNlcnZpY2UtPnNlcnZpY2UgKTogJHJldHVybi49J3NlbGVjdGVkJzsgZW5kaWY7ICRyZXR1cm4uPSAnPicuJHNlcnZpY2UtPnNlcnZpY2UuJyAtICcuJHNlcnZpY2UtPm5hbWUuJyAtICcuJHNlcnZpY2UtPnJhdGUuJzwvb3B0aW9uPic7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgZW5kZm9yZWFjaDsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkcmV0dXJuLj0gJzwvc2VsZWN0Pg0KICAgICAgICAgICAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgICAgICAgICAgICA8L2Rpdj4nOw0KICAgICAgICAgICAgICAgICAgZWxzZWlmKCAkc2VydmljZUluZm9bImFwaV90eXBlIl0gPT0gMyApOg0KICAgICAgICAgICAgICAgICAgICAkcmV0dXJuLj0gJzxkaXYgY2xhc3M9InNlcnZpY2UtbW9kZV9fYmxvY2siPg0KICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImZvcm0tZ3JvdXAiPg0KICAgICAgICAgICAgICAgICAgICAgIDxsYWJlbD5TZXJ2aWNlPC9sYWJlbD4NCiAgICAgICAgICAgICAgICAgICAgICAgIDxpbnB1dCBjbGFzcz0iZm9ybS1jb250cm9sIiB2YWx1ZT0iJy4kc2VydmljZUluZm9bJ2FwaV9zZXJ2aWNlJ10uJyIgbmFtZT0ic2VydmljZSI+DQogICAgICAgICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgICAgICAgIDwvZGl2Pic7DQogICAgICAgICAgICAgICAgICBlbmRpZjsNCiAgICAgICAgICAgICAgICAgICRyZXR1cm4uPSc8L2Rpdj4NCiAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgPC9kaXY+DQoNCiAgICAgICAgICAgICAgPGRpdiBpZD0idW5saW1pdGVkIj4NCiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb3JtLWdyb3VwIj4NCiAgICAgICAgICAgICAgICAgIDxsYWJlbCBjbGFzcz0iZm9ybS1ncm91cF9fc2VydmljZS1uYW1lIj5TZXJ2aWNlIHByaWNlICgxMDAwIHBpZWNlcyk8L2xhYmVsPg0KICAgICAgICAgICAgICAgICAgPGlucHV0IHR5cGU9InRleHQiIGNsYXNzPSJmb3JtLWNvbnRyb2wiIG5hbWU9InByaWNlIiB2YWx1ZT0iJy4kc2VydmljZUluZm9bInNlcnZpY2VfcHJpY2UiXS4nIj4NCiAgICAgICAgICAgICAgICA8L2Rpdj4NCg0KICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InJvdyI+DQogICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJjb2wtbWQtNiBmb3JtLWdyb3VwIj4NCiAgICAgICAgICAgICAgICAgICAgPGxhYmVsIGNsYXNzPSJmb3JtLWdyb3VwX19zZXJ2aWNlLW5hbWUiPk1pbmltdW0gb3JkZXI8L2xhYmVsPg0KICAgICAgICAgICAgICAgICAgICA8aW5wdXQgdHlwZT0idGV4dCIgY2xhc3M9ImZvcm0tY29udHJvbCIgbmFtZT0ibWluIiB2YWx1ZT0iJy4kc2VydmljZUluZm9bInNlcnZpY2VfbWluIl0uJyI+DQogICAgICAgICAgICAgICAgICA8L2Rpdj4NCg0KICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iY29sLW1kLTYgZm9ybS1ncm91cCI+DQogICAgICAgICAgICAgICAgICAgIDxsYWJlbCBjbGFzcz0iZm9ybS1ncm91cF9fc2VydmljZS1uYW1lIj5NYXhpbXVtIG9yZGVyPC9sYWJlbD4NCiAgICAgICAgICAgICAgICAgICAgPGlucHV0IHR5cGU9InRleHQiIGNsYXNzPSJmb3JtLWNvbnRyb2wiIG5hbWU9Im1heCIgdmFsdWU9IicuJHNlcnZpY2VJbmZvWyJzZXJ2aWNlX21heCJdLiciPg0KICAgICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgIDwvZGl2Pg0KDQogICAgICAgICAgICAgIDxkaXYgaWQ9ImxpbWl0ZWQiPg0KICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImZvcm0tZ3JvdXAiPg0KICAgICAgICAgICAgICAgICAgPGxhYmVsIGNsYXNzPSJmb3JtLWdyb3VwX19zZX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AgICA8L2Rpdj4NCiAgICAgICAgICAgICAgPC9kaXY+DQoNCiAgICAgICAgICAgIDwvZGl2Pg0KDQogICAgICAgICAgICAgIDxkaXYgY2xhc3M9Im1vZGFsLWZvb3RlciI+DQogICAgICAgICAgICAgICAgPGJ1dHRvbiB0eXBlPSJzdWJtaXQiIGNsYXNzPSJidG4gYnRuLXByaW1hcnkiPlVwZGF0ZSBzdWJzY3JpcHRpb24gaW5mb3JtYXRpb248L2J1dHRvbj4NCiAgICAgICAgICAgICAgICA8YnV0dG9uIHR5cGU9ImJ1dHRvbiIgY2xhc3M9ImJ0biBidG4tZGVmYXVsdCIgZGF0YS1kaXNtaXNzPSJtb2RhbCI+Q2FuY2VsPC9idXR0b24+DQogICAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgICAgICA8L2Zvcm0+DQo8c2NyaXB0Pg0KICAgICAgICAgICAgdmFyIHR5cGUgPSAkKCIjc2hvdyIpLnZhbCgpOw0KICAgICAgICAgICAgaWYoIHNob3dfcmVmaWxsID09ICJ0cnVlIiApew0KICAgICAgICAgICAgICAkKCIjcmVmaWxsIikuaGlkZSgpOw0KICAgICAgICAgICAgfSBlbHNlew0KICAgICAgICAgICAgICAkKCIjcmVmaWxsIikuc2hvdygpOw0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgJCgiI2FkbWluICIpLmNoYW5nZShmdW5jdGlvbigpew0KICAgICAgICAgICAgICB2YXIgdHlwZSA9ICQodGhpcykudmFsKCk7DQogICAgICAgICAgICAgICAgaWYoIHNob3dfcmVmaWxsID09ICJmYWxzZSIgKXsNCiAgICAgICAgICAgICAgICAgICQoIiNyZWZpbGwiKS5oaWRlKCk7DQogICAgICAgICAgICAgICAgfSBlbHNlew0KICAgICAgICAgICAgICAgICAgJCgiI3JlZmlsbCIpLnNob3coKTsNCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICB9KTsNCiAgICAgICAgICA8L3NjcmlwdD4NCg0KDQogICAgICAgICAgICAgIDxzY3JpcHQgdHlwZT0idGV4dC9qYXZhc2NyaXB0Ij4NCiAgICAgICAgICAgICAgJCgiLm90aGVyX3NlcnZpY2VzIikuY2xpY2soZnVuY3Rpb24oKXsNCiAgICAgICAgICAgICAgICB2YXIgY29udHJvbCA9ICQoIiN0cmFuc2xhdGlvbnNMaXN0Iik7DQogICAgICAgICAgICAgICAgaWYoIGNvbnRyb2wuYXR0cigiY2xhc3MiKSA9PSAiaGlkZGVuIiApew0KICAgICAgICAgICAgICAgICAgY29udHJvbC5yZW1vdmVDbGFzcygiaGlkZGVuIik7DQogICAgICAgICAgICAgICAgfSBlbHNlew0KICAgICAgICAgICAgICAgICAgY29udHJvbC5hZGRDbGFzcygiaGlkZGVuIik7DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgdmFyIHNpdGVfdXJsICA9ICQoImhlYWQgYmFzZSIpLmF0dHIoImhyZWYiKTsNCiAgICAgICAgICAgICAgICAkKCIjcHJvdmlkZXIiKS5jaGFuZ2UoZnVuY3Rpb24oKXsNCiAgICAgICAgICAgICAgICAgIHZhciBwcm92aWRlciA9ICQodGhpcykudmFsKCk7DQogICAgICAgICAgICAgICAgICBnZXRQcm92aWRlclNlcnZpY2VzKHByb3ZpZGVyLHNpdGVfdXJsKTsNCiAgICAgICAgICAgICAgICB9KTsNCg0KICAgICAgICAgICAgICAgIGdldFByb3ZpZGVyKCk7DQogICAgICAgICAgICAgICAgJCgiI3NlcnZpY2VNb2RlIikuY2hhbmdlKGZ1bmN0aW9uKCl7DQogICAgICAgICAgICAgICAgICBnZXRQcm92aWRlcigpOw0KICAgICAgICAgICAgICAgIH0pOw0KDQogICAgICAgICAgICAgICAgZ2V0U2FsZVByaWNlKCk7DQogICAgICAgICAgICAgICAgJCgiI3NhbGVwcmljZV9jYWwiKS5jaGFuZ2UoZnVuY3Rpb24oKXsNCiAgICAgICAgICAgICAgICAgIGdldFNhbGVQcmljZSgpOw0KICAgICAgICAgICAgICAgIH0pOw0KDQogICAgICAgICAgICAgICAgZ2V0U3Vic2NyaXB0aW9uKCk7DQogICAgICAgICAgICAgICAgJCgiI3N1YnNjcmlwdGlvbl9wYWNrYWdlIikuY2hhbmdlKGZ1bmN0aW9uKCl7DQogICAgICAgICAgICAgICAgICBnZXRTdWJzY3JpcHRpb24oKTsNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBmdW5jdGlvbiBnZXRQcm92aWRlclNlcnZpY2VzKHByb3ZpZGVyLHNpdGVfdXJsKXsNCiAgICAgICAgICAgICAgICAgIGlmKCBwcm92aWRlciA9PSAwICl7DQogICAgICAgICAgICAgICAgICAgICQoIiNwcm92aWRlcl9zZXJ2aWNlIikuaGlkZSgpOw0KICAgICAgICAgICAgICAgICAgfWVsc2V7DQogICAgICAgICAgICAgICAgICAgICQucG9zdChzaXRlX3VybCsiYWRtaW4vYWpheF9kYXRhIix7YWN0aW9uOiJwcm92aWRlcnNfbGlzdCIscHJvdmlkZXI6cHJvdmlkZXJ9KS5kb25lKGZ1bmN0aW9uKCBkYXRhICkgew0KICAgICAgICAgICAgICAgICAgICAgICQoIiNwcm92aWRlcl9zZXJ2aWNlIikuc2hvdygpOw0KICAgICAgICAgICAgICAgICAgICAgICQoIiNwcm92aWRlcl9zZXJ2aWNlIikuaHRtbChkYXRhKTsNCiAgICAgICAgICAgICAgICAgICAgfSkuZmFpbChmdW5jdGlvbigpew0KICAgICAgICAgICAgICAgICAgICAgIGFsZXJ0KCJIYXRhIG9sdcWfdHUhIik7DQogICAgICAgICAgICAgICAgICAgIH0pOw0KICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIH0NCg0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGdldFByb3ZpZGVyKCl7DQogICAgICAgICAgICAgICAgICB2YXIgbW9kZSA9ICQoIiNzZXJ2aWNlTW9kZSIpLnZhbCgpOw0KICAgICAgICAgICAgICAgICAgICBpZiggbW9kZSA9PSAxICl7DQogICAgICAgICAgICAgICAgICAgICAgJCgiI2F1dG9Nb2RlIikuaGlkZSgpOw0KICAgICAgICAgICAgICAgICAgICB9ZWxzZXsNCiAgICAgICAgICAgICAgICAgICAgICAkKCIjYXV0b01vZGUiKS5zaG93KCk7DQogICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICB9DQoNCiAgICAgICAgICAgICAgICBmdW5jdGlvbiBnZXRTYWxlUHJpY2UoKXsNCiAgICAgICAgICAgICAgICAgIHZhciB0eXBlID0gJCgiI3NhbGVwcmljZV9jYWwiKS52YWwoKTsNCiAgICAgICAgICAgICAgICAgICAgaWYoIHR5cGUgPT0gIm5vcm1hbCIgKXsNCiAgICAgICAgICAgICAgICAgICAgICAkKCIjc2FsZXByaWNlIikuaGlkZSgpOw0KICAgICAgICAgICAgICAgICAgICAgICQoIiNzZXJ2aWNlUHJpY2UiKS5zaG93KCk7DQogICAgICAgICAgICAgICAgICAgIH1lbHNlew0KICAgICAgICAgICAgICAgICAgICAgICQoIiNzYWxlcHJpY2UiKS5zaG93KCk7DQogICAgICAgICAgICAgICAgICAgICAgJCgiI3NlcnZpY2VQcmljZSIpLmhpZGUoKTsNCiAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIH0NCg0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGdldFN1YnNjcmlwdGlvbigpew0KICAgICAgICAgICAgICAgICAgdmFyIHR5cGUgPSAkKCIjc3Vic2NyaXB0aW9uX3BhY2thZ2UiKS52YWwoKTsNCiAgICAgICAgICAgICAgICAgICAgaWYoIHR5cGUgPT0gIjExIiB8fCB0eXBlID09ICIxMiIgKXsNCiAgICAgICAgICAgICAgICAgICAgICAkKCIjdW5saW1pdGVkIikuc2hvdygpOw0KICAgICAgICAgICAgICAgICAgICAgICQoIiNsaW1pdGVkIikuaGlkZSgpOw0KICAgICAgICAgICAgICAgICAgICB9ZWxzZXsNCiAgICAgICAgICAgICAgICAgICAgICAkKCIjdW5saW1pdGVkIikuaGlkZSgpOw0KICAgICAgICAgICAgICAgICAgICAgICQoIiNsaW1pdGVkIikuc2hvdygpOw0KICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICA8L3NjcmlwdD4NCiAgICAgICAgICAgICAgJzsNCg0KDQoJIGVjaG8ganNvbl9lbmNvZGUoWyJjb250ZW50Ij0+JHJldHVybiwidGl0bGUiPT4iRWRpdCBzdWJzY3JpcHRpb24gKElEOiAiLiRzZXJ2aWNlSW5mb1sic2VydmljZV9pZCJdLiIpIl0pOw0KDQoNCiAgICAgIGVsc2U6DQogICAgICAgICRyZXR1cm4gPSAnDQoNCiAgICAgICAgPGZvcm0gY2xhc3M9ImZvcm0iIGFjdGlvbj0iJy5zaXRlX3VybCgiYWRtaW4vc2VydmljZXMvZWRpdC1zZXJ2aWNlLyIuJHNlcnZpY2VJbmZvWyJzZXJ2aWNlX2lkIl0pLiciIG1ldGhvZD0icG9zdCIgZGF0YS14aHI9InRydWUiPg0KICAgICAgICAgICAgPGRpdiBjbGFzcz0ibW9kYWwtYm9keSI+JzsNCg0KICAgICAgICAgICAgICBpZiggY291bnQoJGxhbmd1YWdlcykgPiAxICk6DQogICAgICAgICAgICAgICAgJHRyYW5zbGF0aW9uTGlzdCA9ICc8YSBjbGFzcz0ib3RoZXJfc2VydmljZXMiPiBUcmFuc2xhdGlvbnMgKCcuKGNvdW50KCRsYW5ndWFnZXMpLTEpLicpIDwvYT4nOw0KICAgICAgICAgICAgICBlbHNlOg0KICAgICAgICAgICAgICAgICR0cmFuc2xhdGlvbkxpc3QgID0gJyc7DQogICAgICAgICAgICAgIGVuZGlmOw0KICAgICAgICAgICAgICBmb3JlYWNoICgkbGFuZ3VhZ2VzIGFzICRsYW5ndWFnZSk6DQogICAgICAgICAgICAgICAgaWYoICRsYW5ndWFnZVsiZGVmYXVsdF9sYW5ndWFnZSJdICk6DQogICAgICAgICAgICAgICAgICAkcmV0dXJuLj0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XJuLj0nPlNwZWNpYWwgQ29tbWVudDwvb3B0aW9uPg0KICAgICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPSI0Iic7IGlmKCAkc2VydmljZUluZm9bInNlcnZpY2VfcGFja2FnZSJdID09IDQgKTogJHJldHVybi49J3NlbGVjdGVkJzsgZW5kaWY7ICRyZXR1cm4uPSc+UGFja2FnZSBDb21tZW50PC9vcHRpb24+DQogICAgICAgICAgICAgICAgICAgICAgPC9zZWxlY3Q+DQogICAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJzZXJ2aWNlLW1vZGVfX2Jsb2NrIj4NCiAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImZvcm0tZ3JvdXAiPg0KICAgICAgICAgICAgICAgICAgPGxhYmVsPk1vZGU8L2xhYmVsPg0KICAgICAgICAgICAgICAgICAgICA8c2VsZWN0IGNsYXNzPSJmb3JtLWNvbnRyb2wiIG5hbWU9Im1vZGUiIGlkPSJzZXJ2aWNlTW9kZSI+DQogICAgICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9IjEiJzsgaWYoICRzZXJ2aWNlSW5mb1sic2VydmljZV9hcGkiXSA9PSAwICk6ICRyZXR1cm4uPSdzZWxlY3RlZCc7IGVuZGlmOyAkcmV0dXJuLj0nPk1hbnVhbDwvb3B0aW9uPg0KICAgICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPSIyIic7IGlmKCAkc2VydmljZUluZm9bInNlcnZpY2VfYXBpIl0gIT0gMCApOiAkcmV0dXJuLj0nc2VsZWN0ZWQnOyBlbmRpZjsgJHJldHVybi49Jz5BdXRvIChBUEkpPC9vcHRpb24+DQogICAgICAgICAgICAgICAgICAgICAgPC9zZWxlY3Q+DQogICAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgICA8L2Rpdj4NCg0KICAgICAgICAgICAgICAgIDxkaXYgaWQ9ImF1dG9Nb2RlIiBzdHlsZT0iZGlzcGxheTogbm9uZSI+DQogICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJzZXJ2aWNlLW1vZGVfX2Jsb2NrIj4NCiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iZm9ybS1ncm91cCI+DQogICAgICAgICAgICAgICAgICAgIDxsYWJlbD5TZXJ2aWNlIFByb3ZpZGVyPC9sYWJlbD4NCiAgICAgICAgICAgICAgICAgICAgICA8c2VsZWN0IGNsYXNzPSJmb3JtLWNvbnRyb2wiIG5hbWU9InByb3ZpZGVyIiBpZD0icHJvdmlkZXIiPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9IjAiPlNlbGVjdCBzZXJ2aWNlIHByb3ZpZGVyLi4uPC9vcHRpb24+JzsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JlYWNoKCAkcHJvdmlkZXJzIGFzICRwcm92aWRlciApOg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHJldHVybi49JzxvcHRpb24gdmFsdWU9IicuJHByb3ZpZGVyWyJpZCJdLiciJzsgaWYoICRzZXJ2aWNlSW5mb1sic2VydmljZV9hcGkiXSA9PSAkcHJvdmlkZXJbImlkIl0gKTogJHJldHVybi49J3NlbGVjdGVkJzsgZW5kaWY7ICRyZXR1cm4uPSc+Jy4kcHJvdmlkZXJbImFwaV9uYW1lIl0uJzwvb3B0aW9uPic7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgZW5kZm9yZWFjaDsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgJHJldHVybi49Jzwvc2VsZWN0Pg0KICAgICAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgICAgICAgICAgPGRpdiBpZD0icHJvdmlkZXJfc2VydmljZSI+JzsNCiAgICAgICAgICAgICAgICAgICRzZXJ2aWNlcyA9ICRzbW1hcGktPmFjdGlvbihhcnJheSgna2V5JyA9PiRzZXJ2aWNlSW5mb1siYXBpX2tleSJdLCdhY3Rpb24nID0+J3NlcnZpY2VzJyksJHNlcnZpY2VJbmZvWyJhcGlfdXJsIl0pOw0KICAgICAgICAgICAgICAgICAgICBpZiggJHNlcnZpY2VJbmZvWyJhcGlfdHlwZSJdID09IDEgKToNCiAgICAgICAgICAgICAgICAgICAgICAkcmV0dXJuLj0gJzxkaXYgY2xhc3M9InNlcnZpY2UtbW9kZV9fYmxvY2siPg0KICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iZm9ybS1ncm91cCI+DQogICAgICAgICAgICAgICAgICAgICAgICA8bGFiZWw+U2VydmljZTwvbGFiZWw+DQogICAgICAgICAgICAgICAgICAgICAgICAgIDxzZWxlY3QgY2xhc3M9ImZvcm0tY29udHJvbCIgbmFtZT0ic2VydmljZSI+JzsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcmVhY2ggKCRzZXJ2aWNlcyBhcyAkc2VydmljZSk6DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRyZXR1cm4uPSAnPG9wdGlvbiB2YWx1ZT0iJy4kc2VydmljZS0+c2VydmljZS4nIic7IGlmKCAkc2VydmljZUluZm9bImFwaV9zZXJ2aWNlIl0gPT0gJHNlcnZpY2UtPnNlcnZpY2UgKTogJHJldHVybi49J3NlbGVjdGVkJzsgZW5kaWY7ICRyZXR1cm4uPSAnPicuJHNlcnZpY2UtPnNlcnZpY2UuJyAtICcuJHNlcnZpY2UtPm5hbWUuJyAtICcuJHNlcnZpY2UtPnJhdGUuJzwvb3B0aW9uPic7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmRmb3JlYWNoOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHJldHVybi49ICc8L3NlbGVjdD4NCiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgICAgICAgICAgICAgIDwvZGl2Pic7DQogICAgICAgICAgICAgICAgICAgIGVsc2VpZiggJHNlcnZpY2VJbmZvWyJhcGlfdHlwZSJdID09IDMgKToNCiAgICAgICAgICAgICAgICAgICAgICAkcmV0dXJuLj0gJzxkaXYgY2xhc3M9InNlcnZpY2UtbW9kZV9fYmxvY2siPg0KICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iZm9ybS1ncm91cCI+DQogICAgICAgICAgICAgICAgICAgICAgICA8bGFiZWw+U2VydmljZTwvbGFiZWw+DQogICAgICAgICAgICAgICAgICAgICAgICAgIDxpbnB1dCBjbGFzcz0iZm9ybS1jb250cm9sIiB2YWx1ZT0iJy4kc2VydmljZUluZm9bJ2FwaV9zZXJ2aWNlJ10uJyIgbmFtZT0ic2VydmljZSI+DQogICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj4nOw0KICAgICAgICAgICAgICAgICAgICBlbmRpZjsNCiAgICAgICAgICAgICAgICAgICRyZXR1cm4uPSc8L2Rpdj4NCiAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InNlcnZpY2UtbW9kZV9fYmxvY2siICBzdHlsZT0iZGlzcGxheTogbm9uZSI+DQogICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImZvcm0tZ3JvdXAiPg0KICAgICAgICAgICAgICAgICAgICA8bGFiZWw+UHJpY2UgT3ZlciB0aGUgUHVyY2hhc2UgUHJpY2U8L2xhYmVsPg0KICAgICAgICAgICAgICAgICAgICAgIDxzZWxlY3QgY2xhc3M9ImZvcm0tY29udHJvbCIgbmFtZT0ic2FsZXByaWNlX2NhbCIgaWQ9InNhbGVwcmljZV9jYWw+DQogICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPSJub3JtYWwiPk5vPC9vcHRpb24+DQogICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPSJwZXJjZW50Ij5BZGQgJSB0byB5b3VyIHB1cmNoYXNlIHByaWNlPC9vcHRpb24+DQogICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPSJhbW91bnQiPkFkZCBhbW91bnQgdG8geW91ciBwdXJjaGFzZSBwcmljZSA8L29wdGlvbj4NCiAgICAgICAgICAgICAgICAgICAgICA8L3NlbGVjdD4NCiAgICAgICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImZvcm0tZ3JvdXAiIHN0eWxlPSJkaXNwbGF5OiBub25lIj4NCiAgICAgICAgICAgICAgICAgICAgPGxhYmVsIGNsYXNzPSJmb3JtLWdyb3VwX19zZXJ2aWNlLW5hbWUiPlByaWNlPC9sYWJlbD4NCiAgICAgICAgICAgICAgICAgICAgPGlucHV0IHR5cGU9InRleHQiIGNsYXNzPSJmb3JtLWNvbnRyb2wiIG5hbWU9InNhbGVwcmljZSIgdmFsdWU9IiI+DQogICAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InNlcnZpY2UtbW9kZV9fYmxvY2siPg0KICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb3JtLWdyb3VwIj4NCiAgICAgICAgICAgICAgICAgICAgPGxhYmVsPkRyaXBmZWVkPC9sYWJlbD4NCiAgICAgICAgICAgICAgICAgICAgICA8c2VsZWN0IGNsYXNzPSJmb3JtLWNvbnRyb2wiIG5hbWU9ImRyaXBmZWVkIj4NCiAgICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9IjEiJzsgaWYoICRzZXJ2aWNlSW5mb1sic2VydmljZV9kcmlwZmVlZCJdID09IDEgKTogJHJldHVybi49J3NlbGVjdGVkJzsgZW5kaWY7ICRyZXR1cm4uPSc+SW5hY3RpdmU8L29wdGlvbj4NCiAgICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9IjIiJzsgaWYoICRzZXJ2aWNlSW5mb1sic2VydmljZV9kcmlwZmVlZCJdID09IDIgKTogJHJldHVybi49J3NlbGVjdGVkJzsgZW5kaWY7ICRyZXR1cm4uPSc+QWN0aXZlPC9vcHRpb24+DQogICAgICAgICAgICAgICAgICAgICAgPC9zZWxlY3Q+DQogICAgICAgICAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgIDwvZGl2Pg0KDQogICAgICAgICAgICAgIDxkaXYgY2xhc3M9InNlcnZpY2UtbW9kZV9fd3JhcHBlciI+DQogICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJyb3ciPg0KICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJjb2wtbWQtNiBzZXJ2aWNlLW1vZGVfX2Jsb2NrICI+DQogICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iZm9ybS1ncm91cCI+DQogICAgICAgICAgICAgICAgICAgICAgPGxhYmVsPkNoZWNrIEluc3RhZ3JhbSBwcm9maWxlIHByaXZhY3k/PC9sYWJlbD4NCiAgICAgICAgICAgICAgICAgICAgICAgIDxzZWxlY3QgY2xhc3M9ImZvcm0tY29udHJvbCIgbmFtZT0iaW5zdGFncmFtX3ByaXZhdGUiPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2YWx1ZT0iMSInOyBpZiggJHNlcnZpY2VJbmZvWyJpbnN0YWdyYW1fcHJpdmF0ZSJdID09IDEgKTogJHJldHVybi49J3NlbGVjdGVkJzsgZW5kaWY7ICRyZXR1cm4uPSc+Tm88L29wdGlvbj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9IjIiJzsgaWYoICRzZXJ2aWNlSW5mb1siaW5zdGFncmFtX3ByaXZhdGUiXSA9PSAyICk6ICRyZXR1cm4uPSdzZWxlY3RlZCc7IGVuZGlmOyAkcmV0dXJuLj0nPlllczwvb3B0aW9uPg0KICAgICAgICAgICAgICAgICAgICAgICAgICA8L3NlbGVjdD4NCiAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImNvbC1tZC02IHNlcnZpY2UtbW9kZV9fYmxvY2sgIj4NCiAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb3JtLWdyb3VwIj4NCiAgICAgICAgICAgICAgICAgICAgICA8bGFiZWw+U3RhcnRpbmcgbnVtYmVyPC9sYWJlbD4NCiAgICAgICAgICAgICAgICAgICAgICAgIDxzZWxlY3QgY2xhc3M9ImZvcm0tY29udHJvbCIgbmFtZT0ic3RhcnRfY291bnQiPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2YWx1ZT0ibm9uZSInOyBpZiggJHNlcnZpY2VJbmZvWyJzdGFydF9jb3VudCJdID09ICJub25lIiApOiAkcmV0dXJuLj0nc2VsZWN0ZWQnOyBlbmRpZjsgJHJldHVybi49Jz5TdGFydGluZyBudW1iZXI8L29wdGlvbj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9Imluc3RhZ3JhbV9mb2xsb3dlciInOyBpZiggJHNlcnZpY2VJbmZvWyJzdGFydF9jb3VudCJdID09ICJpbnN0YWdyYW1fZm9sbG93ZXIiICk6ICRyZXR1cm4uPSdzZWxlY3RlZCc7IGVuZGlmOyAkcmV0dXJuLj0nPk51bWJlciBvZiBJbnN0YWdyYW0gZm9sbG93ZXJzPC9vcHRpb24+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPSJpbnN0YWdyYW1fcGhvdG8iJzsgaWYoICRzZXJ2aWNlSW5mb1sic3RhcnRfY291bnQiXSA9PSAiaW5zdGFncmFtX3Bob3RvIiApOiAkcmV0dXJuLj0nc2VsZWN0ZWQnOyBlbmRpZjsgJHJldHVybi49Jz5OdW1iZXIgb2YgSW5zdGFncmFtIGZvbGxvd2Vyczwvb3B0aW9uPg0KICAgICAgICAgICAgICAgICAgICAgICAgICA8L3NlbGVjdD4NCiAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InJvdyI+DQogICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImNvbC1tZC02IHNlcnZpY2UtbW9kZV9fYmxvY2sgIj4NCiAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb3JtLWdyb3VwIj4NCiAgICAgICAgICAgICAgICAgICAgICA8bGFiZWw+RW50ZXIgdGhlIDJuZCBvcmRlciBvbiB0aGUgc2FtZSBsaW5rPzwvbGFiZWw+DQogICAgICAgICAgICAgICAgICAgICAgICA8c2VsZWN0IGNsYXNzPSJmb3JtLWNvbnRyb2wiIG5hbWU9Imluc3RhZ3JhbV9zZWNvbmQiPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2YWx1ZT0iMiInOyBpZiggJHNlcnZpY2VJbmZvWyJpbnN0YWdyYW1fc2Vjb25kIl0gPT0gMiApOiAkcmV0dXJuLj0nc2VsZWN0ZWQnOyBlbmRpZjsgJHJldHVybi49Jz5ZZXM8L29wdGlvbj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9IjEiJzsgaWYoICRzZXJ2aWNlSW5mb1siaW5zdGFncmFtX3NlY29uZCJdID09IDEgKTogJHJldHVybi49J3NlbGVjdGVkJzsgZW5kaWY7ICRyZXR1cm4uPSc+Tm88L29wdGlvbj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgPC9zZWxlY3Q+DQogICAgICAgICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgIDwvZGl2Pg0KDQogICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImZvcm0tZ3JvdXAiPg0KICAgICAgICAgICAgICAgIDxsYWJlbCBjbGFzcz0iZm9ybS1ncm91cF9fc2VydmljZS1uYW1lIj5TZXJ2aWNlIHByaWNlICgxMDAwIHBpZWNlcyk8L2xhYmVsPg0KICAgICAgICAgICAgICAgIDxpbnB1dCB0eXBlPSJ0ZXh0IiBjbGFzcz0iZm9ybS1jb250cm9sIiBuYW1lPSJwcmljZSIgdmFsdWU9IicuJHNlcnZpY2VJbmZvWyJzZXJ2aWNlX3ByaWNlIl0uJyI+DQogICAgICAgICAgICAgIDwvZGl2Pg0KDQogICAgICAgICAgICAgIDxkaXYgY2xhc3M9InJvdyI+DQogICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iY29sLW1kLTYgZm9ybS1ncm91cCI+DQogICAgICAgICAgICAgICAgICA8bGFiZWwgY2xhc3M9ImZvcm0tZ3JvdXBfX3NlcnZpY2UtbmFtZSI+TWluaW11bSBvcmRlcjwvbGFiZWw+DQogICAgICAgICAgICAgICAgICA8aW5wdXQgdHlwZT0idGV4dCIgY2xhc3M9ImZvcm0tY29udHJvbCIgbmFtZT0ibWluIiB2YWx1ZT0iJy4kc2VydmljZUluZm9bInNlcnZpY2VfbWluIl0uJyI+DQogICAgICAgICAgICAgICAgPC9kaXY+DQoNCiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJjb2wtbWQtNiBmb3JtLWdyb3VwIj4NCiAgICAgICAgICAgICAgICAgIDxsYWJlbCBjbGFzcz0iZm9ybS1ncm91cF9fc2VydmljZS1uYW1lIj5NaW5pbXVtIG9yZGVyPC9sYWJlbD4NCiAgIC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GVkJzsgZW5kaWY7ICRyZXR1cm4uPSc+T2ZmPC9vcHRpb24+DQogICAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2YWx1ZT0iMSInOyBpZiggJHNlcnZpY2VJbmZvWyJjYW5jZWxidXR0b24iXSA9PSAxICk6ICRyZXR1cm4uPSdzZWxlY3RlZCc7IGVuZGlmOyAkcmV0dXJuLj0nPk9uPC9vcHRpb24+DQogICAgICAgICAgICAgICAgICA8L3NlbGVjdD4NCiAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgPC9kaXY+DQoNCiAgICAgICAgICAgICAgPGhyPg0KICAgICAgICAgICAgICANCiAgICAgICAgICAgICAgPGRpdiBjbGFzcz0ic2VydmljZS1tb2RlX19ibG9jayI+DQogICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iZm9ybS1ncm91cCI+DQogICAgICAgICAgICAgICAgPGxhYmVsPk9yZGVyIExpbms8L2xhYmVsPg0KICAgICAgICAgICAgICAgICAgPHNlbGVjdCBjbGFzcz0iZm9ybS1jb250cm9sIiBuYW1lPSJ3YW50X3VzZXJuYW1lIj4NCiAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPSIxIic7IGlmKCAkc2VydmljZUluZm9bIndhbnRfdXNlcm5hbWUiXSA9PSAxICk6ICRyZXR1cm4uPSdzZWxlY3RlZCc7IGVuZGlmOyAkcmV0dXJuLj0nPkxpbms8L29wdGlvbj4NCiAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPSIyIic7IGlmKCAkc2VydmljZUluZm9bIndhbnRfdXNlcm5hbWUiXSA9PSAyICk6ICRyZXR1cm4uPSdzZWxlY3RlZCc7IGVuZGlmOyAkcmV0dXJuLj0nPlVzZXJuYW1lPC9vcHRpb24+DQogICAgICAgICAgICAgICAgICA8L3NlbGVjdD4NCiAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgPC9kaXY+DQoNCiAgICAgICAgICAgICAgPGRpdiBjbGFzcz0ic2VydmljZS1tb2RlX19ibG9jayI+DQogICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iZm9ybS1ncm91cCI+DQogICAgICAgICAgICAgICAgPGxhYmVsPlBlcnNvbmFsaXplZCBTZXJ2aWNlPC9sYWJlbD4NCiAgICAgICAgICAgICAgICAgIDxzZWxlY3QgY2xhc3M9ImZvcm0tY29udHJvbCIgbmFtZT0ic2VjcmV0Ij4NCiAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPSIyIic7IGlmKCAkc2VydmljZUluZm9bInNlcnZpY2Vfc2VjcmV0Il0gPT0gMiApOiAkcmV0dXJuLj0nc2VsZWN0ZWQnOyBlbmRpZjsgJHJldHVybi49Jz5Obzwvb3B0aW9uPg0KICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9IjEiJzsgaWYoICRzZXJ2aWNlSW5mb1sic2VydmljZV9zZWNyZXQiXSA9PSAxICk6ICRyZXR1cm4uPSdzZWxlY3RlZCc7IGVuZGlmOyAkcmV0dXJuLj0nPlllczwvb3B0aW9uPg0KICAgICAgICAgICAgICAgICAgPC9zZWxlY3Q+DQogICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgIDwvZGl2Pg0KDQogICAgICAgICAgICAgIDxkaXYgY2xhc3M9InNlcnZpY2UtbW9kZV9fYmxvY2siPg0KICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImZvcm0tZ3JvdXAiPg0KICAgICAgICAgICAgICAgIDxsYWJlbD5TZXJ2aWNlIFNwZWVkPC9sYWJlbD4NCiAgICAgICAgICAgICAgICAgIDxzZWxlY3QgY2xhc3M9ImZvcm0tY29udHJvbCIgbmFtZT0ic3BlZWQiPg0KICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9IjEiJzsgaWYoICRzZXJ2aWNlSW5mb1sic2VydmljZV9zcGVlZCJdID09IDEgKTogJHJldHVybi49J3NlbG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AgICAgICAgICAgICAgICAgPC9mb3JtPg0KPHNjcmlwdD4NCiAgICAgICAgICAgIHZhciB0eXBlID0gJCgiI3Nob3ciKS52YWwoKTsNCiAgICAgICAgICAgIGlmKCAkc2VydmljZUluZm9bInNob3dfcmVmaWxsIl0gICA9PSAiZmFsc2UiICl7DQogICAgICAgICAgICAgICQoIiNyZWZpbGwiKS5oaWRlKCk7DQogICAgICAgICAgICB9IGVsc2V7DQogICAgICAgICAgICAgICQoIiNyZWZpbGwiKS5zaG93KCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICAkKCIjc2hvdyAiKS5jaGFuZ2UoZnVuY3Rpb24oKXsNCiAgICAgICAgICAgICAgdmFyIHR5cGUgPSAkKHRoaXMpLnZhbCgpOw0KICAgICAgICAgICAgICAgIGlmKCAkc2VydmljZUluZm9bInNob3dfcmVmaWxsIl0gID09ICJmYWxzZSIgKXsNCiAgICAgICAgICAgICAgICAgICQoIiNyZWZpbGwiKS5oaWRlKCk7DQogICAgICAgICAgICAgICAgfSBlbHNlew0KICAgICAgICAgICAgICAgICAgJCgiI3JlZmlsbCIpLnNob3coKTsNCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICB9KTsNCiAgICAgICAgICA8L3NjcmlwdD4NCiAgICAgICAgICAgICAgPHNjcmlwdCB0eXBlPSJ0ZXh0L2phdmFzY3JpcHQiPg0KDQogICAgICAgICAgICAgICAkKCIub3RoZXJfc2VydmljZXMiKS5jbGljayhmdW5jdGlvbigpew0KICAgICAgICAgICAgICAgICB2YXIgY29udHJvbCA9ICQoIiN0cmFuc2xhdGlvbnNMaXN0Iik7DQogICAgICAgICAgICAgICAgIGlmKCBjb250cm9sLmF0dHIoImNsYXNzIikgPT0gImhpZGRlbiIgKXsNCiAgICAgICAgICAgICAgICAgICBjb250cm9sLnJlbW92ZUNsYXNzKCJoaWRkZW4iKTsNCiAgICAgICAgICAgICAgICAgfSBlbHNlew0KICAgICAgICAgICAgICAgICAgIGNvbnRyb2wuYWRkQ2xhc3MoImhpZGRlbiIpOw0KICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgdmFyIHNpdGVfdXJsICA9ICQoImhlYWQgYmFzZSIpLmF0dHIoImhyZWYiKTsNCiAgICAgICAgICAgICAgICAkKCIjcHJvdmlkZXIiKS5jaGFuZ2UoZnVuY3Rpb24oKXsNCiAgICAgICAgICAgICAgICAgIHZhciBwcm92aWRlciA9ICQodGhpcykudmFsKCk7DQogICAgICAgICAgICAgICAgICBnZXRQcm92aWRlclNlcnZpY2VzKHByb3ZpZGVyLHNpdGVfdXJsKTsNCiAgICAgICAgICAgICAgICB9KTsNCg0KICAgICAgICAgICAgICAgIGdldFByb3ZpZGVyKCk7DQogICAgICAgICAgICAgICAgJCgiI3NlcnZpY2VNb2RlIikuY2hhbmdlKGZ1bmN0aW9uKCl7DQogICAgICAgICAgICAgICAgICBnZXRQcm92aWRlcigpOw0KICAgICAgICAgICAgICAgIH0pOw0KDQogICAgICAgICAgICAgICAgZ2V0U2FsZVByaWNlKCk7DQogICAgICAgICAgICAgICAgJCgiI3NhbGVwcmljZV9jYWwiKS5jaGFuZ2UoZnVuY3Rpb24oKXsNCiAgICAgICAgICAgICAgICAgIGdldFNhbGVQcmljZSgpOw0KICAgICAgICAgICAgICAgIH0pOw0KDQogICAgICAgICAgICAgICAgZ2V0U3Vic2NyaXB0aW9uKCk7DQogICAgICAgICAgICAgICAgJCgiI3N1YnNjcmlwdGlvbl9wYWNrYWdlIikuY2hhbmdlKGZ1bmN0aW9uKCl7DQogICAgICAgICAgICAgICAgICBnZXRTdWJzY3JpcHRpb24oKTsNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBmdW5jdGlvbiBnZXRQcm92aWRlclNlcnZpY2VzKHByb3ZpZGVyLHNpdGVfdXJsKXsNCiAgICAgICAgICAgICAgICAgIGlmKCBwcm92aWRlciA9PSAwICl7DQogICAgICAgICAgICAgICAgICAgICQoIiNwcm92aWRlcl9zZXJ2aWNlIikuaGlkZSgpOw0KICAgICAgICAgICAgICAgICAgfWVsc2V7DQogICAgICAgICAgICAgICAgICAgICQucG9zdChzaXRlX3VybCsiYWRtaW4vYWpheF9kYXRhIix7YWN0aW9uOiJwcm92aWRlcnNfbGlzdCIscHJvdmlkZXI6cHJvdmlkZXJ9KS5kb25lKGZ1bmN0aW9uKCBkYXRhICkgew0KICAgICAgICAgICAgICAgICAgICAgICQoIiNwcm92aWRlcl9zZXJ2aWNlIikuc2hvdygpOw0KICAgICAgICAgICAgICAgICAgICAgICQoIiNwcm92aWRlcl9zZXJ2aWNlIikuaHRtbChkYXRhKTsNCiAgICAgICAgICAgICAgICAgICAgfSkuZmFpbChmdW5jdGlvbigpew0KICAgICAgICAgICAgICAgICAgICAgIGFsZXJ0KCJIYXRhIG9sdcWfdHUhIik7DQogICAgICAgICAgICAgICAgICAgIH0pOw0KICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIH0NCg0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGdldFByb3ZpZGVyKCl7DQogICAgICAgICAgICAgICAgICB2YXIgbW9kZSA9ICQoIiNzZXJ2aWNlTW9kZSIpLnZhbCgpOw0KICAgICAgICAgICAgICAgICAgICBpZiggbW9kZSA9PSAxICl7DQogICAgICAgICAgICAgICAgICAgICAgJCgiI2F1dG9Nb2RlIikuaGlkZSgpOw0KICAgICAgICAgICAgICAgICAgICB9ZWxzZXsNCiAgICAgICAgICAgICAgICAgICAgICAkKCIjYXV0b01vZGUiKS5zaG93KCk7DQogICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICB9DQoNCiAgICAgICAgICAgICAgICBmdW5jdGlvbiBnZXRTYWxlUHJpY2UoKXsNCiAgICAgICAgICAgICAgICAgIHZhciB0eXBlID0gJCgiI3NhbGVwcmljZV9jYWwiKS52YWwoKTsNCiAgICAgICAgICAgICAgICAgICAgaWYoIHR5cGUgPT0gIm5vcm1hbCIgKXsNCiAgICAgICAgICAgICAgICAgICAgICAkKCIjc2FsZXByaWNlIikuaGlkZSgpOw0KICAgICAgICAgICAgICAgICAgICAgICQoIiNzZXJ2aWNlUHJpY2UiKS5zaG93KCk7DQogICAgICAgICAgICAgICAgICAgIH1lbHNlew0KICAgICAgICAgICAgICAgICAgICAgICQoIiNzYWxlcHJpY2UiKS5zaG93KCk7DQogICAgICAgICAgICAgICAgICAgICAgJCgiI3NlcnZpY2VQcmljZSIpLmhpZGUoKTsNCiAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIH0NCg0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGdldFN1YnNjcmlwdGlvbigpew0KICAgICAgICAgICAgICAgICAgdmFyIHR5cGUgPSAkKCIjc3Vic2NyaXB0aW9uX3BhY2thZ2UiKS52YWwoKTsNCiAgICAgICAgICAgICAgICAgICAgaWYoIHR5cGUgPT0gIjExIiB8fCB0eXBlID09ICIxMiIgKXsNCiAgICAgICAgICAgICAgICAgICAgICAkKCIjdW5saW1pdGVkIikuc2hvdygpOw0KICAgICAgICAgICAgICAgICAgICAgICQoIiNsaW1pdGVkIikuaGlkZSgpOw0KICAgICAgICAgICAgICAgICAgICB9ZWxzZXsNCiAgICAgICAgICAgICAgICAgICAgICAkKCIjdW5saW1pdGVkIikuaGlkZSgpOw0KICAgICAgICAgICAgICAgICAgICAgICQoIiNsaW1pdGVkIikuc2hvdygpOw0KICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICA8L3NjcmlwdD4NCiAgICAgICAgICAgICAgJzsNCiAgICAgICAgZWNobyBqc29uX2VuY29kZShbImNvbnRlbnQiPT4kcmV0dXJuLCJ0aXRsZSI9PiJFZGl0IHNlcnZpY2UgKElEOiAiLiRzZXJ2aWNlSW5mb1sic2VydmljZV9pZCJdLiIpIl0pOw0KICAgICAgZW5kaWY7DQogIGVsc2VpZiggJGFjdGlvbiA9PSAiZ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ICAgICAgICAgICBpZiggY29udHJvbC5hdHRyKCJjbGFzcyIpID09ICJoaWRkZW4iICl7DQogICAgICAgICAgICAgICAgICBjb250cm9sLnJlbW92ZUNsYXNzKCJoaWRkZW4iKTsNCiAgICAgICAgICAgICAgICB9IGVsc2V7DQogICAgICAgICAgICAgICAgICBjb250cm9sLmFkZENsYXNzKCJoaWRkZW4iKTsNCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgIH0pOw0KDQogICAgICAgICAgICAgIDwvc2NyaXB0Pg0KICAgICAgICAgICAgICAnOw0KICAgICAgICBlY2hvIGpzb25fZW5jb2RlKFsiY29udGVudCI9PiRyZXR1cm4sInRpdGxlIj0+IkVkaXQgZGVzY3JpcHRpb24gKElEOiAiLiRzZXJ2aWNlSW5mb1sic2VydmljZV9pZCJdLiIpIl0pOw0KDQoNCmVsc2VpZiggJGFjdGlvbiA9PSAiZWRpdF90aW1lIiApOg0KICAgICRpZCAgICAgICA9ICRfUE9TVFsiaWQiXTsNCiAgICAkc21tYXBpICAgPSBuZXcgU01NQXBpKCk7DQogICAgJHNlcnZpY2VJbmZvPSAkY29ubi0+cHJlcGFyZSgiU0VMRUNUICogRlJPTSBzZXJ2aWNlcyBXSEVSRSBzZXJ2aWNlX2lkPTppZCAiKTsNCiAgICAkc2VydmljZUluZm8tPmV4ZWN1dGUoYXJyYXkoImlkIj0+JGlkKSk7DQogICAgJHNlcnZpY2VJbmZvPSAkc2VydmljZUluZm8tPmZldGNoKFBETzo6RkVUQ0hfQVNTT0MpOw0KICAgICRtdWx0aURlc2MgID0ganNvbl9kZWNvZGUoJHNlcnZpY2VJbmZvWyJ0aW1lX2xhbmciXSx0cnVlKTsNCg0KICAgICAgICAkcmV0dXJuID0gJzxmb3JtIGNsYXNzPSJmb3JtIiBhY3Rpb249Iicuc2l0ZV91cmwoImFkbWluL3NlcnZpY2VzL2VkaXQtdGltZS8iLiRzZXJ2aWNlSW5mb1sic2VydmljZV9pZCJdKS4nIiBtZXRob2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rpdj4NCg0KICAgICAgICAgICAgPGRpdiBpZD0iYXV0b01vZGUiIHN0eWxlPSJkaXNwbGF5OiBub25lIj4NCiAgICAgICAgICAgICAgPGRpdiBjbGFzcz0ic2VydmljZS1tb2RlX19ibG9jayI+DQogICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iZm9ybS1ncm91cCI+DQogICAgICAgICAgICAgICAgPGxhYmVsPlNlcnZpY2UgUHJvdmlkZXI8L2xhYmVsPg0KICAgICAgICAgICAgICAgICAgPHNlbGVjdCBjbGFzcz0iZm9ybS1jb250cm9sIiBuYW1lPSJwcm92aWRlciIgaWQ9InByb3ZpZGVyIj4NCiAgICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9IjAiPlNlbGVjdCBzZXJ2aWNlIHByb3ZpZGVyLi4uPC9vcHRpb24+JzsNCiAgICAgICAgICAgICAgICAgICAgICAgIGZvcmVhY2goICRwcm92aWRlcnMgYXMgJHByb3ZpZGVyICk6DQogICAgICAgICAgICAgICAgICAgICAgICAgICRyZXR1cm4uPSc8b3B0aW9uIHZhbHVlPSInLiRwcm92aWRlclsiaWQiXS4nIj4nLiRwcm92aWRlclsiYXBpX25hbWUiXS4nPC9vcHRpb24+JzsNCiAgICAgICAgICAgICAgICAgICAgICAgIGVuZGZvcmVhY2g7DQogICAgICAgICAgICAgICAgICAgICAgJHJldHVybi49Jzwvc2VsZWN0Pg0KICAgICAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgPGRpdiBpZD0icHJvdmlkZXJfc2VydmljZSI+DQogICAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgPC9kaXY+DQoNCiAgICAgICAgICA8ZGl2IGlkPSJ1bmxpbWl0ZWQiPg0KICAgICAgICAgICAgPGRpdiBjbGFzcz0iZm9ybS1ncm91cCI+DQogICAgICAgICAgICAgIDxsYWJlbCBjbGFzcz0iZ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ICAgICAgICAgICAgIDwvc2VsZWN0Pg0KICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgPC9kaXY+DQoNCiAgICAgICAgPC9kaXY+DQoNCiAgICAgICAgICA8ZGl2IGNsYXNzPSJtb2RhbC1mb290ZXIiPg0KICAgICAgICAgICAgPGJ1dHRvbiB0eXBlPSJzdWJtaXQiIGNsYXNzPSJidG4gYnRuLXByaW1hcnkiPkFkZCBuZXcgc3Vic2NyaXB0aW9uPC9idXR0b24+DQogICAgICAgICAgICA8YnV0dG9uIHR5cGU9ImJ1dHRvbiIgY2xhc3M9ImJ0biBidG4tZGVmYXVsdCIgZGF0YS1kaXNtaXNzPSJtb2RhbCI+Q2FuY2VsPC9idXR0b24+DQogICAgICAgICAgPC9kaXY+DQogICAgICAgICAgPC9mb3JtPg0KICAgICAgICAgIDxzY3JpcHQgdHlwZT0idGV4dC9qYXZhc2NyaXB0Ij4NCg0KICAgICAgICAgICQoIi5vdGhlcl9zZXJ2aWNlcyIpLmNsaWNrKGZ1bmN0aW9uKCl7DQogICAgICAgICAgICB2YXIgY29udHJvbCA9ICQoIiN0cmFuc2xhdGlvbnNMaXN0Iik7DQogICAgICAgICAgICBpZiggY29udHJvbC5hdHRyKCJjbGFzcyIpID09ICJoaWRkZW4iICl7DQogICAgICAgICAgICAgIGNvbnRyb2wucmVtb3ZlQ2xhc3MoImhpZGRlbiIpOw0KICAgICAgICAgICAgfSBlbHNlew0KICAgICAgICAgICAgICBjb250cm9sLmFkZENsYXNzKCJoaWRkZW4iKTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgICB9KTsNCg0KICAgICAgICAgIHZhciBzaXRlX3VybCAgPSAkKCJoZWFkIGJhc2UiKS5hdHRyKCJocmVmIik7DQogICAgICAgICAgICAkKCIjcHJvdmlkZXIiKS5jaGFuZ2UoZnVuY3Rpb24oKXsNCiAgICAgICAgICAgICAgdmFyIHByb3ZpZGVyID0gJCh0aGlzKS52YWwoKTsNCiAgICAgICAgICAgICAgZ2V0UHJvdmlkZXJTZXJ2aWNlcyhwcm92aWRlcixzaXRlX3VybCk7DQogICAgICAgICAgICB9KTsNCg0KICAgICAgICAgICAgZ2V0UHJvdmlkZXIoKTsNCiAgICAgICAgICAgICQoIiNzZXJ2aWNlTW9kZSIpLmNoYW5nZShmdW5jdGlvbigpew0KICAgICAgICAgICAgICBnZXRQcm92aWRlcigpOw0KICAgICAgICAgICAgfSk7DQoNCiAgICAgICAgICAgIGdldFNhbGVQcmljZSgpOw0KICAgICAgICAgICAgJCgiI3NhbGVwcmljZV9jYWwiKS5jaGFuZ2UoZnVuY3Rpb24oKXsNCiAgICAgICAgICAgICAgZ2V0U2FsZVByaWNlKCk7DQogICAgICAgICAgICB9KTsNCg0KICAgICAgICAgICAgZ2V0U3Vic2NyaXB0aW9uKCk7DQogICAgICAgICAgICAkKCIjc3Vic2NyaXB0aW9uX3BhY2thZ2UiKS5jaGFuZ2UoZnVuY3Rpb24oKXsNCiAgICAgICAgICAgICAgZ2V0U3Vic2NyaXB0aW9uKCk7DQogICAgICAgICAgICB9KTsNCiAgICAgICAgICAgIGZ1bmN0aW9uIGdldFByb3ZpZGVyU2VydmljZXMocHJvdmlkZXIsc2l0ZV91cmwpew0KICAgICAgICAgICAgICBpZiggcHJvdmlkZXIgPT0gMCApew0KICAgICAgICAgICAgICAgICQoIiNwcm92aWRlcl9zZXJ2aWNlIikuaGlkZSgpOw0KICAgICAgICAgICAgICB9ZWxzZXsNCiAgICAgICAgICAgICAgICAkLnBvc3Qoc2l0ZV91cmwrImFkbWluL2FqYXhfZGF0YSIse2FjdGlvbjoicHJvdmlkZXJzX2xpc3QiLHByb3ZpZGVyOnByb3ZpZGVyfSkuZG9uZShmdW5jdGlvbiggZGF0YSApIHsNCiAgICAgICAgICAgICAgICAgICQoIiNwcm92aWRlcl9zZXJ2aWNlIikuc2hvdygpOw0KICAgICAgICAgICAgICAgICAgJCgiI3Byb3ZpZGVyX3NlcnZpY2UiKS5odG1sKGRhdGEpOw0KICAgICAgICAgICAgICAgIH0pLmZhaWwoZnVuY3Rpb24oKXsNCiAgICAgICAgICAgICAgICAgIGFsZXJ0KCJIYXRhIG9sdcWfdHUhIik7DQogICAgICAgICAgICAgICAgfSk7DQogICAgICAgICAgICAgIH0NCiAgICAgICAgICAgIH0NCg0KICAgICAgICAgICAgZnVuY3Rpb24gZ2V0UHJvdmlkZXIoKXsNCiAgICAgICAgICAgICAgdmFyIG1vZGUgPSAkKCIjc2VydmljZU1vZGUiKS52YWwoKTsNCiAgICAgICAgICAgICAgICBpZiggbW9kZSA9PSAxICl7DQogICAgICAgICAgICAgICAgICAkKCIjYXV0b01vZGUiKS5oaWRlKCk7DQogICAgICAgICAgICAgICAgfWVsc2V7DQogICAgICAgICAgICAgICAgICAkKCIjYXV0b01vZGUiKS5zaG93KCk7DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgfQ0KDQogICAgICAgICAgICBmdW5jdGlvbiBnZXRTYWxlUHJpY2UoKXsNCiAgICAgICAgICAgICAgdmFyIHR5cGUgPSAkKCIjc2FsZXByaWNlX2NhbCIpLnZhbCgpOw0KICAgICAgICAgICAgICAgIGlmKCB0eXBlID09ICJub3JtYWwiICl7DQogICAgICAgICAgICAgICAgICAkKCIjc2FsZXByaWNlIikuaGlkZSgpOw0KICAgICAgICAgICAgICAgICAgJCgiI3NlcnZpY2VQcmljZSIpLnNob3coKTsNCiAgICAgICAgICAgICAgICB9ZWxzZXsNCiAgICAgICAgICAgICAgICAgICQoIiNzYWxlcHJpY2UiKS5zaG93KCk7DQogICAgICAgICAgICAgICAgICAkKCIjc2VydmljZVByaWNlIikuaGlkZSgpOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgIH0NCg0KICAgICAgICAgICAgZnVuY3Rpb24gZ2V0U3Vic2NyaXB0aW9uKCl7DQogICAgICAgICAgICAgIHZhciB0eXBlID0gJCgiI3N1YnNjcmlwdGlvbl9wYWNrYWdlIikudmFsKCk7DQogICAgICAgICAgICA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FN0ZXAiIGRhdGEtc3RlcD0iZmlyc3QiPk5leHQgc3RlcDwvYnV0dG9uPg0KICAgICAgICAgICAgPGJ1dHRvbiB0eXBlPSJzdWJtaXQiIGNsYXNzPSJidG4gYnRuLXByaW1hcnkiIGlkPSJzdWJtaXRTdGVwIj5BZGQgc2VydmljZXM8L2J1dHRvbj4NCiAgICAgICAgICA8L2Rpdj4NCg0KICAgICAgICA8L2Zvcm0+DQogICAgICAgICAgIDxzY3JpcHQ+DQogICAgICAgICAgICAkKCIjc3VibWl0U3RlcCIpLmhpZGUoKTsNCiAgICAgICAgICAgICQoIiNuZXh0U3RlcCIpLmNsaWNrKGZ1bmN0aW9uKCl7DQogICAgICAgICAgICAgIHZhciBub3dfc3RlcCA9ICQodGhpcykuYXR0cigiZGF0YS1zdGVwIik7DQogICAgICAgICAgICAgIHZhciBwcm92aWRlciA9ICQoIiNwcm92aWRlciIpLnZhbCgpOw0KICAgICAgICAgICAgICB2YXIgY2F0ZWdvcnkgPSAkKCIjc2VsZWN0b3IiKS52YWwoKTsNCiAgICAgICAgICAgICAgJCgiI3NlY29uZFN0ZXAiKS5oaWRlKCk7DQogICAgICAgICAgICAgICAgaWYoIG5vd19zdGVwID09ICJmaXJzdCIgKXsNCiAgICAgICAgICAgICAgICAgIGlmKCBwcm92aWRlciA9PSAwICl7DQogICAgICAgICAgICAgICAgICAgICQudG9hc3Qoew0KICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGluZzogIlVuc3VjY2Vzc2Z1bCIsDQogICAgICAgICAgICAgICAgICAgICAgICB0ZXh0OiAiUGxlYXNlIHNlbGVjdCBzZXJ2aWNlIHByb3ZpZGVyIiwNCiAgICAgICAgICAgICAgICAgICAgICAgIGljb246ICJlcnJvciIsDQogICAgICAgICAgICAgICAgICAgICAgICBsb2FkZXI6IHRydWUsDQogICAgICAgICAgICAgICAgICAgICAgICBsb2FkZXJCZzogIiM5RUM2MDAiDQogICAgICAgICAgICAgICAgICAgIH0pOw0KICAgICAgICAgICAgICAgICAgfWVsc2V7DQogICAgICAgICAgICAgICAgICAgICQoIiNmaXJzdFN0ZXAiKS5oaWRlKCk7DQogICAgICAgICAgICAgICAgICAgICQoIiNzZWNvbmRTdGVwIikuc2hvdygpOw0KICAgICAgICAgICAgICAgICAgICAkLnBvc3QoImFkbWluL2FqYXhfZGF0YSIsIHtwcm92aWRlcjpwcm92aWRlcixjYXRlZ29yeTpjYXRlZ29yeSxhY3Rpb246ImltcG9ydF9zZXJ2aWNlc19saXN0IiB9LCBmdW5jdGlvbihkYXRhKXsNCiAgICAgICAgICAgICAgICAgICAgICAkKCIjc2Vjb25kU3RlcCIpLmh0bWwoZGF0YSk7DQogICAgICAgICAgICAgICAgICAgIH0pOw0KICAgICAgICAgICAgICAgICAgICAkKCIjbmV4dFN0ZXAiKS5hdHRyKCJkYXRhLXN0ZXAiLCJzZWNvbmQiKTsNCiAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICB9ZWxzZSBpZiggbm93X3N0ZXAgPT0gInNlY29uZCIgKXsNCiAgICAgICAgICAgICAgICAgICAgdmFyIGFycmF5ICAgICA9IFtdOw0KICAgICAgICAgICAgICAgICAgICAgICAkKFwnW2NsYXNzXj0ic2VsZWN0U2VydmljZXMtIl1cJykuZWFjaChmdW5jdGlvbiAoKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGlkICAgID0gJCh0aGlzKS52YWwoKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgY2hlY2sgPSAkKHRoaXMpLnByb3AoImNoZWNrZWQiKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcHJvdmlkZXIgID0gICQodGhpcykuYXR0cigiZGF0YS1wcm92aWRlciIpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIGNoZWNrID09IHRydWUgKXsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHBhcmFtcyA9IHt9Ow0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXNbImlkIl0gICAgICAgICAgICA9IGlkOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXNbImNhdGVnb3J5Il0gICAgICA9ICQodGhpcykuYXR0cigiZGF0YS1jYXRlZ29yeSIpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcnJheS5wdXNoKHBhcmFtcyk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgIH0pOw0KICAgICAgICAgICAgICAgICAgICAgICB2YXIgY291bnQgPSBhcnJheS5sZW5ndGg7DQogICAgICAgICAgICAgICAgICAgICBpZiggY291bnQgKXsNCiAgICAgICAgICAgICAgICAgICAgICAgJC5wb3N0KCJhZG1pbi9hamF4X2RhdGEiLCB7cHJvdmlkZXI6cHJvdmlkZXIsYWN0aW9uOiJpbXBvcnRfc2VydmljZXNfbGFzdCIsc2VydmljZXM6YXJyYXkgfSwgZnVuY3Rpb24oZGF0YSl7DQogICAgICAgICAgICAgICAgICAgICAgICAgJCgiI3RoaXJkU3RlcCIpLmh0bWwoZGF0YSk7DQogICAgICAgICAgICAgICAgICAgICAgIH0pOw0KICAgICAgICAgICAgICAgICAgICAgICAkKCIjbmV4dFN0ZXAiKS5oaWRlKCk7DQogICAgICAgICAgICAgICAgICAgICAgICQoIiNzdWJtaXRTdGVwIikuc2hvdygpOw0KICAgICAgICAgICAgICAgICAgICAgfWVsc2V7DQogICAgICAgICAgICAgICAgICAgICAgICQoIiNuZXh0U3RlcCIpLmF0dHIoImRhdGEtc3RlcCIsInNlY29uZCIpOw0KICAgICAgICAgICAgICAgICAgICAgICAkKCIjZmlyc3RTdGVwIikuaGlkZSgpOw0KICAgICAgICAgICAgICAgICAgICAgICAkKCIjc2Vjb25kU3RlcCIpLnNob3coKTsNCiAgICAgICAgICAgICAgICAgICAgICAgJCgiI25leHRTdGVwIikuc2hvdygpOw0KICAgICAgICAgICAgICAgICAgICAgICAkKCIjc3VibWl0U3RlcCIpLmhpZGUoKTsNCiAgICAgICAgICAgICAgICAgICAgICAgJC50b2FzdCh7DQogICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkaW5nOiAiVW5zdWNjZXNzZnVsIiwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgIHRleHQ6ICJQbGVhc2Ugc2VsZWN0IGF0IGxlYXN0IDEgc2VydmljZSB5b3Ugd2FudCB0byBhZGQiLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgaWNvbjogImVycm9yIiwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvYWRlcjogdHJ1ZSwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvYWRlckJnOiAiIzlFQzYwMCINCiAgICAgICAgICAgICAgICAgICAgICAgfSk7DQogICAgICAgICAgICAgICAgICAgICB9DQoNCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICB9KTsNCiAgICAgICAgICA8L3NjcmlwdD4NCiAgICAgICAgICAnOw0KICAgIGVjaG8ganNvbl9lbmNvZGUoWyJjb250ZW50Ij0+JHJldHVybiwidGl0bGUiPT4iUHVsbCBvdXQgc2VydmljZXMgZnJvbSBwcm92aWRlciJdKTsNCiAgZWxzZWlmKCAkYWN0aW9uID09ICJpbXBvcnRfc2VydmljZXNfbGlzdCIgKToNCiAgICAkcHJvdmlkZXJfaWQgID0gJF9QT1NUWyJwcm92aWRlciJdOw0KICAgICRjYXRlZ29yeV9pZDIgID0gJF9QT1NUWyJjYXRlZ29yeSJdOw0KICAgICRzbW1hcGkgICAgICAgPSBuZXcgU01NQXBpKCk7DQogICAgJHByb3ZpZGVyICAgICA9ICRjb25uLT5wcmVwYXJlKCJTRUxFQ1QgKiBGUk9NIHNlcnZpY2VfYXBpIFdIRVJFIGlkPTppZCIpOw0KICAgICRwcm92aWRlciAgICAgLT5leGVjdXRlKGFycmF5KCJpZCI9PiRwcm92aWRlcl9pZCkpOw0KICAgICRwcm92aWRlciAgICAgPSAkcHJvdmlkZXItPmZldGNoKFBETzo6RkVUQ0hfQVNTT0MpOw0KICAgICAgaWYoICRwcm92aWRlclsiYXBpX3R5cGUiXSA9PSAxICk6DQogICAgICAgICRzZXJ2aWNlcyAgID0gJHNtbWFwaS0+YWN0aW9uKGFycmF5KCdrZXknPT4kcHJvdmlkZXJbImFwaV9rZXkiXSwnYWN0aW9uJz0+J3NlcnZpY2VzJyksJHByb3ZpZGVyWyJhcGlfdXJsIl0pOw0KICAgICAgICAgIGlmKCAkc2VydmljZXMgKToNCiAgICAgICAgICAgICRncm91cGVkID0gYXJyYXlfZ3JvdXBfYnkoJHNlcnZpY2VzLCAnY2F0ZWdvcnknKTsNCiAgICAgICAgICAgIGVjaG8gJzxkaXYgY2xhc3M9IiI+DQogICAgICAgICAgICAgPGRpdiBjbGFzcz0ic2VydmljZXMtaW1wb3J0X19ib2R5Ij4NCiAgICAgICAgICAgICAgICAgPGRpdj4NCiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0ic2VydmljZXMtaW1wb3J0X19saXN0LXdyYXAiPg0KICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJzZXJ2aWNlcy1pbXBvcnRfX3Njcm9sbC13cmFwIj4NCgkJCQkJICAgPGxhYmVsIGNsYXNzPSJidG4gYnRuLXByaW1hcnkiPiA8aW5wdXQgaWQ9ImNoZWNrayIgdHlwZT0iY2hlY2tib3giPiBTZWxlY3QgQWxsPC9sYWJlbD4nOw0KICAgICAgICAgICAgICAgICAgICAgICBmb3JlYWNoKCRncm91cGVkIGFzICRjYXRlZ29yeSk6DQogICAgICAgICAgICAgICAgICAgICAgICAgJGNhdGVnb3J5X2lkKys7DQogICAgICAgICAgICAgICAgICAgICAgICAgZWNobyAnDQogICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJzZXJ2aWNlcy1pbXBvcnRfX2NhdGVnb3J5Ij4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0ic2VydmljZXMtaW1wb3J0X19jYXRlZ29yeS10aXRsZSI+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGxhYmVsPjxpbnB1dCB0eXBlPSJjaGVja2JveCIgZGF0YS1pZD0iJy4kY2F0ZWdvcnlfaWQuJyIgaWQ9ImNoZWNrQWxsLScuJGNhdGVnb3J5X2lkLiciPicuJGNhdGVnb3J5WzBdLT5jYXRlZ29yeS4nPC9sYWJlbD4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aW5wdXQgdHlwZT0iaGlkZGVuIiBuYW1lPSJjYXRlZ29yeSIgdmFsdWU9IicuJGNhdGVnb3J5X2lkMi4nIj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJzZXJ2aWNlcy1pbXBvcnRfX3BhY2thZ2VzIj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHVsPic7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcigkaT0wOyRpPGNvdW50KCRjYXRlZ29yeSk7JGkrKyk6DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWNobyAnPGxpPjxsYWJlbD48aW5wdXQgZGF0YS1zZXJ2aWNlPSInLiRjYXRlZ29yeVskaV0tPm5hbWUuJyIgZGF0YS1wcm92aWRlcj0iJy4kcHJvdmlkZXJbImlkIl0uJyIgIGRhdGEtY2F0ZWdvcnk9IicuJGNhdGVnb3J5X2lkLiciICBjbGFzcz0ic2VsZWN0U2VydmljZXMtJy4kY2F0ZWdvcnlfaWQuJyIgdHlwZT0iY2hlY2tib3giIHZhbHVlPSInLiRjYXRlZ29yeVskaV0tPnNlcnZpY2UuJyIgbmFtZT0ic2VydmljZXNbXSI+Jy4kY2F0ZWdvcnlbJGldLT5zZXJ2aWNlLicgLSAnLiRjYXRlZ29yeVskaV0tPm5hbWUuJzxzcGFuIGNsYXNzPSJzZXJ2aWNlcy1pbXBvcnRfX3BhY2thZ2VzLXByaWNlIj4nLnByaWNlRm9ybWF0KCRjYXRlZ29yeVskaV0tPnJhdGUpLic8L3NwYW4+PC9sYWJlbD48L2xpPic7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVuZGZvcjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVjaG8gICc8L3VsPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgPC9zcGFuPic7DQogICAgICAgICAgICAgICAgICAgICAgICBlbmRmb3JlYWNoOw0KICAgICAgICAgICAgICAgICAgICAgICAgZWNobyAnDQogICAgICAgICAgICAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgIDwvZGl2Pg0KCQkJICAgPHNjcmlwdD4gJCgiI2NoZWNrayIpLmNsaWNrKGZ1bmN0aW9uICgpIHskKCIjc2Vjb25kU3RlcCA6Y2hlY2tib3giKS5ub3QodGhpcykucHJvcCgiY2hlY2tlZCIsIHRoaXMuY2hlY2tlZCk7fSk7PC9zY3JpcHQ+DQogICAgICAgICAgICAgIDxzY3JpcHQ+DQogICAgICAgICAgICAgICQoXCdbaWRePSJjaGVja0FsbC0iXVwnKS5jbGljayhmdW5jdGlvbiAoKSB7DQogICAgICAgICAgICAgICAgdmFyIGlkID0gJCh0aGlzKS5hdHRyKCJkYXRhLWlkIik7DQogICAgICAgICAgICAgICAgIGlmICggJCh0aGlzKS5wcm9wKCJjaGVja2VkIikgPT0gdHJ1ZSApIHsNCiAgICAgICAgICAgICAgICAgICAkKCIuc2VsZWN0U2VydmljZXMtIitpZCkubm90KHRoaXMpLnByb3AoImNoZWNrZWQiLCB0cnVlKTsNCiAgICAgICAgICAgICAgICAgfWVsc2V7DQogICAgICAgICAgICAgICAgICAgJCgiLnNlbGVjdFNlcnZpY2VzLSIraWQpLm5vdCh0aGlzKS5wcm9wKCJjaGVja2VkIiwgZmFsc2UpOw0KICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgPC9zY3JpcHQ+DQogICAgICAgICAgICAgIDwvZGl2Pic7DQogICAgICAgICAgZWxzZToNCiAgICAgICAgICAgIGVjaG8gIkFuIGVycm9yIG9jY3VycmVkLCBwbGVhc2UgdHJ5IGxhdGVyLiI7DQogICAgICAgICAgZW5kaWY7DQogICAgICBlbmRpZjsNCiAgZWxzZWlmKCAkYWN0aW9uID09ICJpbXBvcnRfc2VydmljZXNfbGFzdCIgKToNCiAgICAkcHJvdmlkZXJfaWQgID0gJF9QT1NUWyJwcm92aWRlciJdOw0KICAgICRzZXJ2aWNlcyAgICAgPSBqc29uX2RlY29kZShqc29uX2VuY29kZSgkX1BPU1RbInNlcnZpY2VzIl0pKTsNCiAgICAkc21tYXBpICAgICAgID0gbmV3IFNNTUFwaSgpOw0KICAgICRwcm92aWRlciAgICAgPSAkY29ubi0+cHJlcGFyZSgiU0VMRUNUICogRlJPTSBzZXJ2aWNlX2FwaSBXSEVSRSBpZD06aWQiKTsNCiAgICAkcHJvdmlkZXIgICAgIC0+ZXhlY3V0ZShhcnJheSgiaWQiPT4kcHJvdmlkZXJfaWQpKTsNCiAgICAkcHJvdmlkZXIgICAgID0gJHByb3ZpZGVyLT5mZXRjaChQRE86OkZFVENIX0FTU09DKTsNCiAgICAkYXBpU2VydmljZXMgID0gJHNtbWFwaS0+YWN0aW9uKGFycmF5KCdrZXknPT4kcHJvdmlkZXJbImFwaV9rZXkiXSwnYWN0aW9uJz0+J3NlcnZpY2VzJyksJHByb3ZpZGVyWyJhcGlfdXJsIl0pOw0KICAgICRncm91cGVkICAgICAgPSBhcnJheV9ncm91cF9ieSgkc2VydmljZXMsICdjYXRlZ29yeScpOw0KICAgICAgZWNobyAnDQogICAgICA8ZGl2IGNsYXNzPSJzZXJ2aWNlcy1pbXBvcnRfX2JvZHkiPg0KICAgICAgICAgICAgIDxkaXY+DQogICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0ic2VydmljZXMtaW1wb3J0X19maWVsZHMiPg0KICAgICAgICAgICAgICAgICAgIA0KICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InNlcnZpY2VzLWltcG9ydF9fc3RlcDMtZmllbGQiPg0KICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InNlcnZpY2VzLWltcG9ydF9fcGxhY2Vob2xkZXItdGl0bGUiPlNlbGVjdCBDdXJyZW5jeTwvZGl2Pjxicj4NCgkJCQkJICA8c2VsZWN0IGlkPSJyYWlzZS1jdXJyZW5jeSIgbmFtZT0iY3VycmVuY3kiPg0KICAgICAgICA8b3B0aW9uIHZhbHVlPSIiIGRpc2FibGVkIHNlbGVjdGVkPkNob29zZSBQcm92aWRlciBDdXJyZW5jeTwvb3B0aW9uPg0KICAgICAgICA8b3B0aW9uIHZhbHVlPSIwLjAxMzkiPklOUjwvb3B0aW9uPg0KICAgICAgICA8b3B0aW9uIHZhbHVlPSIxIj5VU0Q8L29wdGlvbj4NCiAgICA8L3NlbGVjdD4NCiAgICAgICAgICAgICAgICAgICAgIA0KICAgICAgICAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InNlcnZpY2VzLWltcG9ydF9fc3RlcDMtcGx1cyI+KzwvZGl2Pg0KICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InNlcnZpY2VzLWltcG9ydF9fc3RlcDMtZmllbGQiPg0KICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2x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XRlZ29yeTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmRpZjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgZW5kZm9yZWFjaDsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgJGNhdGVnb3J5X2lkPSRjYXRlZ29yeV9pZCsrOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAkYysrOw0KICAgICAgICAgICAgICAgICAgICAgICAgZWNobyAnPHNwYW4gY2xhc3M9InByb3ZpZGVyQ2F0ZWdvcnkiIGlkPSJwcm92aWRlckNhdGVnb3J5LScuJGMuJyI+DQogICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJzZXJ2aWNlcy1pbXBvcnRfX2NhdGVnb3J5Ij4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InNlcnZpY2VzLWltcG9ydF9fY2F0ZWdvcnktdGl0bGUiPjxsYWJlbD4nLiRjYXRlZ29yeU5hbWUuJzwvbGFiZWw+PC9kaXY+DQogICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InNlcnZpY2VzLWltcG9ydF9fcGFja2FnZXMiPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHVsPic7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcigkaT0wOyRpPGNvdW50KCRjYXRlZ29yeSk7JGkrKyk6DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yZWFjaCAoJGFwaVNlcnZpY2VzIGFzICRhcGlTZXJ2aWNlKToNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCAkYXBpU2VydmljZS0+c2VydmljZSA9PSAkY2F0ZWdvcnlbJGldLT5pZCAgKToNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWNobyAnPGxpIGlkPSJwcm92aWRlclNlcnZpY2UtJy4kYXBpU2VydmljZS0+c2VydmljZS4nIj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGxhYmVsPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnLiRhcGlTZXJ2aWNlLT5zZXJ2aWNlLicgLSAnLiRhcGlTZXJ2aWNlLT5uYW1lLicNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHNwYW4gY2xhc3M9InNlcnZpY2VzLWltcG9ydF9fcGFja2FnZXMtcHJpY2UtZWRpdCIgPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJzZXJ2aWNlcy1pbXBvcnRfX3BhY2thZ2VzLXByaWNlLWxvY2siIGRhdGEtY2F0ZWdvcnk9IicuJGMuJyIgIGRhdGEtaWQ9InNlcnZpY2VkZWxldGUtJy4kYXBpU2VydmljZS0+c2VydmljZS4nIiBkYXRhLXNlcnZpY2U9IicuJGFwaVNlcnZpY2UtPnNlcnZpY2UuJyI+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHNwYW4gY2xhc3M9ImZhIGZhLXRyYXNoIj48L3NwYW4+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJzZXJ2aWNlcy1pbXBvcnRfX3BhY2thZ2VzLXByaWNlLWxvY2siICBkYXRhLWlkPSJzZXJ2aWNlbG9jay0nLiRhcGlTZXJ2aWNlLT5zZXJ2aWNlLiciIGRhdGEtc2VydmljZT0iJy4kYXBpU2VydmljZS0+c2VydmljZS4nIj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz0iZmEgZmEtdW5sb2NrIj48L3NwYW4+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aW5wdXQgaWQ9InNlcnZpY2VQcmljZUNhbCcuJGFwaVNlcnZpY2UtPnNlcnZpY2UuJyIgdHlwZT0idGV4dCIgY2xhc3M9InNlcnZpY2VzLWltcG9ydF9fcHJpY2UiIGRhdGEtcmF0ZT0iJy5wcmljZUZvcm1hdCgkYXBpU2VydmljZS0+cmF0ZSkuJyIgZGF0YS1zZXJ2aWNlPSInLiRhcGlTZXJ2aWNlLT5zZXJ2aWNlLiciIG5hbWU9InNlcnZpY2VzTGlzdFsnLiRhcGlTZXJ2aWNlLT5zZXJ2aWNlLiddIiB2YWx1ZT0iJy5wcmljZUZvcm1hdA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoJGFwaVNlcnZpY2UtPnJhdGUpLiciPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz0ic2VydmljZXMtaW1wb3J0X19wcm92aWRlci1wcmljZSI+Jy5wcmljZUZvcm1hdCgkYXBpU2VydmljZS0+cmF0ZSkuJzwvc3Bhbj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9zcGFuPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2xhYmVsPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2xpPic7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmRpZjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmRmb3JlYWNoOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmRmb3I7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgZWNobyAgJzwvdWw+DQogICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgICAgICAgICAgIDwvc3Bhbj4nOw0KICAgICAgICAgICAgICAgICAgICAgIGVuZGZvcmVhY2g7DQogICAgICAgICAgICAgICAgICAgZWNobyAnPC9kaXY+DQogICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgPC9kaXY+DQogICAgICAgICAgPHNjcmlwdD4NCiAgICAgICAgICBmdW5jdGlvbiBmb3JtYXRDdXJyZW5jeSh0b3RhbCkgew0KICAgICAgICAgICAgICB2YXIgbmVnID0gZmFsc2U7DQogICAgICAgICAgICAgIGlmKHRvdGFsIDwgMCkgew0KICAgICAgICAgICAgICAgICAgbmVnID0gdHJ1ZTsNCiAgICAgICAgICAgICAgICAgIHRvdGFsID0gTWF0aC5hYnModG90YWwpOw0KICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgIHJldHVybiBwYXJzZUZsb2F0KHRvdGFsLCAxMCkudG9GaXhlZCgyKS5yZXBsYWNlKC8oXGQpKD89KFxkezN9KStcLikvZywgIiQxLCIpLnRvU3RyaW5nKCk7DQogICAgICAgICAgfQ0KICAgICAgICAgIGZ1bmN0aW9uIHN1bShpbnB1dCl7DQogICAgICAgICAgIGlmICh0b1N0cmluZy5jYWxsKGlucHV0KSAhPT0gIltvYmplY3QgQXJyYXldIikNCiAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOw0KDQogICAgICAgICAgICAgICAgICAgICAgdmFyIHRvdGFsID0gIDA7DQogICAgICAgICAgICAgICAgICAgICAgZm9yKHZhciBpPTA7aTxpbnB1dC5sZW5ndGg7aSsrKQ0KICAgICAgICAgICAgICAgICAgICAgICAgew0KICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpc05hTihpbnB1dFtpXSkpew0KICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICB0b3RhbCArPSBOdW1iZXIoaW5wdXRbaV0pOw0KICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICByZXR1cm4gdG90YWw7DQogICAgICAgICAgICB9DQogICAgICAgICAgZnVuY3Rpb24gY2hhcmdlU2VydmljZSgpew0KICAgICAgICAgICAgdmFyIGFkZF9maXhlZCAgICAgICA9ICQoIiNyYWlzZS1maXhlZCIpLnZhbCgpOw0KICAgICAgICAgICAgdmFyIGFkZF9wZXJjZW50ICAgICA9ICQoIiNyYWlzZS1wZXJjZW50IikudmFsKCk7DQoJCQl2YXIgYWRkX2N1cnJlbmN5ICAgICA9ICQoIiNyYWlzZS1jdXJyZW5jeSIpLnZhbCgpOw0KICAgICAgICAgICAgJCgiLnNlcnZpY2VzLWltcG9ydF9fcHJpY2UiKS5lYWNoKGZ1bmN0aW9uKCl7DQogICAgICAgICAgICAgIGlmKCAkKHRoaXMpLmF0dHIoInJlYWRvbmx5IikgIT0gInJlYWRvbmx5IiApew0KICAgICAgICAgICAgICAgIHZhciByYXRlICAgICAgICA9ICQodGhpcykuYXR0cigiZGF0YS1yYXRlIik7DQogICAgICAgICAgICAgICAgdmFyIHNlcnZpY2UgICAgID0gJCh0aGlzKS5hdHRyKCJkYXRhLXNlcnZpY2UiKTsNCiAgICAgICAgICAgICAgICB2YXIgdG90YWwgPSBzdW0oW3JhdGUsKHJhdGUqYWRkX3BlcmNlbnQvMTAwKV0pKihhZGRfY3VycmVuY3kpOw0KICAgICAgICAgICAgICAgICQoIiNzZXJ2aWNlUHJpY2VDYWwiK3NlcnZpY2UpLnZhbCh0b3RhbCk7DQoNCiAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgfSk7DQogICAgICAgICAgfQ0KICAgICAgICAgICAgJChcJ1tkYXRhLWlkXj0ic2VydmljZWRlbGV0ZS0iXVwnKS5jbGljayhmdW5jdGlvbigpew0KICAgICAgICAgICAgICB2YXIgaWQgICAgICAgID0gJCh0aGlzKS5hdHRyKCJkYXRhLXNlcnZpY2UiKTsNCiAgICAgICAgICAgICAgdmFyIGNhdGVnb3J5ICA9ICQodGhpcykuYXR0cigiZGF0YS1jYXRlZ29yeSIpOw0KICAgICAgICAgICAgICAkKCJsaSNwcm92aWRlclNlcnZpY2UtIitpZCkucmVtb3ZlKCk7DQogICAgICAgICAgICAgICAgaWYoICQoIiNwcm92aWRlckNhdGVnb3J5LSIrY2F0ZWdvcnkrIiA+IC5zZXJ2aWNlcy1pbXBvcnRfX3BhY2thZ2VzID4gdWwgPiBsaSIpLmxlbmd0aCA9PSAwICl7DQogICAgICAgICAgICAgICAgICAkKCIjcHJvdmlkZXJDYXRlZ29yeS0iK2NhdGVnb3J5KS5yZW1vdmUoKTsNCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICQoXCdbZGF0YS1pZF49InNlcnZpY2Vsb2NrLSJdXCcpLmNsaWNrKGZ1bmN0aW9uKCl7DQogICAgICAgICAgICAgIHZhciBzZXJ2aWNlX2lkICA9ICQodGhpcykuYXR0cigiZGF0YS1zZXJ2aWNlIik7DQogICAgICAgICAgICAgIHZhciBsb2NrICAgICAgICA9ICQodGhpcykuZmluZCgic3BhbiIpLmF0dHIoImNsYXNzIik7DQogICAgICAgICAgICAgIGlmKCBsb2NrID09ICJmYSBmYS11bmxvY2siICl7DQogICAgICAgICAgICAgICAgJCh0aGlzKS5maW5kKCJzcGFuIikucmVtb3ZlQ2xhc3MoImZhIGZhLXVubG9jayIpOw0KICAgICAgICAgICAgICAgICQodGhpcykuZmluZCgic3BhbiIpLmFkZENsYXNzKCJmYSBmYS1sb2NrIik7DQogICAgICAgICAgICAgICAgJChcJ1tkYXRhLXNlcnZpY2U9IlwnK3NlcnZpY2VfaWQrXCciXVwnKS5hdHRyKCJyZWFkb25seSIsdHJ1ZSk7DQogICAgICAgICAgICAgIH0gZWxzZXsNCiAgICAgICAgICAgICAgICAkKHRoaXMpLmZpbmQoInNwYW4iKS5yZW1vdmVDbGFzcygiZmEgZmEtbG9jayIpOw0KICAgICAgICAgICAgICAgICQodGhpcykuZmluZCgic3BhbiIpLmFkZENsYXNzKCJmYSBmYS11bmxvY2siKTsNCiAgICAgICAgICAgICAgICAkKFwnW2RhdGEtc2VydmljZT0iXCcrc2VydmljZV9pZCtcJyJdXCcpLmF0dHIoInJlYWRvbmx5IixmYWxzZSk7DQogICAgICAgICAgICAgIH0NCiAgICAgICAgICAgIH0pOw0KDQogICAgICAgICAgICAkKCIuc2VydmljZXMtaW1wb3J0X19zdGVwMy1hY3Rpb25zIikuY2xpY2soZnVuY3Rpb24oKXsNCiAgICAgICAgICAgICAgdmFyIGFkZF9maXhlZCAgICAgICA9ICQoIiNyYWlzZS1maXhlZCIpLnZhbCgiIik7DQogICAgICAgICAgICAgIHZhciBhZGRfcGVyY2VudCAgICAgPSAkKCIjcmFpc2UtcGVyY2VudCIpLnZhbCgiIik7DQoJCQkgIHZhciBhZGRfY3VycmVuY3kgICAgID0gJCgiI3JhaXNlLWN1cnJlbmN5IikudmFsKCIiKTsNCiAgICAgICAgICAgICAgJCgiLnNlcnZpY2VzLWltcG9ydF9fcHJpY2UiKS5lYWNoKGZ1bmN0aW9uKCl7DQogICAgICAgICAgICAgICAgaWYoICQodGhpcykuYXR0cigicmVhZG9ubHkiKSAhPSAicmVhZG9ubHkiICl7DQogICAgICAgICAgICAgICAgICB2YXIgcmF0ZSAgICAgICAgPSAkKHRoaXMpLmF0dHIoImRhdGEtcmF0ZSIpOw0KICAgICAgICAgICAgICAgICAgdmFyIHNlcnZpY2UgICAgID0gJCh0aGlzKS5hdHRyKCJkYXRhLXNlcnZpY2UiKTsNCiAgICAgICAgICAgICAgICAgICAgJCgiI3NlcnZpY2VQcmljZUNhbCIrc2VydmljZSkudmFsKHJhdGUpOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgfSk7DQogICAgICAgICAgICB9KTsNCg0KICAgICAgICAgICAgJCgiI3JhaXNlLWZpeGVkIikub24oImtleXVwIiwgZnVuY3Rpb24oKXsNCiAgICAgICAgICAgICAgY2hhcmdlU2VydmljZSgpOw0KICAgICAgICAgICAgfSk7DQoNCiAgICAgICAgICAgICQoIiNyYWlzZS1wZXJjZW50Iikub24oImtleXVwIiwgZnVuY3Rpb24oKXsNCiAgICAgICAgICAgICAgY2hhcmdlU2VydmljZSgpOw0KICAgICAgICAgICAgfSk7DQoJCQkgJCgiI3JhaXNlLWN1cnJlbmN5Iikub24oImtleXVwIiwgZnVuY3Rpb24oKXsNCiAgICAgICAgICAgICAgY2hhcmdlU2VydmljZSgpOw0KICAgICAgICAgICAgfSk7DQoNCiAgICAgICAgICA8L3NjcmlwdD4NCiAgICAgICAgICAnOw0KICBlbHNlaWYoICRhY3Rpb24gPT0gInByaWNlX3Byb3ZpZGVyQ2FsIiApOg0KICAgICRmaXhlZCAgICA9ICRfUE9TVFsiZml4ZWQiXTsNCiAgICAkcGVyY2VudCAgPSAkX1BPU1RbInBlcmNlbnQiXTsNCiAgICAkcmF0ZSAgICAgPSAkX1BPU1RbInJhdGUiXTsNCiAgICAkdG90YWwgICAgPSAkcmF0ZTsNCiAgICAgIGlmKCBpc19udW1lcmljKCRwZXJjZW50KSAmJiAkcGVyY2VudCA+IDAgICk6DQogICAgICAgICR0b3RhbD0gJHRvdGFsKygkcmF0ZSokcGVyY2VudC8xMDApOw0KICAgICAgZW5kaWY7DQogICAgICBpZiggaXNfbnVtZXJpYygkZml4ZWQpICYmICRmaXhlZCA+IDAgKToNCiAgICAgICAgJHRvdGFsPSAkdG90YWwrJGZpeGVkOw0KICAgICAgZW5kaWY7DQogICAgICBlY2hvICR0b3RhbDsNCg0KDQplbHNlaWYoICRhY3Rpb24gPT0gImltcG9ydF9zZXJ2aWNlIiApOg0KICAgICRwcm92aWRlcnMgID0gJGNvbm4tPnByZXBhcmUoIlNFTEVDVCAqIEZST00gc2VydmljZV9hcGkgICBXSEVSRS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AgICAkKCIjbmV4dFN0ZXAiKS5jbGljayhmdW5jdGlvbigpew0KICAgICAgICAgICAgICB2YXIgbm93X3N0ZXAgPSAkKHRoaXMpLmF0dHIoImRhdGEtc3RlcCIpOw0KICAgICAgICAgICAgICB2YXIgcHJvdmlkZXIgPSAkKCIjcHJvdmlkZXIiKS52YWwoKTsNCiAgICAgICAgICAgICAgdmFyIGNhdGVnb3J5ID0gJCgiI3NlbGVjdG9yIikudmFsKCk7DQogICAgICAgICAgICAgICQoIiNzZWNvbmRTdGVwIikuaGlkZSgpOw0KICAgICAgICAgICAgICAgIGlmKCBub3dfc3RlcCA9PSAiZmlyc3QiICl7DQogICAgICAgICAgICAgICAgICBpZiggcHJvdmlkZXIgPT0gMCApew0KICAgICAgICAgICAgICAgICAgICAkLnRvYXN0KHsNCiAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRpbmc6ICJVbnN1Y2Nlc3NmdWwiLA0KICAgICAgICAgICAgICAgICAgICAgICAgdGV4dDogIlBsZWFzZSBzZWxlY3Qgc2VydmljZSBwcm92aWRlciIsDQogICAgICAgICAgICAgICAgICAgICAgICBpY29uOiAiZXJyb3IiLA0KICAgICAgICAgICAgICAgICAgICAgICAgbG9hZGVyOiB0cnVlLA0KICAgICAgICAgICAgICAgICAgICAgICAgbG9hZGVyQmc6ICIjOUVDNjAwIg0KICAgICAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICAgIH1lbHNlew0KICAgICAgICAgICAgICAgICAgICAkKCIjZmlyc3RTdGVwIikuaGlkZSgpOw0KICAgICAgICAgICAgICAgICAgICAkKCIjc2Vjb25kU3RlcCIpLnNob3coKTsNCiAgICAgICAgICAgICAgICAgICAgJC5wb3N0KCJhZG1pbi9hamF4X2RhdGEiLCB7cHJvdmlkZXI6cHJvdmlkZXIsY2F0ZWdvcnk6Y2F0ZWdvcnksYWN0aW9uOiJpbXBvcnRfc2VydmljZXNfbGlzdCIgfSwgZnVuY3Rpb24oZGF0YSl7DQogICAgICAgICAgICAgICAgICAgICAgJCgiI3NlY29uZFN0ZXAiKS5odG1sKGRhdGEpOw0KICAgICAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICAgICAgJCgiI25leHRTdGVwIikuYXR0cigiZGF0YS1zdGVwIiwic2Vjb25kIik7DQogICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgfWVsc2UgaWYoIG5vd19zdGVwID09ICJzZWNvbmQiICl7DQogICAgICAgICAgICAgICAgICAgIHZhciBhcnJheSAgICAgPSBbXTsNCiAgICAgICAgICAgICAgICAgICAgICAgJChcJ1tjbGFzc149InNlbGVjdFNlcnZpY2VzLSJdXCcpLmVhY2goZnVuY3Rpb24gKCkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBpZCAgICA9ICQodGhpcykudmFsKCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGNoZWNrID0gJCh0aGlzKS5wcm9wKCJjaGVja2VkIik7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHByb3ZpZGVyICA9ICAkKHRoaXMpLmF0dHIoImRhdGEtcHJvdmlkZXIiKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCBjaGVjayA9PSB0cnVlICl7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwYXJhbXMgPSB7fTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zWyJpZCJdICAgICAgICAgICAgPSBpZDsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zWyJjYXRlZ29yeSJdICAgICAgPSAkKHRoaXMpLmF0dHIoImRhdGEtY2F0ZWdvcnkiKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJyYXkucHVzaChwYXJhbXMpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICAgICAgICAgdmFyIGNvdW50ID0gYXJyYXkubGVuZ3RoOw0KICAgICAgICAgICAgICAgICAgICAgaWYoIGNvdW50ICl7DQogICAgICAgICAgICAgICAgICAgICAgICQucG9zdCgiYWRtaW4vYWpheF9kYXRhIiwge3Byb3ZpZGVyOnByb3ZpZGVyLGFjdGlvbjoiaW1wb3J0X3NlcnZpY2VzX2xhc3QiLHNlcnZpY2VzOmFycmF5IH0sIGZ1bmN0aW9uKGRhdGEpew0KICAgICAgICAgICAgICAgICAgICAgICAgICQoIiN0aGlyZFN0ZXAiKS5odG1sKGRhdGEpOw0KICAgICAgICAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICAgICAgICAgJCgiI25leHRTdGVwIikuaGlkZSgpOw0KICAgICAgICAgICAgICAgICAgICAgICAkKCIjc3VibWl0U3RlcCIpLnNob3coKTsNCiAgICAgICAgICAgICAgICAgICAgIH1lbHNlew0KICAgICAgICAgICAgICAgICAgICAgICAkKCIjbmV4dFN0ZXAiKS5hdHRyKCJkYXRhLXN0ZXAiLCJzZWNvbmQiKTsNCiAgICAgICAgICAgICAgICAgICAgICAgJCgiI2ZpcnN0U3RlcCIpLmhpZGUoKTsNCiAgICAgICAgICAgICAgICAgICAgICAgJCgiI3NlY29uZFN0ZXAiKS5zaG93KCk7DQogICAgICAgICAgICAgICAgICAgICAgICQoIiNuZXh0U3RlcCIpLnNob3coKTsNCiAgICAgICAgICAgICAgICAgICAgICAgJCgiI3N1Ym1pdFN0ZXAiKS5oaWRlKCk7DQogICAgICAgICAgICAgICAgICAgICAgICQudG9hc3Qoew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGluZzogIlVuc3VjY2Vzc2Z1bCIsDQogICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0OiAiUGxlYXNlIHNlbGVjdCBhdCBsZWFzdCAxIHNlcnZpY2UgeW91IHdhbnQgdG8gYWRkIiwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgIGljb246ICJlcnJvciIsDQogICAgICAgICAgICAgICAgICAgICAgICAgICBsb2FkZXI6IHRydWUsDQogICAgICAgICAgICAgICAgICAgICAgICAgICBsb2FkZXJCZzogIiM5RUM2MDAiDQogICAgICAgICAgICAgICAgICAgICAgIH0pOw0KICAgICAgICAgICAgICAgICAgICAgfQ0KDQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgfSk7DQogICAgICAgICAgPC9zY3JpcHQ+DQogICAgICAgICAgJzsNCiAgICBlY2hvIGpzb25fZW5jb2RlKFsiY29udGVudCI9PiRyZXR1cm4sInRpdGxlIj0+IlB1bGwgb3V0IHNlcnZpY2VzIGZyb20gcHJvdmlkZXIiXSk7DQogIGVsc2VpZiggJGFjdGlvbiA9PSAiaW1wb3J0X3NlcnZpY2VzX2xpc3QiICk6DQogICAgJHByb3ZpZGVyX2lkICA9ICRfUE9TVFsicHJvdmlkZXIiXTsNCiAgICAkY2F0ZWdvcnlfaWQyICA9ICRfUE9TVFsiY2F0ZWdvcnkiXTsNCiAgICAkc21tYXBpICAgICAgID0gbmV3IFNNTUFwaSgpOw0KICAgICRwcm92aWRlciAgICAgPSAkY29ubi0+cHJlcGFyZSgiU0VMRUNUICogRlJPTSBzZXJ2aWNlX2FwaSBXSEVSRSBpZD06aWQiKTsNCiAgICAkcHJvdmlkZXIgICAgIC0+ZXhlY3V0ZShhcnJheSgiaWQiPT4kcHJvdmlkZXJfaWQpKTsNCiAgICAkcHJvdmlkZXIgICAgID0gJHByb3ZpZGVyLT5mZXRjaChQRE86OkZFVENIX0FTU09DKTsNCiAgICAgIGlmKCAkcHJvdmlkZXJbImFwaV90eXBlIl0gPT0gMSApOg0KICAgICAgICAkc2VydmljZXMgICA9ICRzbW1hcGktPmFjdGlvbihhcnJheSgna2V5Jz0+JHByb3ZpZGVyWyJhcGlfa2V5Il0sJ2FjdGlvbic9PidzZXJ2aWNlcycpLCRwcm92aWRlclsiYXBpX3VybCJdKTsNCiAgICAgICAgICBpZiggJHNlcnZpY2VzICk6DQogICAgICAgICAgICAkZ3JvdXBlZCA9IGFycmF5X2dyb3VwX2J5KCRzZXJ2aWNlcywgJ2NhdGVnb3J5Jyk7DQogICAgICAgICAgICBlY2hvICc8ZGl2IGNsYXNzPSIiPg0KICAgICAgICAgICAgPGRpdiBjbGFzcz0ic2VydmljZXMtaW1wb3J0X19ib2R5Ij4NCiAgICAgICAgICAgICAgICAgPGRpdj4NCiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0ic2VydmljZXMtaW1wb3J0X19saXN0LXdyYXAiPg0KICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJzZXJ2aWNlcy1pbXBvcnRfX3Njcm9sbC13cmFwIj4nOw0KICAgICAgICAgICAgICAgICAgICAgICBmb3JlYWNoKCRncm91cGVkIGFzICRjYXRlZ29yeSk6DQogICAgICAgICAgICAgICAgICAgICAgICAgJGNhdGVnb3J5X2lkKys7DQogICAgICAgICAgICAgICAgICAgICAgICAgZWNobyAnDQogICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJzZXJ2aWNlcy1pbXBvcnRfX2NhdGVnb3J5Ij4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0ic2VydmljZXMtaW1wb3J0X19jYXRlZ29yeS10aXRsZSI+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGxhYmVsPjxpbnB1dCB0eXBlPSJjaGVja2JveCIgZGF0YS1pZD0iJy4kY2F0ZWdvcnlfaWQuJyIgaWQ9ImNoZWNrQWxsLScuJGNhdGVnb3J5X2lkLiciPicuJGNhdGVnb3J5WzBdLT5jYXRlZ29yeS4nPC9sYWJlbD4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aW5wdXQgdHlwZT0iaGlkZGVuIiBuYW1lPSJjYXRlZ29yeSIgdmFsdWU9IicuJGNhdGVnb3J5X2lkMi4nIj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJzZXJ2aWNlcy1pbXBvcnRfX3BhY2thZ2VzIj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHVsPic7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcigkaT0wOyRpPGNvdW50KCRjYXRlZ29yeSk7JGkrKyk6DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWNobyAnPGxpPjxsYWJlbD48aW5wdXQgZGF0YS1zZXJ2aWNlPSInLiRjYXRlZ29yeVskaV0tPm5hbWUuJyIgZGF0YS1wcm92aWRlcj0iJy4kcHJvdmlkZXJbImlkIl0uJyIgIGRhdGEtY2F0ZWdvcnk9IicuJGNhdGVnb3J5X2lkLiciICBjbGFzcz0ic2VsZWN0U2VydmljZXMtJy4kY2F0ZWdvcnlfaWQuJyIgdHlwZT0iY2hlY2tib3giIHZhbHVlPSInLiRjYXRlZ29yeVskaV0tPnNlcnZpY2UuJyIgbmFtZT0ic2VydmljZXNbXSI+Jy4kY2F0ZWdvcnlbJGldLT5zZXJ2aWNlLicgLSAnLiRjYXRlZ29yeVskaV0tPm5hbWUuJzxzcGFuIGNsYXNzPSJzZXJ2aWNlcy1pbXBvcnRfX3BhY2thZ2VzLXByaWNlIj4nLnByaWNlRm9ybWF0KCRjYXRlZ29yeVskaV0tPnJhdGUpLic8L3NwYW4+PC9sYWJlbD48L2xpPic7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVuZGZvcjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVjaG8gICc8L3VsPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgPC9zcGFuPic7DQogICAgICAgICAgICAgICAgICAgICAgICBlbmRmb3JlYWNoOw0KICAgICAgICAgICAgICAgICAgICAgICAgZWNobyAnDQogICAgICAgICAgICAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgICAgICA8c2NyaXB0Pg0KICAgICAgICAgICAgICAkKFwnW2lkXj0iY2hlY2tBbGwtIl1cJykuY2xpY2soZnVuY3Rpb24gKCkgew0KICAgICAgICAgICAgICAgIHZhciBpZCA9ICQodGhpcykuYXR0cigiZGF0YS1pZCIpOw0KICAgICAgICAgICAgICAgICBpZiAoICQodGhpcykucHJvcCgiY2hlY2tlZCIpID09IHRydWUgKSB7DQogICAgICAgICAgICAgICAgICAgJCgiLnNlbGVjdFNlcnZpY2VzLSIraWQpLm5vdCh0aGlzKS5wcm9wKCJjaGVja2VkIiwgdHJ1ZSk7DQogICAgICAgICAgICAgICAgIH1lbHNlew0KICAgICAgICAgICAgICAgICAgICQoIi5zZWxlY3RTZXJ2aWNlcy0iK2lkKS5ub3QodGhpcykucHJvcCgiY2hlY2tlZCIsIGZhbHNlKTsNCiAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgfSk7DQogICAgICAgICAgICAgIDwvc2NyaXB0Pg0KICAgICAgICAgICAgICA8L2Rpdj4nOw0KICAgICAgICAgIGVsc2U6DQogICAgICAgICAgICBlY2hvICJBbiBlcnJvciBvY2N1cnJlZCwgcGxlYXNlIHRyeSBsYXRlci4iOw0KICAgICAgICAgIGVuZGlmOw0KICAgICAgZW5kaWY7DQogIGVsc2VpZiggJGFjdGlvbiA9PSAiaW1wb3J0X3NlcnZpY2VzX2xhc3QiICk6DQogICAgJHByb3ZpZGVyX2lkICA9ICRfUE9TVFsicHJvdmlkZXIiXTs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19saXN0LWFjdGl2ZSI+DQogICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0ic2VydmljZXMtaW1wb3J0X19zY3JvbGwtd3JhcCI+JzsNCiAgICAgICAgICAgICAgICAgICAgICAkY2F0ZWdvcnlfaWQgID0gMDsNCiAgICAgICAgICAgICAgICAgICAgICAkYz0wOw0KICAgICAgICAgICAgICAgICAgICAgIGZvcmVhY2goJGdyb3VwZWQgYXMgJGNhdGVnb3J5KToNCiAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yZWFjaCAoJGFwaVNlcnZpY2VzIGFzICRrZXkgPT4gJHZhbHVlKToNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiggJGNhdGVnb3J5WyRjYXRlZ29yeV9pZF0tPmlkID09ICR2YWx1ZS0+c2VydmljZSApOg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGNhdGVnb3J5TmFtZSA9ICR2YWx1ZS0+Y2F0ZWdvcnk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgZW5kaWY7DQogICAgICAgICAgICAgICAgICAgICAgICAgIGVuZGZvcmVhY2g7DQogICAgICAgICAgICAgICAgICAgICAgICAgICRjYXRlZ29yeV9pZD0kY2F0ZWdvcnlfaWQrKzsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgJGMrKzsNCiAgICAgICAgICAgICAgICAgICAgICAgIGVjaG8gJzxzcGFuIGNsYXNzPSJwcm92aWRlckNhdGVnb3J5IiBpZD0icHJvdmlkZXJDYXRlZ29yeS0nLiRjLiciPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0ic2VydmljZXMtaW1wb3J0X19jYXRlZ29yeSI+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJzZXJ2aWNlcy1pbXBvcnRfX2NhdGVnb3J5LXRpdGxlIj48bGFiZWw+Jy4kY2F0ZWdvcnlOYW1lLic8L2xhYmVsPjwvZGl2Pg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJzZXJ2aWNlcy1pbXBvcnRfX3BhY2thZ2VzIj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx1bD4nOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IoJGk9MDskaTxjb3VudCgkY2F0ZWdvcnkpOyRpKyspOg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcmVhY2ggKCRhcGlTZXJ2aWNlcyBhcyAkYXBpU2VydmljZSk6DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiggJGFwaVNlcnZpY2UtPnNlcnZpY2UgPT0gJGNhdGVnb3J5WyRpXS0+aWQgICk6DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVjaG8gJzxsaSBpZD0icHJvdmlkZXJTZXJ2aWNlLScuJGFwaVNlcnZpY2UtPnNlcnZpY2UuJyI+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxsYWJlbD4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJy4kYXBpU2VydmljZS0+c2VydmljZS4nIC0gJy4kYXBpU2VydmljZS0+bmFtZS4nDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPSJzZXJ2aWNlcy1pbXBvcnRfX3BhY2thZ2VzLXByaWNlLWVkaXQiID4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0ic2VydmljZXMtaW1wb3J0X19wYWNrYWdlcy1wcmljZS1sb2NrIiBkYXRhLWNhdGVnb3J5PSInLiRjLiciICBkYXRhLWlkPSJzZXJ2aWNlZGVsZXRlLScuJGFwaVNlcnZpY2UtPnNlcnZpY2UuJyIgZGF0YS1zZXJ2aWNlPSInLiRhcGlTZXJ2aWNlLT5zZXJ2aWNlLiciPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPSJmYSBmYS10cmFzaCI+PC9zcGFuPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0ic2VydmljZXMtaW1wb3J0X19wYWNrYWdlcy1wcmljZS1sb2NrIiAgZGF0YS1pZD0ic2VydmljZWxvY2stJy4kYXBpU2VydmljZS0+c2VydmljZS4nIiBkYXRhLXNlcnZpY2U9IicuJGFwaVNlcnZpY2UtPnNlcnZpY2UuJyI+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHNwYW4gY2xhc3M9ImZhIGZhLXVubG9jayI+PC9zcGFuPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGlucHV0IGlkPSJzZXJ2aWNlUHJpY2VDYWwnLiRhcGlTZXJ2aWNlLT5zZXJ2aWNlLiciIHR5cGU9InRleHQiIGNsYXNzPSJzZXJ2aWNlcy1pbXBvcnRfX3ByaWNlIiBkYXRhLXJhdGU9IicucHJpY2VGb3JtYXQoJGFwaVNlcnZpY2UtPnJhdGUpLiciIGRhdGEtc2VydmljZT0iJy4kYXBpU2VydmljZS0+c2VydmljZS4nIiBuYW1lPSJzZXJ2aWNlc0xpc3RbJy4kYXBpU2VydmljZS0+c2VydmljZS4nXSIgdmFsdWU9IicucHJpY2VGb3JtYXQNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCRhcGlTZXJ2aWNlLT5yYXRlKS4nIj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHNwYW4gY2xhc3M9InNlcnZpY2VzLWltcG9ydF9fcHJvdmlkZXItcHJpY2UiPicucHJpY2VGb3JtYXQoJGFwaVNlcnZpY2UtPnJhdGUpLic8L3NwYW4+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvc3Bhbj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9sYWJlbD4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9saT4nOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW5kaWY7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW5kZm9yZWFjaDsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW5kZm9yOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVjaG8gICc8L3VsPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgICAgICAgICAgICA8L3NwYW4+JzsNCiAgICAgICAgICAgICAgICAgICAgICBlbmRmb3JlYWNoOw0KICAgICAgICAgICAgICAgICAgIGVjaG8gJzwvZGl2Pg0KICAgICAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgIDxzY3JpcHQ+DQogICAgICAgICAgZnVuY3Rpb24gZm9ybWF0Q3VycmVuY3kodG90YWwpIHsNCiAgICAgICAgICAgICAgdmFyIG5lZyA9IGZhbHNlOw0KICAgICAgICAgICAgICBpZih0b3RhbCA8IDApIHsNCiAgICAgICAgICAgICAgICAgIG5lZyA9IHRydWU7DQogICAgICAgICAgICAgICAgICB0b3RhbCA9IE1hdGguYWJzKHRvdGFsKTsNCiAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICByZXR1cm4gcGFyc2VGbG9hdCh0b3RhbCwgMTApLnRvRml4ZWQoMikucmVwbGFjZSgvKFxkKSg/PShcZHszfSkrXC4pL2csICIkMSwiKS50b1N0cmluZygpOw0KICAgICAgICAgIH0NCiAgICAgICAgICBmdW5jdGlvbiBzdW0oaW5wdXQpew0KICAgICAgICAgICBpZiAodG9TdHJpbmcuY2FsbChpbnB1dCkgIT09ICJbb2JqZWN0IEFycmF5XSIpDQogICAgICAgICAgICAgIHJldHVybiBmYWxzZTsNCg0KICAgICAgICAgICAgICAgICAgICAgIHZhciB0b3RhbCA9ICAwOw0KICAgICAgICAgICAgICAgICAgICAgIGZvcih2YXIgaT0wO2k8aW5wdXQubGVuZ3RoO2krKykNCiAgICAgICAgICAgICAgICAgICAgICAgIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXNOYU4oaW5wdXRbaV0pKXsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7DQogICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgdG90YWwgKz0gTnVtYmVyKGlucHV0W2ldKTsNCiAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgcmV0dXJuIHRvdGFsOw0KICAgICAgICAgICAgfQ0KICAgICAgICAgIGZ1bmN0aW9uIGNoYXJnZVNlcnZpY2UoKXsNCiAgICAgICAgICAgIHZhciBhZGRfZml4ZWQgICAgICAgPSAkKCIjcmFpc2UtZml4ZWQiKS52YWwoKTsNCiAgICAgICAgICAgIHZhciBhZGRfcGVyY2VudCAgICAgPSAkKCIjcmFpc2UtcGVyY2VudCIpLnZhbCgpOw0KCQkJdmFyIGFkZF9jdXJyZW5jeSAgICAgPSAkKCIjcmFpc2UtY3VycmVuY3kiKS52YWwoKTsNCiAgICAgICAgICAgICQoIi5zZXJ2aWNlcy1pbXBvcnRfX3ByaWNlIikuZWFjaChmdW5jdGlvbigpew0KICAgICAgICAgICAgICBpZiggJCh0aGlzKS5hdHRyKCJyZWFkb25seSIpICE9ICJyZWFkb25seSIgKXsNCiAgICAgICAgICAgICAgICB2YXIgcmF0ZSAgICAgICAgPSAkKHRoaXMpLmF0dHIoImRhdGEtcmF0ZSIpOw0KICAgICAgICAgICAgICAgIHZhciBzZXJ2aWNlICAgICA9ICQodGhpcykuYXR0cigiZGF0YS1zZXJ2aWNlIik7DQogICAgICAgICAgICAgICAgdmFyIHRvdGFsID0gc3VtKFtyYXRlLChyYXRlKmFkZF9wZXJjZW50LzEwMCldKSooYWRkX2N1cnJlbmN5KTsNCiAgICAgICAgICAgICAgICAkKCIjc2VydmljZVByaWNlQ2FsIitzZXJ2aWNlKS52YWwodG90YWwpOw0KDQogICAgICAgICAgICAgIH0NCiAgICAgICAgICAgIH0pOw0KICAgICAgICAgIH0NCiAgICAgICAgICAgICQoXCdbZGF0YS1pZF49InNlcnZpY2VkZWxldGUtIl1cJykuY2xpY2soZnVuY3Rpb24oKXsNCiAgICAgICAgICAgICAgdmFyIGlkICAgICAgICA9ICQodGhpcykuYXR0cigiZGF0YS1zZXJ2aWNlIik7DQogICAgICAgICAgICAgIHZhciBjYXRlZ29yeSAgPSAkKHRoaXMpLmF0dHIoImRhdGEtY2F0ZWdvcnkiKTsNCiAgICAgICAgICAgICAgJCgibGkjcHJvdmlkZXJTZXJ2aWNlLSIraWQpLnJlbW92ZSgpOw0KICAgICAgICAgICAgICAgIGlmKCAkKCIjcHJvdmlkZXJDYXRlZ29yeS0iK2NhdGVnb3J5KyIgPiAuc2VydmljZXMtaW1wb3J0X19wYWNrYWdlcyA+IHVsID4gbGkiKS5sZW5ndGggPT0gMCApew0KICAgICAgICAgICAgICAgICAgJCgiI3Byb3ZpZGVyQ2F0ZWdvcnktIitjYXRlZ29yeSkucmVtb3ZlKCk7DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgfSk7DQogICAgICAgICAgICAkKFwnW2RhdGEtaWRePSJzZXJ2aWNlbG9jay0iXVwnKS5jbGljayhmdW5jdGlvbigpew0KICAgICAgICAgICAgICB2YXIgc2VydmljZV9pZCAgPSAkKHRoaXMpLmF0dHIoImRhdGEtc2VydmljZSIpOw0KICAgICAgICAgICAgICB2YXIgbG9jayAgICAgICAgPSAkKHRoaXMpLmZpbmQoInNwYW4iKS5hdHRyKCJjbGFzcyIpOw0KICAgICAgICAgICAgICBpZiggbG9jayA9PSAiZmEgZmEtdW5sb2NrIiApew0KICAgICAgICAgICAgICAgICQodGhpcykuZmluZCgic3BhbiIpLnJlbW92ZUNsYXNzKCJmYSBmYS11bmxvY2siKTsNCiAgICAgICAgICAgICAgICAkKHRoaXMpLmZpbmQoInNwYW4iKS5hZGRDbGFzcygiZmEgZmEtbG9jayIpOw0KICAgICAgICAgICAgICAgICQoXCdbZGF0YS1zZXJ2aWNlPSJcJytzZXJ2aWNlX2lkK1wnIl1cJykuYXR0cigicmVhZG9ubHkiLHRydWUpOw0KICAgICAgICAgICAgICB9IGVsc2V7DQogICAgICAgICAgICAgICAgJCh0aGlzKS5maW5kKCJzcGFuIikucmVtb3ZlQ2xhc3MoImZhIGZhLWxvY2siKTsNCiAgICAgICAgICAgICAgICAkKHRoaXMpLmZpbmQoInNwYW4iKS5hZGRDbGFzcygiZmEgZmEtdW5sb2NrIik7DQogICAgICAgICAgICAgICAgJChcJ1tkYXRhLXNlcnZpY2U9IlwnK3NlcnZpY2VfaWQrXCciXVwnKS5hdHRyKCJyZWFkb25seSIsZmFsc2UpOw0KICAgICAgICAgICAgICB9DQogICAgICAgICAgICB9KTsNCg0KICAgICAgICAgICAgJCgiLnNlcnZpY2VzLWltcG9ydF9fc3RlcDMtYWN0aW9ucyIpLmNsaWNrKGZ1bmN0aW9uKCl7DQogICAgICAgICAgICAgIHZhciBhZGRfZml4ZWQgICAgICAgPSAkKCIjcmFpc2UtZml4ZWQiKS52YWwoIiIpOw0KICAgICAgICAgICAgICB2YXIgYWRkX3BlcmNlbnQgICAgID0gJCgiI3JhaXNlLXBlcmNlbnQiKS52YWwoIiIpOw0KCQkJICB2YXIgYWRkX2N1cnJlbmN5ICAgICA9ICQoIiNyYWlzZS1jdXJyZW5jeSIpLnZhbCgiIik7DQogICAgICAgICAgICAgICQoIi5zZXJ2aWNlcy1pbXBvcnRfX3ByaWNlIikuZWFjaChmdW5jdGlvbigpew0KICAgICAgICAgICAgICAgIGlmKCAkKHRoaXMpLmF0dHIoInJlYWRvbmx5IikgIT0gInJlYWRvbmx5IiApew0KICAgICAgICAgICAgICAgICAgdmFyIHJhdGUgICAgICAgID0gJCh0aGlzKS5hdHRyKCJkYXRhLXJhdGUiKTsNCiAgICAgICAgICAgICAgICAgIHZhciBzZXJ2aWNlICAgICA9ICQodGhpcykuYXR0cigiZGF0YS1zZXJ2aWNlIik7DQogICAgICAgICAgICAgICAgICAgICQoIiNzZXJ2aWNlUHJpY2VDYWwiK3NlcnZpY2UpLnZhbChyYXRlKTsNCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgIH0pOw0KICAgICAgICAgICAgfSk7DQoNCiAgICAgICAgICAgICQoIiNyYWlzZS1maXhlZCIpLm9uKCJrZXl1cCIsIGZ1bmN0aW9uKCl7DQogICAgICAgICAgICAgIGNoYXJnZVNlcnZpY2UoKTsNCiAgICAgICAgICAgIH0pOw0KDQogICAgICAgICAgICAkKCIjcmFpc2UtcGVyY2VudCIpLm9uKCJrZXl1cCIsIGZ1bmN0aW9uKCl7DQogICAgICAgICAgICAgIGNoYXJnZVNlcnZpY2UoKTsNCiAgICAgICAgICAgIH0pOw0KCQkJICQoIiNyYWlzZS1jdXJyZW5jeSIpLm9uKCJrZXl1cCIsIGZ1bmN0aW9uKCl7DQogICAgICAgICAgICAgIGNoYXJnZVNlcnZpY2UoKTsNCiAgICAgICAgICAgIH0pOw0KDQogICAgICAgICAgPC9zY3JpcHQ+DQogICAgICAgICAgJzsNCiAgZWxzZWlmKCAkYWN0aW9uID09ICJwcmljZV9wcm92aWRlckNhbCIgKToNCiAgICAkZml4ZWQgICAgPSAkX1BPU1RbImZpeGVkIl07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vbigpIHsNCiAgICAgICAgJCgiI3N1bW1lcm5vdGVFeGFtcGxlIikuc3VtbWVybm90ZSh7DQogICAgICAgICAgICBoZWlnaHQ6IDIwMCwNCiAgICAgICAgICAgIGNvZGVtaXJyb3I6IHsNCiAgICAgICAgICAgICAgICB0aGVtZTogImRlZmF1bHQiDQogICAgICAgICAgICB9LA0KICAgICAgICAgICAgdG9vbGJhcjogWw0KICAgICAgICAgICAgICAgIFsic3R5bGUiLCBbImJvbGQiLCAiaXRhbGljIiwgInVuZGVybGluZSIsICJjbGVhciJdXSwNCiAgICAgICAgICAgICAgICBbImZvbnRzaXplIiwgWyJmb250c2l6ZSJdXSwNCiAgICAgICAgICAgICAgICBbImNvbG9yIiwgWyJjb2xvciJdXSwNCiAgICAgICAgICAgICAgICBbInBhcmEiLCBbInVsIiwgIm9sIiwgInBhcmFncmFwaCJdXSwNCiAgICAgICAgICAgICAgICBbImhlaWdodCIsIFsiaGVpZ2h0Il1dLA0KICAgICAgICAgICAgICAgIFsiaHRtbCIsIFsiY29kZXZpZXciXV0sDQogICAgICAgICAgICAgICAgWyJmdWxsc2NyZWVuIiwgWyJmdWxsc2NyZWVuIl1dDQogICAgICAgICAgICBdLA0KICAgICAgICAgICAgY2FsbGJhY2tzOiB7DQogICAgICAgICAgICAgICAgb25JbWFnZUxpbmtJbnNlcnQ6IGZ1bmN0aW9uKHVybCkgew0KICAgICAgICAgICAgICAgICAgICB2YXIgaW1hZ2VMaW5rSFRNTCA9ICI8YSBocmVmPVwnIiArIHVybCArICJcJz48aW1nIHNyYz1cJyIgKyB1cmwgKyAiXCc+PC9hPiI7DQogICAgICAgICAgICAgICAgICAgICQoIiNzdW1tZXJub3RlRXhhbXBsZSIpLnN1bW1lcm5vdGUoInBhc3RlSFRNTCIsIGltYWdlTGlua0hUTUwpOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfSk7DQo8L3NjcmlwdD4nOw0KDQoNCmVj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aGVpZ2h0Il1dLA0KICAgICAgICAgICAgICAgIFsiaHRtbCIsIFsiY29kZXZpZXciXV0sDQogICAgICAgICAgICAgICAgWyJmdWxsc2NyZWVuIiwgWyJmdWxsc2NyZWVuIl1dDQogICAgICAgICAgICBdLA0KICAgICAgICAgICAgY2FsbGJhY2tzOiB7DQogICAgICAgICAgICAgICAgb25JbWFnZUxpbmtJbnNlcnQ6IGZ1bmN0aW9uKHVybCkgew0KICAgICAgICAgICAgICAgICAgICB2YXIgaW1hZ2VMaW5rSFRNTCA9ICI8YSBocmVmPVwnIiArIHVybCArICJcJz48aW1nIHNyYz1cJyIgKyB1cmwgKyAiXCc+PC9hPiI7DQogICAgICAgICAgICAgICAgICAgICQoIiNzdW1tZXJub3RlRXhhbXBsZSIpLnN1bW1lcm5vdGUoInBhc3RlSFRNTCIsIGltYWdlTGlua0hUTUwpOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfSk7DQo8L3NjcmlwdD4nOw0KDQogICAgZWNobyBqc29uX2VuY29kZShbJ2NvbnRlbnQnID0+ICRyZXR1cm4sICd0aXRsZScgPT4gJyddKTsNCiAgICANCiAgICBlbHNlaWYgKCgkYWN0aW9uID09ICdlZGl0X3BheW1lbnRtZXRob2QnKSAmJiAoJF9QT1NUWydpZCddID09ICd1ZGRva3RhUGF5JykpIDoNCiAgICAkaWQgPSAkX1BPU1RbJ2lkJ107DQogICAgJG1ldGhvZCA9ICRjb25uLT5wcmVwYXJlKCdTRUxFQ1QgKiBGUk9NIHBheW1lbnRfbWV0aG9kcyBXSEVSRSBtZXRob2RfZ2V0PTppZCAnKTsNCiAgICAkbWV0aG9kLT5leGVjdXRlKFsnaWQnID0+ICRpZF0pOw0KICAgICRtZXRob2QgPSAkbWV0aG9kLT5mZXRjaChQRE86OkZFVENIX0FTU09DKTsNCiAgICAkZXh0cmEgPSBqc29uX2RlY29kZSgkbWV0aG9kWydtZXRob2RfZXh0cmFzJ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sdWU9IjEiICcgLiAoJG1lbnVMaW5rID09ICIxIiA/ICdzZWxlY3RlZCcgOiAnJykgLiAnPk9mZjwvb3B0aW9uPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvc2VsZWN0Pg0KICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgICAgICAgIDwvZGl2Pic7DQogICAgICAgIGNvbnRpbnVlOw0KICAgIH0NCg0KICAgICRuZXdfc3RyaW5nID0gc3RyX3JlcGxhY2UoIl8iLCAiICIsICRtZW51TmFtZSk7DQogICAgJGxhYmVsID0gc3RydG91cHBlcigkbmV3X3N0cmluZyk7DQogICAgJHJldHVybiAuPSAnPGRpdiBjbGFzcz0iZm9ybS1ncm91cCI+DQogICAgICAgICAgICAgICAgICAgPGxhYmVsIGNsYXNzPSJjb250cm9sLWxhYmVsIj4nIC4gJGxhYmVsIC4gJzo8L2xhYmVsPg0KICAgICAgICAgICAgICAgICAgIDxkaXY+DQogICAgICAgICAgICAgICAgICAgICAgIDxpbnB1dCB0eXBlPSJ0ZXh0IiBuYW1lPSInIC4gJG1lbnVOYW1lIC4gJyIgdmFsdWU9IicgLiAkbWVudUxpbmsgLiAnIiBjbGFzcz0iZm9ybS1jb250cm9sIj4NCiAgICAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgIDwvZGl2Pic7DQp9DQoNCiRyZXR1cm4gLj0gJzxkaXYgY2xhc3M9ImZvcm0tZ3JvdXAiPg0KICAgICAgICAgICAgICAgIDxkaXY+DQogICAgICAgICAgICAgICAgICAgIDxidXR0b24gdHlwZT0ic3VibWl0IiBjbGFzcz0iYnRuIGJ0bi1wcmltYXJ5Ij5TYXZlIERldGFpbHM8L2J1dHRvbj4NCiAgICAgICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICA8L2Zvcm0+JzsNCg0KJHJldHVybiAuPSAnPHN0eWxlPg0KICAgIC5mb3JtLWdyb3VwIHsNCiAgICAgICAgbWFyZ2luLWJvdHRvbTogMTBweDsNCiAgICAgICAgcGFkZGluZzogNXB4OyAvKiBBZGQgcGFkZGluZyB0byBjcmVhdGUgc3BhY2UgYmV0d2VlbiBsYWJlbCBhbmQgaW5wdXQgKi8NCiAgICB9DQoNCiAgICBsYWJlbCB7DQogICAgICAgIGRpc3BsYXk6IGJsb2NrOw0KICAgICAgICBtYXJnaW4tYm90dG9tOiA1cHg7DQogICAgICAgIGZvbnQtd2VpZ2h0OiBib2xkOw0KICAgIH0NCg0KICAgIC5mb3JtLWNvbnRyb2wgew0KICAgICAgICB3aWR0aDogMTAwJTsNCiAgICAgICAgcGFkZGluZzogMTBweDsNCiAgICAgICAgZm9udC1zaXplOiAxNnB4Ow0KICAgICAgICBtYXJnaW4tYm90dG9tOiAxMHB4Ow0KICAgICAgICBib3JkZXI6IDFweCBzb2xpZCAjY2NjOw0KICAgICAgICBib3JkZXItcmFkaXVzOiA0cHg7DQogICAgICAgIGJhY2tncm91bmQtY29sb3I6ICNmZmY7DQogICAgfQ0KDQogICAgdGV4dGFyZWEuZm9ybS1jb250cm9sIHsNCiAgICAgICAgcmVzaXplOiB2ZXJ0aWNhbDsNCiAgICB9DQoNCiAgICAuYnRuIHsNCiAgICAgICAgZGlzcGxheTogYmxvY2s7DQogICAgICAgIG1hcmdpbjogMCBhdXRvOw0KICAgICAgICB3aWR0aDogMTAwJTsNCiAgICAgICAgbWF4LXdpZHRoOiAyMDBweDsNCiAgICB9DQoNCiAgICAubm90ZS10b29sYmFyIC5idG4tZ3JvdXAgew0KICAgICAgICBkaXNwbGF5OiBpbmxpbmUtZmxleDsNCiAgICB9DQogICAgDQogICAgLyogQWRkaXRpb25hbCBDU1MgZm9yIHJlc3BvbnNpdmVuZXNzICovDQogICAgQG1lZGlhIChtYXgtd2lkdGg6IDc2OHB4KSB7DQogICAgICAgICAuZm9ybS1ncm91cCB7DQogICAgICAgICAgICBtYXJnaW4tYm90dG9tOiAxMHB4Ow0KICAgICAgICAgICAgcGFkZGluZzogNXB4OyAvKiBBZGQgcGFkZGluZyBmb3IgcmVzcG9uc2l2ZW5lc3MgKi8NCiAgICAgICAgfQ0KICAgIH0NCiAgICANCiAgICBAbWVkaWEgKG1pbi13aWR0aDogNzY4cHgpIHsNCiAgICAgICAgLmZvcm0tZ3JvdXAgew0KICAgICAgICAgICAgbWFyZ2luLWJvdHRvbTogMTBweDsNCiAgICAgICAgICAgIHBhZGRpbmc6IDVweDsgLyogQWRkIHBhZGRpbmcgZm9yIHJlc3BvbnNpdmVuZXNzICovDQogICAgICAgIH0NCg0KICAgICAgICBsYWJlbCB7DQogICAgICAgICAgICBkaXNwbGF5OiBibG9jazsNCiAgICAgICAgICAgIG1hcmdpbi1ib3R0b206IDVweDsNCiAgICAgICAgICAgIGZvbnQtd2VpZ2h0OiBib2xkOw0KICAgICAgICB9DQoNCiAgICAgICAgLmZvcm0tY29udHJvbCB7DQogICAgICAgICAgICB3aWR0aDogMTAwJTsNCiAgICAgICAgICAgIHBhZGRpbmc6IDEwcHg7DQogICAgICAgICAgICBmb250LXNpemU6IDE2cHg7DQogICAgICAgICAgICBtYXJnaW4tYm90dG9tOiAxMHB4Ow0KICAgICAgICAgICAgYm9yZGVyOiAxcHggc29saWQgI2NjYzsNCiAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDRweDsNCiAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6ICNmZmY7DQogICAgICAgIH0NCg0KICAgICAgICB0ZXh0YXJlYS5mb3JtLWNvbnRyb2wgew0KICAgICAgICAgICAgcmVzaXplOiB2ZXJ0aWNhbDsNCiAgICAgICAgfQ0KDQogICAgICAgIC5idG4gew0KICAgICAgICAgICAgZGlzcGxheTogYmxvY2s7DQogICAgICAgICAgICBtYXJnaW46IDAgYXV0bzsNCiAgICAgICAgICAgIHdpZHRoOiAxMDAlOw0KICAgICAgICAgICAgbWF4LXdpZHRoOiAyMDBweDsNCiAgICAgICAgfQ0KDQogIC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4NCiAgICAgICAgICAgICAgICAgICAgICAgIDxsYWJlbCBjbGFzcz0iY29udHJvbC1sYWJlbCI+JyAuICRsYWJlbCAuICc6PC9sYWJlbD4NCiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXY+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgPHNlbGVjdCBuYW1lPSInIC4gJG1lbnVOYW1lIC4gJyIgY2xhc3M9ImZvcm0tY29udHJvbCI+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9IjIiICcgLiAoJG1lbnVMaW5rID09ICIyIiA/ICdzZWxlY3RlZCcgOiAnJykgLiAnPk9ubjwvb3B0aW9uPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPSIxIiAnIC4gKCRtZW51TGluayA9PSAiMSIgPyAnc2VsZWN0ZWQnIDogJycpIC4gJz5PZmY8L29wdGlvbj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3NlbGVjdD4NCiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgICAgICAgICAgICA8L2Rpdj4nOw0KICAgICAgICBjb250aW51ZTsNCiAgICB9DQoNCiAgICAkbmV3X3N0cmluZyA9IHN0cl9yZXBsYWNlKCJfIiwgIiAiLCAkbWVudU5hbWUpOw0KICAgICRsYWJlbCA9IHN0cnRvdXBwZXIoJG5ld19zdHJpbmcpOw0KICAgICRyZXR1cm4gLj0gJzxkaXYgY2xhc3M9ImZvcm0tZ3JvdXAiPg0KICAgICAgICAgICAgICAgICAgIDxsYWJlbCBjbGFzcz0iY29udHJvbC1sYWJlbCI+JyAuICRsYWJlbCAuICc6PC9sYWJlbD4NCiAgICAgICAgICAgICAgICAgICA8ZGl2Pg0KICAgICAgICAgICAgICAgICAgICAgICA8aW5wdXQgdHlwZT0idGV4dCIgbmFtZT0iJyAuICRtZW51TmFtZSAuICciIHZhbHVlPSInIC4gJG1lbnVMaW5rIC4gJyIgY2xhc3M9ImZvcm0tY29udHJvbCI+DQogICAgICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgICA8L2Rpdj4nOw0KfQ0KDQokcmV0dXJuIC49ICc8ZGl2IGNsYXNzPSJmb3JtLWdyb3VwIj4NCiAgICAgICAgICAgICAgICA8ZGl2Pg0KICAgICAgICAgICAgICAgICAgICA8YnV0dG9uIHR5cGU9InN1Ym1pdCIgY2xhc3M9ImJ0biBidG4tcHJpbWFyeSI+U2F2ZSBEZXRhaWxzPC9idXR0b24+DQogICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgPC9mb3JtPic7DQoNCiRyZXR1cm4gLj0gJzxzdHlsZT4NCiAgICAuZm9ybS1ncm91cCB7DQogICAgICAgIG1hcmdpbi1ib3R0b206IDEwcHg7DQogICAgICAgIHBhZGRpbmc6IDVweDsgLyogQWRkIHBhZGRpbmcgdG8gY3JlYXRlIHNwYWNlIGJldHdlZW4gbGFiZWwgYW5kIGlucHV0ICovDQogICAgfQ0KDQogICAgbGFiZWwgew0KICAgICAgICBkaXNwbGF5OiBibG9jazsNCiAgICAgICAgbWFyZ2luLWJvdHRvbTogNXB4Ow0KICAgICAgICBmb250LXdlaWdodDogYm9sZDsNCiAgICB9DQoNCiAgICAuZm9ybS1jb250cm9sIHsNCiAgICAgICAgd2lkdGg6IDEwMCU7DQogICAgICAgIHBhZGRpbmc6IDEwcHg7DQogICAgICAgIGZvbnQtc2l6ZTogMTZweDsNCiAgICAgICAgbWFyZ2luLWJvdHRvbTogMTBweDsNCiAgICAgICAgYm9yZGVyOiAxcHggc29saWQgI2NjYzsNCiAgICAgICAgYm9yZGVyLXJhZGl1czogNHB4Ow0KICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjZmZmOw0KICAgIH0NCg0KICAgIHRleHRhcmVhLmZvcm0tY29udHJvbCB7DQogICAgICAgIHJlc2l6ZTogdmVydGljYWw7DQogICAgfQ0KDQogICAgLmJ0biB7DQogICAgICAgIGRpc3BsYXk6IGJsb2NrOw0KICAgICAgICBtYXJnaW46IDAgYXV0bzsNCiAgICAgICAgd2lkdGg6IDEwMCU7DQogICAgICAgIG1heC13aWR0aDogMjAwcHg7DQogICAgfQ0KDQogICAgLm5vdGUtdG9vbGJhciAuYnRuLWdyb3VwIHsNCiAgICAgICAgZGlzcGxheTogaW5saW5lLWZsZXg7DQogICAgfQ0KICAgIA0KICAgIC8qIEFkZGl0aW9uYWwgQ1NTIGZvciByZXNwb25zaXZlbmVzcyAqLw0KICAgIEBtZWRpYSAobWF4LXdpZHRoOiA3NjhweCkgew0KICAgICAgICAgLmZvcm0tZ3JvdXAgew0KICAgICAgICAgICAgbWFyZ2luLWJvdHRvbTogMTBweDsNCiAgICAgICAgICAgIHBhZGRpbmc6IDVweDsgLyogQWRkIHBhZGRpbmcgZm9yIHJlc3BvbnNpdmVuZXNzICovDQogICAgICAgIH0NCiAgICB9DQogICAgDQogICAgQG1lZGlhIChtaW4td2lkdGg6IDc2OHB4KSB7DQogICAgICAgIC5mb3JtLWdyb3VwIHsNCiAgICAgICAgICAgIG1hcmdpbi1ib3R0b206IDEwcHg7DQogICAgICAgICAgICBwYWRkaW5nOiA1cHg7IC8qIEFkZCBwYWRkaW5nIGZvciByZXNwb25zaXZlbmVzcyAqLw0KICAgICAgICB9DQoNCiAgICAgICAgbGFiZWwgew0KICAgICAgICAgICAgZGlzcGxheTogYmxvY2s7DQogICAgICAgICAgICBtYXJnaW4tYm90dG9tOiA1cHg7DQogICAgICAgICAgICBmb250LXdlaWdodDogYm9sZDsNCiAgICAgICAgfQ0KDQogICAgICAgIC5mb3JtLWNvbnRyb2wgew0KICAgICAgICAgICAgd2lkdGg6IDEwMCU7DQogICAgICAgICAgICBwYWRkaW5nOiAxMHB4Ow0KICAgICAgICAgICAgZm9udC1zaXplOiAxNnB4Ow0KICAgICAgICAgICAgbWFyZ2luLWJvdHRvbTogMTBweDsNCiAgICAgICAgICAgIGJvcmRlcjogMXB4IHNvbGlkICNjY2M7DQogICAgICAgICAgICBib3JkZXItcmFkaXVzOiA0cHg7DQogICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjZmZmOw0KICAgICAgICB9DQoNCiAgICAgICAgdGV4dGFyZWEuZm9ybS1jb250cm9sIHsNCiAgICAgICAgICAgIHJlc2l6ZTogdmVydGljYWw7DQogICAgICAgIH0NCg0KICAgICAgICAuYnRuIHsNCiAgICAgICAgICAgIGRpc3BsYXk6IGJsb2NrOw0KICAgICAgICAgICAgbWFyZ2luOiAwIGF1dG87DQogICAgICAgICAgICB3aWR0aDogMTAwJTsNCiAgICAgICAgICAgIG1heC13aWR0aDogMjAwcHg7DQogICAgICAgIH0NCg0KICAgICAgICAubm90ZS10b29sYmFyIC5idG4tZ3JvdXAgew0KICAgICAgICAgICAgZGlzcGxheTogaW5saW5lLWZsZXg7DQogICAgICAgIH0NCiAgICB9DQo8L3N0eWxlPic7DQoNCg0KZWNobyBqc29uX2VuY29kZShbJ2NvbnRlbnQnID0+ICRyZXR1cm4sICd0aXRsZScgPT4gJyddKTsNCmVsc2VpZiAoJGFjdGlvbiA9PSAiZWRpdF9wYXltZW50bWV0aG9kIiAmJiAkX1BPU1RbImlkIl0gPT0gInlvdWNhbiIpOg0KJGlkID0gJF9SRVFVRVNUWyJpZCJdOw0KDQokbWV0aG9kID0gJGNvbm4tPnByZXBhcmUoJ1NFTEVDVCAqIEZST00gcGF5bWVudF9tZXRob2RzIFdIRVJFIG1ldGhvZF9nZXQ9Om1ldGhvZF9nZXQgJyk7DQokbWV0aG9kLT5leGVjdXRlKFsnbWV0aG9kX2dldCcgPT4gJGlkXSk7DQokbWV0aG9kID0gJG1ldGhvZC0+ZmV0Y2goUERPOjpGRVRDSF9BU1NPQyk7DQokZXh0cmEgPSBqc29uX2RlY29kZSgkbWV0aG9kWydtZXRob2RfZXh0cmFzJ10sIHRydWUpOw0KJElEID0gJG1ldGhvZFsibWV0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qLw0KICAgIH0NCg0KICAgIGxhYmVsIHsNCiAgICAgICAgZGlzcGxheTogYmxvY2s7DQogICAgICAgIG1hcmdpbi1ib3R0b206IDVweDsNCiAgICAgICAgZm9udC13ZWlnaHQ6IGJvbGQ7DQogICAgfQ0KDQogICAgLmZvcm0tY29udHJvbCB7DQogICAgICAgIHdpZHRoOiAxMDAlOw0KICAgICAgICBwYWRkaW5nOiAxMHB4Ow0KICAgICAgICBmb250LXNpemU6IDE2cHg7DQogICAgICAgIG1hcmdpbi1ib3R0b206IDEwcHg7DQogICAgICAgIGJvcmRlcjogMXB4IHNvbGlkICNjY2M7DQogICAgICAgIGJvcmRlci1yYWRpdXM6IDRweDsNCiAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogI2ZmZjsNCiAgICB9DQoNCiAgICB0ZXh0YXJlYS5mb3JtLWNvbnRyb2wgew0KICAgICAgICByZXNpemU6IHZlcnRpY2FsOw0KICAgIH0NCg0KICAgIC5idG4gew0KICAgICAgICBkaXNwbGF5OiBibG9jazsNCiAgICAgICAgbWFyZ2luOiAwIGF1dG87DQogICAgICAgIHdpZHRoOiAxMDAlOw0KICAgICAgICBtYXgtd2lkdGg6IDIwMHB4Ow0KICAgIH0NCg0KICAgIC5ub3RlLXRvb2xiYXIgLmJ0bi1ncm91cCB7DQogICAgICAgIGRpc3BsYXk6IGlubGluZS1mbGV4Ow0KICAgIH0NCiAgICANCiAgICAvKiBBZGRpdGlvbmFsIENTUyBmb3IgcmVzcG9uc2l2ZW5lc3MgKi8NCiAgICBAbWVkaWEgKG1heC13aWR0aDogNzY4cHgpIHsNCiAgICAgICAgIC5mb3JtLWdyb3VwIHsNCiAgICAgICAgICAgIG1hcmdpbi1ib3R0b206IDEwcHg7DQogICAgICAgICAgICBwYWRkaW5nOiA1cHg7IC8qIEFkZCBwYWRkaW5nIGZvciByZXNwb25zaXZlbmVzcyAqLw0KICAgICAgICB9DQogICAgfQ0KICAgIA0KICAgIEBtZWRpYSAobWluLXdpZHRoOiA3NjhweCkgew0KICAgICAgICAuZm9ybS1ncm91cCB7DQogICAgICAgICAgICBtYXJnaW4tYm90dG9tOiAxMHB4Ow0KICAgICAgICAgICAgcGFkZGluZzogNXB4OyAvKiBBZGQgcGFkZGluZyBmb3IgcmVzcG9uc2l2ZW5lc3MgKi8NCiAgICAgICAgfQ0KDQogICAgICAgIGxhYmVsIHsNCiAgICAgICAgICAgIGRpc3BsYXk6IGJsb2NrOw0KICAgICAgICAgICAgbWFyZ2luLWJvdHRvbTogNXB4Ow0KICAgICAgICAgICAgZm9udC13ZWlnaHQ6IGJvbGQ7DQogICAgICAgIH0NCg0KICAgICAgICAuZm9ybS1jb250cm9sIHsNCiAgICAgICAgICAgIHdpZHRoOiAxMDAlOw0KICAgICAgICAgICAgcGFkZGluZzogMTBweDsNCiAgICAgICAgICAgIGZvbnQtc2l6ZTogMTZweDsNCiAgICAgICAgICAgIG1hcmdpbi1ib3R0b206IDEwcHg7DQogICAgICAgICAgICBib3JkZXI6IDFweCBzb2xpZCAjY2NjOw0KICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogNHB4Ow0KICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogI2ZmZjsNCiAgICAgICAgfQ0KDQogICAgICAgIHRleHRhcmVhLmZvcm0tY29udHJvbCB7DQogICAgICAgICAgICByZXNpemU6IHZlcnRpY2FsOw0KICAgICAgICB9DQoNCiAgICAgICAgLmJ0biB7DQogICAgICAgICAgICBkaXNwbGF5OiBibG9jazsNCiAgICAgICAgICAgIG1hcmdpbjogMCBhdXRvOw0KICAgICAgICAgICAgd2lkdGg6IDEwMCU7DQogICAgICAgICAgICBtYXgtd2lkdGg6IDIwMHB4Ow0KICAgICAgICB9DQoNCiAgICAgICAgLm5vdGUtdG9vbGJhciAuYnRuLWdyb3VwIHsNCiAgICAgICAgICAgIGRpc3BsYXk6IGlubGluZS1mbGV4Ow0KICAgICAgICB9DQogICAgfQ0KPC9zdHlsZT4nOw0KDQoNCmVjaG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ICJZZXMsIEkgYW0gc3VyZSEiXSwNCiAgICAgICAgICB9KQ0KICAgICAgICAgIC50aGVuKCh3aWxsRGVsZXRlKSA9PiB7DQogICAgICAgICAgICBpZiAod2lsbERlbGV0ZSkgew0KICAgICAgICAgICAgICAkLmFqYXgoew0KICAgICAgICAgICAgICAgIHVybDogIGFjdGlvbiwNCiAgICAgICAgICAgICAgICB0eXBlOiAiR0VUIiwNCiAgICAgICAgICAgICAgICBkYXRhVHlwZTogImpzb24iLA0KICAgICAgICAgICAgICAgIGNhY2hlOiBmYWxzZSwNCiAgICAgICAgICAgICAgICBjb250ZW50VHlwZTogZmFsc2UsDQogICAgICAgICAgICAgICAgcHJvY2Vzc0RhdGE6IGZhbHNlDQogICAgICAgICAgICAgIH0pDQogICAgICAgICAgICAgIC5kb25lKGZ1bmN0aW9uKHJlc3VsdCl7DQogICAgICAgICAgICAgICAgaWYoIHJlc3VsdC5zID09ICJlcnJvciIgKXsNCiAgICAgICAgICAgICAgICAgIHZhciBoZWFkaW5nID0gIlVuc3VjY2Vzc2Z1bCI7DQogICAgICAgICAgICAgICAgfWVsc2V7DQogICAgICAgICAgICAgICAgICB2YXIgaGVhZGluZyA9ICJTdWNjZXNzZnVsIjsNCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAkLnRvYXN0KHsNCiAgICAgICAgICAgICAgICAgICAgICBoZWFkaW5nOiBoZWFkaW5nLA0KICAgICAgICAgICAgICAgICAgICAgIHRleHQ6IHJlc3VsdC5tLA0KICAgICAgICAgICAgICAgICAgICAgIGljb246IHJlc3VsdC5zLA0KICAgICAgICAgICAgICAgICAgICAgIGxvYWRlcjogdHJ1ZSwNCiAgICAgICAgICAgICAgICAgICAgICBsb2FkZXJCZzogIiM5RUM2MDAiDQogICAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICAgIGlmIChyZXN1bHQuciE9bnVsbCkgew0KICAgICAgICAgICAgICAgICAgICBpZiggcmVzdWx0LnRpbWUgPT1udWxsICl7IHJlc3VsdC50aW1lID0gMzsgfQ0KICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7DQogICAgICAgICAgICAgICAgICAgICAgd2luZG93LmxvY2F0aW9uLmhyZWYgID0gcmVzdWx0LnI7DQogICAgICAgICAgICAgICAgICAgIH0scmVzdWx0LnRpbWUqMTAwMCk7DQogICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgIH0pDQogICAgICAgICAgICAgIC5mYWlsKGZ1bmN0aW9uKCl7DQogICAgICAgICAgICAgICAgJC50b2FzdCh7DQogICAgICAgICAgICAgICAgICAgIGhlYWRpbmc6ICJVbnN1Y2Nlc3NmdWwiLA0KICAgICAgICAgICAgICAgICAgICB0ZXh0OiAiVGhlIHJlcXVlc3QgY291bGQgbm90IGJlIGZ1bGZpbGxlZCIsDQogICAgICAgICAgICAgICAgICAgIGljb246ICJlcnJvciIsDQogICAgICAgICAgICAgICAgICAgIGxvYWRlcjogdHJ1ZSwNCiAgICAgICAgICAgICAgICAgICAgbG9hZGVyQmc6ICIjOUVDNjAwIg0KICAgICAgICAgICAgICAgIH0pOw0KICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgLyogxLDDp2VyaWsgc2lsaW5tZXNpIG9uYXlsYW5kxLEgKi8NCiAgICAgICAgICAgIH0gZWxzZSB7DQogICAgICAgICAgICAgICQudG9hc3Qoew0KICAgICAgICAgICAgICAgICAgaGVhZGluZzogIlVuc3VjY2Vzc2Z1bCIsDQogICAgICAgICAgICAgICAgICB0ZXh0OiAiUmVxdWVzdCBmb3IgZGVsZXRpb24gZGVuaWVkIiwNCiAgICAgICAgICAgICAgICAgIGljb246ICJlcnJvciIsDQogICAgICAgICAgICAgICAgICBsb2FkZXI6IHRydWUsDQogICAgICAgICAgICAgICAgICBsb2FkZXJCZzogIiM5RUM2MDAiDQogICAgICAgICAgICAgIH0pOw0KICAgICAgICAgICAgfQ0KICAgICAgICAgIH0pOw0KICA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pbGxEZWxldGUpID0+IHsNCiAgICAgICAgICAgICAgaWYgKHdpbGxEZWxldGUpIHsNCiAgICAgICAgICAgICAgICAkLmFqYXgoew0KICAgICAgICAgICAgICAgICAgdXJsOiAgYWN0aW9uLA0KICAgICAgICAgICAgICAgICAgdHlwZTogIkdFVCIsDQogICAgICAgICAgICAgICAgICBkYXRhVHlwZTogImpzb24iLA0KICAgICAgICAgICAgICAgICAgY2FjaGU6IGZhbHNlLA0KICAgICAgICAgICAgICAgICAgY29udGVudFR5cGU6IGZhbHNlLA0KICAgICAgICAgICAgICAgICAgcHJvY2Vzc0RhdGE6IGZhbHNlDQogICAgICAgICAgICAgICAgfSkNCiAgICAgICAgICAgICAgICAuZG9uZShmdW5jdGlvbihyZXN1bHQpew0KICAgICAgICAgICAgICAgICAgaWYoIHJlc3VsdC5zID09ICJlcnJvciIgKXsNCiAgICAgICAgICAgICAgICAgICAgdmFyIGhlYWRpbmcgPSAiVW5zdWNjZXNzZnVsIjsNCiAgICAgICAgICAgICAgICAgIH1lbHNlew0KICAgICAgICAgICAgICAgICAgICB2YXIgaGVhZGluZyA9ICJTdWNjZXNzZnVsIjsNCiAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgJC50b2FzdCh7DQogICAgICAgICAgICAgICAgICAgICAgICBoZWFkaW5nOiBoZWFkaW5nLA0KICAgICAgICAgICAgICAgICAgICAgICAgdGV4dDogcmVzdWx0Lm0sDQogICAgICAgICAgICAgICAgICAgICAgICBpY29uOiByZXN1bHQucywNCiAgICAgICAgICAgICAgICAgICAgICAgIGxvYWRlcjogdHJ1ZSwNCiAgICAgICAgICAgICAgICAgICAgICAgIGxvYWRlckJnOiAiIzlFQzYwMCINCiAgICAgICAgICAgICAgICAgICAgfSk7DQogICAgICAgICAgICAgICAgICAgIGlmIChyZXN1bHQuciE9bnVsbCkgew0KICAgICAgICAgICAgICAgICAgICAgIGlmKCByZXN1bHQudGltZSA9PW51bGwgKXsgcmVzdWx0LnRpbWUgPSAzOyB9DQogICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpew0KICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93LmxvY2F0aW9uLmhyZWYgID0gcmVzdWx0LnI7DQogICAgICAgICAgICAgICAgICAgICAgfSxyZXN1bHQudGltZSoxMDAwKTsNCiAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIH0pDQogICAgICAgICAgICAgICAgLmZhaWwoZnVuY3Rpb24oKXsNCiAgICAgICAgICAgICAgICAgICQudG9hc3Qoew0KICAgICAgICAgICAgICAgICAgICAgIGhlYWRpbmc6ICJVbnN1Y2Nlc3NmdWwiLA0KICAgICAgICAgICAgICAgICAgICAgIHRleHQ6ICJUaGUgcmVxdWVzdCBjb3VsZCBub3QgYmUgZnVsZmlsbGVkIiwNCiAgICAgICAgICAgICAgICAgICAgICBpY29uOiAiZXJyb3IiLA0KICAgICAgICAgICAgICAgICAgICAgIGxvYWRlcjogdHJ1ZSwNCiAgICAgICAgICAgICAgICAgICAgICBsb2FkZXJCZzogIiM5RUM2MDAiDQogICAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICAvKiDEsMOnZXJpayBzaWxpbm1lc2kgb25heWxhbmTEsSAqLw0KICAgICAgICAgICAgICB9IGVsc2Ugew0KICAgICAgICAgICAgICAgICQudG9hc3Qoew0KICAgICAgICAgICAgICAgICAgICBoZWFkaW5nOiAiVW5zdWNjZXNzZnVsIiwNCiAgICAgICAgICAgICAgICAgICAgdGV4dDogIlJlcXVlc3QgZm9yIGRlbGV0aW9uIGRlbmllZCIsDQogICAgICAgICAgICAgICAgICAgIGljb246ICJlcnJvciIsDQogICAgICAgICAgICAgICAgICAgIGxvYWRlcjogdHJ1ZSwNCiAgICAgICAgICAgICAgICAgICAgbG9hZGVyQmc6ICIjOUVDNjAwIg0KICAgICAgICAgICAgICAgIH0pOw0KICAgICAgICAg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G5cclxuICAgICAgICA8L2Rpdj5cclxuXHJcbiAgICAgICAgICA8ZGl2IGNsYXNzPVwibW9kYWwtZm9vdGVyXCI+XHJcbiAgICAgICAgICAgIDxidXR0b24gdHlwZT1cInN1Ym1pdFwiIGNsYXNzPVwiYnRuIGJ0bi1wcmltYXJ5XCI+QWRkIFByb3ZpZGVyPC9idXR0b24+XHJcbiAgICAgICAgICAgIDxidXR0b24gdHlwZT1cImJ1dHRvblwiIGNsYXNzPVwiYnRuIGJ0bi1kZWZhdWx0XCIgZGF0YS1kaXNtaXNzPVwibW9kYWxcIj5DYW5jZWw8L2J1dHRvbj5cclxuICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgPC9mb3JtPiI7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVjaG8ganNvbl9lbmNvZGUoWyJjb250ZW50IiA9PiAkcmV0dXJuLCAidGl0bGUiID0+ICJBZGQgTmV3IFByb3ZpZGVyIl0pOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgDQogIGVsc2VpZiggJGFjdGlvbiA9PSAiZWRpdF9wcm92aWRlciIgKToNCiAgICAkaWQgICAgICAgICA9ICRfUE9TVFsiaWQiXTsNCiAgICAkcHJvdmlkZXIgICA9ICRjb25uLT5wcmVwYXJlKCJTRUxFQ1QgKiBGUk9NIHNlcnZpY2VfYXBpIFdIRVJFIGlkPTppZCAiKTsNCiAgICAkcHJvdmlkZXIgICAtPmV4ZWN1dGUoYXJyYXkoImlkIj0+JGlkKSk7DQogICAgJHByb3ZpZGVyICAgPSAkcHJvdmlkZXItPmZldGNoKFBETzo6RkVUQ0hfQVNTT0M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G4gYnRuLWRlZmF1bHQiIGRhdGEtZGlzbWlzcz0ibW9kYWwiPkNhbmNlbDwvYnV0dG9uPg0KDQoNCiAgDQoNCiAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgICAgICAgIDwvZm9ybT4NCjxzY3JpcHQ+DQogICAgICAgICAgICANCiAgICAgICAgICAgICQoIiNhZG1pbiAiKS5jaGFuZ2UoZnVuY3Rpb24oKXsNCiAgICAgICAgICAgICAgdmFyIHR5cGUgPSAkKHRoaXMpLnZhbCgpOw0KICAgICAgICAgICAgICAgIGlmKCAkcGFuZWxbInBhbmVsX3R5cGUiXSAhPSAiQ2hpbGQiICl7DQogICAgICAgICAgICAgICAgICAkKCIjYWRtaW5fYWNjZXNzIikuaGlkZSgpOw0KICAgICAgICAgICAgICAgIH0gZWxzZXsNCiAgICAgICAgICAgICAgICAgICQoIiNhZG1pbl9hY2Nlc3MiKS5zaG93KCk7DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgfSk7DQogICAgICAgICAgPC9zY3JpcHQ+DQoNCiAgICAgICAgICAgICAgICAgIDxzY3JpcHQgc3JjPSJodHRwczovL3VucGtnLmNvbS9zd2VldGFsZXJ0L2Rpc3Qvc3dlZXRhbGVydC5taW4uanMiPjwvc2NyaXB0Pg0KICAgICAgICAgIDxzY3JpcHQ+DQogICAgICAgICAgJCgiI2RlbGV0ZS1yb3ciKS5jbGljayhmdW5jdGlvbigpew0KICAgICAgICAgICAgdmFyIGFjdGlvbiA9ICQodGhpcykuYXR0cigiZGF0YS11cmwiKTsNCiAgICAgICAgICAgIHN3YWwoew0KICAgICAgICAgICAgICB0aXRsZTogIkFyZSB5b3Ugc3VyZSB5b3Ugd2FudCB0byBkZWxldGU/IiwNCiAgICAgICAgICAgICAgdGV4dDogIklmIHlvdSBjb25maXJtIHRoaXMgY29udGVudCB3aWxsIGJlIGRlbGV0ZWQsIGl0IG1heSBub3QgYmUgcG9zc2libGUgdG8gcmVzdG9yZSBpdC4iLA0KICAgICAgICAgICAgICBpY29uOiAid2FybmluZyIsDQogICAgICAgICAgICAgIGJ1dHRvbnM6IHRydWUsDQogICAgICAgICAgICAgIGRhbmdlck1vZGU6IHRydWUsDQogICAgICAgICAgICAgIGJ1dHRvbnM6IFsiQ2FuY2VsIiwgIlllcywgSSBhbSBzdXJlISJdLA0KICAgICAgICAgICAgfSkNCiAgICAgICAgICAgIC50aGVuKCh3aWxsRGVsZXRlKSA9PiB7DQogICAgICAgICAgICAgIGlmICh3aWxsRGVsZXRlKSB7DQogICAgICAgICAgICAgICAgJC5hamF4KHsNCiAgICAgICAgICAgICAgICAgIHVybDogIGFjdGlvbiwNCiAgICAgICAgICAgICAgICAgIHR5cGU6ICJHRVQiLA0KICAgICAgICAgICAgICAgICAgZGF0YVR5cGU6ICJqc29uIiwNCiAgICAgICAgICAgICAgICAgIGNhY2hlOiBmYWxzZSwNCiAgICAgICAgICAgICAgICAgIGNvbnRlbnRUeXBlOiBmYWxzZSwNCiAgICAgICAgICAgICAgICAgIHByb2Nlc3NEYXRhOiBmYWxzZQ0KICAgICAgICAgICAgICAgIH0pDQogICAgICAgICAgICAgICAgLmRvbmUoZnVuY3Rpb24ocmVzdWx0KXsNCiAgICAgICAgICAgICAgICAgIGlmKCByZXN1bHQucyA9PSAiZXJyb3IiICl7DQogICAgICAgICAgICAgICAgICAgIHZhciBoZWFkaW5nID0gIlVuc3VjY2Vzc2Z1bCI7DQogICAgICAgICAgICAgICAgICB9ZWxzZXsNCiAgICAgICAgICAgICAgICAgICAgdmFyIGhlYWRpbmcgPSAiU3VjY2Vzc2Z1bCI7DQogICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICQudG9hc3Qoew0KICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGluZzogaGVhZGluZywNCiAgICAgICAgICAgICAgICAgICAgICAgIHRleHQ6IHJlc3VsdC5tLA0KICAgICAgICAgICAgICAgICAgICAgICAgaWNvbjogcmVzdWx0LnMsDQogICAgICAgICAgICAgICAgICAgICAgICBsb2FkZXI6IHRydWUsDQogICAgICAgICAgICAgICAgICAgICAgICBsb2FkZXJCZzogIiM5RUM2MDAiDQogICAgICAgICAgICAgICAgICAgIH0pOw0KICAgICAgICAgICAgICAgICAgICBpZiAocmVzdWx0LnIhPW51bGwpIHsNCiAgICAgICAgICAgICAgICAgICAgICBpZiggcmVzdWx0LnRpbWUgPT1udWxsICl7IHJlc3VsdC50aW1lID0gMzsgfQ0KICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsNCiAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5sb2NhdGlvbi5ocmVmICA9IHJlc3VsdC5yOw0KICAgICAgICAgICAgICAgICAgICAgIH0scmVzdWx0LnRpbWUqMTAwMCk7DQogICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICB9KQ0KICAgICAgICAgICAgICAgIC5mYWlsKGZ1bmN0aW9uKCl7DQogICAgICAgICAgICAgICAgICAkLnRvYXN0KHsNCiAgICAgICAgICAgICAgICAgICAgICBoZWFkaW5nOiAiVW5zdWNjZXNzZnVsIiwNCiAgICAgICAgICAgICAgICAgICAgICB0ZXh0OiAiVGhlIHJlcXVlc3QgY291bGQgbm90IGJlIGZ1bGZpbGxlZCIsDQogICAgICAgICAgICAgICAgICAgICAgaWNvbjogImVycm9yIiwNCiAgICAgICAgICAgICAgICAgICAgICBsb2FkZXI6IHRydWUsDQogICAgICAgICAgICAgICAgICAgICAgbG9hZGVyQmc6ICIjOUVDNjAwIg0KICAgICAgICAgICAgICAgICAgfSk7DQogICAgICAgICAgICAgICAgfSk7DQogICAgICAgICAgICAgICAgLyogxLDDp2VyaWsgc2lsaW5tZXNpIG9uYXlsYW5kxLEgKi8NCiAgICAgICAgICAgICAgfSBlbHNlIHsNCiAgICAgICAgICAgICAgICAkLnRvYXN0KHsNCiAgICAgICAgICAgICAgICAgICAgaGVhZGluZzogIlVuc3VjY2Vzc2Z1bCIsDQogICAgICAgICAgICAgICAgICAgIHRleHQ6ICJSZXF1ZXN0IGZvciBkZWxldGlvbiBkZW5pZWQiLA0KICAgICAgICAgICAgICAgICAgICBpY29uOiAiZXJyb3IiLA0KICAgICAgICAgICAgICAgICAgICBsb2FkZXI6IHRydWUsDQogICAgICAgICAgICAgICAgICAgIGxvYWRlckJnOiAiIzlFQzYwMCINCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgfSk7DQogICAgICAgICAgfSk7DQogICAgICAgICAgPC9zY3JpcHQ+DQogICAgICAgICAnOw0KICAgIGVjaG8ganNvbl9lbmNvZGUoWyJjb250ZW50Ij0+JHJldHVybiwidGl0bGUiPT4iRWRpdCBwcm92aWRlciAoIi4kcHJvdmlkZXJbImFwaV9uYW1lIl0uIikgIl0pOw0KICAgDQogIGVsc2VpZiggJGFjdGlvbiA9PSAiZXhwb3J0X3VzZXIiICk6DQogICAgJHJldHVybiA9ICc8Zm9ybSBjbGFzcz0iZm9ybSIgYWN0aW9uPSInLnNpdGVfdXJsKCJhZG1pbi9jbGllbnRzL2V4cG9ydCIpLiciIG1ldGhvZD0icG9zdCI+DQogICAgICAgIDxkaXYgY2xhc3M9Im1vZGFsLWJvZHkiPg0KDQogICAgICAgICAgPGRpdiBjbGFzcz0ic2VydmljZS1tb2RlX19ibG9jayI+DQogICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb3JtLWdyb3VwIj4NCiAgICAgICAgICAgIDxsYWJlbD5NZW1iZXJzaGlwIFN0YXR1czwvbGFiZWw+DQogICAgICAgICAgICAgIDxzZWxlY3QgY2xhc3M9ImZvcm0tY29udHJvbCIgbmFtZT0iY2xpZW50X3N0YXR1cyI+DQogICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9ImFsbCI+QWxsIG1lbWJlcnM8L29wdGlvbj4NCiAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2YWx1ZT0iMSI+SW5hY3RpdmU8L29wdGlvbj4NCiAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2YWx1ZT0iMiI+QWN0aXZlPC9vcHRpb24+DQogICAgICAgICAgICAgICAgPC9zZWxlY3Q+DQogICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICA8L2Rpdj4NCg0KICAgICAgICAgIDxkaXYgY2xhc3M9InNlcnZpY2UtbW9kZV9fYmxvY2siPg0KICAgICAgICAgICAgPGRpdiBjbGFzcz0iZm9ybS1ncm91cCI+DQogICAgICAgICAgICA8bGFiZWw+RW1haWwgU3RhdHVzPC9sYWJlbD4NCiAgICAgICAgICAgICAgPHNlbGVjdCBjbGFzcz0iZm9ybS1jb250cm9sIiBuYW1lPSJlbWFpbF9zdGF0dXMiPg0KICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPSJhbGwiPkFsbCBtZW1iZXJzPC9vcHRpb24+DQogICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9IjEiPlVuYXBwcm92ZWQ8L29wdGlvbj4NCiAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2YWx1ZT0iMiI+QXBwcm92ZWQ8L29wdGlvbj4NCiAgICAgICAgICAgICAgICA8L3NlbGVjdD4NCiAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgIDwvZGl2Pg0KDQogICAgICAgICAgPGRpdiBjbGFzcz0ic2VydmljZS1tb2RlX19ibG9jayI+DQogICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb3JtLWdyb3VwIj4NCiAgICAgICAgICAgIDxsYWJlbD5Gb3JtYXQ8L2xhYmVsPg0KICAgICAgICAgICAgICA8c2VsZWN0IGNsYXNzPSJmb3JtLWNvbnRyb2wiIG5hbWU9ImZvcm1hdCI+DQogICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9Impzb24iPkpTT048L29wdGlvbj4NCiAgICAgICAgICAgICAgICA8L3NlbGVjdD4NCiAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgIDwvZGl2Pg0KDQogICAgICAgICAgPGRpdiBjbGFzcz0ic2VydmljZS1tb2RlX19ibG9jayI+DQogICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb3JtLWdyb3VwIj4NCiAgICAgICAgICAgIDxsYWJlbD5NZW1iZXIgaW5mb3JtYXRpb248L2xhYmVsPg0KICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb3JtLWdyb3VwIj4NCiAgICAgICAgICAgICAgICAgIDxsYWJlbCBjbGFzcz0iY2hlY2tib3gtaW5saW5lIj4NCiAgICAgICAgICAgICAgICAgICAgPGlucHV0IHR5cGU9ImNoZWNrYm94IiBjbGFzcz0iYWNjZXNzIiBuYW1lPSJleHBvcnRjb2x1bW5bY2xpZW50X2lkXSIgY2hlY2tlZCB2YWx1ZT0iMSI+IElEDQogICAgICAgICAgICAgICAgICA8L2xhYmVsPg0KICAgICAgICAgICAgICAgICAgPGxhYmVsIGNsYXNzPSJjaGVja2JveC1pbmxpbmUiPg0KICAgICAgICAgICAgICAgICAgICA8aW5wdXQgdHlwZT0iY2hlY2tib3giIGNsYXNzPSJhY2Nlc3MiIG5hbWU9ImV4cG9ydGNvbHVtbltlbWFpbF0iIGNoZWNrZWQgdmFsdWU9IjEiPiBFbWFpbA0KICAgICAgICAgICAgICAgICAgPC9sYWJlbD4NCiAgICAgICAgICAgICAgICAgIDxsYWJlbCBjbGFzcz0iY2hlY2tib3gtaW5saW5lIj4NCiAgICAgICAgICAgICAgICAgICAgPGlucHV0IHR5cGU9ImNoZWNrYm94IiBjbGFzcz0iYWNjZXNzIiBuYW1lPSJleHBvcnRjb2x1bW5bbmFtZV0iIGNoZWNrZWQgdmFsdWU9IjEiPiBOYW1lIHN1cm5hbWUNCiAgICAgICAgICAgICAgICAgIDwvbGFiZWw+DQogICAgICAgICAgICAgICAgICA8bGFiZWwgY2xhc3M9ImNoZWNrYm94LWlubGluZSI+DQogICAgICAgICAgICAgICAgICAgIDxpbnB1dCB0eXBlPSJj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gIDxkaXYgY2xhc3M9InNlcnZpY2VzLWltcG9ydF9fcGFja2FnZXMiPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dWw+JzsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JlYWNoICgkcHJpY2UgYXMgJHJvdyk6DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkcmV0dXJuLj0nPGxpIGlkPSJzZXJ2aWNlLScuJHJvd1sic2VydmljZWlkIl0uJyI+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGxhYmVsPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcuJHJvd1sic2VydmljZWlkIl0uJyAtICcuJHJvd1sic2VydmljZV9uYW1lIl0uJw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPSJzZXJ2aWNlcy1pbXBvcnRfX3BhY2thZ2VzLXByaWNlLWVkaXQiID4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJzZXJ2aWNlcy1pbXBvcnRfX3BhY2thZ2VzLXByaWNlLWxvY2siICBkYXRhLWlkPSJzZXJ2aWNlZGVsZXRlLScuJHJvd1sic2VydmljZWlkIl0uJyIgZGF0YS1zZXJ2aWNlPSInLiRyb3dbInNlcnZpY2VpZCJdLiciPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHNwYW4gY2xhc3M9ImZhIGZhLXRyYXNoIj48L3NwYW4+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGlucHV0IHR5cGU9InRleHQiIGNsYXNzPSJzZXJ2aWNlcy1pbXBvcnRfX3ByaWNlIiBuYW1lPSJwcmljZVsnLiRyb3dbInNlcnZpY2VpZCJdLiddIiB2YWx1ZT0iJy4kcm93WyJjbGllbnRwcmljZSJdLiciPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPSJzZXJ2aWNlcy1pbXBvcnRfX3Byb3ZpZGVyLXByaWNlIj4nLiRyb3dbInByaWNlIl0uJzwvc3Bhbj4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3NwYW4+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9sYWJlbD4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvbGk+JzsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmRmb3JlYWNoOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkcmV0dXJuLj0nPC91bD4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICAgICAgICAgICAgICAgIDwvc3Bhbj48L2Rpdj4NCiAgICAgICAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgICAgICAgPC9kaXY+DQogICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICAgIDxzY3JpcHQ+DQoNCiAgICAgICAgICAgICAgJChcJ1tkYXRhLWlkXj0ic2VydmljZWRlbGV0ZS0iXVwnKS5jbGljayhmdW5jdGlvbigpew0KICAgICAgICAgICAgICAgIHZhciBpZCAgICAgICAgPSAkKHRoaXMpLmF0dHIoImRhdGEtc2VydmljZSIpOw0KICAgICAgICAgICAgICAgICQoIltuYW1lPVwncHJpY2VbIitpZCsiXVwnXSIpLnZhbCgiIik7DQogICAgICAgICAgICAgICAgLy8kKCJ1bCA+IGxpI3NlcnZpY2UtIitpZCkucmVtb3ZlKCk7DQogICAgICAgICAgICAgIH0pOw0KDQogICAgICAgICAgICA8L3NjcmlwdD4NCg0KICAgICAgICA8L2Rpdj4NCg0KICAgICAgICAgIDxkaXYg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pX25hbWUiXS4nPC9oND4NCiAgICAgICAgICAgICAgPHRleHRhcmVhIGNsYXNzPSJmb3JtLWNvbnRyb2wiIHJvd3M9IjgiIHJlYWRvbmx5Pic7ICRyZXR1cm4uPXByaW50X3IoJGVycm9ycyx0cnVlKTsgJHJldHVybi49JzwvdGV4dGFyZWE+DQogICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICA8L2Rpdj4NCg0KDQogICAgICAgIDwvZGl2Pg0KDQogICAgICAgICAgPGRpdiBjbGFzcz0ibW9kYWwtZm9vdGVyIj4NCiAgICAgICAgICAgIDxidXR0b24gdHlwZT0iYnV0dG9uIiBjbGFzcz0iYnRuIGJ0bi1kZWZhdWx0IiBkYXRhLWRpc21pc3M9Im1vZGFsIj5DYW5jZWw8L2J1dHRvbj4NCiAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICA8L2Zvcm0+JzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVjaG8ganNvbl9lbmNvZGUoWyJjb250ZW50IiA9PiAkcmV0dXJuLCAidGl0bGUiID0+ICJFcnJvciBkZXRhaWxzIChJRDogIi4kcm93WyJvcmRlcl9pZCJdLiIpICJdKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIA0KICAgIA0KICBlbHNlaWYoICRhY3Rpb24gPT0gIm9yZGVyX2RldGFpbHMiICk6DQogICAgJGlkICAgICA9ICRfUE9TVFsiaWQiXTsNCiAgICAkcm93ICAgID0gJGNvbm4tPnByZXBhcmUoIlNFTEVDVCAqIEZST00gb3JkZXJzIElOTkVSIEpPSU4gc2VydmljZV9hcGkgT04gc2VydmljZV9hcGkuaWQ9b3JkZXJzLm9yZGVyX2FwaSBXSEVSRSBvc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DxsYWJlbD5MYXN0IHVwZGF0ZTwvbGFiZWw+DQogICAgICAgICAgICAgIDxpbnB1dCBjbGFzcz0iZm9ybS1jb250cm9sIiB2YWx1ZT0iJy4kcm93WyJsYXN0X2NoZWNrIl0uJyIgcmVhZG9ubHk+DQogICAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICA8L2Rpdj4NCg0KDQogICAgICAgIDwvZGl2Pg0KDQogICAgICAgICAgPGRpdiBjbGFzcz0ibW9kYWwtZm9vdGVyIj4NCiAgICAgICAgICAgIDxidXR0b24gdHlwZT0iYnV0dG9uIiBjbGFzcz0iYnRuIGJ0bi1kZWZhdWx0IiBkYXRhLWRpc21pc3M9Im1vZGFsIj5DYW5jZWw8L2J1dHRvbj4NCiAgICAgICAgICA8L2Rpdj4NCiAgICAgICAgICA8L2Zvcm0+JzsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVjaG8ganNvbl9lbmNvZGUoWyJjb250ZW50IiA9PiAkcmV0dXJuLCAidGl0bGUiID0+ICJPcmRlciBEZXRhaWxzIChJRDogIiAuICRyb3dbIm9yZGVyX2lkIl0gLiAiKSAiXSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIA0KICBlbHNlaWYoICRhY3Rpb24gPT0gImVhcm5fbm90ZSIgKToNCiAgICAkaWQgICAgID0gJF9QT1NUWyJpZCJdOw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ybS1jb250cm9sIiBuYW1lPSJiYW5rIj4nOw0KICAgICAgICAgICAgICAgIGZvcmVhY2goICRiYW5rIGFzICRiYW5rYSApOg0KICAgICAgICAgICAgICAgICAgJHJldHVybi49ICc8b3B0aW9uIHZhbHVlPSInLiRiYW5rYVsiaWQiXS4nIic7IGlmKCAkcGF5bWVudFsicGF5bWVudF9iYW5rIl0gPT0gJGJhbmthWyJpZCJdICk6ICRyZXR1cm4uPSdzZWxlY3RlZCc7IGVuZGlmOyAkcmV0dXJuLj0nPicuJGJhbmthWyJiYW5rX25hbWUiXS4nPC9vcHRpb24+JzsNCiAgICAgICAgICAgICAgICBlbmRmb3JlYWNoOw0KICAgICAgICAgICAgICAgICRyZXR1cm4uPSc8L3NlbGVjdD4NCiAgICAgICAgICAgIDwvZGl2Pg0KICAgICAgICAgIDwvZGl2Pg0KDQogICAgICAgICAgPGRpdiBjbGFzcz0ic2VydmljZS1tb2RlX19ibG9jayI+DQogICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb3JtLWdyb3VwIj4NCiAgICAgICAgICAgIDxsYWJlbD5QYXltZW50IHN0YXR1czwvbGFiZWw+DQogICAgICAgICAgICAgIDxzZWxlY3QgY2xhc3M9ImZvcm0tY29udHJvbCIgJzsgaWYoICRwYXltZW50WyJwYXltZW50X3N0YXR1cyJdID09IDMgKTogJHJldHVybi49J2Rpc2FibGVkJzsgZW5kaWY7ICRyZXR1cm4uPScgbmFtZT0ic3RhdHVzIj4NCiAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2YWx1ZT0iMSInOyBpZiggJHBheW1lbnRbInBheW1lbnRfc3RhdHVzIl0gPT0gMSApOiAkcmV0dXJuLj0nc2VsZWN0ZWQnOyBlbmRpZjsgJHJldHVybi49Jz5QZW5kaW5nPC9vcHRpb24+DQogICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9IjIiJzsgaWYoICRwYXltZW50WyJwYXltZW50X3N0YXR1cyJdID09IDIgKTogJHJldHVyb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9ImJ0biBidG4tcHJpbWFyeSI+U2F2ZSBDaGFuZ2VzPC9idXR0b24+DQogICAgICAgICAgICA8YnV0dG9uIHR5cGU9ImJ1dHRvbiIgY2xhc3M9ImJ0biBidG4tZGVmYXVsdCIgZGF0YS1kaXNtaXNzPSJtb2RhbCI+Q2FuY2VsPC9idXR0b24+DQoNCiAgICAgICAgIDwvZm9ybT4nOyAgDQogICAgZWNobyBqc29uX2VuY29kZShbImNvbnRlbnQiPT4kcmV0dXJuLCJ0aXRsZSI9PiJFZGl0IGN1cnJlbmN5ICgiLiRwcm92aWRlclsibmFtZSJdLiIpICJdKTsNCiAgIA0KDQogIA0KICBlbmRpZjsNCg0K")); ?>

Function Calls

base64_decode 1

Variables

None

Stats

MD5 5677ad2b77988e09787459641306db52
Eval Count 1
Decode Time 431 ms