function Get_swagger_Procedure(){tenderType==""&&PMT!=""&&(tenderType=PMT);(tenderType.includes("landSell")||tenderType.includes("landRental")||tenderType.includes("basicSell")||tenderType.includes("alienation")||tenderType.includes("legitimatePropertyLease")||tenderType.includes("commercialSell")||tenderType.includes("bankRuptcy")||tenderType.includes("simpleSell")||tenderType.includes("regulationsPropertyLease")||tenderType.includes("commercialPropertyLease")||tenderType.includes("smallPrivatization")||tenderType.includes("largePrivatization")||tenderType.includes("nonperformingLoans")||tenderType.includes("landArrested"))&&(similar_procedures=!0);strStartsWith(tenderType,"renewables")?(PMT=tenderType=swagger_tenderType="renewables",swagger_Procedure="renewables.GreenProcedure"):strStartsWith(tenderType,"subsoil-")||strStartsWith(tenderType,"nadra")?(strStartsWith(tenderType,"subsoil-english")?swagger_Procedure="subsoil-english.SubsoilEnglishProcedure":strStartsWith(tenderType,"subsoil-dutch")&&(swagger_Procedure="subsoil-dutch.SubsoilDutchProcedure"),PMT=tenderType="nadra",swagger_tenderType="subsoil"):strStartsWith(tenderType,"dgf-")?(strStartsWith(tenderType,"dgf-english")?(swagger_tenderType="dgf.dgfEnglishProcedure",swagger_Procedure="dgf-english.DgfEnglishProcedure"):strStartsWith(tenderType,"dgf-dutch")&&(swagger_tenderType="dgf.dgfDutchProcedure",swagger_Procedure="dgf-dutch.DgfDutchProcedure"),PMT=tenderType="dgf"):strStartsWith(tenderType,"railwayCargo-english")?PMT=tenderType=swagger_tenderType="railwayCargo-english":strStartsWith(tenderType,"railwayCargo-dutch")?PMT=tenderType=swagger_tenderType="railwayCargo-dutch":strStartsWith(tenderType,"timber")?(PMT=tenderType="timber",swagger_tenderType="timber-english",swagger_Procedure=strStartsWith(tenderType,"railwayCargo-multiAwards")?"timber-multiAwards.TimberMultiAwardsProcedure":"timber-english.TimberEnglishProcedure"):strStartsWith(tenderType,"legitimatePropertyLease-english")?(PMT=tenderType=swagger_tenderType="legitimatePropertyLease-english",swagger_Procedure="legitimatePropertyLease-english.legitimatePropertyLeaseEnglishProcedure"):strStartsWith(tenderType,"legitimatePropertyLease-dutch")?(PMT=tenderType=swagger_tenderType="legitimatePropertyLease-dutch",swagger_Procedure="legitimatePropertyLease-dutch.legitimatePropertyLeaseDutchProcedure"):strStartsWith(tenderType,"legitimatePropertyLease-priorityEnglish")?(PMT=tenderType=swagger_tenderType="legitimatePropertyLease-priorityEnglish",swagger_Procedure="legitimatePropertyLease-priorityEnglish.legitimatePropertyLeasePriorityEnglishProcedure"):strStartsWith(tenderType,"landRental-english")?(PMT=tenderType=swagger_tenderType="landRental-english",swagger_Procedure="landRental-english.LandRentalEnglishProcedure"):strStartsWith(tenderType,"landSell-english")?(PMT=tenderType=swagger_tenderType="landSell-english",swagger_Procedure="landSell-english.LandSellEnglishProcedure"):strStartsWith(tenderType,"landSell-priorityEnglish")?(PMT=tenderType=swagger_tenderType="landSell-priorityEnglish",swagger_Procedure="landSell-priorityEnglish.LandSellPriorityEnglishProcedure"):strStartsWith(tenderType,"basicSell-english")?(PMT=tenderType=swagger_tenderType="basicSell-english",swagger_Procedure="basicSell-english.basicSellEnglishProcedure"):strStartsWith(tenderType,"basicSell-dutch")?(PMT=tenderType=swagger_tenderType="basicSell-dutch",swagger_Procedure="basicSell-dutch.BasicSellDutchProcedure"):strStartsWith(tenderType,"basicSell-withoutAuction")?(PMT=tenderType=swagger_tenderType="basicSell-withoutAuction",swagger_Procedure="basicSell-withoutAuction.basicSellWithoutAuctionProcedure"):strStartsWith(tenderType,"alienation-english")?(PMT=tenderType=swagger_tenderType="alienation-english",swagger_Procedure="alienation-english.alienationEnglishProcedure"):strStartsWith(tenderType,"commercialSell-english")?(PMT=tenderType=swagger_tenderType="commercialSell-english",swagger_Procedure="commercialSell-english.commercialSellEnglishProcedure"):strStartsWith(tenderType,"commercialSell-dutch")?(PMT=tenderType=swagger_tenderType="commercialSell-dutch",swagger_Procedure="commercialSell-dutch.commercialSellDutchProcedure"):strStartsWith(tenderType,"simpleSell-withoutAuction")?(PMT=tenderType=swagger_tenderType="simpleSell-withoutAuction",swagger_Procedure="simpleSell-withoutAuction.simpleSellWithoutAuctionProcedure"):strStartsWith(tenderType,"bankRuptcy-english")?(PMT=tenderType=swagger_tenderType="bankRuptcy-english",swagger_Procedure="bankRuptcy-english.bankRuptcyEnglishProcedure"):strStartsWith(tenderType,"bankRuptcy-dutch")?(PMT=tenderType=swagger_tenderType="bankRuptcy-dutch",swagger_Procedure="bankRuptcy-dutch.bankRuptcyDutchProcedure"):strStartsWith(tenderType,"bankRuptcy-withoutAuction")?(PMT=tenderType=swagger_tenderType="bankRuptcy-withoutAuction",swagger_Procedure="bankRuptcy-withoutAuction.bankRuptcyWithoutAuctionProcedure"):strStartsWith(tenderType,"regulationsPropertyLease-english")?(PMT=tenderType=swagger_tenderType="regulationsPropertyLease-english",swagger_Procedure="regulationsPropertyLease-english.regulationsPropertyLeaseEnglishProcedure"):strStartsWith(tenderType,"regulationsPropertyLease-dutch")?(PMT=tenderType=swagger_tenderType="regulationsPropertyLease-dutch",swagger_Procedure="regulationsPropertyLease-dutch.regulationsPropertyLeaseDutchProcedure"):strStartsWith(tenderType,"commercialPropertyLease-dutch")?(PMT=tenderType=swagger_tenderType="commercialPropertyLease-dutch",swagger_Procedure="commercialPropertyLease-dutch.commercialPropertyLeaseDutchProcedure"):strStartsWith(tenderType,"commercialPropertyLease-english")?(PMT=tenderType=swagger_tenderType="commercialPropertyLease-english",swagger_Procedure="commercialPropertyLease-english.commercialPropertyLeaseEnglishProcedure"):strStartsWith(tenderType,"smallPrivatization-dutch")?(PMT=tenderType=swagger_tenderType="smallPrivatization-dutch",swagger_Procedure="smallPrivatization-dutch.smallPrivatizationDutchProcedure"):strStartsWith(tenderType,"smallPrivatization-english")?(PMT=tenderType=swagger_tenderType="smallPrivatization-english",swagger_Procedure="smallPrivatization-english.smallPrivatizationEnglishProcedure"):strStartsWith(tenderType,"largePrivatization-english")?(PMT=tenderType=swagger_tenderType="largePrivatization-english",swagger_Procedure="largePrivatization-english.largePrivatizationEnglishProcedure"):strStartsWith(tenderType,"nonperformingLoans-dutch")?(PMT=tenderType=swagger_tenderType="nonperformingLoans-dutch",swagger_Procedure="nonperformingLoans-dutch.nonperformingLoansDutchProcedure"):strStartsWith(tenderType,"nonperformingLoans-english")?(PMT=tenderType=swagger_tenderType="nonperformingLoans-english",swagger_Procedure="nonperformingLoans-english.nonperformingLoansEnglishProcedure"):strStartsWith(tenderType,"landArrested-english")?(PMT=tenderType=swagger_tenderType="landArrested-english",swagger_Procedure="landArrested-english.LandArrestedEnglishProcedure"):strStartsWith(tenderType,"landArrested-priorityEnglish")&&(PMT=tenderType=swagger_tenderType="landArrested-priorityEnglish",swagger_Procedure="landArrested-priorityEnglish.LandArrestedPriorityEnglishProcedure");tenderType!=""&&(path_swagger=strStartsWith(tenderType,"subsoil-")||strStartsWith(tenderType,"nadra")?"JS/Swagger/subsoil":"JS/Swagger/"+tenderType.split("-")[0]);oFormRecord.sellingMethod!=undefined&&(auctionType=oFormRecord.sellingMethod.indexOf("-multiAwards")>-1?"multiAwards":oFormRecord.sellingMethod.indexOf("-dutch")>-1?"dutch":"english")}function set_auctionType(){auctionType_mark=tenderType=="timber"?"auctionType_timber":tenderType=="nadra"||tenderType=="railwayCargo"||tenderType=="dgf"?"auctionType_cdb3":tenderType.includes("legitimatePropertyLease")?"auctionType_rent":"";auctionType_mark!=""&&SetDicSearchOption(d_dict,$("#slPosition_auctionType"),auctionType_mark,"NONE");tenderType=="nadra"&&idForm==0&&$("#slPosition_auctionType option[value='dutch']").remove()}function add_radio_text(n,t,i,r,u){var f=pn_radio___rand_id.outerHTML,e=rand_id++;f=f.replace(new RegExp("__rand_id","g"),e).replace("__id",t).replace("__text",i).replace("__atid",r).replace("__award_id",u);n.append(f)}function set_swagger_legalName(n){if(legalName=$(n).attr("legalName"),legalName[0]!="_"){if(legalName.indexOf("Procedure")>-1){if(swagger_Procedure==""||swagger_Procedure=="all")return;legalName=legalName.replace("Procedure",swagger_Procedure)}if(legalName.indexOf("PMT")>-1){if(swagger_tenderType=="")return;legalName=legalName.replace("PMT",swagger_tenderType)}if(legalNames=legalName.split("."),legalNames.length==2?(model="base",obj=legalNames[0],property=legalNames[1]):(model=legalNames[0],obj=legalNames[1],property=legalNames[2]),schemas_obj=obj_swagger.components.schemas[model+"."+obj],schemas_obj!=undefined){if(schemas_obj.allOf!=undefined){for(var t=0;schemas_obj.allOf[t]!=undefined;t++);schemas_obj=schemas_obj.allOf[t-1]}schemas_obj.properties==undefined||schemas_obj.properties[property]==undefined||(legalName.includes("contracts")||legalName.includes("awards")?schemas_obj&&schemas_obj.properties&&schemas_obj.properties[property]&&schemas_obj.properties[property][legalNames[3]]&&schemas_obj.properties[property][legalNames[3]].properties&&schemas_obj.properties[property][legalNames[3]].properties[legalNames[4]]?text=schemas_obj.properties[property][legalNames[3]].properties[legalNames[4]][label_legalName]:schemas_obj.properties[property][label_legalName]!=undefined&&(text=schemas_obj.properties[property][label_legalName]):text=schemas_obj.properties[property][label_legalName],$(n).text(text))}}}function get_schemas_property(n,t){if(n=n.replace("Procedure",swagger_Procedure).replace("PMT",swagger_tenderType),ar_schemas=n.split("."),ar_schemas.length==1?(model="base",obj=ar_schemas[0]):ar_schemas.length==3?(model=ar_schemas[1],obj=ar_schemas[2]):(model=ar_schemas[0],obj=ar_schemas[1]),schemas_obj=obj_swagger.components.schemas[model+"."+obj],schemas_obj!=undefined){if(schemas_obj.allOf!=undefined){for(var i=0;schemas_obj.allOf[i]!=undefined;i++);schemas_obj=schemas_obj.allOf[i-1]}if(schemas_obj.properties[t]!=undefined)return schemas_obj.properties[t][label_legalName]}}function add_full_field(n,t,i,r,u,f,e){var o=pn_full_field___schemas___property.outerHTML,s=rand_id++;schemas_property=get_schemas_property(i,r);value=t[r];u!=undefined&&u!=""&&value!=undefined?value=value[u]:u="uk_UA";u=u==undefined?r:r+"."+u;e||(e="display:none");o=o.replace(new RegExp("__schemas","g"),i).replace(new RegExp("__property","g"),r).replace(new RegExp("__rand_id","g"),s).replace("schemas.property",schemas_property).replace("__style",e).replace("__atid",u);n.append(o);$("[data-atid='"+u+"']",n).val(value);f&&SetViewForm($("[id='pn_full_field_"+i+"_"+r+"']",n))}function add_date_field(n,t,i,r,u){var f=pn_date_field___schemas___property.outerHTML,o=rand_id++,e;schemas_property=get_schemas_property(i,r);_atid=r;_Date="";_Time="";sd=t[r];sd!=undefined&&(e=sISO_8601_2_DMYHM(sd),_Date=e.substr(0,10),_Time=e.substr(11,5));f=f.replace(new RegExp("__schemas","g"),i).replace(new RegExp("__property","g"),r).replace(new RegExp("__rand_id","g"),o).replace(new RegExp("__atid","g"),_atid).replace("schemas.property",schemas_property).replace("__Date",_Date).replace("__Time",_Time);n.append(f);u&&SetViewForm($("[id='pn_date_field_"+i+"_"+r+"']",n))}function add_period_field(n,t,i,r,u){var e=pn_period_field___schemas___property.outerHTML,o=rand_id++,f;schemas_property=get_schemas_property(i,r);_atid=r;startDate_Date="";startDate_Time="";endDate_Date="";endDate_Time="";sd=t[r].startDate;sd!=undefined&&(f=sISO_8601_2_DMYHM(sd),startDate_Date=f.substr(0,10),startDate_Time=f.substr(11,5));sd=t[r].endDate;sd!=undefined&&(f=sISO_8601_2_DMYHM(sd),endDate_Date=f.substr(0,10),endDate_Time=f.substr(11,5));e=e.replace(new RegExp("__schemas","g"),i).replace(new RegExp("__property","g"),r).replace(new RegExp("__rand_id","g"),o).replace(new RegExp("__atid","g"),_atid).replace("schemas.property",schemas_property).replace("__startDate.Date",startDate_Date).replace("__startDate.Time",startDate_Time).replace("__endDate.Date",endDate_Date).replace("__endDate.Time",endDate_Time);n.append(e);u&&SetViewForm($("[id='pn_period_field_"+i+"_"+r+"']",n))}function add_value_field(n,t,i,r,u){var f=pn_value_field___schemas___property.outerHTML,e=rand_id++;schemas_property=get_schemas_property(i,r);_atid=r;value_amount="";obj_property=t[r];obj_property!=undefined&&(value_amount=obj_property.amount);f=f.replace(new RegExp("__schemas","g"),i).replace(new RegExp("__property","g"),r).replace(new RegExp("__rand_id","g"),e).replace("schemas.property",schemas_property).replace("__amount",value_amount).replace("__atid",_atid);n.append(f);obj_property!=undefined&&obj_property.valueAddedTaxIncluded!="False"&&(obj_property.valueAddedTaxIncluded||obj_property.valueAddedTaxIncluded=="True")&&$("[data-atid='"+r+".valueAddedTaxIncluded']",$("#pn_value_field_"+i+"_"+r,n)).prop("checked","checked");u&&SetViewForm($("[id='pn_value_field_"+i+"_"+r+"']",n))}function get_value_field(n,t){if(place=$("[data-atid='"+n+"']"),place.length==0){bValid=!1;return}var i={};if(t||$("[data-atid='"+n+".amount']",place).val()!=""){if(!checkfloat($("[data-atid='"+n+".amount']",place),0,1e12)){bValid=!1;return}return i.amount=lastCheckValue,i.currency="UAH",i}}function add_discount_field(n,t,i,r,u){var f=pn_discount_field___schemas___property.outerHTML,e=rand_id++;schemas_property=get_schemas_property(i,r);_atid=r;value_amount="";discountPercent="";obj_property=t[r];obj_property!=undefined&&obj_property.previousAuctionValue!=undefined&&(value_amount=obj_property.previousAuctionValue.amount,discountPercent=obj_property.discountPercent);f=f.replace(new RegExp("__schemas","g"),i).replace(new RegExp("__property","g"),r).replace(new RegExp("__rand_id","g"),e).replace("schemas.property",schemas_property).replace("__amount",value_amount).replace("__discountPercent",discountPercent).replace("__atid",_atid);n.append(f);obj_property!=undefined&&obj_property.discount&&$("[data-atid='"+r+".discount']",$("#pn_discount_field_"+i+"_"+r,n)).prop("checked","checked");u&&SetViewForm($("[id='pn_discount_field_"+i+"_"+r+"']",n));add_discount=!0}function get_discount_field(n){if(place=$("[data-atid='"+n+"']"),place.length==0){bValid=!1;return}var t={};if($("[data-atid='"+n+".discount']",place).prop("checked")){if(t.discount=!0,!checkfloat($("[data-atid='"+n+".previousAuctionValue.amount']",place),data.value.amount,1e12)){bValid=!1;return}if(t.previousAuctionValue={amount:lastCheckValue},!checkfloat($("[data-atid='"+n+".discountPercent']",place),0,100)){bValid=!1;return}t.discountPercent=lastCheckValue;t.previousAuctionValue.currency="UAH"}else t.discount=!1;return t}function add_VerificationDocuments(n,t,i,r,u){var f=pn_VerificationDocuments___rand_id.outerHTML,e="VerificationDocumentInfo",s=rand_id++,o;_atid=r;startDate_Date="";startDate_Time="";t=t!=undefined&&t.length>0?t[0]:undefined;t!=undefined&&(sd=t.date,sd!=undefined&&(o=sISO_8601_2_DMYHM(sd),startDate_Date=o.substr(0,10),startDate_Time=o.substr(11,5)));f=f.replace(new RegExp("__rand_id","g"),s).replace("schemas.property","Ліцензія").replace("__startDate.Date",startDate_Date).replace("__atid",_atid);n.append(f);t!=undefined&&($("[data-atid='"+e+".description.uk_UA']",n).val(t.description.uk_UA),$("[data-atid='"+e+".id']",n).val(t.id));$("[data-atid='"+e+".date']",n).attr("autocomplete","off").datepicker($.datepicker.regional.uk);u&&SetViewForm($("#pn_VerificationDocuments_"+s,n))}function get_VerificationDocuments(n){if(n.length==0){bValid=!1;return}var t={},i="VerificationDocumentInfo";if(!checkLength($("[data-atid='VerificationDocumentInfo.description.uk_UA']",n),"",1,1e4)){bValid=!1;return}if(t.description={uk_UA:lastCheckValue},!checkLength($("[data-atid='"+i+".id']",n),"",1,1e4)){bValid=!1;return}if(t.id=lastCheckValue,!checkDate($("[data-atid='"+i+".date']",n),"",dMinDate,dMaxDate)){bValid=!1;return}return t.date=getISO_datetime(lastCheckValue,"00:00",!0),t}function AddTestBid(n){var t=pn_TestBid___rand_id.outerHTML,i=rand_id++;t=t.replace(new RegExp("__rand_id","g"),i);place=$("#pn_test_bids_contetnt");place.append(t);obj_place=$("#pn_TestBid_"+i,place);n!=undefined&&($("[data-atid='contactPoint.email']",obj_place).val(n.bidders[0].contactPoint.email),$("[data-atid='value.amount']",obj_place).val(n.value.amount),n.quantity!=undefined&&$("[data-atid='quantity']",obj_place).val(n.quantity));tenderType!="renewables"&&$(".renewables",obj_place).hide()}function get_TestBids(n,t,i){var r=[],u=0;return $("[data-atid='testBid']",$("#pn_test_bids_contetnt")).each(function(){r.push(get_TestBid(this,n,t,i,u++))}),r}function get_TestBid(n,t,i,r,u){if(n.length==0){bValid=!1;return}var f={};if(!checkLength($("[data-atid='contactPoint.email']",n),"",1,1e4)){bValid=!1;return}if(email=lastCheckValue,!checkfloat($("[data-atid='value.amount']",n),"",0,t)){bValid=!1;return}if(value=lastCheckValue,tenderType=="renewables"){if(!checkInt($("[data-atid='quantity']",n),"",0,i)){bValid=!1;return}quantity=lastCheckValue}return f={bidders:[{identifier:{scheme:"UA-EDR",legalName:{uk_UA:"Name "+u},id:"00000111"},address:{streetAddress:{uk_UA:"111111"},locality:{uk_UA:"111111"},region:{uk_UA:"Івано-Франківська область"},postalCode:"11111",countryName:{uk_UA:"Україна"}},contactPoint:{name:{uk_UA:"Person "+u},email:email,telephone:"+380123456789"}}],status:"active",value:{amount:value,currency:r},id:uuidv4(),ownerToken:uuidv4()},tenderType=="renewables"&&(f.quantity=quantity),f}function add_PrepaymentDetails(n,t,i,r,u){var f=pn_PrepaymentDetails___rand_id.outerHTML,o="timber.PrepaymentDetails",s=rand_id++,e;schemas_property=get_schemas_property(i,r);_atid=r;date_Date="";date_Time="";t!=undefined&&(sd=t.date,sd!=undefined&&(e=sISO_8601_2_DMYHM(sd),date_Date=e.substr(0,10),date_Time=e.substr(11,5)));f=f.replace(new RegExp("__rand_id","g"),s).replace("schemas.property",schemas_property).replace("__date.Date",date_Date).replace("__atid",_atid);n.append(f);t!=undefined&&$("[data-atid='"+o+".prepayment.amount']",n).val(t.prepayment.amount);$("[data-atid='"+o+".date']",n).attr("autocomplete","off").datepicker($.datepicker.regional.uk);u&&SetViewForm($("#pn_PrepaymentDetails_"+s,n))}function get_PrepaymentDetails(n){if(n.length==0){bValid=!1;return}var t={},i="timber.PrepaymentDetails";if(!checkfloat($("[data-atid='"+i+".prepayment.amount']",n),0,1e12)){bValid=!1;return}if(t.prepayment={amount:lastCheckValue,currency:"UAH"},!checkDate($("[data-atid='"+i+".date']",n),"",dMinDate,dMaxDate)){bValid=!1;return}return t.date=getISO_datetime(lastCheckValue,"00:00",!0),t}function set_renewables(){add_full_field($("#pn_position_fields"),oFormRecord,"Procedure","accessDetails","uk_UA",sw_ReadOnly);add_full_field($("#pn_position_fields"),oFormRecord,"Procedure","x_documentRequirements","uk_UA",sw_ReadOnly);add_full_field($("#pn_position_fields"),oFormRecord,"Procedure","x_additionalInformation","uk_UA",sw_ReadOnly);oFormRecord.x_quantityLimit!=undefined&&(oFormRecord.x_quantityLimit=Math.round(100*oFormRecord.x_quantityLimit)/100,add_full_field($("#pn_position_fields"),oFormRecord,"Procedure","x_quantityLimit",undefined,!0));oFormRecord.waitingPeriod!=undefined&&add_period_field($("#pn_postiion_periods"),oFormRecord,"Procedure","waitingPeriod",!0);oFormRecord.verificationPeriod!=undefined&&add_period_field($("#pn_position_periods"),oFormRecord,"Procedure","verificationPeriod",!0);oFormRecord.waitingPeriod!=undefined&&add_period_field($("#pn_position_periods"),oFormRecord,"Procedure","waitingPeriod",!0);$("#pnProcuringEntity").Tender_Organization({anItem:idForm==0?oFormRecord:oFormRecord.procuringEntity,OrganisationTitle:"Замовник",ReadOnly:ReadOnly,OrganisationEditable:isDebugMode,name_prefix:"procuringEntity"});add_VerificationDocuments($("[data-atid='VerificationDocumentPlace']",$("#pnProcuringEntity")),idForm==0?full_data.j_content.x_verificationDocuments_renewables:oFormRecord.procuringEntity.x_verificationDocuments,"renewables.ProcuringEntity","x_verificationDocuments",sw_ReadOnly);$("[data-atid ='bankAccount']").show();SetDicSearchOption(d_dict,$("[data-atid='AccountIdentification.scheme']"),"AccountIdentification_scheme",!1,"Виберіть значення");add_BankAccount($("#pn_bankAccount_place"),idForm==0?full_data.j_content.bankAccount_cbd3:oFormRecord.bankAccount,sw_ReadOnly);show_field_contract();$("#pn_registrationFee").hide();$("#pn_auctionType").hide()}function get_renewables(){if(checkLength($("[data-atid='accessDetails.uk_UA']"),"",1,1e4))return(data.accessDetails={uk_UA:lastCheckValue},!checkLength($("[data-atid='x_documentRequirements.uk_UA']"),"",1,1e4))?void 0:(data.x_documentRequirements={uk_UA:lastCheckValue},!checkLength($("[data-atid='x_additionalInformation.uk_UA']"),"",1,1e4))?void 0:(data.x_additionalInformation={uk_UA:lastCheckValue},!bValid)?void 0:(data.bankAccount=[get_BankAccount($("[data-atid='BankAccount']",$("#pn_bankAccount_place")))],!bValid)?void 0:!0}function get_nadra_dics(){jQuery.getJSON("Js/subsoil/subsoilUsageType.json?v="+version,function(n){d_subsoilUsageType=n})}function check_nadra_dics_loaded(){return d_subsoilUsageType!=undefined}function set_nadra(){get_nadra_dics();wait_nadra()}function wait_nadra(){if(!check_nadra_dics_loaded()){setTimeout(wait_nadra,100);return}$("#pnProcuringEntity").Tender_Organization({anItem:idForm==0?oFormRecord:oFormRecord.procuringEntity,OrganisationTitle:"Інформація про Організатора аукціону",ReadOnly:idForm==0||idForm.includes("web")||page_data.canPublic=="true"?!1:ReadOnly,OrganisationEditable:!0,name_prefix:"procuringEntity"});$("#pn_registrationFee").hide();SetDicSearchOption(d_dict,$("[data-atid='tenderAttempts']"),"tenderAttempts_2",!0,"");SetViewForm($("#pnPosition_dgfID"));(idForm==0||strStartsWith(oFormRecord.id,"web"))&&$("#pnPosition_dgfID").hide();oFormRecord.tenderAttempts!=undefined&&$("[data-atid='tenderAttempts']").val(oFormRecord.tenderAttempts);$("[data-atid='tenderAttempts']").change(function(){tenderAttempts_lotId_change()});(oFormRecord.accessDetails!=undefined||idForm==0||strStartsWith(idForm,"web")||!sw_ReadOnly)&&add_full_field($("#pn_position_fields"),oFormRecord,"Procedure","accessDetails","uk_UA",sw_ReadOnly);(oFormRecord.x_documentRequirements!=undefined||idForm==0||strStartsWith(idForm,"web")||!sw_ReadOnly)&&add_full_field($("#pn_position_fields"),oFormRecord,"Procedure","x_documentRequirements","uk_UA",sw_ReadOnly);(oFormRecord.geologicDataValue!=undefined||idForm==0||strStartsWith(idForm,"web")||!sw_ReadOnly)&&add_value_field($("#pn_position_fields"),oFormRecord,"Procedure","geologicDataValue",sw_ReadOnly);(oFormRecord.documentationValue!=undefined||idForm==0||strStartsWith(idForm,"web")||!sw_ReadOnly)&&add_value_field($("#pn_position_fields"),oFormRecord,"Procedure","documentationValue",sw_ReadOnly);(oFormRecord.leaseDuration!=undefined||idForm==0||strStartsWith(idForm,"web")||!sw_ReadOnly)&&$("[data-block ='leaseDuration']").show();oFormRecord.minNumberOfQualifiedBids!=undefined&&$("#pn_minNumberOfQualifiedBids").show();add_discount_field($("#pn_position_fields"),oFormRecord,"Procedure","discount",sw_ReadOnly);SetDicSearchOption(d_dict,$("[data-atid='AccountIdentification.scheme']"),"AccountIdentification_scheme",!1,"Виберіть значення");show_field_contract();PrefixId="_0";Add_nadraProperties_cbd3(oFormRecord.items!=undefined?oFormRecord.items[0]:{},PrefixId,$("#pn_w_item"+PrefixId));oFormRecord.leaseDuration!=undefined&&(leaseDuration=Iso8601DurationPeriod(oFormRecord.leaseDuration),$("#ePosition_leaseDuration_y").val(leaseDuration.period.variables.Y),$("#ePosition_leaseDuration_m").val(leaseDuration.period.variables.M),sw_ReadOnly&&($("#teposition_leaseduration_y").text(leaseDuration.period.variables.Y),$("#teposition_leaseduration_m").text(leaseDuration.period.variables.M)),$("[data-block ='leaseDuration']").show());$(".required-label",$('[data-block="leaseDuration"]')).remove();$(".required-label",$("#pn_full_field_Procedure_accessDetails")).remove();tenderAttempts_lotId_change();var n=oFormRecord.awards;if(n!=undefined&&n.length>0)for(contract_index=0,_i_award=0;_i_award<n.length;_i_award++)contracts!=undefined&&(i_contract=get_contract_on_award(n[_i_award].id))!=-1&&(_contact=contracts[i_contract],(_contact.status=="signed"||_contact.datePaid!=undefined)&&(add_date_field($("#pn_contract_fields_"+contract_index),_contact,"subsoil.Contract","datePaid",!(isOwn&&_contact.status=="signed")),_contact.status=="signed"&&SetEditFormFields($("[data-atid='datePaid']",$("#pn_contract_fields_"+contract_index)))),contract_index++);$(".not_nadra").hide()}function get_nadra(){if($("[data-atid='accessDetails.uk_UA']").val()!=""){if(!checkLength($("[data-atid='accessDetails.uk_UA']"),"",1,1e4))return;data.accessDetails={uk_UA:lastCheckValue}}if($("[data-atid='x_documentRequirements.uk_UA']").val()!=""){if(!checkLength($("[data-atid='x_documentRequirements.uk_UA']"),"",1,1e4))return;data.accessDetails={uk_UA:lastCheckValue}}if(((geologicDataValue=get_value_field("geologicDataValue"),!1)!=undefined&&(data.geologicDataValue=geologicDataValue),bValid)&&((documentationValue=get_value_field("documentationValue"),!1)!=undefined&&(data.documentationValue=documentationValue),bValid)&&(!(data.tenderAttempts>1)||((discount=get_discount_field("discount",!0))!=undefined&&(data.discount=discount),bValid))){if($("#ePosition_leaseDuration_y").val()!=""||$("#ePosition_leaseDuration_m").val()!=""){if($("#ePosition_leaseDuration_y").val()==""&&$("#ePosition_leaseDuration_y").val(0),$("#ePosition_leaseDuration_m").val()==""&&$("#ePosition_leaseDuration_m").val(0),!checkInt($("#ePosition_leaseDuration_y"),0,50))return;if(leaseDuration_y=lastCheckValue,!checkInt($("#ePosition_leaseDuration_m"),0,12))return;leaseDuration_m=lastCheckValue;data.leaseDuration="P"+leaseDuration_y+"Y"+leaseDuration_m+"M"}if(withPublic&&on_first_publc&&data.sellingMethod.indexOf("-fast")==-1&&data.sellingMethod.indexOf("-initial")==-1&&(doc_place=$("#pn_trd_doc_place"),NeedDocuments="",NeedDocument(doc_place,"auction_nadra","evaluationCriteria"),NeedDocument(doc_place,"auction_nadra","x_auctionDocumentationPackage"),NeedDocument(doc_place,"auction_nadra","x_submissionBidProcedure"),NeedDocument(doc_place,"auction_nadra","x_nonSanctionedRequirements"),NeedDocument(doc_place,"auction_nadra","x_brokerPaymentConditions"),NeedDocument(doc_place,"auction_nadra","x_qualificationSigningTerms"),NeedDocuments!="")){updateTips("Додайте документ: "+NeedDocuments,"Y");return}return!0}}function Add_nadraProperties_cbd3(n,t,i){var r=pn_nadraProperties___rand_id.outerHTML,f=rand_id++,u;(place=$("#pn_itemPropertiesPlace"+t,i),place.text()=="")&&(r=r.replace(new RegExp("__rand_id","g"),f).replace(new RegExp("__PrefixId","g"),t),place.append(r),u={},n.additionalClassifications&&(u=getPropertyOnClassifications(n.additionalClassifications)),obj_place=$("#pn_nadraProperties_"+f,place),SetCBD3DicOption(d_subsoilUsageType,$("[data-atid='subsoilUsageType']",obj_place),!0),SetValuesAtId("subsoilUsageType",u,obj_place),sw_ReadOnly&&SetViewForm(obj_place))}function get_timber_dics(){jQuery.getJSON("Js/timber/timberSortment.json?v="+version,function(n){d_timberSortment=n});jQuery.getJSON("Js/timber/timberSpecies.json?v="+version,function(n){d_timberSpecies=n});jQuery.getJSON("Js/timber/timberClass.json?v="+version,function(n){d_timberClass=n});jQuery.getJSON("Js/timber/timberStorage.json?v="+version,function(n){d_timberStorage=n});jQuery.getJSON("Js/timber/timberDiameter.json?v="+version,function(n){d_timberDiameter=n});jQuery.getJSON("js/timber/timber_species.json?v="+version,function(n){d_timber_species=n;cd_timber_species=!0})}function check_timber_dics_loaded(){return d_timberSortment!=undefined&&d_timberSpecies!=undefined&&d_timberClass!=undefined&&d_timberStorage!=undefined&&d_timberDiameter!=undefined}function set_timber(){get_timber_dics();wait_timber()}function wait_timber(){if(!check_timber_dics_loaded()){setTimeout(wait_timber,100);return}SetDicSearchOption(d_dict,$("[data-atid='tenderAttempts']"),"tenderAttempts_10",!0,"");oFormRecord.tenderAttempts!=undefined&&$("[data-atid='tenderAttempts']").val(oFormRecord.tenderAttempts);$("[data-atid='tenderAttempts']").change(function(){tenderAttempts_lotId_change()});add_full_field($("#pn_position_fields"),oFormRecord,"Procedure","accessDetails","uk_UA",sw_ReadOnly);add_full_field($("#pn_position_fields"),oFormRecord,"Procedure","x_documentRequirements","uk_UA",sw_ReadOnly);add_discount_field($("#pn_position_fields"),oFormRecord,"Procedure","discount",sw_ReadOnly);$("[data-atid ='bankAccount']").show();SetDicSearchOption(d_dict,$("[data-atid='AccountIdentification.scheme']"),"AccountIdentification_scheme",!1,"Виберіть значення");add_BankAccount($("#pn_bankAccount_place"),idForm==0?full_data.j_content.bankAccount_cbd3:oFormRecord.bankAccount,sw_ReadOnly);show_field_contract();PrefixId="_0";Add_timberProperties_cbd3(oFormRecord.items!=undefined?oFormRecord.items[0]:{},PrefixId,$("#pn_w_item"+PrefixId));tenderAttempts_lotId_change();var n=oFormRecord.awards;if(n!=undefined&&n.length>0)for(contract_index=0,_i_award=0;_i_award<n.length;_i_award++)contracts!=undefined&&(i_contract=get_contract_on_award(n[_i_award].id))!=-1&&(_contact=contracts[i_contract],add_PrepaymentDetails($("#pn_contract_fields_"+contract_index),_contact.x_prepaymentDetails,"timber-english.Contract","x_prepaymentDetails",_contact.contract_readonly),contract_index++)}function get_timber(){if(checkLength($("[data-atid='accessDetails.uk_UA']"),"",1,1e4)&&(data.accessDetails={uk_UA:lastCheckValue},checkLength($("[data-atid='x_documentRequirements.uk_UA']"),"",1,1e4))&&(data.x_documentRequirements={uk_UA:lastCheckValue},!(data.tenderAttempts>1)||((discount=get_discount_field("discount",!0))!=undefined&&(data.discount=discount),bValid))){if(withPublic&&on_first_publc&&data.sellingMethod.indexOf("-fast")==-1&&data.sellingMethod.indexOf("-initial")==-1&&(doc_place=$("#pn_trd_doc_place"),NeedDocuments="",NeedDocument(doc_place,"auction_timber_technicalSpecifications","technicalSpecifications"),NeedDocuments!="")){updateTips("Додайте документ: "+NeedDocuments,"Y");return}(data.bankAccount=[get_BankAccount($("[data-atid='BankAccount']",$("#pn_bankAccount_place")))],bValid)&&(alert("Публікацію аукціонів обмежено згідно з роз'ясненням Національної комісії з цінних паперів та фондового ринку"),ShowFrame("https://www.nssmc.gov.ua/do-uvahy-uchasnykiv-tovarnoho-rynku"))}}function Add_timberProperties_cbd3(n,t,i){var u=pn_timberProperties___rand_id.outerHTML,f=rand_id++,r;(place=$("#pn_itemPropertiesPlace"+t,i),place.text()=="")&&(u=u.replace(new RegExp("__rand_id","g"),f).replace(new RegExp("__PrefixId","g"),t),place.append(u),r={},n.additionalClassifications&&(r=getPropertyOnClassifications(n.additionalClassifications)),n.unitValue!=undefined&&(r.unitValue=n.unitValue.amount),r.timberLength!=undefined&&(timberLength=r.timberLength.split(" - "),r.timberLengthMin=timberLength[0],r.timberLengthMax=timberLength[1]),obj_place=$("#pn_timberProperties_"+f,place),SetCBD3DicOption(d_timberSortment,$("[data-atid='timberSortment']",obj_place),!0),SetCBD3DicOption(d_timberSpecies,$("[data-atid='timberSpecies']",obj_place),!0),SetCBD3DicOption(d_timberStorage,$("[data-atid='timberStorage']",obj_place),!0),relatedTo="timberSortment."+(r.timberSortment==undefined?"":r.timberSortment),SetCBD3DicOption(d_timberClass,$("[data-atid='timberClass']",obj_place),!0,relatedTo),SetCBD3DicOption(d_timberDiameter,$("[data-atid='timberDiameter']",obj_place),!0,relatedTo),SetRangeOption($("[data-atid='timberProductionYear']",obj_place),2e3,2100,"Виберіть значення"),SetRangeOption($("[data-atid='timberProductionQuarter']",obj_place),1,4,"Виберіть значення"),SetValuesAtId("timberSortment,timberSpecies,timberClass,timberStorage,timberDiameter,timberProductionYear,timberProductionQuarter,unitValue,timberLengthMin,timberLengthMax",r,obj_place),sw_ReadOnly?SetViewForm(obj_place):r.timberSortment==undefined&&sl_timberSortment_onchange(t))}function get_registry_dics(){jQuery.getJSON("Js/Registry/actingEntityRole.json?v="+version,function(n){d_actingEntityRole=n});jQuery.getJSON("Js/Registry/actionType.json?v="+version,function(n){d_actionType=n});jQuery.getJSON("Js/Registry/documentOf.json?v="+version,function(n){d_documentOf=n});jQuery.getJSON("Js/Registry/floorType.json?v="+version,function(n){d_floorType=n});jQuery.getJSON("Js/Registry/fuelType.json?v="+version,function(n){d_fuelType=n});jQuery.getJSON("Js/Registry/leaseRestrictions.json?v="+version,function(n){d_leaseRestrictions=n});jQuery.getJSON("Js/Registry/intendedUse.json?v="+version,function(n){d_intendedUse=n});jQuery.getJSON("Js/Registry/listType.json?v="+version,function(n){d_listType=n});jQuery.getJSON("Js/Registry/ownershipType.json?v="+version,function(n){d_ownershipType=n});jQuery.getJSON("Js/Registry/powerSupplyClass.json?v="+version,function(n){d_powerSupplyClass=n});jQuery.getJSON("Js/Registry/registrationState.json?v="+version,function(n){d_registrationState=n});jQuery.getJSON("Js/Registry/requestStatus.json?v="+version,function(n){d_requestStatus=n});jQuery.getJSON("Js/Registry/requestType.json?v="+version,function(n){d_requestType=n});jQuery.getJSON("Js/Registry/statusInList.json?v="+version,function(n){d_statusInList=n});jQuery.getJSON("Js/Registry/transmissionType.json?v="+version,function(n){d_transmissionType=n});jQuery.getJSON("Js/Registry/verification3.json?v="+version,function(n){d_verification3=n})}function check_registry_dics_loaded(){return d_documentOf!=undefined&&d_floorType!=undefined&&d_fuelType!=undefined&&d_leaseRestrictions!=undefined&&d_intendedUse!=undefined&&d_listType!=undefined&&d_ownershipType!=undefined&&d_powerSupplyClass!=undefined&&d_registrationState!=undefined&&d_requestStatus!=undefined&&d_requestType!=undefined&&d_statusInList!=undefined&&d_transmissionType!=undefined&&d_verification3!=undefined&&d_actingEntityRole!=undefined&&d_actionType!=undefined}function set_swagger_Procedure_legalName(){$(".sw_lang[legalName*='Procedure']").each(function(){set_swagger_legalName(this)})}function set_sellingMethod(n){if(Ajax_syncGet("Js/d_tender_type.json?v="+version,function(n){d_tender_type=n}),n)member_type==909?(SetDicSearchOption(d_tender_type,$("#slPosition_tenderType"),"renewables",!1,"",""),tenderType="renewables"):member_type==908?(SetDicSearchOption(d_tender_type,$("#slPosition_tenderType"),"bankRuptcy",!1,"",""),tenderType="bankRuptcy-english"):member_type==910?(SetDicSearchOption(d_tender_type,$("#slPosition_tenderType"),"timber",!1,"",""),tenderType="timber",alert("Публікацію аукціонів обмежено згідно з роз'ясненням Національної комісії з цінних паперів та фондового ринку"),ShowFrame("https://www.nssmc.gov.ua/do-uvahy-uchasnykiv-tovarnoho-rynku")):member_type==911?(SetDicSearchOption(d_tender_type,$("#slPosition_tenderType"),"nadra",!1,"",""),tenderType="nadra",$("#slPosition_tenderType option[value='subsoil-dutch']").remove()):member_type==912?(SetDicSearchOption(d_tender_type,$("#slPosition_tenderType"),"legitimatePropertyLease",!1,"",""),cdb3_rent=!0,priority||(tenderType="legitimatePropertyLease-english")):member_type==913?(SetDicSearchOption(d_tender_type,$("#slPosition_tenderType"),"regulationsPropertyLease",!1,"",""),tenderType="regulationsPropertyLease-english"):member_type==901?(SetDicSearchOption(d_tender_type,$("#slPosition_tenderType"),"land",!1,"",""),tenderType="landRental-english"):member_type==905?(SetDicSearchOption(d_tender_type,$("#slPosition_tenderType"),"Sell","NONE","",""),tenderType="basicSell-english"):member_type==914?(SetDicSearchOption(d_tender_type,$("#slPosition_tenderType"),"alienation",!1,"",""),tenderType="alienation-english"):member_type==915?(SetDicSearchOption(d_tender_type,$("#slPosition_tenderType"),"nonperformingLoans",!1,"",""),tenderType="nonperformingLoans-english"):member_type==916&&(SetDicSearchOption(d_tender_type,$("#slPosition_tenderType"),"landArrested",!0,"",""),tenderType="landArrested-english");else{let n=tenderType;const t=(oFormRecord.sellingMethod!=undefined?oFormRecord.sellingMethod:oFormRecord.procurementMethodType).split("-");return(tenderType=="dgf"||tenderType=="railwayCargo"||tenderType=="timber"||tenderType=="nadra")&&(n=t[0]+"-"+t[1]),GetItemById(d_tender_type,n,tenderType.includes("landSell")||tenderType.includes("landRental")?"land":tenderType.includes("bankRuptcy")?"bankRuptcy":tenderType.includes("landArrested-english")||tenderType.includes("landArrested-priorityEnglish")?"landArrested":tenderType.includes("landArrested-withoutAuction")?"landArrested-withoutAuction":tenderType.includes("dgf")?"dgf":tenderType.includes("railwayCargo")?"railwayCargo":tenderType.includes("renewables")?"renewables":tenderType.includes("legitimatePropertyLease")?"legitimatePropertyLease":tenderType.includes("nadra")?"nadra":tenderType.includes("timber")?"timber":tenderType.includes("basicSell")||tenderType.includes("simpleSell")?"Sell":tenderType.includes("commercialSell")?"commercialSell":tenderType.includes("alienation")?"alienation":tenderType.includes("regulationsPropertyLease")?"regulationsPropertyLease":tenderType.includes("commercialPropertyLease")?"commercialPropertyLease":tenderType.includes("smallPrivatization")?"smallPrivatization":tenderType.includes("nonperformingLoans")?"nonperformingLoans":tenderType.includes("largePrivatization")?"largePrivatization":"tenderType")}}function set_tenderType(){const t=oFormRecord.sellingMethod.split("-"),n=t[0]+"-"+t[1];n.includes("dgf")?(tenderType="dgf",cdb3_dgf=!0):tenderType=n.includes("railwayCargo")?"railwayCargo":n.includes("subsoil")?"nadra":n}function set_dutchStep(){oFormRecord.dutchStep!=undefined&&(tenderType.includes("commercialPropertyLease-dutch")||tenderType.includes("regulationsPropertyLease-dutch")||tenderType.includes("basicSell-dutch")||tenderType.includes("commercialSell-dutch")||tenderType.includes("legitimatePropertyLease-dutch")||tenderType.includes("nonperformingLoans-dutch")||tenderType.includes("dgf")||tenderType.includes("smallPrivatization")&&auctionType=="dutch"||tenderType=="nadra"&&auctionType=="dutch"||tenderType.includes("bankRuptcy-dutch"))&&($("#dutchStep_dutchStepQuantity").val(oFormRecord.dutchStep.dutchStepQuantity),oFormRecord.dutchStep.dutchStepPercent!=undefined&&$("#dutchStep_dutchStepPercent").val(oFormRecord.dutchStep.dutchStepPercent),oFormRecord.dutchStep.dutchStepValue!=undefined&&$("#dutchStep_dutchStepValue").val(oFormRecord.dutchStep.dutchStepValue.amount))}function show_field_contract(){$("[data-atid ='pn_contractTotalValue']").show();$("[data-atid ='pn_title.uk_UA']").show();$("[data-atid ='pn_description.uk_UA']").show();$("[data-atid ='pn_contractTime_dateFrom']").show();$("[data-atid ='pn_contractTime_dateTill']").show();tenderType.includes("commercialPropertyLease")&&$("[legalname='PMT.Contract.contractTotalValue']").text("Заключна вартість договору з урахуванням податків");(tenderType.includes("landSell")||tenderType.includes("landArrested")||tenderType.includes("bankRuptcy"))&&$("#pn_contractTime").hide()}function change_type(n){tenderType=n;switch(n.split("-")[0]){case"basicSell":spec_basicSell_type();break;case"bankRuptcy":spec_bankRuptcy_type();break;case"commercialSell":spec_commercialSell_type();break;case"commercialPropertyLease":spec_commercialPropertyLease_type();break;case"regulationsPropertyLease":spec_regulationsPropertyLease_type();break;default:alert("Тип процедури не визначено")}DlgSend(!1)}function show_cdb3_dutchStep(){$("#pn_dutchStep").show();idForm==0||strStartsWith(oFormRecord.id,"web")||tenderType!="nadra"||auctionType!="dutch"||$("#dutchStep_dutchStepQuantity").attr("disabled","disabled");tenderType.includes("commercialSell-dutch")||tenderType.includes("nonperformingLoans-dutch")||$("#dutchStep_dutchStepPercent").attr("disabled","disabled");$("#dutchStep_dutchStepValue").attr("disabled","disabled");$("#pn_minNumberOfQualifiedBids").hide();idForm!=0||not_copy||$("#dutchStep_dutchStepQuantity").val("99")}var obj_swagger={},swagger_Procedure="",swagger_tenderType="",d_timberSortment,d_timberSpecies,d_timberClass,d_timberStorage,d_timberDiameter,d_unsuccessfulReason,d_eligibilityCriteria,d_dgfItemType,d_constructionTechnology,d_encumbrances,d_carryType,d_subsoilUsageType,d_railwayCargoExclusionObjectType,d_objectLoadUnloadOrExclusionRange,d_wagonSpecies,path_swagger="JS/Swagger/swagger",d_actingEntityRole,d_actionType,d_documentOf,d_floorType,d_fuelType,d_leaseRestrictions,d_intendedUse,d_listType,d_ownershipType,d_powerSupplyClass,d_registrationState,d_requestStatus,d_requestType,d_statusInList,d_transmissionType,d_verification3;tenderType="";var add_discount=!1,update_nadra_info=!1,cbd_3_public_edit=!1