diff --git a/src/module_patrimoine/module/forms/patrimoine_saisie/patrimoine_saisie_patrimoine_element.json b/src/module_patrimoine/module/forms/patrimoine_saisie/patrimoine_saisie_patrimoine_element.json new file mode 100644 index 0000000000000000000000000000000000000000..13a7c07b0f9e6dbf80d08c02d8e0dec6d7482816 --- /dev/null +++ b/src/module_patrimoine/module/forms/patrimoine_saisie/patrimoine_saisie_patrimoine_element.json @@ -0,0 +1,1608 @@ +{ + "display":{ + "name":"patrimoine_saisie_patrimoine_element-form", + "title":"PATRIMOINE_ELEMENT_TITLE_DISPLAY", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "label", + "name": "id_bati", + "label": "Identifiant du bâti", + "nb_cols": 2, + "id": "Element_1_1583493459156" + }, + { + "type": "label", + "name": "titre", + "label": "Titre", + "nb_cols": 10, + "id": "Element_3_1583493460040" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "ref_cadastre", + "label": "Références cadastrales", + "nb_cols": 10, + "id": "Element_0_1583758609210" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "adresse", + "label": "Adresse", + "nb_cols": 8, + "id": "Element_2_1583493459656" + }, + { + "type": "label", + "name": "nom_commune", + "label": "Commune", + "nb_cols": 4, + "id": "Element_0_1583493456078" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "niveau_classement", + "label": "Niveau d’intérêt de l’élément bâti", + "nb_cols": 2, + "id": "Element_1_1583758616142" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "proposition_classement_label", + "label": "Proposition de classement au PLU-H", + "nb_cols": 2, + "id": "Element_0_1583501763160" + }, + { + "type": "label", + "name": "classement_au_pluh_label", + "label": "Classement en EBP au PLU-H", + "nb_cols": 2, + "id": "Element_1_1583501767205" + }, + { + "type": "label", + "name": "id_ebq_pluh", + "label": "Identifiant EBP au PLU-H", + "nb_cols": 2, + "id": "Element_1_1583501767205" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "descriptif", + "label": "Descriptif", + "nb_cols": 12, + "id": "Element_0_1583500264734" + } + ] + }, + { + "fields": [ + { + "type": "bo_grid", + "name": "valeur", + "label": "Valeur(s)", + "required": false, + "pattern": "", + "nb_cols": 4, + "id": "Element_0_1583763643016", + "options": { + "enableRowSelection": true, + "enableSelectAll": true, + "enablePagination": false, + "enablePaginationControls": false, + "enableColumnMenus": false, + "enableColumnResizing": true, + "appHeader": false, + "appHeaderTitleBar": false, + "columnDefs": [], + "data": [] + }, + "bo_id": "element_bati_qualite_valeur", + "bo_filter_attr": "id_ebq", + "form_filter_value": "id_element_bati_qualite" + }, + { + "type": "bo_grid", + "name": "theme", + "label": "Thème(s)", + "required": false, + "pattern": "", + "nb_cols": 4, + "id": "Element_1_1583765115272", + "options": { + "enableRowSelection": true, + "enableSelectAll": true, + "enablePagination": false, + "enablePaginationControls": false, + "enableColumnMenus": false, + "enableColumnResizing": true, + "appHeader": false, + "appHeaderTitleBar": false, + "columnDefs": [], + "data": [] + }, + "form_filter_value": "id_element_bati_qualite", + "bo_filter_attr": "id_ebq", + "bo_id": "element_bati_qualite_theme" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "preconisation", + "label": "Préconisation", + "nb_cols": 12, + "id": "Element_1_1583501124119" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "typologie_tissus", + "label": "Typologie tissus", + "nb_cols": 6, + "id": "Element_0_1583499754397" + }, + { + "type": "label", + "name": "sous_typologie_tissus", + "label": "Sous-typologie tissus", + "nb_cols": 6, + "id": "Element_1_1583499757263" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "morphologie_batiment", + "label": "Morphologie bâtiment", + "nb_cols": 6, + "id": "Element_0_1583751315055" + }, + { + "type": "label", + "name": "sous_morphologie_batiment", + "label": "Sous morphologie bâtiment", + "nb_cols": 6, + "id": "Element_1_1583751316259" + } + ] + }, + + { + "fields": [ + { + "type": "bo_grid", + "name": "protection_etat", + "label": "Protection(s) état", + "required": false, + "pattern": "", + "nb_cols": 4, + "id": "Element_0_1583765113367", + "options": { + "enableRowSelection": true, + "enableSelectAll": true, + "enablePagination": false, + "enablePaginationControls": false, + "enableColumnMenus": false, + "enableColumnResizing": true, + "appHeader": false, + "appHeaderTitleBar": false, + "columnDefs": [], + "data": [] + }, + "form_filter_value": "id_element_bati_qualite", + "bo_filter_attr": "id_ebq", + "bo_id": "element_bati_qualite_protection" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "procedure_pluh", + "label": "procédure PLU-H", + "nb_cols": 6, + "id": "procedure_pluh" + }, + { + "type": "label", + "name": "procedure_modification", + "label": "Numéro de modification procédure", + "nb_cols": 2, + "id": "procedure_modification" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "nom_enqueteur", + "label": "Enquêteur", + "nb_cols": 12, + "id": "Element_1_1583500979694" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "date_creation_fiche", + "label": "Date de création de la fiche", + "nb_cols": 2, + "id": "Element_0_1583493674730" + }, + { + "type": "label", + "name": "date_maj", + "label": "Date de mise à jour", + "nb_cols": 2, + "id": "Element_1_1583493693844" + } + ] + }, + { + "fields": [ + { + "type": "image_wsdata", + "name": "photos", + "label": "Photo(s)", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "Element_0_1588165731143", + "multiple": true, + "displayOnly":true + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "commentaire", + "label": "Commentaires", + "nb_cols": 12, + "id": "Element_2_1583499759232" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "descriptif_commentaire", + "label": "Commentaires sur le descriptif", + "nb_cols": 12, + "id": "Element_2_1583500394559" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "commentaire_complementaire", + "label": "Commentaires complémentaires", + "nb_cols": 12, + "id": "Element_2_1583500268908" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"display_button", + "id":"display_button", + "buttons":[ + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "tabs": { + "position": "top", + "list": [ + { + "label": "Général", + "elements": [ + "display_button", + "nom_commune", + "id_bati", + "adresse", + "titre", + "descriptif", + "preconisation", + "proposition_classement_label", + "classement_au_pluh_label", + "id_ebq_pluh", + "ref_cadastre", + "niveau_classement", + "valeur", + "theme", + "typologie_tissus", + "sous_typologie_tissus", + "morphologie_batiment", + "sous_morphologie_batiment", + "photos" + ] + }, + { + "label": "Protection état", + "elements": [ + "display_button", + "protection_etat" + ] + }, + { + "label": "Détails fiche", + "elements": [ + "display_button", + "procedure_pluh", + "procedure_modification", + "date_creation_fiche", + "date_maj", + "nom_enqueteur" + ] + }, + { + "label": "Commentaires", + "elements": [ + "display_button", + "commentaire", + "commentaire_complementaire", + "descriptif_commentaire" + ] + } + ] + } + }, + "search":{ + "name":"patrimoine_saisie_patrimoine_element-form", + "title":"PATRIMOINE_SAISIE_ELEMENT", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"text", + "name":"id_bati", + "label":"Identifiant du bâti", + "required":false, + "pattern":"", + "nb_cols":2, + "id":"id_bati" + }, + { + "type":"text", + "name":"titre", + "label":"Titre", + "required":false, + "pattern":"", + "nb_cols":4, + "id":"titre" + } + ] + }, + { + "fields":[ + { + "type":"select", + "name":"code_insee", + "label":"Commune", + "required":true, + "nb_cols":3, + "id":"code_insee", + "datasource":{ + "datasource_id":"datasource_38", + "sort_order":"ASC", + "distinct":"true", + "label_key":"nom_commune", + "order_by":"nom_commune", + "id_key":"code_insee", + "attributs":"code_insee|nom_commune" + }, + "id_from":"code_insee_from" + } + ] + }, + { + "fields":[ + { + "type":"radio", + "name":"classement_au_pluh", + "label":"Classement en EBP au PLU-H", + "nb_cols":2, + "id":"classement_au_pluh", + "options":{ + "choices":[ + { + "label":"Oui", + "value":true + }, + { + "label":"Non", + "value":false + } + ] + }, + "visible": true + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-xs", + "nb_cols":12, + "name":"search_button", + "id":"search_button", + "buttons":[ + { + "type":"button", + "name":"search", + "label":"FORM_SEARCH_BUTTON", + "class":"btn-primary", + "event":"setGridFilter()" + }, + { + "type":"reset", + "name":"reset", + "label":"FORM_RESET_BUTTON", + "class":"btn-primary", + "event":"resetGridFilter()" + } + ] + } + ] + } + ], + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "search_button", + "id_bati", + "titre", + "code_insee", + "classement_au_pluh" + ] + } + ] + } + }, + "insert":{ + "name":"patrimoine_saisie_patrimoine_element-form", + "title":"PATRIMOINE_ELEMENT_TITLE_INSERT", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "number", + "name": "num_batiment", + "label": "Numéro du bâtiment", + "required":true, + "nb_cols": 2, + "id": "Element_1_1583493459156" + }, + { + "type": "text", + "name": "titre", + "label": "Titre", + "required":false, + "nb_cols": 10, + "id": "Element_3_1583493460040" + } + ] + }, + { + "fields":[ + { + "type":"textarea", + "name":"ref_cadastre", + "label":"Références cadastrales", + "required":false, + "pattern":"", + "nb_cols":12, + "id":"ref_cadastre" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "adresse", + "label": "Adresse", + "required":false, + "nb_cols": 8, + "id": "Element_2_1583493459656" + }, + { + "type":"select", + "name":"code_insee", + "label":"Commune", + "required":true, + "nb_cols":4, + "id":"code_insee", + "id_from":"code_insee_from", + "datasource":{ + "datasource_id":"datasource_commune", + "sort_order":"ASC", + "distinct":"true", + "label_key":"nom_commune", + "order_by":"nom_commune", + "id_key":"code_insee", + "attributs":"code_insee|nom_commune" + } + } + ] + }, + { + "fields":[ + { + "type":"select", + "name":"niveau_classement", + "label":"Niveau d’intérêt de l’élément bâti", + "required": false, + "nb_cols": 2, + "id":"niveau_classement", + "id_from":"niveau_classement_from", + "datasource":{ + "datasource_id":"datasource_niveau_classement", + "sort_order":"ASC", + "distinct":"true", + "label_key":"alias", + "order_by":"alias", + "id_key":"valeur", + "attributs":"valeur|alias" + } + } + ] + }, + { + "fields":[ + { + "type":"radio", + "name":"proposition_classement", + "label":"Proposition de classement au PLU-H", + "nb_cols":2, + "id":"proposition_classement", + "options":{ + "choices":[ + { + "label":"Oui", + "value":true + }, + { + "label":"Non", + "value":false + } + ] + }, + "visible": true + }, + { + "type":"radio", + "name":"classement_au_pluh", + "label":"Classement en EBP au PLU-H", + "nb_cols":2, + "id":"classement_au_pluh", + "options":{ + "choices":[ + { + "label":"Oui", + "value":true + }, + { + "label":"Non", + "value":false + } + ] + }, + "visible": true + } + ] + }, + { + "fields":[ + { + "type":"tinymce", + "name":"preconisation", + "label":"Préconisation", + "required":false, + "nb_rows":5, + "nb_cols":12, + "id":"preconisation" + } + ] + }, + { + "fields": [ + { + "type":"select", + "name":"code_procedure_pluh", + "label":"Procédure PLU-H", + "required":false, + "nb_cols":6, + "id":"code_procedure_pluh", + "id_from":"code_procedure_pluh_from", + "datasource":{ + "datasource_id":"datasource_procedure_pluh", + "sort_order":"ASC", + "distinct":"true", + "label_key":"procedure_pluh", + "order_by":"procedure_pluh", + "id_key":"code_procedure_pluh", + "attributs":"code_procedure_pluh|procedure_pluh" + } + }, + { + "type": "text", + "name": "procedure_modification", + "label": "Numéro de modification procédure", + "required":false, + "nb_cols": 2, + "id": "procedure_modification" + } + ] + }, + { + "fields":[ + { + "type":"select", + "name":"id_enqueteur", + "label":"Enquêteur", + "required":false, + "nb_cols":3, + "id":"id_enqueteur", + "id_from":"id_enqueteur", + "datasource":{ + "datasource_id":"datasource_enqueteur", + "sort_order":"ASC", + "distinct":"true", + "label_key":"nom_enqueteur", + "order_by":"nom_enqueteur", + "id_key":"id_enqueteur", + "attributs":"id_enqueteur|nom_enqueteur" + } + } + ] + }, + { + "fields":[ + { + "type":"tinymce", + "name":"descriptif", + "label":"Descriptif", + "required":false, + "nb_rows":3, + "nb_cols":12, + "id":"descriptif" + } + ] + }, + { + "fields":[ + { + "type":"select", + "name":"id_typologie_tissus", + "label":"Typologie de tissus", + "required":false, + "nb_cols":4, + "id":"id_typologie_tissus", + "id_from":"id_typologie_tissus", + "datasource":{ + "datasource_id":"datasource_typologie_tissus", + "sort_order":"ASC", + "distinct":"true", + "label_key":"typologie_tissus", + "order_by":"typologie_tissus", + "id_key":"id_typologie_tissus", + "attributs":"id_typologie_tissus|typologie_tissus" + } + }, + { + "type":"select", + "name":"id_sous_typologie_tissus", + "label":"Sous-typologie de tissus", + "required":false, + "nb_cols":5, + "id":"id_sous_typologie_tissus", + "id_from":"id_sous_typologie_tissus", + "datasource":{ + "datasource_id":"datasource_sous_typologie_tissus", + "sort_order":"ASC", + "distinct":"true", + "label_key":"sous_typologie_tissus", + "order_by":"sous_typologie_tissus", + "id_key":"id_sous_typologie_tissus", + "attributs":"id_sous_typologie_tissus|sous_typologie_tissus", + "parents":[ + { + "name":"id_typologie_tissus", + "filter_attr":"id_typologie_tissus", + "filter_equality":"=", + "wait_for_parent":true + } + ] + } + } + ] + }, + { + "fields":[ + { + "type":"select", + "name":"id_morphologie_batiment", + "label":"Morphologie du bâtiment", + "required":false, + "nb_cols":2, + "id":"id_morphologie_batiment", + "id_from":"id_morphologie_batiment", + "datasource":{ + "datasource_id":"datasource_morphologie_batiment", + "sort_order":"ASC", + "distinct":"true", + "label_key":"morphologie_batiment", + "order_by":"morphologie_batiment", + "id_key":"id_morphologie_batiment", + "attributs":"id_morphologie_batiment|morphologie_batiment" + } + }, + { + "type":"select", + "name":"id_sous_morphologie_batiment", + "label":"Sous morphologie du bâtiment", + "required":false, + "nb_cols":4, + "id":"id_sous_morphologie_batiment", + "id_from":"id_sous_morphologie_batiment", + "datasource":{ + "datasource_id":"datasource_sous_morphologie_batiment", + "sort_order":"ASC", + "distinct":"true", + "label_key":"sous_morphologie_batiment", + "order_by":"sous_morphologie_batiment", + "id_key":"id_sous_morphologie_batiment", + "attributs":"id_sous_morphologie_batiment|sous_morphologie_batiment", + "parents":[ + { + "name":"id_morphologie_batiment", + "filter_attr":"id_morphologie_batiment", + "filter_equality":"=", + "wait_for_parent":true + } + ] + } + } + ] + }, + { + "fields":[ + { + "type":"textarea", + "name":"commentaire", + "label":"Commentaires", + "required":false, + "pattern":"", + "nb_cols":12, + "id":"commentaire" + } + ] + }, + { + "fields":[ + { + "type":"textarea", + "name":"descriptif_commentaire", + "label":"Commentaires sur le descriptif", + "required":false, + "pattern":"", + "nb_cols":12, + "id":"descriptif_commentaire" + } + ] + }, + { + "fields":[ + { + "type":"textarea", + "name":"commentaire_complementaire", + "label":"Commentaires complémentaires", + "required":false, + "pattern":"", + "nb_cols":12, + "id":"commentaire_complementaire" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"insert_button", + "id":"insert_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_CREATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "initEvent": "", + "event":"sendSimpleForm()", + "afterEvent":"editSectionForm()", + "tabs": { + "position": "top", + "list": [ + { + "label": "Général", + "elements": [ + "insert_button", + "code_insee", + "num_batiment", + "adresse", + "titre", + "ref_cadastre", + "descriptif", + "niveau_classement", + "preconisation", + "proposition_classement", + "classement_au_pluh", + "valeur", + "theme", + "id_typologie_tissus", + "id_sous_typologie_tissus", + "id_morphologie_batiment", + "id_sous_morphologie_batiment" + ] + }, + { + "label": "Détails fiche", + "elements": [ + "insert_button", + "code_procedure_pluh", + "procedure_modification", + "id_enqueteur" + ] + }, + + { + "label": "Commentaires", + "elements": [ + "insert_button", + "commentaire", + "commentaire_complementaire", + "descriptif_commentaire" + ] + } + ] + } + }, + "update":{ + "name":"patrimoine_saisie_patrimoine_element-form", + "title":"PATRIMOINE_ELEMENT_TITLE_UPDATE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "label", + "name": "id_bati", + "label": "Identifiant du bati", + "required":true, + "nb_cols": 2, + "id": "Element_1_1583493459156" + }, + { + "type": "text", + "name": "titre", + "label": "Titre", + "required":false, + "nb_cols": 10, + "id": "Element_3_1583493460040" + } + ] + }, + { + "fields":[ + { + "type":"textarea", + "name":"ref_cadastre", + "label":"Références cadastrales", + "required":false, + "pattern":"", + "nb_cols":12, + "id":"ref_cadastre" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "adresse", + "label": "Adresse", + "required":false, + "nb_cols": 8, + "id": "Element_2_1583493459656" + }, + { + "type":"select", + "name":"code_insee", + "label":"Commune", + "required":true, + "nb_cols":4, + "id":"code_insee", + "id_from":"code_insee_from", + "datasource":{ + "datasource_id":"datasource_commune", + "sort_order":"ASC", + "distinct":"true", + "label_key":"nom_commune", + "order_by":"nom_commune", + "id_key":"code_insee", + "attributs":"code_insee|nom_commune" + } + } + ] + }, + { + "fields":[ + { + "type":"select", + "name":"niveau_classement", + "label":"Niveau d’intérêt de l’élément bâti", + "required": false, + "nb_cols": 2, + "id":"niveau_classement", + "id_from":"niveau_classement_from", + "datasource":{ + "datasource_id":"datasource_niveau_classement", + "sort_order":"ASC", + "distinct":"true", + "label_key":"alias", + "order_by":"alias", + "id_key":"valeur", + "attributs":"valeur|alias" + } + } + ] + }, + { + "fields":[ + { + "type":"radio", + "name":"proposition_classement", + "label":"Proposition de classement au PLU-H", + "nb_cols":2, + "id":"proposition_classement", + "options":{ + "choices":[ + { + "label":"Oui", + "value":true + }, + { + "label":"Non", + "value":false + } + ] + }, + "visible": true + }, + { + "type":"radio", + "name":"classement_au_pluh", + "label":"Classement en EBP au PLU-H", + "nb_cols":2, + "id":"classement_au_pluh", + "options":{ + "choices":[ + { + "label":"Oui", + "value":true + }, + { + "label":"Non", + "value":false + } + ] + }, + "visible": true + }, + { + "type": "label", + "name": "id_ebq_pluh", + "label": "Identifiant EBP au PLU-H", + "nb_cols": 2, + "id": "Element_1_1583501767205" + } + ] + }, + { + "fields": [ + { + "type":"select", + "name":"code_procedure_pluh", + "label":"Procédure PLU-H", + "required":false, + "nb_cols":6, + "id":"code_procedure_pluh", + "id_from":"code_procedure_pluh_from", + "datasource":{ + "datasource_id":"datasource_procedure_pluh", + "sort_order":"ASC", + "distinct":"true", + "label_key":"procedure_pluh", + "order_by":"procedure_pluh", + "id_key":"code_procedure_pluh", + "attributs":"code_procedure_pluh|procedure_pluh" + } + }, + { + "type": "text", + "name": "procedure_modification", + "label": "Numéro de modification procédure", + "required":false, + "nb_cols": 2, + "id": "procedure_modification" + } + ] + }, + { + "fields":[ + { + "type":"select", + "name":"id_enqueteur", + "label":"Enquêteur", + "required":false, + "nb_cols":3, + "id":"id_enqueteur", + "id_from":"id_enqueteur", + "datasource":{ + "datasource_id":"datasource_enqueteur", + "sort_order":"ASC", + "distinct":"true", + "label_key":"nom_enqueteur", + "order_by":"nom_enqueteur", + "id_key":"id_enqueteur", + "attributs":"id_enqueteur|nom_enqueteur" + } + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "date_creation_fiche", + "label": "Date de création de la fiche", + "nb_cols": 2, + "id": "Element_0_1583493674730" + }, + { + "type": "label", + "name": "date_maj", + "label": "Date de mise à jour", + "nb_cols": 2, + "id": "Element_1_1583493693844" + } + ] + }, + { + "fields":[ + { + "type":"tinymce", + "name":"descriptif", + "label":"Descriptif", + "required":false, + "nb_rows":3, + "nb_cols":12, + "id":"descriptif" + } + ] + }, + { + "fields": [ + { + "type": "double_select", + "name": "valeurs", + "label": "Valeurs de l'élément", + "required": false, + "nb_cols": 5, + "id": "Element_0_4_1", + "name_to": "valeurs", + "name_from": "valeurs_from", + "size": 5, + "label_from": "valeurs non associées", + "label_to": "valeurs associées à l'élément", + "web_service": { + "ressource_id": "patrimoine/valeurs", + "id_key": "id_valeur", + "label_key": "valeur", + "parameters": { + "order_by": "valeur" + } + } + } + ] + }, + { + "fields":[ + { + "type":"tinymce", + "name":"preconisation", + "label":"Préconisation", + "required":false, + "nb_rows":5, + "nb_cols":12, + "id":"preconisation" + } + ] + }, + { + "fields": [ + { + "type": "double_select", + "name": "themes", + "label": "Thèmes du périmètre", + "required": false, + "nb_cols": 4, + "id": "Element_0_4_1", + "name_to": "themes", + "name_from": "themes_from", + "size": 6, + "label_from": "thèmes non associés", + "label_to": "thèmes associés à l'élément", + "web_service": { + "ressource_id": "patrimoine/themes", + "id_key": "id_theme", + "label_key": "theme", + "parameters": { + "order_by": "theme" + } + } + } + ] + }, + { + "fields":[ + { + "type":"select", + "name":"id_typologie_tissus", + "label":"Typologie de tissus", + "required":false, + "nb_cols":4, + "id":"id_typologie_tissus", + "id_from":"id_typologie_tissus", + "datasource":{ + "datasource_id":"datasource_typologie_tissus", + "sort_order":"ASC", + "distinct":"true", + "label_key":"typologie_tissus", + "order_by":"typologie_tissus", + "id_key":"id_typologie_tissus", + "attributs":"id_typologie_tissus|typologie_tissus" + } + }, + { + "type":"select", + "name":"id_sous_typologie_tissus", + "label":"Sous-typologie de tissus", + "required":false, + "nb_cols":5, + "id":"id_sous_typologie_tissus", + "id_from":"id_sous_typologie_tissus", + "datasource":{ + "datasource_id":"datasource_sous_typologie_tissus", + "sort_order":"ASC", + "distinct":"true", + "label_key":"sous_typologie_tissus", + "order_by":"sous_typologie_tissus", + "id_key":"id_sous_typologie_tissus", + "attributs":"id_sous_typologie_tissus|sous_typologie_tissus", + "parents":[ + { + "name":"id_typologie_tissus", + "filter_attr":"id_typologie_tissus", + "filter_equality":"=", + "wait_for_parent":true + } + ] + } + } + ] + }, + { + "fields":[ + { + "type":"select", + "name":"id_morphologie_batiment", + "label":"Morphologie du bâtiment", + "required":false, + "nb_cols":2, + "id":"id_morphologie_batiment", + "id_from":"id_morphologie_batiment", + "datasource":{ + "datasource_id":"datasource_morphologie_batiment", + "sort_order":"ASC", + "distinct":"true", + "label_key":"morphologie_batiment", + "order_by":"morphologie_batiment", + "id_key":"id_morphologie_batiment", + "attributs":"id_morphologie_batiment|morphologie_batiment" + } + }, + { + "type":"select", + "name":"id_sous_morphologie_batiment", + "label":"Sous morphologie du bâtiment", + "required":false, + "nb_cols":4, + "id":"id_sous_morphologie_batiment", + "id_from":"id_sous_morphologie_batiment", + "datasource":{ + "datasource_id":"datasource_sous_morphologie_batiment", + "sort_order":"ASC", + "distinct":"true", + "label_key":"sous_morphologie_batiment", + "order_by":"sous_morphologie_batiment", + "id_key":"id_sous_morphologie_batiment", + "attributs":"id_sous_morphologie_batiment|sous_morphologie_batiment", + "parents":[ + { + "name":"id_morphologie_batiment", + "filter_attr":"id_morphologie_batiment", + "filter_equality":"=", + "wait_for_parent":true + } + ] + } + } + ] + }, + { + "fields": [ + { + "type": "double_select", + "name": "protection_etats", + "label": "Protections état de l'élément", + "required": false, + "nb_cols": 6, + "id": "Element_0_4_1", + "name_to": "protection_etats", + "name_from": "protection_etats_from", + "size": 6, + "label_from": "protections état non associées", + "label_to": "protections état associées à l'élément", + "web_service": { + "ressource_id": "patrimoine/protection_etats", + "id_key": "id_protection_etat", + "label_key": "protection_etat", + "parameters": { + "order_by": "protection_etat" + } + } + } + ] + }, + { + "fields": [ + { + "type": "image_wsdata", + "name": "photos", + "label": "Photo(s)", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "Element_0_1588165731143", + "multiple": true + } + ] + }, + { + "fields":[ + { + "type":"textarea", + "name":"commentaire", + "label":"Commentaires", + "required":false, + "pattern":"", + "nb_cols":12, + "id":"commentaire" + } + ] + }, + { + "fields":[ + { + "type":"textarea", + "name":"descriptif_commentaire", + "label":"Commentaires sur le descriptif", + "required":false, + "pattern":"", + "nb_cols":12, + "id":"descriptif_commentaire" + } + ] + }, + { + "fields":[ + { + "type":"textarea", + "name":"commentaire_complementaire", + "label":"Commentaires complémentaires", + "required":false, + "pattern":"", + "nb_cols":12, + "id":"commentaire_complementaire" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"update_button", + "id":"update_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_UPDATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "initEvent": "", + "event":"sendSimpleForm()", + "tabs": { + "position": "top", + "list": [ + { + "label": "Général", + "elements": [ + "update_button", + "code_insee", + "id_bati", + "adresse", + "titre", + "descriptif", + "niveau_classement", + "ref_cadastre", + "preconisation", + "proposition_classement", + "classement_au_pluh", + "id_ebq_pluh", + "valeurs", + "themes", + "id_typologie_tissus", + "id_sous_typologie_tissus", + "id_morphologie_batiment", + "id_sous_morphologie_batiment", + "photos" + ] + }, + { + "label": "Protection état", + "elements": [ + "update_button", + "protection_etats" + ] + }, + { + "label": "Détails fiche", + "elements": [ + "update_button", + "code_procedure_pluh", + "procedure_modification", + "id_enqueteur", + "date_creation_fiche", + "date_maj" + ] + }, + { + "label": "Commentaires", + "elements": [ + "update_button", + "commentaire", + "commentaire_complementaire", + "descriptif_commentaire" + ] + } + ] + } + }, + "datasources":{ + "datasource_classification_qualite":{ + "type":"web_service", + "dataType":"tableValue", + "name":"classification_qualite", + "description":"", + "parameters":{ + "schema":"patrimoine", + "table":"classification_type_qualite" + }, + "ressource_id":"vitis/genericquerys", + "id":"datasource_classification_qualite" + }, + "datasource_enqueteur":{ + "type":"web_service", + "dataType":"tableValue", + "name":"enqueteur", + "description":"", + "parameters":{ + "schema":"patrimoine", + "table":"enqueteur" + }, + "ressource_id":"vitis/genericquerys", + "id":"datasource_enqueteur" + }, + "datasource_typologie_tissus":{ + "type":"web_service", + "dataType":"tableValue", + "name":"typologie_tissus", + "description":"", + "parameters":{ + "schema":"patrimoine", + "table":"typologie_tissus" + }, + "ressource_id":"vitis/genericquerys", + "id":"datasource_typologie_tissus" + }, + "datasource_sous_typologie_tissus":{ + "type":"web_service", + "dataType":"tableValue", + "name":"sous_typologie_tissus", + "description":"", + "parameters":{ + "schema":"patrimoine", + "table":"sous_typologie_tissus" + }, + "ressource_id":"vitis/genericquerys", + "id":"datasource_sous_typologie_tissus" + }, + "datasource_morphologie_batiment":{ + "type":"web_service", + "dataType":"tableValue", + "name":"morphologie_batiment", + "description":"", + "parameters":{ + "schema":"patrimoine", + "table":"morphologie_batiment" + }, + "ressource_id":"vitis/genericquerys", + "id":"datasource_morphologie_batiment" + }, + "datasource_sous_morphologie_batiment":{ + "type":"web_service", + "dataType":"tableValue", + "name":"sous_morphologie_batiment", + "description":"", + "parameters":{ + "schema":"patrimoine", + "table":"sous_morphologie_batiment" + }, + "ressource_id":"vitis/genericquerys", + "id":"datasource_sous_morphologie_batiment" + }, + "datasource_commune":{ + "type":"web_service", + "dataType":"tableValue", + "name":"commune", + "description":"", + "parameters":{ + "schema":"patrimoine", + "table":"commune" + }, + "ressource_id":"vitis/genericquerys", + "id":"datasource_commune" + }, + "datasource_niveau_classement":{ + "type":"web_service", + "dataType":"tableValue", + "name":"niveau_classement", + "description":"", + "parameters":{ + "schema":"patrimoine", + "table":"param_liste", + "filter": {"id_nom_table": "element_bati_qualite", "nom_liste": "niveau_classement"} + }, + "ressource_id":"vitis/genericquerys" + }, + "datasource_procedure_pluh":{ + "type":"web_service", + "dataType":"tableValue", + "name":"procedure_pluh", + "description":"", + "parameters":{ + "schema":"patrimoine", + "table":"procedure_pluh" + }, + "ressource_id":"vitis/genericquerys", + "id":"datasource_procedure_pluh" + } + } +} diff --git a/src/module_patrimoine/module/forms/patrimoine_saisie/patrimoine_saisie_patrimoine_perimetre.json b/src/module_patrimoine/module/forms/patrimoine_saisie/patrimoine_saisie_patrimoine_perimetre.json new file mode 100644 index 0000000000000000000000000000000000000000..152728019af94678bd4c0404246f35dc6d173bd0 --- /dev/null +++ b/src/module_patrimoine/module/forms/patrimoine_saisie/patrimoine_saisie_patrimoine_perimetre.json @@ -0,0 +1,1399 @@ +{ + "display":{ + "name":"patrimoine_saisie_patrimoine_perimetre-form", + "title":"PATRIMOINE_PERIMETRE_TITLE_DISPLAY", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "label", + "name": "nom_commune", + "label": "Commune", + "nb_cols": 4, + "id": "Element_0_1583493456078" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "id_ensemble", + "label": "Identifiant de l'ensemble", + "nb_cols": 2, + "id": "Element_1_1583493459156" + }, + { + "type": "label", + "name": "titre", + "label": "Titre", + "nb_cols": 10, + "id": "Element_3_1583493460040" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "localisation", + "label": "Localisation", + "nb_cols": 8, + "id": "Element_2_1583493459656" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "classification_qualite", + "label": "Justification du niveau de qualité", + "nb_cols": 12, + "id": "Element_0_1583500976468" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "typologie_tissus", + "label": "Typologie de tissus", + "nb_cols": 6, + "id": "Element_0_1583499754397" + }, + { + "type": "label", + "name": "sous_typologie_tissus", + "label": "Sous-typologie de tissus", + "nb_cols": 6, + "id": "Element_1_1583499757263" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "proposition_classement_label", + "label": "Proposition au classement", + "nb_cols": 2, + "id": "Element_0_1583501763160" + }, + { + "type": "label", + "name": "classement_au_pluh_label", + "label": "Classement en PIP au PLU-H", + "nb_cols": 2, + "id": "Element_1_1583501767205" + }, + { + "type": "label", + "name": "id_pip_pluh", + "label": "Identifiant PIP au PLU-H", + "nb_cols": 2, + "id": "Element_1_1583501767205" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "procedure_pluh", + "label": "procédure PLU-H", + "nb_cols": 6, + "id": "procedure_pluh" + }, + { + "type": "label", + "name": "procedure_modification", + "label": "Numéro de modification procédure", + "nb_cols": 2, + "id": "procedure_modification" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "nom_enqueteur", + "label": "Enquêteur", + "nb_cols": 12, + "id": "Element_1_1583500979694" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "date_creation_fiche", + "label": "Date de création de la fiche", + "nb_cols": 2, + "id": "Element_0_1583493674730" + }, + { + "type": "label", + "name": "date_maj", + "label": "Date de mise à jour", + "nb_cols": 2, + "id": "Element_1_1583493693844" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "descriptif", + "label": "Descriptif", + "nb_cols": 12, + "id": "Element_0_1583500264734" + } + ] + }, + { + "fields": [ + { + "type": "bo_grid", + "name": "valeur", + "label": "Valeur(s)", + "required": false, + "pattern": "", + "nb_cols": 4, + "id": "Element_0_1583769359221", + "options": { + "enableRowSelection": true, + "enableSelectAll": true, + "enablePagination": false, + "enablePaginationControls": false, + "enableColumnMenus": false, + "enableColumnResizing": true, + "appHeader": false, + "appHeaderTitleBar": false, + "columnDefs": [], + "data": [] + }, + "bo_filter_attr": "id_epq", + "form_filter_value": "id_perimetre_porteur_qualite", + "bo_id": "perimetre_porteur_qualite_valeur" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "preconisation", + "label": "Préconisation", + "nb_cols": 12, + "id": "Element_1_1583501124119" + } + ] + }, + { + "fields": [ + { + "type": "bo_grid", + "name": "protection_etat", + "label": "Protection(s) état", + "required": false, + "pattern": "", + "nb_cols": 4, + "id": "Element_1_1583769360103", + "options": { + "enableRowSelection": true, + "enableSelectAll": true, + "enablePagination": false, + "enablePaginationControls": false, + "enableColumnMenus": false, + "enableColumnResizing": true, + "appHeader": false, + "appHeaderTitleBar": false, + "columnDefs": [], + "data": [] + }, + "form_filter_value": "id_perimetre_porteur_qualite", + "bo_filter_attr": "id_epq", + "bo_id": "perimetre_porteur_qualite_protec" + } + ] + }, + { + "fields": [ + { + "type": "image_wsdata", + "name": "photos", + "label": "Photo(s)", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "Element_0_1588165731143", + "multiple": true, + "displayOnly":true + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "commentaire", + "label": "Commentaires", + "nb_cols": 12, + "id": "Element_2_1583499759232" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "commentaire_titre", + "label": "Commentaires sur le titre", + "nb_cols": 12, + "id": "Element_1_1583500266645" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "descriptif_commentaire", + "label": "Commentaires sur le descriptif", + "nb_cols": 12, + "id": "Element_2_1583500394559" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "commentaire_complementaire", + "label": "Commentaires complémentaires", + "nb_cols": 12, + "id": "Element_2_1583500268908" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"display_button", + "id":"display_button", + "buttons":[ + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "tabs": { + "position": "top", + "list": [ + { + "label": "Général", + "elements": [ + "display_button", + "nom_commune", + "id_ensemble", + "localisation", + "titre", + "descriptif", + "classification_qualite", + "typologie_tissus", + "sous_typologie_tissus", + "preconisation", + "proposition_classement_label", + "classement_au_pluh_label", + "id_pip_pluh", + "valeur", + "photos" + ] + }, + { + "label": "Protection état", + "elements": [ + "display_button", + "protection_etat" + ] + }, + { + "label": "Détails fiche", + "elements": [ + "nom_enqueteur", + "date_creation_fiche", + "date_maj", + "procedure_modification", + "procedure_pluh" + ] + }, + { + "label": "Commentaires", + "elements": [ + "display_button", + "commentaire", + "commentaire_titre", + "commentaire_complementaire", + "descriptif_commentaire" + ] + } + ] + } + }, + "search":{ + "name":"patrimoine_saisie_patrimoine_perimetre-form", + "title":"PATRIMOINE_SAISIE_PERIMETRE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"text", + "name":"id_ensemble", + "label":"Identifiant de l'élément", + "required":false, + "pattern":"", + "nb_cols":2, + "id":"id_ensemble" + }, + { + "type":"text", + "name":"titre", + "label":"Titre", + "required":false, + "pattern":"", + "nb_cols":4, + "id":"titre" + } + ] + }, + { + "fields":[ + { + "type":"select", + "name":"code_insee", + "label":"Commune", + "required":true, + "nb_cols":3, + "id":"code_insee", + "datasource":{ + "datasource_id":"datasource_38", + "sort_order":"ASC", + "distinct":"true", + "label_key":"nom_commune", + "order_by":"nom_commune", + "id_key":"code_insee", + "attributs":"code_insee|nom_commune" + }, + "id_from":"code_insee_from" + } + ] + }, + { + "fields":[ + { + "type":"radio", + "name":"classement_au_pluh", + "label":"Classement en PIP au PLU-H", + "nb_cols":2, + "id":"classement_au_pluh", + "options":{ + "choices":[ + { + "label":"Oui", + "value":true + }, + { + "label":"Non", + "value":false + } + ] + }, + "visible": true + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-xs", + "nb_cols":12, + "name":"search_button", + "id":"search_button", + "buttons":[ + { + "type":"button", + "name":"search", + "label":"FORM_SEARCH_BUTTON", + "class":"btn-primary", + "event":"setGridFilter()" + }, + { + "type":"reset", + "name":"reset", + "label":"FORM_RESET_BUTTON", + "class":"btn-primary", + "event":"resetGridFilter()" + } + ] + } + ] + } + ], + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "search_button", + "id_ensemble", + "titre", + "code_insee", + "classement_au_pluh" + ] + } + ] + } + }, + "insert":{ + "name":"patrimoine_saisie_patrimoine_perimetre-form", + "title":"PATRIMOINE_PERIMETRE_TITLE_INSERT", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type":"select", + "name":"code_insee", + "label":"Commune", + "required":true, + "nb_cols":4, + "id":"code_insee", + "id_from":"code_insee_from", + "datasource":{ + "datasource_id":"datasource_commune", + "sort_order":"ASC", + "distinct":"true", + "label_key":"nom_commune", + "order_by":"nom_commune", + "id_key":"code_insee", + "attributs":"code_insee|nom_commune" + } + } + ] + }, + { + "fields": [ + { + "type": "number", + "name": "num_ensemble", + "label": "Numéro de l'ensemble", + "required":true, + "nb_cols": 2, + "id": "Element_1_1583493459156" + }, + { + "type": "text", + "name": "titre", + "label": "Titre", + "required":false, + "nb_cols": 10, + "id": "Element_3_1583493460040" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "localisation", + "label": "Localisation", + "required":false, + "nb_cols": 8, + "id": "Element_2_1583493459656" + } + ] + }, + { + "fields":[ + { + "type":"select", + "name":"id_classification_qualite", + "label":"Justification du niveau de qualité", + "required":true, + "nb_cols":4, + "id":"id_classification_qualite", + "id_from":"id_classification_qualite_from", + "datasource":{ + "datasource_id":"datasource_classification_qualite", + "sort_order":"ASC", + "distinct":"true", + "label_key":"classification_qualite", + "order_by":"classification_qualite", + "id_key":"id_classification_qualite", + "attributs":"id_classification_qualite|classification_qualite" + } + } + ] + }, + { + "fields":[ + { + "type":"tinymce", + "name":"preconisation", + "label":"Préconisation", + "required":false, + "nb_rows":5, + "nb_cols":12, + "id":"preconisation" + } + ] + }, + { + "fields":[ + { + "type":"radio", + "name":"proposition_classement", + "label":"Proposition au classement", + "nb_cols":2, + "id":"proposition_classement", + "options":{ + "choices":[ + { + "label":"Oui", + "value":true + }, + { + "label":"Non", + "value":false + } + ] + }, + "visible": true + }, + { + "type":"radio", + "name":"classement_au_pluh", + "label":"Classement en PIP au PLU-H", + "nb_cols":2, + "id":"classement_au_pluh", + "options":{ + "choices":[ + { + "label":"Oui", + "value":true + }, + { + "label":"Non", + "value":false + } + ] + }, + "visible": true + } + ] + }, + { + "fields": [ + { + "type":"select", + "name":"code_procedure_pluh", + "label":"Procédure PLU-H", + "required":false, + "nb_cols":6, + "id":"code_procedure_pluh", + "id_from":"code_procedure_pluh_from", + "datasource":{ + "datasource_id":"datasource_procedure_pluh", + "sort_order":"ASC", + "distinct":"true", + "label_key":"procedure_pluh", + "order_by":"procedure_pluh", + "id_key":"code_procedure_pluh", + "attributs":"code_procedure_pluh|procedure_pluh" + } + }, + { + "type": "text", + "name": "procedure_modification", + "label": "Numéro de modification procédure", + "required":false, + "nb_cols": 2, + "id": "procedure_modification" + } + ] + }, + { + "fields":[ + { + "type":"select", + "name":"id_enqueteur", + "label":"Enquêteur", + "required":false, + "nb_cols":3, + "id":"id_enqueteur", + "id_from":"id_enqueteur", + "datasource":{ + "datasource_id":"datasource_enqueteur", + "sort_order":"ASC", + "distinct":"true", + "label_key":"nom_enqueteur", + "order_by":"nom_enqueteur", + "id_key":"id_enqueteur", + "attributs":"id_enqueteur|nom_enqueteur" + } + } + ] + }, + { + "fields":[ + { + "type":"tinymce", + "name":"descriptif", + "label":"Descriptif", + "required":false, + "nb_rows":3, + "nb_cols":12, + "id":"descriptif" + } + ] + }, + { + "fields":[ + { + "type":"select", + "name":"id_typologie_tissus", + "label":"Typologie de tissus", + "required":false, + "nb_cols":4, + "id":"id_typologie_tissus", + "id_from":"id_typologie_tissus", + "datasource":{ + "datasource_id":"datasource_typologie_tissus", + "sort_order":"ASC", + "distinct":"true", + "label_key":"typologie_tissus", + "order_by":"typologie_tissus", + "id_key":"id_typologie_tissus", + "attributs":"id_typologie_tissus|typologie_tissus" + } + }, + { + "type":"select", + "name":"id_sous_typologie_tissus", + "label":"Sous-typologie de tissus", + "required":false, + "nb_cols":5, + "id":"id_sous_typologie_tissus", + "id_from":"id_sous_typologie_tissus", + "datasource":{ + "datasource_id":"datasource_sous_typologie_tissus", + "sort_order":"ASC", + "distinct":"true", + "label_key":"sous_typologie_tissus", + "order_by":"sous_typologie_tissus", + "id_key":"id_sous_typologie_tissus", + "attributs":"id_sous_typologie_tissus|sous_typologie_tissus", + "parents":[ + { + "name":"id_typologie_tissus", + "filter_attr":"id_typologie_tissus", + "filter_equality":"=", + "wait_for_parent":true + } + ] + } + } + ] + }, + { + "fields":[ + { + "type":"textarea", + "name":"commentaire", + "label":"Commentaires", + "required":false, + "pattern":"", + "nb_cols":12, + "id":"commentaire" + } + ] + }, + { + "fields":[ + { + "type":"textarea", + "name":"commentaire_titre", + "label":"Commentaires sur le titre", + "required":false, + "pattern":"", + "nb_cols":12, + "id":"commentaire_titre" + } + ] + }, + { + "fields":[ + { + "type":"textarea", + "name":"descriptif_commentaire", + "label":"Commentaires sur le descriptif", + "required":false, + "pattern":"", + "nb_cols":12, + "id":"descriptif_commentaire" + } + ] + }, + { + "fields":[ + { + "type":"textarea", + "name":"commentaire_complementaire", + "label":"Commentaires complémentaires", + "required":false, + "pattern":"", + "nb_cols":12, + "id":"commentaire_complementaire" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"insert_button", + "id":"insert_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_CREATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "initEvent": "", + "event":"sendSimpleForm()", + "afterEvent":"editSectionForm()", + "tabs": { + "position": "top", + "list": [ + { + "label": "Général", + "elements": [ + "insert_button", + "code_insee", + "num_ensemble", + "localisation", + "titre", + "descriptif", + "id_classification_qualite", + "id_typologie_tissus", + "id_sous_typologie_tissus", + "preconisation", + "proposition_classement", + "classement_au_pluh", + "valeur" + ] + }, + { + "label": "Détails fiche", + "elements": [ + "id_enqueteur", + "date_creation_fiche", + "date_maj", + "procedure_modification", + "code_procedure_pluh" + ] + }, + { + "label": "Commentaires", + "elements": [ + "insert_button", + "commentaire", + "commentaire_titre", + "commentaire_complementaire", + "descriptif_commentaire" + ] + } + ] + } + }, + "update":{ + "name":"patrimoine_saisie_patrimoine_perimetre-form", + "title":"PATRIMOINE_PERIMETRE_TITLE_UPDATE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "label", + "name": "id_ensemble", + "label": "Identifiant de l'ensemble", + "required":true, + "nb_cols": 2, + "id": "Element_1_1583493459156" + }, + { + "type": "text", + "name": "titre", + "label": "Titre", + "required":false, + "nb_cols": 10, + "id": "Element_3_1583493460040" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "localisation", + "label": "Localisation", + "required":false, + "nb_cols": 8, + "id": "Element_2_1583493459656" + }, + { + "type":"select", + "name":"code_insee", + "label":"Commune", + "required":true, + "nb_cols":4, + "id":"code_insee", + "id_from":"code_insee_from", + "datasource":{ + "datasource_id":"datasource_commune", + "sort_order":"ASC", + "distinct":"true", + "label_key":"nom_commune", + "order_by":"nom_commune", + "id_key":"code_insee", + "attributs":"code_insee|nom_commune" + } + } + ] + }, + { + "fields":[ + { + "type":"select", + "name":"id_classification_qualite", + "label":"Justification du niveau de qualité", + "required":true, + "nb_cols":4, + "id":"id_classification_qualite", + "id_from":"id_classification_qualite_from", + "datasource":{ + "datasource_id":"datasource_classification_qualite", + "sort_order":"ASC", + "distinct":"true", + "label_key":"classification_qualite", + "order_by":"classification_qualite", + "id_key":"id_classification_qualite", + "attributs":"id_classification_qualite|classification_qualite" + } + } + ] + }, + { + "fields":[ + { + "type":"select", + "name":"id_typologie_tissus", + "label":"Typologie de tissus", + "required":false, + "nb_cols":4, + "id":"id_typologie_tissus", + "id_from":"id_typologie_tissus", + "datasource":{ + "datasource_id":"datasource_typologie_tissus", + "sort_order":"ASC", + "distinct":"true", + "label_key":"typologie_tissus", + "order_by":"typologie_tissus", + "id_key":"id_typologie_tissus", + "attributs":"id_typologie_tissus|typologie_tissus" + } + }, + { + "type":"select", + "name":"id_sous_typologie_tissus", + "label":"Sous-typologie de tissus", + "required":false, + "nb_cols":5, + "id":"id_sous_typologie_tissus", + "id_from":"id_sous_typologie_tissus", + "datasource":{ + "datasource_id":"datasource_sous_typologie_tissus", + "sort_order":"ASC", + "distinct":"true", + "label_key":"sous_typologie_tissus", + "order_by":"sous_typologie_tissus", + "id_key":"id_sous_typologie_tissus", + "attributs":"id_sous_typologie_tissus|sous_typologie_tissus", + "parents":[ + { + "name":"id_typologie_tissus", + "filter_attr":"id_typologie_tissus", + "filter_equality":"=", + "wait_for_parent":true + } + ] + } + } + ] + }, + { + "fields":[ + { + "type":"tinymce", + "name":"preconisation", + "label":"Préconisation", + "required":false, + "nb_rows":5, + "nb_cols":12, + "id":"preconisation" + } + ] + }, + { + "fields":[ + { + "type":"radio", + "name":"proposition_classement", + "label":"Proposition au classement", + "nb_cols":2, + "id":"proposition_classement", + "options":{ + "choices":[ + { + "label":"Oui", + "value":true + }, + { + "label":"Non", + "value":false + } + ] + }, + "visible": true + }, + { + "type":"radio", + "name":"classement_au_pluh", + "label":"Classement en PIP au PLU-H", + "nb_cols":2, + "id":"classement_au_pluh", + "options":{ + "choices":[ + { + "label":"Oui", + "value":true + }, + { + "label":"Non", + "value":false + } + ] + }, + "visible": true + } + ] + }, + { + "fields": [ + { + "type":"select", + "name":"code_procedure_pluh", + "label":"Procédure PLU-H", + "required":false, + "nb_cols":6, + "id":"code_procedure_pluh", + "id_from":"code_procedure_pluh_from", + "datasource":{ + "datasource_id":"datasource_procedure_pluh", + "sort_order":"ASC", + "distinct":"true", + "label_key":"procedure_pluh", + "order_by":"procedure_pluh", + "id_key":"code_procedure_pluh", + "attributs":"code_procedure_pluh|procedure_pluh" + } + }, + { + "type": "text", + "name": "procedure_modification", + "label": "Numéro de modification procédure", + "required":false, + "nb_cols": 2, + "id": "procedure_modification" + } + ] + }, + { + "fields":[ + { + "type":"select", + "name":"id_enqueteur", + "label":"Enquêteur", + "required":false, + "nb_cols":3, + "id":"id_enqueteur", + "id_from":"id_enqueteur", + "datasource":{ + "datasource_id":"datasource_enqueteur", + "sort_order":"ASC", + "distinct":"true", + "label_key":"nom_enqueteur", + "order_by":"nom_enqueteur", + "id_key":"id_enqueteur", + "attributs":"id_enqueteur|nom_enqueteur" + } + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "date_creation_fiche", + "label": "Date de création de la fiche", + "nb_cols": 2, + "id": "Element_0_1583493674730" + }, + { + "type": "label", + "name": "date_maj", + "label": "Date de mise à jour", + "nb_cols": 2, + "id": "Element_1_1583493693844" + } + ] + }, + { + "fields":[ + { + "type":"tinymce", + "name":"descriptif", + "label":"Descriptif", + "required":false, + "nb_rows":3, + "nb_cols":12, + "id":"descriptif" + } + ] + }, + { + "fields": [ + { + "type": "double_select", + "name": "valeurs", + "label": "Valeurs du périmètre", + "required": false, + "nb_cols": 5, + "id": "Element_0_4_1", + "name_to": "valeurs", + "name_from": "valeurs_from", + "size": 5, + "label_from": "valeurs non associées", + "label_to": "valeurs associées au périmètre", + "web_service": { + "ressource_id": "patrimoine/valeurs", + "id_key": "id_valeur", + "label_key": "valeur", + "parameters": { + "order_by": "valeur" + } + } + } + ] + }, + { + "fields": [ + { + "type": "double_select", + "name": "protection_etats", + "label": "Protections état du périmètre", + "required": false, + "nb_cols": 6, + "id": "Element_0_4_1", + "name_to": "protection_etats", + "name_from": "protection_etats_from", + "size": 6, + "label_from": "protections état non associées", + "label_to": "protections état associées au périmètre", + "web_service": { + "ressource_id": "patrimoine/protection_etats", + "id_key": "id_protection_etat", + "label_key": "protection_etat", + "parameters": { + "order_by": "protection_etat" + } + } + } + ] + }, + { + "fields": [ + { + "type": "image_wsdata", + "name": "photos", + "label": "Photo(s)", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "Element_0_1588165731143", + "multiple": true, + "displayOnly":false + } + ] + }, + { + "fields":[ + { + "type":"textarea", + "name":"commentaire", + "label":"Commentaires", + "required":false, + "pattern":"", + "nb_cols":12, + "id":"commentaire" + } + ] + }, + { + "fields":[ + { + "type":"textarea", + "name":"commentaire_titre", + "label":"Commentaires sur le titre", + "required":false, + "pattern":"", + "nb_cols":12, + "id":"commentaire_titre" + } + ] + }, + { + "fields":[ + { + "type":"textarea", + "name":"descriptif_commentaire", + "label":"Commentaires sur le descriptif", + "required":false, + "pattern":"", + "nb_cols":12, + "id":"descriptif_commentaire" + } + ] + }, + { + "fields":[ + { + "type":"textarea", + "name":"commentaire_complementaire", + "label":"Commentaires complémentaires", + "required":false, + "pattern":"", + "nb_cols":12, + "id":"commentaire_complementaire" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"update_button", + "id":"update_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_UPDATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "initEvent": "", + "event":"sendSimpleForm()", + "tabs": { + "position": "top", + "list": [ + { + "label": "Général", + "elements": [ + "update_button", + "code_insee", + "id_ensemble", + "localisation", + "titre", + "descriptif", + "id_classification_qualite", + "id_typologie_tissus", + "id_sous_typologie_tissus", + "preconisation", + "proposition_classement", + "classement_au_pluh", + "id_pip_pluh", + "valeurs", + "photos" + ] + }, + { + "label": "Protection état", + "elements": [ + "display_button", + "protection_etats" + ] + }, + { + "label": "Détails fiche", + "elements": [ + "id_enqueteur", + "date_creation_fiche", + "date_maj", + "procedure_modification", + "code_procedure_pluh" + ] + }, + { + "label": "Commentaires", + "elements": [ + "update_button", + "commentaire", + "commentaire_titre", + "commentaire_complementaire", + "descriptif_commentaire" + ] + } + ] + } + }, + "datasources":{ + "datasource_classification_qualite":{ + "type":"web_service", + "dataType":"tableValue", + "name":"classification_qualite", + "description":"", + "parameters":{ + "schema":"patrimoine", + "table":"classification_type_qualite" + }, + "ressource_id":"vitis/genericquerys", + "id":"datasource_classification_qualite" + }, + "datasource_enqueteur":{ + "type":"web_service", + "dataType":"tableValue", + "name":"enqueteur", + "description":"", + "parameters":{ + "schema":"patrimoine", + "table":"enqueteur" + }, + "ressource_id":"vitis/genericquerys", + "id":"datasource_enqueteur" + }, + "datasource_typologie_tissus":{ + "type":"web_service", + "dataType":"tableValue", + "name":"typologie_tissus", + "description":"", + "parameters":{ + "schema":"patrimoine", + "table":"typologie_tissus" + }, + "ressource_id":"vitis/genericquerys", + "id":"datasource_typologie_tissus" + }, + "datasource_sous_typologie_tissus":{ + "type":"web_service", + "dataType":"tableValue", + "name":"sous_typologie_tissus", + "description":"", + "parameters":{ + "schema":"patrimoine", + "table":"sous_typologie_tissus" + }, + "ressource_id":"vitis/genericquerys", + "id":"datasource_sous_typologie_tissus" + }, + "datasource_commune":{ + "type":"web_service", + "dataType":"tableValue", + "name":"commune", + "description":"", + "parameters":{ + "schema":"patrimoine", + "table":"commune" + }, + "ressource_id":"vitis/genericquerys", + "id":"datasource_commune" + }, + "datasource_procedure_pluh":{ + "type":"web_service", + "dataType":"tableValue", + "name":"procedure_pluh", + "description":"", + "parameters":{ + "schema":"patrimoine", + "table":"procedure_pluh" + }, + "ressource_id":"vitis/genericquerys", + "id":"datasource_procedure_pluh" + } + } +} diff --git a/src/module_patrimoine/module/javascript/script_module.js b/src/module_patrimoine/module/javascript/script_module.js new file mode 100644 index 0000000000000000000000000000000000000000..639dbf3a09ee70cabe32deb179cf6a2584df426d --- /dev/null +++ b/src/module_patrimoine/module/javascript/script_module.js @@ -0,0 +1,66 @@ +/* global vitisApp, goog, angular, bootbox, oVFB */ + +'use strict'; +goog.provide('vmap.patrimoine.script_module'); +goog.require('vmap.patrimoine.dashboard'); +vitisApp.on('appMainDrtvLoaded', function () { + + /** + * loadSuiviProdImmoRepartitionLogControl function. + * Chargement de la section "Prétraitement" de l'onglet "Contrôle". + */ + angular.element(vitisApp.appMainDrtv).scope()["loadPatrimoineLogControl"] = function () { + // Injection des services. + /*var $log = angular.element(vitisApp.appMainDrtv).injector().get(["$log"]); + var $rootScope = angular.element(vitisApp.appMainDrtv).injector().get(["$rootScope"]); + var $translate = angular.element(vitisApp.appMainDrtv).injector().get(["$translate"]); + var envSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["envSrvc"]); + // + $log.info("loadSuiviProdImmoRepartitionLogControl"); + // Sauve certaines données de la liste. + var sSortedBy = envSrvc["oSelectedObject"]["sorted_by"]; + var sSortedDir = envSrvc["oSelectedObject"]["sorted_dir"]; + var sEditColumn = envSrvc["oSelectedObject"]["edit_column"]; + var sShowColumn = envSrvc["oSelectedObject"]["show_column"]; + // Colonne et sens de tri. + envSrvc["oSelectedObject"]["sorted_by"] = "id_traitement"; + envSrvc["oSelectedObject"]["sorted_dir"] = "ASC"; + envSrvc["oSelectedObject"]["edit_column"] = "editModalSectionForm"; + envSrvc["oSelectedObject"]["show_column"] = "showModalSectionForm"; + // "sIdField" pour les boutons du mode "update" et "display". + envSrvc["oSelectedObject"]["sIdField"] = "id_controle"; + // Affiche la liste des prétraitements du contrôle. + $translate(["GRID_TITLE_ANC_SAISIE_ANC_CONTROLE_CONTROLE_TRAITEMENT"]).then(function (oTranslations) { + // Paramètres de la liste + boutons. + var oGridOptions = { + "appHeader": true, + "appHeaderSearchForm": false, + "appGridTitle": oTranslations["GRID_TITLE_ANC_SAISIE_ANC_CONTROLE_CONTROLE_TRAITEMENT"], + "appShowActions": true, + "appIdField": "id_traitement" + }; + // + $rootScope["loadSectionList"](oGridOptions); + }); + // Attends que les boutons du "header" soient ajoutés. + var clearListener = $rootScope.$on('workspaceListHeaderActionsAdded', function (event, oGridOptions) { + // Supprime le "listener". + clearListener(); + // Restaure les données originales de la liste. + envSrvc["oSelectedObject"]["sorted_by"] = sSortedBy; + envSrvc["oSelectedObject"]["sorted_dir"] = sSortedDir; + envSrvc["oSelectedObject"]["edit_column"] = sEditColumn; + envSrvc["oSelectedObject"]["show_column"] = sShowColumn; + // Boutons d'ajout et de suppression d'un traitement. + for (var i = 0; i < oGridOptions["appActions"].length; i++) { + if (oGridOptions["appActions"][i]["name"].indexOf("_add") != -1) + oGridOptions["appActions"][i]["event"] = "addModalSectionForm()"; + else if (oGridOptions["appActions"][i]["name"].indexOf("_delete") != -1) + oGridOptions["appActions"][i]["event"] = "DeleteSelection({'sIdField':'id_traitement'})"; + } + });*/ + }; + + + +}); \ No newline at end of file diff --git a/src/module_patrimoine/module/lang/lang-en.json b/src/module_patrimoine/module/lang/lang-en.json new file mode 100644 index 0000000000000000000000000000000000000000..ba0e2de942de8c38c6db5afcecc0947a3116da93 --- /dev/null +++ b/src/module_patrimoine/module/lang/lang-en.json @@ -0,0 +1,6 @@ +{ + "TEXT_MODE_SUIVI_PROD_IMMO_SAISIE" : "Inventaire du patrimoine d' l'Agence d'urbanisme de Lyon", + "TITLE_MODE_SUIVI_PROD_IMMO_SAISIE" : "Patrimoine", + "PATRIMOINE_SAISIE_PERIMETRE" : "Périmètre porteur qualité", + "PATRIMOINE_SAISIE_ELEMENT" : "Éléments bâti qualité" +} diff --git a/src/module_patrimoine/module/lang/lang-fr.json b/src/module_patrimoine/module/lang/lang-fr.json new file mode 100644 index 0000000000000000000000000000000000000000..f6a5799b7b4c888023358dd43a154f371ee3325f --- /dev/null +++ b/src/module_patrimoine/module/lang/lang-fr.json @@ -0,0 +1,12 @@ +{ + "TEXT_MODE_PATRIMOINE_SAISIE" : "Inventaire du patrimoine d' l'Agence d'urbanisme de Lyon", + "TITLE_MODE_PATRIMOINE_SAISIE" : "Patrimoine", + "PATRIMOINE_SAISIE_PERIMETRE" : "Périmètre porteur qualité", + "PATRIMOINE_SAISIE_ELEMENT" : "Élément bâti de qualité", + "PATRIMOINE_PERIMETRE_TITLE_DISPLAY" : "Périmètre porteur de qualité", + "PATRIMOINE_ELEMENT_TITLE_DISPLAY" : "Élément bâti de qualité", + "PATRIMOINE_PERIMETRE_TITLE_UPDATE" : "Mise à jour d'un périmètre porteur de qualité", + "PATRIMOINE_ELEMENT_TITLE_UPDATE" : "Mise à jour d'un élément bâti de qualité", + "PATRIMOINE_PERIMETRE_TITLE_INSERT" : "Ajout d'un périmètre porteur de qualité", + "PATRIMOINE_ELEMENT_TITLE_INSERT" : "Ajout d'un élément bâti de qualité" +} diff --git a/src/module_patrimoine/web_service/ws/Commune.class.inc b/src/module_patrimoine/web_service/ws/Commune.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..6f65c5241905c3c1c2d03c74dacf77f8482dd6ff --- /dev/null +++ b/src/module_patrimoine/web_service/ws/Commune.class.inc @@ -0,0 +1,45 @@ +<?php + +require_once __DIR__ . '/Patrimoine.class.inc'; +require_once __DIR__ . '/../../../vitis/vas/rest/class/vitis_lib/Connection.class.inc'; + +/** + * \file Patrimoine.class.inc + * \class Patrimoine + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Patrimoine php class + * + * This class defines commune for one Patrimoine + * + */ + +class Commune extends Patrimoine { + + public $oError; + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + * @param type $oConnection connection object + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $this->aProperties); + } + + /** + * get informations about commune + */ + function GET() { + $this->aFields = $this->getFields('patrimoine', "commune", "code_insee"); + } + +} + +?> \ No newline at end of file diff --git a/src/module_patrimoine/web_service/ws/Element_bati_qualite.class.inc b/src/module_patrimoine/web_service/ws/Element_bati_qualite.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..af402c1ab36f4494e9f731a4e23e143b718b5f10 --- /dev/null +++ b/src/module_patrimoine/web_service/ws/Element_bati_qualite.class.inc @@ -0,0 +1,278 @@ +<?php + +require_once __DIR__ . '/Patrimoine.class.inc'; +require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/class/vitis_lib/Connection.class.inc'; + +/** + * \file Element_bati_qualite.class.inc + * \class Element_bati_qualite + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Element_bati_qualite php class + * + * This class defines operation for one Element_bati_qualite + * + */ +class Element_bati_qualite extends Patrimoine { + + public $oError; + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + * @param type $oConnection connection object + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $this->aProperties); + $this->oFilesManager = new Files_manager($this->aProperties); + } + + /** + * @SWG\Get(path="/controles/{id_element_bati_qualite}", + * tags={"Element_bati_qualites"}, + * summary="Get Element_bati_qualite", + * description="Request to get Element_bati_qualite by id", + * operationId="GET", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="id_element_bati_qualite", + * in="path", + * description="id_element_bati_qualite", + * required=true, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="Element_bati_qualite Response", + * @SWG\Schema(ref="#/definitions/controles") + * ) + * ) + */ + + /** + * get informations about mode + */ + function GET() { + $this->aFields = $this->getFields('patrimoine', "element_bati_qualite", "id_element_bati_qualite", 'patrimoine_saisie_patrimoine_element', 'patrimoine'); + $this->getCommune(); + $this->getEnqueteur(); + $this->getTypologieTissus(); + $this->getSousTypologieTissus(); + $this->getMorphologieBatiment(); + $this->getSousMorphologieBatiment(); + $this->getValeurs(); + $this->getProtectionsEtat(); + $this->getThemes(); + // proposition_classement + if ($this->aFields['proposition_classement']==true) $this->aFields['proposition_classement_label'] ="Oui"; + if ($this->aFields['proposition_classement']==false) $this->aFields['proposition_classement_label'] ="Non"; + // classement_au_pluh + if ($this->aFields['classement_au_pluh']==true) $this->aFields['classement_au_pluh_label'] ="Oui"; + if ($this->aFields['classement_au_pluh']==false) $this->aFields['classement_au_pluh_label'] ="Non"; + // Date de création + if(isset($this->aFields['date_creation_fiche']) and !is_null($this->aFields['date_creation_fiche'])){ + $oDate_creation_fiche = new DateTime($this->aFields['date_creation_fiche']); + $this->aFields['date_creation_fiche'] = $oDate_creation_fiche->format('d/m/Y'); + } + // Date de mise à jour + if(isset($this->aFields['date_maj']) and !is_null($this->aFields['date_maj'])){ + $oDate_maj = new DateTime($this->aFields['date_maj']); + $this->aFields['date_maj'] = $oDate_maj->format('d/m/Y'); + } + } + + /** + * get commune of perimeter + */ + function getCommune() { + if(isset($this->aFields['code_insee']) and !is_null($this->aFields['code_insee'])){ + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'patrimoine', 'type' => 'schema_name'); + $aParams['code_insee'] = array('value' => $this->aFields['code_insee'], 'type' => 'number'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getCommune'], $aParams); + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $this->aFields['nom_commune'] = $aLigne["nom_commune"]; + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + } + } + + /** + * get enqueteur of perimeter + */ + function getEnqueteur() { + if(isset($this->aFields['id_enqueteur']) and !is_null($this->aFields['id_enqueteur'])){ + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'patrimoine', 'type' => 'schema_name'); + $aParams['id_enqueteur'] = array('value' => $this->aFields['id_enqueteur'], 'type' => 'string'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getEnqueteur'], $aParams); + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $this->aFields['nom_enqueteur'] = $aLigne["nom_enqueteur"]; + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + } + } + + /** + * get typologie tissus of perimeter + */ + function getTypologieTissus() { + if(isset($this->aFields['id_typologie_tissus']) and !is_null($this->aFields['id_typologie_tissus'])){ + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'patrimoine', 'type' => 'schema_name'); + $aParams['id_typologie_tissus'] = array('value' => $this->aFields['id_typologie_tissus'], 'type' => 'number'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getTypologieTissus'], $aParams); + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $this->aFields['typologie_tissus'] = $aLigne["typologie_tissus"]; + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + } + } + + /** + * get sous-typologie tissus of perimeter + */ + function getSousTypologieTissus() { + if(isset($this->aFields['id_sous_typologie_tissus']) and !is_null($this->aFields['id_sous_typologie_tissus'])){ + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'patrimoine', 'type' => 'schema_name'); + $aParams['id_sous_typologie_tissus'] = array('value' => $this->aFields['id_sous_typologie_tissus'], 'type' => 'number'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getSousTypologieTissus'], $aParams); + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $this->aFields['sous_typologie_tissus'] = $aLigne["sous_typologie_tissus"]; + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + } + } + + /** + * get morphologie batiment of perimeter + */ + function getMorphologieBatiment() { + if(isset($this->aFields['id_morphologie_batiment']) and !is_null($this->aFields['id_morphologie_batiment'])){ + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'patrimoine', 'type' => 'schema_name'); + $aParams['id_morphologie_batiment'] = array('value' => $this->aFields['id_morphologie_batiment'], 'type' => 'number'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getMorphologieBatiment'], $aParams); + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $this->aFields['morphologie_batiment'] = $aLigne["morphologie_batiment"]; + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + } + } + + /** + * get sous-morphologie batiment tissus of perimeter + */ + function getSousMorphologieBatiment() { + if(isset($this->aFields['id_sous_morphologie_batiment']) and !is_null($this->aFields['id_sous_morphologie_batiment'])){ + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'patrimoine', 'type' => 'schema_name'); + $aParams['id_sous_morphologie_batiment'] = array('value' => $this->aFields['id_sous_morphologie_batiment'], 'type' => 'number'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getSousMorphologieBatiment'], $aParams); + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $this->aFields['sous_morphologie_batiment'] = $aLigne["sous_morphologie_batiment"]; + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + } + } + + /** + * get valeurs of element + */ + function getValeurs() { + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'patrimoine', 'type' => 'schema_name'); + $aParams['id_ebq'] = array('value' => $this->aValues["my_vitis_id"], 'type' => 'number'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getElementValeurs'], $aParams); + $sListValeurId = ""; + $aListValeur = array(); + while ($aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult)) { + if ($sListValeurId == "") { + $sListValeurId = $aLigne["id_valeur"]; + } else { + $sListValeurId .= "|" . $aLigne["id_valeur"]; + } + $aListValeur[] = $aLigne["valeur"]; + } + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + $this->aFields['valeurs'] = $sListValeurId; + $this->aFields['valeurs_label'] = implode(',', $aListValeur); + } + + /** + * get protections état of element + */ + function getProtectionsEtat() { + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'patrimoine', 'type' => 'schema_name'); + $aParams['id_ebq'] = array('value' => $this->aValues["my_vitis_id"], 'type' => 'number'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getElementProtectionsEtat'], $aParams); + $sProtectionEtatId = ""; + $aListProtectionEtat = array(); + while ($aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult)) { + if ($sProtectionEtatId == "") { + $sProtectionEtatId = $aLigne["id_protection_etat"]; + } else { + $sProtectionEtatId .= "|" . $aLigne["id_protection_etat"]; + } + $aListProtectionEtat[] = $aLigne["protection_etat"]; + } + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + $this->aFields['protection_etats'] = $sProtectionEtatId; + $this->aFields['protection_etats_label'] = implode(',', $aListProtectionEtat); + } + + /** + * get thèmes of element + */ + function getThemes() { + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'patrimoine', 'type' => 'schema_name'); + $aParams['id_ebq'] = array('value' => $this->aValues["my_vitis_id"], 'type' => 'number'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getElementThemes'], $aParams); + $sThemeId = ""; + $aListTheme = array(); + while ($aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult)) { + if ($sThemeId == "") { + $sThemeId = $aLigne["id_theme"]; + } else { + $sThemeId .= "|" . $aLigne["id_theme"]; + } + $aListTheme[] = $aLigne["theme"]; + } + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + $this->aFields['themes'] = $sThemeId; + $this->aFields['themes_label'] = implode(',', $aListTheme); + } + + /** + * delete a Element_bati_qualite + */ + function DELETE() { + $this->oConnection->oBd->delete('patrimoine', 'element_bati_qualite', 'id_element_bati_qualite', $this->aValues["my_vitis_id"], 'integer'); + if ($this->oConnection->oBd->enErreur()) { + $this->oError = new VitisError(1, $this->oConnection->oBd->getBDMessage()); + } else { + $this->aFields["id_element_bati_qualite"] = $this->aValues["my_vitis_id"]; + } + } + +} + +?> diff --git a/src/module_patrimoine/web_service/ws/Element_bati_qualites.class.inc b/src/module_patrimoine/web_service/ws/Element_bati_qualites.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..7f6da1ed222d9a9983ce351a2130638bef6c315f --- /dev/null +++ b/src/module_patrimoine/web_service/ws/Element_bati_qualites.class.inc @@ -0,0 +1,396 @@ +<?php + +/** + * \file Element_bati_qualites.class.inc + * \class Element_bati_qualites + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Element_bati_qualites php class + * + * This class defines Rest Api to Vitis Element_bati_qualites + * + */ +require_once __DIR__ . '/Patrimoine.class.inc'; +require_once 'Element_bati_qualite.class.inc'; + +class Element_bati_qualites extends Patrimoine { + /** + * @SWG\Definition( + * definition="/element_bati_qualites", + * allOf={ + * @SWG\Schema(ref="#/definitions/element_bati_qualites") + * } + * ) + * * @SWG\Tag( + * name="Element_bati_qualites", + * description="Operations about Element_bati_qualites" + * ) + */ + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $this->aProperties); + $this->oFilesManager = new Files_manager($this->aProperties); + } + + /** + * @SWG\Get(path="/element_bati_qualites", + * tags={"Element_bati_qualites"}, + * summary="Get Element_bati_qualites", + * description="Request to get Element_bati_qualites", + * operationId="GET", + * produces={"application/xml", "application/json", "application/x-vm-json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="order_by", + * in="query", + * description="list of ordering fields", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="sort_order", + * in="query", + * description="sort_order", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="limit", + * in="query", + * description="number of element", + * required=false, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="offset", + * in="query", + * description="index of first element", + * required=false, + * type="string", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="filter", + * in="query", + * description="filter results", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="distinct", + * in="query", + * description="delete duplicates", + * required=false, + * type="boolean" + * ), + * @SWG\Response( + * response=200, + * description="controle Response", + * @SWG\Schema(ref="#/definitions/element_bati_qualites") + * ) + * ) + */ + + /** + * get Element_bati_qualites + * @return Element_bati_qualites + */ + function GET() { + $aReturn = $this->genericGet('patrimoine', "element_bati_qualite", "id_element_bati_qualite"); + $sMessage = $aReturn['sMessage']; + $aElements=json_decode($aReturn['sMessage'],true); + $aElements2=array(); + foreach ($aElements['element_bati_qualites'] as $aElement){ + // geom + unset($aElement['geom']); + // proposition_classement + if ($aElement['proposition_classement']==true) $aElement['proposition_classement_label'] ="Oui"; + if ($aElement['proposition_classement']==false) $aElement['proposition_classement_label'] ="Non"; + // classement_au_pluh + if ($aElement['classement_au_pluh']==true) $aElement['classement_au_pluh_label'] ="Oui"; + if ($aElement['classement_au_pluh']==false) $aElement['classement_au_pluh_label'] ="Non"; + // nom_commune + $aElement['nom_commune']= $this->getCommune($aElement['code_insee']); + // procedure_pluh + $aElement['procedure_pluh']= $this->getProcedurePluh($aElement['code_procedure_pluh']); + $aElements2[count($aElements2)]=$aElement; + } + $sPerimetres=json_encode(array("element_bati_qualites"=>$aElements2,"list_count"=>$aElements['list_count'],"total_row_number"=>$aElements['total_row_number'],"status"=>$aElements['status'])); + return $sPerimetres; + } + + /** + * get commune of element + */ + function getCommune($iCodeInsee) { + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'patrimoine', 'type' => 'schema_name'); + $aParams['code_insee'] = array('value' => $iCodeInsee, 'type' => 'number'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getCommune'], $aParams); + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + return $aLigne["nom_commune"]; + } + + /** + * get procedure_pluh of element + */ + function getProcedurePluh($iProcedurePluh) { + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'patrimoine', 'type' => 'schema_name'); + $aParams['code_procedure_pluh'] = array('value' => $iProcedurePluh, 'type' => 'string'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getProcedurePluh'], $aParams); + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + return $aLigne["procedure_pluh"]; + } + + /** + * @SWG\Post(path="/element_bati_qualites", + * tags={"Element_bati_qualites"}, + * summary="Add controle", + * description="Request to add Element_bati_qualites", + * operationId="POST", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="controle Response", + * @SWG\Schema(ref="#/definitions/element_bati_qualites") + * ) + * ) + */ + + /** + * insert controle + * @return id of the controle created + */ + function POST() { + // get value sequence from patrimoine database to set id + $oConnexion = new PDO('pgsql:host=\'srv-postgres\' port=5432 dbname=\'patrimoine\'', $_SESSION["ses_Login"], trim(des(rtrim(utf8_decode($_SESSION["ses_Login"])), hexToString(rtrim($_SESSION["ses_Password"])), 0, 0, null))); + $oPDOresult = $oConnexion->query('SELECT nextval(\'patrimoine.element_bati_qualite_id_element_bati_qualite_seq\')'); + $aResult = $oPDOresult->fetch(PDO::FETCH_ASSOC); + $this->aValues['id_element_bati_qualite'] = $aResult['nextval']; + if ($this->aValues['id_enqueteur']==null) unset($this->aValues['id_enqueteur']); + if ($this->aValues['id_typologie_tissus']==null) unset($this->aValues['id_typologie_tissus']); + if ($this->aValues['id_sous_typologie_tissus']==null) unset($this->aValues['id_sous_typologie_tissus']); + if ($this->aValues['id_morphologie_batiment']==null) unset($this->aValues['id_morphologie_batiment']); + if ($this->aValues['id_sous_morphologie_batiment']==null) unset($this->aValues['id_sous_morphologie_batiment']); + if ($this->aValues['code_procedure_pluh']==null) unset($this->aValues['code_procedure_pluh']); + $this->aValues['id_bati'] =$this->aValues['code_insee'].'_'.$this->aValues['num_batiment']; + $this->aValues['date_creation_fiche'] = date("Y-m-d"); + // error_log(print_r($this->aValues,true)); + // Fichiers à uploader + $aUploadFiles = array('photos' => []); + $aReturn = $this->genericPost('patrimoine', 'element_bati_qualite', null, 'id_element_bati_qualite', $aUploadFiles, 'patrimoine_saisie_patrimoine_element', 'patrimoine'); + return $aReturn['sMessage']; + } + + /** + * @SWG\Put(path="/element_bati_qualites/{id_element_bati_qualite}", + * tags={"Element_bati_qualites"}, + * summary="update Element_bati_qualites", + * description="Request to update Element_bati_qualites", + * operationId="PUT", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Controle token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_element_bati_qualite", + * in="path", + * description="id of the Element_bati_qualites", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/element_bati_qualites") + * ) + * ) + */ + + /** + * update element_bati_qualites + * @return id of element_bati_qualites updated or error object if a element_bati_qualites is not updated + */ + function PUT() { + if ($this->aValues['id_enqueteur']==null) unset($this->aValues['id_enqueteur']); + if ($this->aValues['id_typologie_tissus']==null) unset($this->aValues['id_typologie_tissus']); + if ($this->aValues['id_sous_typologie_tissus']==null) unset($this->aValues['id_sous_typologie_tissus']); + if ($this->aValues['id_morphologie_batiment']==null) unset($this->aValues['id_morphologie_batiment']); + if ($this->aValues['id_sous_morphologie_batiment']==null) unset($this->aValues['id_sous_morphologie_batiment']); + if ($this->aValues['code_procedure_pluh']==null) unset($this->aValues['code_procedure_pluh']); + unset($this->aValues['id_bati']); + unset($this->aValues['date_creation_fiche']); + $this->aValues['date_maj'] = date("Y-m-d"); + // Fichiers à uploader + $aUploadFiles = array('photos' => []); + // Mise à jour + $aReturn = $this->genericPut('patrimoine', 'element_bati_qualite', 'id_element_bati_qualite', $aUploadFiles, 'patrimoine_saisie_patrimoine_element', 'patrimoine'); + if ($aReturn['sStatus'] == 1) { + $aXmlRacineAttribute['status'] = 1; + $sMessage = $this->asDocument('', 'vitis', $this->aValues['sEncoding'], True, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']); + //***** valeurs *****// + // Le paramètre "valeurs" est passé dans la requête ? + if ($this->aValues['valeurs'] !== NULL) { + $this->oConnection->oBd->delete('patrimoine', 'ebq_valeur', 'id_ebq', $this->aValues["my_vitis_id"]); + // Valeur(s) à rattacher au groupe ? + if (!empty($this->aValues['valeurs'])){ + require $this->sRessourcesFile; + $aValeurs = explode('|', $this->aValues['valeurs']); + foreach ($aValeurs as $iValeurId){ + $aParams = array(); + $aParams['sSchemaFramework'] = array('value' => 'patrimoine', 'type' => 'schema_name'); + $aParams['id_valeur'] = array('value' => $iValeurId, 'type' => 'number'); + $aParams['id_ebq'] = array('value' => $this->aValues["my_vitis_id"], 'type' => 'number'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['insertElementValeurs'], $aParams); + } + } + } + //***** protections état *****// + // Le paramètre "protection_etats" est passé dans la requête ? + if ($this->aValues['protection_etats'] !== NULL) { + $this->oConnection->oBd->delete('patrimoine', 'ebq_protection_etat', 'id_ebq', $this->aValues["my_vitis_id"]); + if (!empty($this->aValues['protection_etats'])){ + require $this->sRessourcesFile; + $aProtectionEtats = explode('|', $this->aValues['protection_etats']); + foreach ($aProtectionEtats as $iProtectionEtatId){ + $aParams = array(); + $aParams['sSchemaFramework'] = array('value' => 'patrimoine', 'type' => 'schema_name'); + $aParams['id_protection_etat'] = array('value' => $iProtectionEtatId, 'type' => 'number'); + $aParams['id_ebq'] = array('value' => $this->aValues["my_vitis_id"], 'type' => 'number'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['insertElementProtectionsEtat'], $aParams); + } + } + } + //***** thèmes *****// + // Le paramètre "themes" est passé dans la requête ? + if ($this->aValues['themes'] !== NULL) { + $this->oConnection->oBd->delete('patrimoine', 'ebq_theme', 'id_ebq', $this->aValues["my_vitis_id"]); + if (!empty($this->aValues['themes'])){ + require $this->sRessourcesFile; + $aThemes = explode('|', $this->aValues['themes']); + foreach ($aThemes as $iThemeId){ + $aParams = array(); + $aParams['sSchemaFramework'] = array('value' => 'patrimoine', 'type' => 'schema_name'); + $aParams['id_theme'] = array('value' => $iThemeId, 'type' => 'number'); + $aParams['id_ebq'] = array('value' => $this->aValues["my_vitis_id"], 'type' => 'number'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['insertElementThemes'], $aParams); + } + } + } + } else { + $sMessage = $aReturn['sMessage']; + } + return $sMessage; + } + + /** + * @SWG\Delete(path="/element_bati_qualites", + * tags={"Element_bati_qualites"}, + * summary="delete Element_bati_qualites", + * description="Request to delete Element_bati_qualites", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="idList", + * in="query", + * description="id of the element", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="Element Response", + * @SWG\Schema(ref="#/definitions/element_bati_qualites") + * ) + * ) + */ + /** + * @SWG\Delete(path="/element_bati_qualites/{id_element_bati_qualite}", + * tags={"Element_bati_qualites"}, + * summary="delete Element_bati_qualites", + * description="Request to delete Element_bati_qualites", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Element token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_element_bati_qualite", + * in="path", + * description="id of the Element_bati_qualites", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/element_bati_qualites") + * ) + * ) + */ + + /** + * delete element_bati_qualites + * @return id of element_bati_qualites deleted or error object if a element_bati_qualites is not deleted + */ + function DELETE() { + require $this->sRessourcesFile; + // Dépendances supprimées en cascade + $aReturn = $this->genericDelete('patrimoine', 'element_bati_qualite', 'id_element_bati_qualite'); + return $aReturn['sMessage']; + } + +} + +?> diff --git a/src/module_patrimoine/web_service/ws/Patrimoine.class.inc b/src/module_patrimoine/web_service/ws/Patrimoine.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..81b01c8ea037248adb006e2464cbd6d9769dafcb --- /dev/null +++ b/src/module_patrimoine/web_service/ws/Patrimoine.class.inc @@ -0,0 +1,42 @@ +<?php + +require_once dirname($_SERVER['SCRIPT_FILENAME']) . "/class/vitis_lib/DbClass.class.inc"; +require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/ws/vitis/Vitis.class.inc'; +require_once 'vmlib/logUtil.inc'; + +class Patrimoine extends Vitis { + + //Chemin du fichier de ressources contenant les requêtes SQL + var $sRessourcesFile = 'ws/patrimoine/Patrimoine.class.sql.inc'; + + /** + * DEPRECATED + * Upload un document dans le ws_data du module Patrimoine. + * @param type $sIndex + * @param type $sFolder + */ + function uploadDocument($sIndex, $sFolder) { + // Crée le répertoire si inexistant. + $sDirPath = $this->aProperties['ws_data_dir'] . '/patrimoine/' . $sFolder . '/documents/' . $this->aValues["my_vitis_id"] . '/' . $sIndex . '/'; + if (!is_dir($sDirPath)) + mkdir($sDirPath, 0777, true); + // Ecrit le fichier. + if (!empty($_FILES[$sIndex])) { + $sErrorMessage = uploadFile($sIndex, "", $sDirPath . $_FILES[$sIndex]["name"], $_FILES[$sIndex]['size'] + 1); + if ($sErrorMessage != "") + writeToErrorLog($sErrorMessage); + } + else { + $sfileContentIndex = $sIndex . '_file'; + $sfileNameIndex = $sIndex . '_name'; + if (!empty($this->aValues[$sfileContentIndex])) { + + $this->aValues[$sIndex] = $this->aValues[$sfileNameIndex]; + $fp = fopen($sDirPath . $this->aValues[$sfileNameIndex], "w"); + fwrite($fp, $this->aValues[$sfileContentIndex]); + fclose($fp); + } + } + } +} +?> diff --git a/src/module_patrimoine/web_service/ws/Patrimoine.class.sql.inc b/src/module_patrimoine/web_service/ws/Patrimoine.class.sql.inc new file mode 100644 index 0000000000000000000000000000000000000000..0c657326ed9634d8f36e3c1dd38f798055e84168 --- /dev/null +++ b/src/module_patrimoine/web_service/ws/Patrimoine.class.sql.inc @@ -0,0 +1,36 @@ +<?php +//Définition des requêtes de l'api Vitis +$aSql['checkIP'] = "SELECT user_id, ip_constraint FROM [sSchemaFramework].user WHERE login ='[sLogin]'"; +$aSql['getGroups'] = "SELECT group_id FROM [sSchemaFramework].user_group WHERE user_id = [user_id]"; +$aSql['loginUnique'] = 'SELECT UPPER("login") FROM [sSchemaFramework]."user" WHERE UPPER("login")=UPPER(\'sLoginUser\')'; +$aSql['getLoginbyId'] = 'SELECT "login" FROM [sSchemaFramework]."user" WHERE user_id=[user_id]'; +$aSql['getTableColumn'] = 'SELECT column_name FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = \'[sSchemaFramework]\' and table_name= \'[sTable]\''; +$aSql['getUserPrivileges'] = 'SELECT groname FROM pg_user s LEFT OUTER JOIN pg_group g on (s.usesysid = any(g.grolist) )inner join [sSchemaFramework].user on "user".login = usename WHERE user_id = [user_id]'; +$aSql['listDomain'] = 'SELECT distinct domain, alias FROM [sSchemaFramework].domain WHERE "type" = \'AD\''; +$aSql['createRolname'] = 'CREATE ROLE "vitis_[sDomain]" NOSUPERUSER INHERIT NOCREATEDB CREATEROLE;'; +$aSql['getInfoRolname'] = 'SELECT * FROM pg_catalog.pg_roles WHERE rolname = \'vitis_[sDomain]\''; +// Patrimoine +$aSql['getCommune'] = "SELECT code_insee, nom_commune FROM [sSchemaFramework].commune WHERE code_insee =[code_insee] LIMIT 1"; +$aSql['getProcedurePluh'] = "SELECT code_procedure_pluh, procedure_pluh FROM [sSchemaFramework].procedure_pluh WHERE code_procedure_pluh =[code_procedure_pluh] LIMIT 1"; +$aSql['getEnqueteur'] = "SELECT id_enqueteur, nom_enqueteur FROM [sSchemaFramework].enqueteur WHERE id_enqueteur =[id_enqueteur] LIMIT 1"; +$aSql['getClassificationTypeQualite'] = "SELECT id_classification_qualite, classification_qualite FROM [sSchemaFramework].classification_type_qualite WHERE id_classification_qualite =[id_classification_qualite] LIMIT 1"; +$aSql['getTypologieTissus'] = "SELECT id_typologie_tissus, typologie_tissus FROM [sSchemaFramework].typologie_tissus WHERE id_typologie_tissus =[id_typologie_tissus] LIMIT 1"; +$aSql['getSousTypologieTissus'] = "SELECT id_sous_typologie_tissus, sous_typologie_tissus FROM [sSchemaFramework].sous_typologie_tissus WHERE id_sous_typologie_tissus =[id_sous_typologie_tissus] LIMIT 1"; +$aSql['getMorphologieBatiment'] = "SELECT id_morphologie_batiment, morphologie_batiment FROM [sSchemaFramework].morphologie_batiment WHERE id_morphologie_batiment =[id_morphologie_batiment] LIMIT 1"; +$aSql['getSousMorphologieBatiment'] = "SELECT id_sous_morphologie_batiment, sous_morphologie_batiment FROM [sSchemaFramework].sous_morphologie_batiment WHERE id_sous_morphologie_batiment =[id_sous_morphologie_batiment] LIMIT 1"; +// EPQ Valeurs +$aSql['getPerimetreValeurs'] = "SELECT epq_valeur.id_valeur, \"valeur\".valeur FROM [sSchemaFramework].epq_valeur LEFT JOIN [sSchemaFramework].valeur ON epq_valeur.id_valeur = \"valeur\".id_valeur WHERE epq_valeur.id_epq = [id_epq]"; +$aSql['insertPerimetreValeurs'] = "INSERT INTO [sSchemaFramework].epq_valeur(id_valeur, id_epq) VALUES([id_valeur], [id_epq])"; +// EPQ Protections Etat +$aSql['getPerimetreProtectionsEtat'] = "SELECT epq_protection_etat.id_protection_etat, \"protection_etat\".protection_etat FROM [sSchemaFramework].epq_protection_etat LEFT JOIN [sSchemaFramework].protection_etat ON epq_protection_etat.id_protection_etat = \"protection_etat\".id_protection_etat WHERE epq_protection_etat.id_epq = [id_epq]"; +$aSql['insertPerimetreProtectionsEtat'] = "INSERT INTO [sSchemaFramework].epq_protection_etat(id_protection_etat, id_epq) VALUES([id_protection_etat], [id_epq])"; +// EBQ Valeurs +$aSql['getElementValeurs'] = "SELECT ebq_valeur.id_valeur, \"valeur\".valeur FROM [sSchemaFramework].ebq_valeur LEFT JOIN [sSchemaFramework].valeur ON ebq_valeur.id_valeur = \"valeur\".id_valeur WHERE ebq_valeur.id_ebq = [id_ebq]"; +$aSql['insertElementValeurs'] = "INSERT INTO [sSchemaFramework].ebq_valeur(id_valeur, id_ebq) VALUES([id_valeur], [id_ebq])"; +// EBQ Protections Etat +$aSql['getElementProtectionsEtat'] = "SELECT ebq_protection_etat.id_protection_etat, \"protection_etat\".protection_etat FROM [sSchemaFramework].ebq_protection_etat LEFT JOIN [sSchemaFramework].protection_etat ON ebq_protection_etat.id_protection_etat = \"protection_etat\".id_protection_etat WHERE ebq_protection_etat.id_ebq = [id_ebq]"; +$aSql['insertElementProtectionsEtat'] = "INSERT INTO [sSchemaFramework].ebq_protection_etat(id_protection_etat, id_ebq) VALUES([id_protection_etat], [id_ebq])"; +// EBQ Themes +$aSql['getElementThemes'] = "SELECT ebq_theme.id_theme, \"theme\".theme FROM [sSchemaFramework].ebq_theme LEFT JOIN [sSchemaFramework].theme ON ebq_theme.id_theme = \"theme\".id_theme WHERE ebq_theme.id_ebq = [id_ebq]"; +$aSql['insertElementThemes'] = "INSERT INTO [sSchemaFramework].ebq_theme(id_theme, id_ebq) VALUES([id_theme], [id_ebq])"; +?> \ No newline at end of file diff --git a/src/module_patrimoine/web_service/ws/Perimetre_porteur_qualite.class.inc b/src/module_patrimoine/web_service/ws/Perimetre_porteur_qualite.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..f41f8e90c9932e87b129ebe8dfa5ed35e2d52fcd --- /dev/null +++ b/src/module_patrimoine/web_service/ws/Perimetre_porteur_qualite.class.inc @@ -0,0 +1,238 @@ +<?php + +require_once __DIR__ . '/Patrimoine.class.inc'; +require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/class/vitis_lib/Connection.class.inc'; + +/** + * \file Perimetre_porteur_qualite.class.inc + * \class Perimetre_porteur_qualite + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Perimetre_porteur_qualite php class + * + * This class defines operation for one Perimetre_porteur_qualite + * + */ +class Perimetre_porteur_qualite extends Patrimoine { + + public $oError; + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + * @param type $oConnection connection object + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $this->aProperties); + $this->oFilesManager = new Files_manager($this->aProperties); + } + + /** + * @SWG\Get(path="/controles/{id_perimetre_porteur_qualite}", + * tags={"Perimetre_porteur_qualites"}, + * summary="Get Perimetre_porteur_qualite", + * description="Request to get Perimetre_porteur_qualite by id", + * operationId="GET", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="id_perimetre_porteur_qualite", + * in="path", + * description="id_perimetre_porteur_qualite", + * required=true, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="Perimetre_porteur_qualite Response", + * @SWG\Schema(ref="#/definitions/controles") + * ) + * ) + */ + + /** + * get informations about mode + */ + function GET() { + $this->aFields = $this->getFields('patrimoine', "perimetre_porteur_qualite", "id_perimetre_porteur_qualite", 'patrimoine_saisie_patrimoine_perimetre', 'patrimoine'); + $this->getCommune(); + $this->getEnqueteur(); + $this->getClassificationTypeQualite(); + $this->getTypologieTissus(); + $this->getSousTypologieTissus(); + $this->getValeurs(); + $this->getProtectionsEtat(); + // proposition_classement + if ($this->aFields['proposition_classement']==true) $this->aFields['proposition_classement_label'] ="Oui"; + if ($this->aFields['proposition_classement']==false) $this->aFields['proposition_classement_label'] ="Non"; + // classement_au_pluh + if ($this->aFields['classement_au_pluh']==true) $this->aFields['classement_au_pluh_label'] ="Oui"; + if ($this->aFields['classement_au_pluh']==false) $this->aFields['classement_au_pluh_label'] ="Non"; + // Date de création + if(isset($this->aFields['date_creation_fiche']) and !is_null($this->aFields['date_creation_fiche'])){ + $oDate_creation_fiche = new DateTime($this->aFields['date_creation_fiche']); + $this->aFields['date_creation_fiche'] = $oDate_creation_fiche->format('d/m/Y'); + } + // Date de mise à jour + if(isset($this->aFields['date_maj']) and !is_null($this->aFields['date_maj'])){ + $oDate_maj = new DateTime($this->aFields['date_maj']); + $this->aFields['date_maj'] = $oDate_maj->format('d/m/Y'); + } + } + + /** + * get commune of perimeter + */ + function getCommune() { + if(isset($this->aFields['code_insee']) and !is_null($this->aFields['code_insee'])){ + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'patrimoine', 'type' => 'schema_name'); + $aParams['code_insee'] = array('value' => $this->aFields['code_insee'], 'type' => 'number'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getCommune'], $aParams); + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $this->aFields['nom_commune'] = $aLigne["nom_commune"]; + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + } + } + + /** + * get enqueteur of perimeter + */ + function getEnqueteur() { + if(isset($this->aFields['id_enqueteur']) and !is_null($this->aFields['id_enqueteur'])){ + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'patrimoine', 'type' => 'schema_name'); + $aParams['id_enqueteur'] = array('value' => $this->aFields['id_enqueteur'], 'type' => 'string'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getEnqueteur'], $aParams); + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $this->aFields['nom_enqueteur'] = $aLigne["nom_enqueteur"]; + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + } + } + + /** + * get classification type qualite of perimeter + */ + function getClassificationTypeQualite() { + if(isset($this->aFields['id_classification_qualite']) and !is_null($this->aFields['id_classification_qualite'])){ + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'patrimoine', 'type' => 'schema_name'); + $aParams['id_classification_qualite'] = array('value' => $this->aFields['id_classification_qualite'], 'type' => 'string'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getClassificationTypeQualite'], $aParams); + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $this->aFields['classification_qualite'] = $aLigne["classification_qualite"]; + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + } + } + + /** + * get typologie tissus of perimeter + */ + function getTypologieTissus() { + if(isset($this->aFields['id_typologie_tissus']) and !is_null($this->aFields['id_typologie_tissus'])){ + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'patrimoine', 'type' => 'schema_name'); + $aParams['id_typologie_tissus'] = array('value' => $this->aFields['id_typologie_tissus'], 'type' => 'number'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getTypologieTissus'], $aParams); + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $this->aFields['typologie_tissus'] = $aLigne["typologie_tissus"]; + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + } + } + + /** + * get sous-typologie tissus of perimeter + */ + function getSousTypologieTissus() { + if(isset($this->aFields['id_sous_typologie_tissus']) and !is_null($this->aFields['id_sous_typologie_tissus'])){ + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'patrimoine', 'type' => 'schema_name'); + $aParams['id_sous_typologie_tissus'] = array('value' => $this->aFields['id_sous_typologie_tissus'], 'type' => 'number'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getSousTypologieTissus'], $aParams); + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $this->aFields['sous_typologie_tissus'] = $aLigne["sous_typologie_tissus"]; + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + } + } + + /** + * get valeurs of perimetre + */ + function getValeurs() { + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'patrimoine', 'type' => 'schema_name'); + $aParams['id_epq'] = array('value' => $this->aValues["my_vitis_id"], 'type' => 'number'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getPerimetreValeurs'], $aParams); + $sListValeurId = ""; + $aListValeur = array(); + while ($aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult)) { + if ($sListValeurId == "") { + $sListValeurId = $aLigne["id_valeur"]; + } else { + $sListValeurId .= "|" . $aLigne["id_valeur"]; + } + $aListValeur[] = $aLigne["valeur"]; + } + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + $this->aFields['valeurs'] = $sListValeurId; + $this->aFields['valeurs_label'] = implode(',', $aListValeur); + } + + /** + * get protections état of perimetre + */ + function getProtectionsEtat() { + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'patrimoine', 'type' => 'schema_name'); + $aParams['id_epq'] = array('value' => $this->aValues["my_vitis_id"], 'type' => 'number'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getPerimetreProtectionsEtat'], $aParams); + $sProtectionEtatId = ""; + $aListProtectionEtat = array(); + while ($aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult)) { + if ($sProtectionEtatId == "") { + $sProtectionEtatId = $aLigne["id_protection_etat"]; + } else { + $sProtectionEtatId .= "|" . $aLigne["id_protection_etat"]; + } + $aListProtectionEtat[] = $aLigne["protection_etat"]; + } + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + $this->aFields['protection_etats'] = $sProtectionEtatId; + $this->aFields['protection_etats_label'] = implode(',', $aListProtectionEtat); + } + + /** + * delete a Perimetre_porteur_qualite + */ + function DELETE() { + $this->oConnection->oBd->delete('patrimoine', 'perimetre_porteur_qualite', 'id_perimetre_porteur_qualite', $this->aValues["my_vitis_id"], 'integer'); + if ($this->oConnection->oBd->enErreur()) { + $this->oError = new VitisError(1, $this->oConnection->oBd->getBDMessage()); + } else { + $this->aFields["id_perimetre_porteur_qualite"] = $this->aValues["my_vitis_id"]; + } + } + +} + +?> diff --git a/src/module_patrimoine/web_service/ws/Perimetre_porteur_qualites.class.inc b/src/module_patrimoine/web_service/ws/Perimetre_porteur_qualites.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..ebef68bab9eca96712b9356fbb6d8d8de5176830 --- /dev/null +++ b/src/module_patrimoine/web_service/ws/Perimetre_porteur_qualites.class.inc @@ -0,0 +1,379 @@ +<?php + +/** + * \file Perimetre_porteur_qualites.class.inc + * \class Perimetre_porteur_qualites + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Perimetre_porteur_qualites php class + * + * This class defines Rest Api to Vitis Perimetre_porteur_qualites + * + */ +require_once __DIR__ . '/Patrimoine.class.inc'; +require_once 'Perimetre_porteur_qualite.class.inc'; +require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/class/vmlib/cryptUtil.inc'; + +class Perimetre_porteur_qualites extends Patrimoine { + /** + * @SWG\Definition( + * definition="/perimetre_porteur_qualites", + * allOf={ + * @SWG\Schema(ref="#/definitions/perimetre_porteur_qualites") + * } + * ) + * * @SWG\Tag( + * name="Perimetre_porteur_qualites", + * description="Operations about Perimetre_porteur_qualites" + * ) + */ + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $this->aProperties); + $this->oFilesManager = new Files_manager($this->aProperties); + } + + /** + * @SWG\Get(path="/perimetre_porteur_qualites", + * tags={"Perimetre_porteur_qualites"}, + * summary="Get Perimetre_porteur_qualites", + * description="Request to get Perimetre_porteur_qualites", + * operationId="GET", + * produces={"application/xml", "application/json", "application/x-vm-json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="order_by", + * in="query", + * description="list of ordering fields", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="sort_order", + * in="query", + * description="sort_order", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="limit", + * in="query", + * description="number of element", + * required=false, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="offset", + * in="query", + * description="index of first element", + * required=false, + * type="string", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="filter", + * in="query", + * description="filter results", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="distinct", + * in="query", + * description="delete duplicates", + * required=false, + * type="boolean" + * ), + * @SWG\Response( + * response=200, + * description="controle Response", + * @SWG\Schema(ref="#/definitions/perimetre_porteur_qualites") + * ) + * ) + */ + + /** + * get Perimetre_porteur_qualites + * @return Perimetre_porteur_qualites + */ + function GET() { + $aReturn = $this->genericGet('patrimoine', "perimetre_porteur_qualite", "id_perimetre_porteur_qualite"); + $sMessage = $aReturn['sMessage']; + $aPerimetres=json_decode($aReturn['sMessage'],true); + $aPerimetres2=array(); + foreach ($aPerimetres['perimetre_porteur_qualites'] as $aPerimetre){ + // geom + unset($aPerimetre['geom']); + // proposition_classement + if ($aPerimetre['proposition_classement']==true) $aPerimetre['proposition_classement_label'] ="Oui"; + if ($aPerimetre['proposition_classement']==false) $aPerimetre['proposition_classement_label'] ="Non"; + // classement_au_pluh + if ($aPerimetre['classement_au_pluh']==true) $aPerimetre['classement_au_pluh_label'] ="Oui"; + if ($aPerimetre['classement_au_pluh']==false) $aPerimetre['classement_au_pluh_label'] ="Non"; + // nom_commune + $aPerimetre['nom_commune']= $this->getCommune($aPerimetre['code_insee']); + // procedure_pluh + $aPerimetre['procedure_pluh']= $this->getProcedurePluh($aPerimetre['code_procedure_pluh']); + $aPerimetres2[count($aPerimetres2)]=$aPerimetre; + } + $sPerimetres=json_encode(array("perimetre_porteur_qualites"=>$aPerimetres2,"list_count"=>$aPerimetres['list_count'],"total_row_number"=>$aPerimetres['total_row_number'],"status"=>$aPerimetres['status'])); + return $sPerimetres; + } + + /** + * get commune of perimeter + */ + function getCommune($iCodeInsee) { + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'patrimoine', 'type' => 'schema_name'); + $aParams['code_insee'] = array('value' => $iCodeInsee, 'type' => 'number'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getCommune'], $aParams); + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + return $aLigne["nom_commune"]; + } + + /** + * get procedure_pluh of perimeter + */ + function getProcedurePluh($iProcedurePluh) { + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'patrimoine', 'type' => 'schema_name'); + $aParams['code_procedure_pluh'] = array('value' => $iProcedurePluh, 'type' => 'string'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getProcedurePluh'], $aParams); + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + return $aLigne["procedure_pluh"]; + } + + /** + * @SWG\Post(path="/perimetre_porteur_qualites", + * tags={"Perimetre_porteur_qualites"}, + * summary="Add perimetre", + * description="Request to add Perimetre_porteur_qualites", + * operationId="POST", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="perimetre Response", + * @SWG\Schema(ref="#/definitions/perimetre_porteur_qualites") + * ) + * ) + */ + + /** + * insert perimetre + * @return id of the perimetre created + */ + function POST() { + // get value sequence from patrimoine database to set id + $oConnexion = new PDO('pgsql:host=\'srv-postgres\' port=5432 dbname=\'patrimoine\'', $_SESSION["ses_Login"], trim(des(rtrim(utf8_decode($_SESSION["ses_Login"])), hexToString(rtrim($_SESSION["ses_Password"])), 0, 0, null))); + $oPDOresult = $oConnexion->query('SELECT nextval(\'patrimoine.perimetre_porteur_qualite_id_perimetre_porteur_qualite_seq\')'); + $aResult = $oPDOresult->fetch(PDO::FETCH_ASSOC); + $this->aValues['id_perimetre_porteur_qualite'] = $aResult['nextval']; + if ($this->aValues['id_classification_qualite']==null) unset($this->aValues['id_classification_qualite']); + if ($this->aValues['id_enqueteur']==null) unset($this->aValues['id_enqueteur']); + if ($this->aValues['id_typologie_tissus']==null) unset($this->aValues['id_typologie_tissus']); + if ($this->aValues['id_sous_typologie_tissus']==null) unset($this->aValues['id_sous_typologie_tissus']); + if ($this->aValues['code_procedure_pluh']==null) unset($this->aValues['code_procedure_pluh']); + $this->aValues['id_ensemble'] =$this->aValues['code_insee'].'_'.$this->aValues['id_classification_qualite'].$this->aValues['num_ensemble']; + $this->aValues['date_creation_fiche'] = date("Y-m-d"); + // error_log(print_r($this->aValues,true)); + // Fichiers à uploader + $aUploadFiles = array('photos' => []); + $aReturn = $this->genericPost('patrimoine', 'perimetre_porteur_qualite', null, 'id_perimetre_porteur_qualite', $aUploadFiles, 'patrimoine_saisie_patrimoine_perimetre', 'patrimoine'); + return $aReturn['sMessage']; + } + + /** + * @SWG\Put(path="/perimetre_porteur_qualites/{id_perimetre_porteur_qualite}", + * tags={"Perimetre_porteur_qualites"}, + * summary="update Perimetre_porteur_qualites", + * description="Request to update Perimetre_porteur_qualites", + * operationId="PUT", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Controle token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_perimetre_porteur_qualite", + * in="path", + * description="id of the Perimetre_porteur_qualites", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/perimetre_porteur_qualites") + * ) + * ) + */ + + /** + * update perimetre_porteur_qualites + * @return id of perimetre_porteur_qualites updated or error object if a perimetre_porteur_qualites is not updated + */ + function PUT() { + if ($this->aValues['id_classification_qualite']==null) unset($this->aValues['id_classification_qualite']); + if ($this->aValues['id_enqueteur']==null) unset($this->aValues['id_enqueteur']); + if ($this->aValues['id_typologie_tissus']==null) unset($this->aValues['id_typologie_tissus']); + if ($this->aValues['id_sous_typologie_tissus']==null) unset($this->aValues['id_sous_typologie_tissus']); + if ($this->aValues['code_procedure_pluh']==null) unset($this->aValues['code_procedure_pluh']); + unset($this->aValues['id_ensemble']); + unset($this->aValues['date_creation_fiche']); + $this->aValues['date_maj'] = date("Y-m-d"); + // Fichiers à uploader + $aUploadFiles = array('photos' => []); + // Mise à jour + $aReturn = $this->genericPut('patrimoine', 'perimetre_porteur_qualite', 'id_perimetre_porteur_qualite', $aUploadFiles, 'patrimoine_saisie_patrimoine_perimetre', 'patrimoine'); + if ($aReturn['sStatus'] == 1) { + $aXmlRacineAttribute['status'] = 1; + $sMessage = $this->asDocument('', 'vitis', $this->aValues['sEncoding'], True, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']); + //***** valeurs *****// + // Le paramètre "valeurs" est passé dans la requête ? + if ($this->aValues['valeurs'] !== NULL) { + $this->oConnection->oBd->delete('patrimoine', 'epq_valeur', 'id_epq', $this->aValues["my_vitis_id"]); + // Valeur(s) à rattacher au groupe ? + if (!empty($this->aValues['valeurs'])) { + require $this->sRessourcesFile; + $aValeurs = explode('|', $this->aValues['valeurs']); + foreach ($aValeurs as $iValeurId) { + $aParams = array(); + $aParams['sSchemaFramework'] = array('value' => 'patrimoine', 'type' => 'schema_name'); + $aParams['id_valeur'] = array('value' => $iValeurId, 'type' => 'number'); + $aParams['id_epq'] = array('value' => $this->aValues["my_vitis_id"], 'type' => 'number'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['insertPerimetreValeurs'], $aParams); + } + } + } + //***** protections état *****// + // Le paramètre "protection_etats" est passé dans la requête ? + if ($this->aValues['protection_etats'] !== NULL) { + $this->oConnection->oBd->delete('patrimoine', 'epq_protection_etat', 'id_epq', $this->aValues["my_vitis_id"]); + if (!empty($this->aValues['protection_etats'])) { + require $this->sRessourcesFile; + $aProtectionEtats = explode('|', $this->aValues['protection_etats']); + foreach ($aProtectionEtats as $iProtectionEtatId) { + $aParams = array(); + $aParams['sSchemaFramework'] = array('value' => 'patrimoine', 'type' => 'schema_name'); + $aParams['id_protection_etat'] = array('value' => $iProtectionEtatId, 'type' => 'number'); + $aParams['id_epq'] = array('value' => $this->aValues["my_vitis_id"], 'type' => 'number'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['insertPerimetreProtectionsEtat'], $aParams); + } + } + } + } else { + $sMessage = $aReturn['sMessage']; + } + return $sMessage; + } + + /** + * @SWG\Delete(path="/perimetre_porteur_qualites", + * tags={"Perimetre_porteur_qualites"}, + * summary="delete Perimetre_porteur_qualites", + * description="Request to delete Perimetre_porteur_qualites", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="idList", + * in="query", + * description="id of the controle", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="controle Response", + * @SWG\Schema(ref="#/definitions/perimetre_porteur_qualites") + * ) + * ) + */ + /** + * @SWG\Delete(path="/perimetre_porteur_qualites/{id_perimetre_porteur_qualite}", + * tags={"Perimetre_porteur_qualites"}, + * summary="delete Perimetre_porteur_qualites", + * description="Request to delete Perimetre_porteur_qualites", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Controle token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_perimetre_porteur_qualite", + * in="path", + * description="id of the Perimetre_porteur_qualites", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/perimetre_porteur_qualites") + * ) + * ) + */ + + /** + * delete perimetre_porteur_qualites + * @return id of perimetre_porteur_qualites deleted or error object if a perimetre_porteur_qualites is not deleted + */ + function DELETE() { + require $this->sRessourcesFile; + // Dépendances supprimées en cascade + $aReturn = $this->genericDelete('patrimoine', 'perimetre_porteur_qualite', 'id_perimetre_porteur_qualite'); + return $aReturn['sMessage']; + } + +} + +?> diff --git a/src/module_patrimoine/web_service/ws/Protection_etat.class.inc b/src/module_patrimoine/web_service/ws/Protection_etat.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..c1a6751495aae9de75070aee7eaed92927b485da --- /dev/null +++ b/src/module_patrimoine/web_service/ws/Protection_etat.class.inc @@ -0,0 +1,45 @@ +<?php + +require_once __DIR__ . '/Patrimoine.class.inc'; +require_once __DIR__ . '/../../../vitis/vas/rest/class/vitis_lib/Connection.class.inc'; + +/** + * \file Patrimoine.class.inc + * \class Patrimoine + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Patrimoine php class + * + * This class defines protection_etat for one Patrimoine + * + */ + +class Protection_etat extends Patrimoine { + + public $oError; + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + * @param type $oConnection connection object + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $this->aProperties); + } + + /** + * get informations about protection_etat + */ + function GET() { + $this->aFields = $this->getFields('patrimoine', "protection_etat", "id_protection_etat"); + } + +} + +?> \ No newline at end of file diff --git a/src/module_patrimoine/web_service/ws/Protection_etats.class.inc b/src/module_patrimoine/web_service/ws/Protection_etats.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..13cdca33d218f79b74f6985dbe4bcf73993860d4 --- /dev/null +++ b/src/module_patrimoine/web_service/ws/Protection_etats.class.inc @@ -0,0 +1,131 @@ +<?php + +/** + * \file Protection_etats.class.inc + * \class Protection_etats + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Protection_etats php class + * + * This class defines Rest Api to Vitis Protection_etats + * + */ +require_once __DIR__ . '/Patrimoine.class.inc'; +require_once 'Protection_etat.class.inc'; + + +class Protection_etats extends Patrimoine { + /** + * @SWG\Definition( + * definition="/protection_etats", + * allOf={ + * @SWG\Schema(ref="#/definitions/protection_etats") + * } + * ) + * * @SWG\Tag( + * name="Protection_etats", + * description="Protection_etats about Protection_etats" + * ) + */ + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $properties); + } + + /** + * @SWG\Get(path="/protection_etats", + * tags={"Protection_etats"}, + * summary="Get Protection_etats", + * description="Request to get Protection_etats", + * operationId="GET", + * produces={"application/xml", "application/json", "application/x-vm-json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="order_by", + * in="query", + * description="list of ordering fields", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="sort_order", + * in="query", + * description="sort_order", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="limit", + * in="query", + * description="number of element", + * required=false, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="offset", + * in="query", + * description="index of first element", + * required=false, + * type="string", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="filter", + * in="query", + * description="filter results", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="distinct", + * in="query", + * description="delete duplicates", + * required=false, + * type="boolean" + * ), + * @SWG\Response( + * response=200, + * description="protection_etat Response", + * @SWG\Schema(ref="#/definitions/protection_etats") + * ) + * ) + */ + + /** + * get Protection_etats + * @return Protection_etats + */ + function GET() { + $aReturn = $this->genericGet('patrimoine', "protection_etat", "id_protection_etat"); + $sMessage = $aReturn['sMessage']; + return $sMessage; + } + + +} + +?> \ No newline at end of file diff --git a/src/module_patrimoine/web_service/ws/Theme.class.inc b/src/module_patrimoine/web_service/ws/Theme.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..3e85cff2e24df6967c42fd5ad4c26b124a9fee62 --- /dev/null +++ b/src/module_patrimoine/web_service/ws/Theme.class.inc @@ -0,0 +1,45 @@ +<?php + +require_once __DIR__ . '/Patrimoine.class.inc'; +require_once __DIR__ . '/../../../vitis/vas/rest/class/vitis_lib/Connection.class.inc'; + +/** + * \file Patrimoine.class.inc + * \class Patrimoine + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Patrimoine php class + * + * This class defines theme for one Patrimoine + * + */ + +class Theme extends Patrimoine { + + public $oError; + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + * @param type $oConnection connection object + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $this->aProperties); + } + + /** + * get informations about theme + */ + function GET() { + $this->aFields = $this->getFields('patrimoine', "theme", "id_theme"); + } + +} + +?> \ No newline at end of file diff --git a/src/module_patrimoine/web_service/ws/Themes.class.inc b/src/module_patrimoine/web_service/ws/Themes.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..28cda19180e4265c11f52cf149da31a2d83d44f9 --- /dev/null +++ b/src/module_patrimoine/web_service/ws/Themes.class.inc @@ -0,0 +1,131 @@ +<?php + +/** + * \file Themes.class.inc + * \class Themes + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Themes php class + * + * This class defines Rest Api to Vitis Themes + * + */ +require_once __DIR__ . '/Patrimoine.class.inc'; +require_once 'Theme.class.inc'; + + +class Themes extends Patrimoine { + /** + * @SWG\Definition( + * definition="/themes", + * allOf={ + * @SWG\Schema(ref="#/definitions/themes") + * } + * ) + * * @SWG\Tag( + * name="Themes", + * description="Themes about Themes" + * ) + */ + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $properties); + } + + /** + * @SWG\Get(path="/themes", + * tags={"Themes"}, + * summary="Get Themes", + * description="Request to get Themes", + * operationId="GET", + * produces={"application/xml", "application/json", "application/x-vm-json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="order_by", + * in="query", + * description="list of ordering fields", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="sort_order", + * in="query", + * description="sort_order", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="limit", + * in="query", + * description="number of element", + * required=false, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="offset", + * in="query", + * description="index of first element", + * required=false, + * type="string", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="filter", + * in="query", + * description="filter results", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="distinct", + * in="query", + * description="delete duplicates", + * required=false, + * type="boolean" + * ), + * @SWG\Response( + * response=200, + * description="theme Response", + * @SWG\Schema(ref="#/definitions/themes") + * ) + * ) + */ + + /** + * get Themes + * @return Themes + */ + function GET() { + $aReturn = $this->genericGet('patrimoine', "theme", "id_theme"); + $sMessage = $aReturn['sMessage']; + return $sMessage; + } + + +} + +?> \ No newline at end of file diff --git a/src/module_patrimoine/web_service/ws/Valeur.class.inc b/src/module_patrimoine/web_service/ws/Valeur.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..5495bd647481a36955a44093649affca0d593702 --- /dev/null +++ b/src/module_patrimoine/web_service/ws/Valeur.class.inc @@ -0,0 +1,45 @@ +<?php + +require_once __DIR__ . '/Patrimoine.class.inc'; +require_once __DIR__ . '/../../../vitis/vas/rest/class/vitis_lib/Connection.class.inc'; + +/** + * \file Patrimoine.class.inc + * \class Patrimoine + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Patrimoine php class + * + * This class defines valeur for one Patrimoine + * + */ + +class Valeur extends Patrimoine { + + public $oError; + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + * @param type $oConnection connection object + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $this->aProperties); + } + + /** + * get informations about valeur + */ + function GET() { + $this->aFields = $this->getFields('patrimoine', "valeur", "id_valeur"); + } + +} + +?> \ No newline at end of file diff --git a/src/module_patrimoine/web_service/ws/Valeurs.class.inc b/src/module_patrimoine/web_service/ws/Valeurs.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..766b1816db52bb1ebbed9d5f1a1535b40cff3e7a --- /dev/null +++ b/src/module_patrimoine/web_service/ws/Valeurs.class.inc @@ -0,0 +1,131 @@ +<?php + +/** + * \file Valeurs.class.inc + * \class Valeurs + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Valeurs php class + * + * This class defines Rest Api to Vitis Valeurs + * + */ +require_once __DIR__ . '/Patrimoine.class.inc'; +require_once 'Valeur.class.inc'; + + +class Valeurs extends Patrimoine { + /** + * @SWG\Definition( + * definition="/valeurs", + * allOf={ + * @SWG\Schema(ref="#/definitions/valeurs") + * } + * ) + * * @SWG\Tag( + * name="Valeurs", + * description="Valeurs about Valeurs" + * ) + */ + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $properties); + } + + /** + * @SWG\Get(path="/valeurs", + * tags={"Valeurs"}, + * summary="Get Valeurs", + * description="Request to get Valeurs", + * operationId="GET", + * produces={"application/xml", "application/json", "application/x-vm-json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="order_by", + * in="query", + * description="list of ordering fields", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="sort_order", + * in="query", + * description="sort_order", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="limit", + * in="query", + * description="number of element", + * required=false, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="offset", + * in="query", + * description="index of first element", + * required=false, + * type="string", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="filter", + * in="query", + * description="filter results", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="distinct", + * in="query", + * description="delete duplicates", + * required=false, + * type="boolean" + * ), + * @SWG\Response( + * response=200, + * description="valeur Response", + * @SWG\Schema(ref="#/definitions/valeurs") + * ) + * ) + */ + + /** + * get Valeurs + * @return Valeurs + */ + function GET() { + $aReturn = $this->genericGet('patrimoine', "valeur", "id_valeur"); + $sMessage = $aReturn['sMessage']; + return $sMessage; + } + + +} + +?> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/module/component/fiche_operation/fiche_operation.html b/src/module_suivi_prod_immo/module/component/fiche_operation/fiche_operation.html new file mode 100644 index 0000000000000000000000000000000000000000..cd563ae416fb4a66311967e5cb60530c3e52ecb8 --- /dev/null +++ b/src/module_suivi_prod_immo/module/component/fiche_operation/fiche_operation.html @@ -0,0 +1,19 @@ +<div id="select_display_form_reader" app-form-reader app-form-definition="formOperation" app-form-definition-name="'display'" app-form-values="formOperationValues"> </div> + + + <div class="row mt-5" style="margin-left: 15px;"> + <form> + <div class="form-group"> + <label for="l_operation">Opération</label> + <select class="form-control select_id_operation" id="l_operation" ng-model="operation_selected"> + <option ng-repeat="operation in operations" ng-value="operation.id_operation">{{ operation.nom_operation }}</option> + </select> + </div> + + <div class="btn-group" role="group" aria-label="Basic example"> + <button id="get_operation" type="button" class="btn btn-outline-secondary button_fiche" ng-click="getFicheOperation(operation_selected)">Afficher la fiche</button> + <button id="get_operation_excel" type="button" class="btn btn-outline-secondary button_fiche" ng-click="getFicheOperationXls(operation_selected)" disabled><span class="glyphicon glyphicon-download-alt" aria-hidden="true"></span> Export</button> + </div> + + </form> + </div> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/module/component/fiche_operation/fiche_operation.js b/src/module_suivi_prod_immo/module/component/fiche_operation/fiche_operation.js new file mode 100644 index 0000000000000000000000000000000000000000..36f04ab76113a2cf040935858b464e65e0c5a91b --- /dev/null +++ b/src/module_suivi_prod_immo/module/component/fiche_operation/fiche_operation.js @@ -0,0 +1,51 @@ +goog.provide('vmap.suivi_prod_immo.fiche_operation'); +goog.require('oVmap'); + +/** + * Fiche operation Directive + * + * @return {angular.Directive} The directive specs. + * @export + * @constructor + */ +vitisApp.fiche_operationDirective = function () { + + return { + restrict: 'A', + templateUrl: 'modules/suivi_prod_immo/component/fiche_operation/fiche_operation.html', + link: function (scope, element, attrs) { + scope.getFicheOperation = function (id_operation) { + if(id_operation==null){ + alert('Veuillez sélectionner une opération dans la liste déroulante !'); + }else{ + window.open(oVmap['properties']['web_server_name'] +'/doc/suivi_prod_immo/get_1_operation.php?token='+oVmap['properties']['token']+'&id_operation='+id_operation, '_blank'); + //window.open('https://geo.urbalyon.org/doc/suivi_prod_immo/get_1_operation.php?id_operation='+id_operation, '_blank'); + } + + } + scope.getFicheOperationXls = function (id_operation) { + alert('En cours de développement'); + } + + scope.operation_selected = null; + scope.operations = []; + + // récupération du contenu de la liste déroulante + ajaxRequest({ + "method": "GET", + "url": oVmap['properties']['web_server_name'] + "/" + oVmap['properties']['services_alias'] + "/suivi_prod_immo/getlist/getoperationlist", + 'async': false, + 'responseType': '', + "success": function (response) { + data = JSON.parse(response.data); + // data.forEach(operation_value => scope.operations.push(operation_value)); + for (var operation_value in data) { + scope.operations.push(data[operation_value]); + } + } + }); + + } + }; +}; +vitisApp.module.directive("appFicheoperation", vitisApp.fiche_operationDirective); diff --git a/src/module_suivi_prod_immo/module/component/fiche_operation/fiche_operation.less b/src/module_suivi_prod_immo/module/component/fiche_operation/fiche_operation.less new file mode 100644 index 0000000000000000000000000000000000000000..f0b5d029bceba76dc2e099cacced55c6137a630f --- /dev/null +++ b/src/module_suivi_prod_immo/module/component/fiche_operation/fiche_operation.less @@ -0,0 +1,14 @@ + +.select_id_operation{ + width:500px; +} + +.title_fiche{ + padding-left: 20px; + font-size: 35px; +} + +.button_fiche{ + border-color: gainsboro; + border: 1px solid; +} \ No newline at end of file diff --git a/src/module_suivi_prod_immo/module/component/porteur/porteur.html b/src/module_suivi_prod_immo/module/component/porteur/porteur.html new file mode 100644 index 0000000000000000000000000000000000000000..cd3583734a70f707f1a140c8c895a64d8e368386 --- /dev/null +++ b/src/module_suivi_prod_immo/module/component/porteur/porteur.html @@ -0,0 +1,17 @@ +<div class="row mt-5" style="margin-left: 15px;"> + <form> + <div class="form-group"> + <label for="l_nom_amenageur">Opérateurs et partenaires</label> + <select class="form-control select_nom_amenageur" id="l_nom_amenageur" ng-model="nom_amenageur_selected"> + <option ng-repeat="nom_amenageur in nom_amenageurs" ng-value="nom_amenageur.code_amenageur">{{ nom_amenageur.nom_amenageur }}</option> + </select> + <span class="glyphicon glyphicon-info-sign" aria-hidden="true" style="color:blue"></span> Le nombre d'opération de l'opérateur est affiché entre parenthèse. + </div> + + <div class="btn-group" role="group" aria-label="Basic example"> + <button id="get_nom_amenageur" type="button" class="btn btn-outline-secondary button_fiche" ng-click="getPorteur(nom_amenageur_selected)">Afficher la fiche</button> + <button id="get_nom_amenageur_excel" type="button" class="btn btn-outline-secondary button_fiche" ng-click="getPorteurXls(nom_amenageur_selected)" disabled><span class="glyphicon glyphicon-download-alt" aria-hidden="true"></span> Export</button> + </div> + + </form> +</div> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/module/component/porteur/porteur.js b/src/module_suivi_prod_immo/module/component/porteur/porteur.js new file mode 100644 index 0000000000000000000000000000000000000000..bac8f0ad0f4e18a0255df40e5c5b949ca20e92e8 --- /dev/null +++ b/src/module_suivi_prod_immo/module/component/porteur/porteur.js @@ -0,0 +1,50 @@ +goog.provide('vmap.suivi_prod_immo.porteur'); +goog.require('oVmap'); + +/** + * Fiche porteur de projets Directive + * + * @return {angular.Directive} The directive specs. + * @export + * @constructor + */ +vitisApp.porteurDirective = function () { + + return { + restrict: 'A', + templateUrl: 'modules/suivi_prod_immo/component/porteur/porteur.html', + link: function (scope, element, attrs) { + scope.getPorteur = function (nom_amenageur) { + if(nom_amenageur==null){ + alert('Veuillez sélectionner un aménageur ou un partenaire dans la liste déroulante !'); + }else{ + window.open(oVmap['properties']['web_server_name'] +'/doc/suivi_prod_immo/get_3_porteur.php?token='+oVmap['properties']['token']+'&concessionnaire_amenagement='+nom_amenageur, '_blank'); + //window.open('https://geo.urbalyon.org/doc/suivi_prod_immo/get_3_porteur.php?nom_amenageur='+nom_amenageur, '_blank'); + } + } + scope.getPorteurXls = function (nom_amenageur) { + alert('En cours de développement'); + } + + scope.nom_amenageur_selected = null; + scope.nom_amenageurs = []; + + // récupération du contenu de la liste déroulante + ajaxRequest({ + "method": "GET", + "url": oVmap['properties']['web_server_name'] + "/" + oVmap['properties']['services_alias'] + "/suivi_prod_immo/getlist/getamenageurlist", + 'async': false, + 'responseType': '', + "success": function (response) { + data = JSON.parse(response.data); + // data.forEach(nom_amenageur_value => scope.nom_amenageurs.push(nom_amenageur_value)); + for (var nom_amenageur_value in data) { + scope.nom_amenageurs.push(data[nom_amenageur_value]); + } + } + }); + + } + }; +}; +vitisApp.module.directive("appPorteur", vitisApp.porteurDirective); diff --git a/src/module_suivi_prod_immo/module/component/porteur/porteur.less b/src/module_suivi_prod_immo/module/component/porteur/porteur.less new file mode 100644 index 0000000000000000000000000000000000000000..d506999f11c2cdb4c8fc52965ddd09d5d576a9a2 --- /dev/null +++ b/src/module_suivi_prod_immo/module/component/porteur/porteur.less @@ -0,0 +1,14 @@ + +.select_nom_amenageur{ + width:500px; +} + +.title_fiche{ + padding-left: 20px; + font-size: 35px; +} + +.button_fiche{ + border-color: gainsboro; + border: 1px solid; +} \ No newline at end of file diff --git a/src/module_suivi_prod_immo/module/component/programme_logement/programme_logement.html b/src/module_suivi_prod_immo/module/component/programme_logement/programme_logement.html new file mode 100644 index 0000000000000000000000000000000000000000..7c582b51bbdf55a1b67be67723237a644ad248a9 --- /dev/null +++ b/src/module_suivi_prod_immo/module/component/programme_logement/programme_logement.html @@ -0,0 +1,29 @@ + + <div class="row mt-5" style="margin-left: 15px;"> + <form> + <div class="form-group"> + <label for="l_financement">Mode de financement</label> + <select class="form-control select_code_financement_equ_public" id="l_financement" ng-model="code_financement_equ_public_selected"> + <option ng-repeat="financement in code_financement_equ_publics" ng-value="financement.code_financement_equ_public">{{ financement.financement_equ_public }}</option> + </select> + </div> + <div class="form-group"> + <label for="l_ctm">Conférence Territoriale des Maires</label> + <select class="form-control select_id_ctm" id="l_ctm" ng-model="id_ctm_selected"> + <option ng-repeat="ctm in nom_ctms" ng-value="ctm.id_ctm">{{ ctm.nom_ctm }}</option> + </select> + </div> + <div class="form-group"> + <label for="l_commune">Communes</label> + <select class="form-control select_id_commune" id="l_commune" ng-model="id_commune_selected"> + <option ng-repeat="commune in nom_communes" ng-value="commune.id_commune">{{ commune.nom_commune }}</option> + </select> + </div> + + <div class="btn-group" role="group" aria-label="Basic example"> + <button id="get_type_operation" type="button" class="btn btn-outline-secondary button_fiche" ng-click="getLogement(id_ctm_selected,id_commune_selected,code_financement_equ_public_selected)">Afficher la fiche</button> + <button id="get_type_operation_excel" type="button" class="btn btn-outline-secondary button_fiche" ng-click="getLogementXls(id_ctm_selected,id_commune_selected,code_financement_equ_public_selected)" disabled><span class="glyphicon glyphicon-download-alt" aria-hidden="true"></span> Export</button> + </div> + + </form> + </div> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/module/component/programme_logement/programme_logement.js b/src/module_suivi_prod_immo/module/component/programme_logement/programme_logement.js new file mode 100644 index 0000000000000000000000000000000000000000..75436fc107b43c3425b9e1895a78b4ecaf6eab20 --- /dev/null +++ b/src/module_suivi_prod_immo/module/component/programme_logement/programme_logement.js @@ -0,0 +1,88 @@ +goog.provide('vmap.suivi_prod_immo.programme_logement'); +goog.require('oVmap'); + +/** + * Fiche programme logement Directive + * + * @return {angular.Directive} The directive specs. + * @export + * @constructor + */ +vitisApp.programme_logementDirective = function () { + + return { + restrict: 'A', + templateUrl: 'modules/suivi_prod_immo/component/programme_logement/programme_logement.html', + link: function (scope, element, attrs) { + scope.getLogement = function (id_ctm,id_commune,code_financement_equ_public) { + params = ''; + if(id_commune==null){ + if(id_ctm!=null){ + params='&id_ctm='+id_ctm; + } + }else{ + params='&id_commune='+id_commune; + } + if(code_financement_equ_public!=null) params=params+'&code_financement='+code_financement_equ_public; + window.open(oVmap['properties']['web_server_name'] +'/doc/suivi_prod_immo/get_4_logement.php?token='+oVmap['properties']['token']+params, '_blank'); + //window.open('https://geo.urbalyon.org/doc/suivi_prod_immo/get_4_logement.php?nom_amenageur='+nom_amenageur, '_blank'); + //https://geo.urbalyon.org/doc/suivi_prod_immo/get_4_logement.php?token=40969f02da2acbefbb09dc353c2142a6&code_financement=FINZAC&id_commune=7 + } + scope.getLogementXls = function (nom_amenageur) { + alert('En cours de développement'); + } + + scope.id_ctm_selected = null; + scope.id_commune_selected = null; + scope.code_financement_equ_public_selected = null; + scope.nom_ctms = []; + scope.nom_communes = []; + scope.code_financement_equ_publics = []; + + // récupération du contenu de la liste déroulante + ajaxRequest({ + "method": "GET", + "url": oVmap['properties']['web_server_name'] + "/" + oVmap['properties']['services_alias'] + "/suivi_prod_immo/getlist/getctmlist", + 'async': false, + 'responseType': '', + "success": function (response) { + data = JSON.parse(response.data); + // data.forEach(nom_ctm_value => scope.nom_ctms.push(nom_ctm_value)); + for (var nom_ctm_value in data) { + scope.nom_ctms.push(data[nom_ctm_value]); + } + } + }); + // récupération du contenu de la liste déroulante + ajaxRequest({ + "method": "GET", + "url": oVmap['properties']['web_server_name'] + "/" + oVmap['properties']['services_alias'] + "/suivi_prod_immo/getlist/getcommunelist", + 'async': false, + 'responseType': '', + "success": function (response) { + data = JSON.parse(response.data); + // data.forEach(nom_commune_value => scope.nom_communes.push(nom_commune_value)); + for (var nom_commune_value in data) { + scope.nom_communes.push(data[nom_commune_value]); + } + } + }); + // récupération du contenu de la liste déroulante + ajaxRequest({ + "method": "GET", + "url": oVmap['properties']['web_server_name'] + "/" + oVmap['properties']['services_alias'] + "/suivi_prod_immo/getlist/getfinancementlist", + 'async': false, + 'responseType': '', + "success": function (response) { + data = JSON.parse(response.data); + // data.forEach(code_financement_value => scope.code_financement_equ_publics.push(code_financement_value)); + for (var code_financement_value in data) { + scope.code_financement_equ_publics.push(data[code_financement_value]); + } + } + }); + + } + }; +}; +vitisApp.module.directive("appProgrammelogement", vitisApp.programme_logementDirective); diff --git a/src/module_suivi_prod_immo/module/component/programme_logement/programme_logement.less b/src/module_suivi_prod_immo/module/component/programme_logement/programme_logement.less new file mode 100644 index 0000000000000000000000000000000000000000..56cfc85294203981990c8e899aa31be726d8edac --- /dev/null +++ b/src/module_suivi_prod_immo/module/component/programme_logement/programme_logement.less @@ -0,0 +1,14 @@ + +.select_programme_logement{ + width:500px; +} + +.title_fiche{ + padding-left: 20px; + font-size: 35px; +} + +.button_fiche{ + border-color: gainsboro; + border: 1px solid; +} \ No newline at end of file diff --git a/src/module_suivi_prod_immo/module/component/type_operation/type_operation.html b/src/module_suivi_prod_immo/module/component/type_operation/type_operation.html new file mode 100644 index 0000000000000000000000000000000000000000..d8480246026b78fcc1486040278a36b0e6a12178 --- /dev/null +++ b/src/module_suivi_prod_immo/module/component/type_operation/type_operation.html @@ -0,0 +1,41 @@ + + <div class="row mt-5" style="margin-left: 15px;"> + <form> + <div class="form-group"> + <label for="l_ctm">Conférence Territoriale des Maires</label> + <select class="form-control select_id_ctm" id="l_ctm" ng-model="id_ctm_selected"> + <option ng-repeat="ctm in ctms" ng-value="ctm.id_ctm">{{ ctm.nom_ctm }}</option> + </select> + </div> + <div class="form-group"> + <label for="l_commune">Communes</label> + <select class="form-control select_id_commune" id="l_commune" ng-model="id_commune_selected"> + <option ng-repeat="commune in communes" ng-value="commune.id_commune">{{ commune.nom_commune }}</option> + </select> + </div> + <div class="form-group"> + <label for="l_procedure_amenagement">Procédure d'aménagement</label> + <select class="form-control select_code_procedure_amenagement" id="l_procedure_amenagement" ng-model="code_procedure_amenagement_selected"> + <option ng-repeat="procedure_amenagement in procedure_amenagements" ng-value="procedure_amenagement.code_procedure_amenagement">{{ procedure_amenagement.procedure_amenagement }}</option> + </select> + </div> + <div class="form-group"> + <label for="l_financement">Mode de financement</label> + <select class="form-control select_code_financement_equ_public" id="l_financement" ng-model="code_financement_equ_public_selected"> + <option ng-repeat="financement in financement_equ_publics" ng-value="financement.code_financement_equ_public">{{ financement.financement_equ_public }}</option> + </select> + </div> + <div class="form-group"> + <label for="l_suivi">Suivi de l'opération</label> + <select class="form-control select_code_suivi" id="l_suivi" ng-model="code_suivi_selected"> + <option ng-repeat="suivi in suivis" ng-value="suivi.code_suivi">{{ suivi.suivi }}</option> + </select> + </div> + + <div class="btn-group" role="group" aria-label="Basic example"> + <button id="get_type_operation" type="button" class="btn btn-outline-secondary button_fiche" ng-click="getTypeOperation(id_ctm_selected,id_commune_selected,code_procedure_amenagement_selected,code_financement_equ_public_selected,code_suivi_selected)">Afficher la fiche</button> + <button id="get_type_operation_excel" type="button" class="btn btn-outline-secondary button_fiche" ng-click="getTypeOperationXls(id_ctm_selected,id_commune_selected,code_procedure_amenagement_selected,code_financement_equ_public_selected,code_suivi_selected)" disabled><span class="glyphicon glyphicon-download-alt" aria-hidden="true"></span> Export</button> + </div> + + </form> + </div> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/module/component/type_operation/type_operation.js b/src/module_suivi_prod_immo/module/component/type_operation/type_operation.js new file mode 100644 index 0000000000000000000000000000000000000000..d57893292b818e039f40956c2ea7baf2f4cd45ca --- /dev/null +++ b/src/module_suivi_prod_immo/module/component/type_operation/type_operation.js @@ -0,0 +1,122 @@ +goog.provide('vmap.suivi_prod_immo.type_operation'); +goog.require('oVmap'); + +/** + * Fiche type opération Directive + * + * @return {angular.Directive} The directive specs. + * @export + * @constructor + */ +vitisApp.type_operationDirective = function () { + + return { + restrict: 'A', + templateUrl: 'modules/suivi_prod_immo/component/type_operation/type_operation.html', + link: function (scope, element, attrs) { + scope.getTypeOperation = function (id_ctm,id_commune,code_procedure_amenagement,code_financement_equ_public,code_suivi) { + params = ''; + if(id_commune==null){ + if(id_ctm!=null){ + params='&id_ctm='+id_ctm; + } + }else{ + params='&id_commune='+id_commune; + } + if(code_financement_equ_public!=null) params=params+'&code_financement='+code_financement_equ_public; + if(code_procedure_amenagement!=null) params=params+'&code_procedure_amenagement='+code_procedure_amenagement; + if(code_suivi!=null) params=params+'&code_suivi='+code_suivi; + window.open(oVmap['properties']['web_server_name'] +'/doc/suivi_prod_immo/get_2_type.php?token='+oVmap['properties']['token']+params, '_blank'); + //window.open('https://geo.urbalyon.org/doc/suivi_prod_immo/get_2_type.php?nom_amenageur='+nom_amenageur, '_blank'); + + } + scope.getTypeOperationXls = function (id_ctm,id_commune,code_procedure_amenagement,code_financement_equ_public,code_suivi) { + alert('En cours de développement'); + } + + scope.id_ctm_selected = null; + scope.id_commune_selected = null; + scope.code_financement_equ_public_selected = null; + scope.code_procedure_amenagement_selected = null; + scope.code_suivi_selected = null; + scope.ctms = []; + scope.communes = []; + scope.financement_equ_publics = []; + scope.procedure_amenagements = []; + scope.suivis = []; + + // récupération du contenu de la liste déroulante + ajaxRequest({ + "method": "GET", + "url": oVmap['properties']['web_server_name'] + "/" + oVmap['properties']['services_alias'] + "/suivi_prod_immo/getlist/getctmlist", + 'async': false, + 'responseType': '', + "success": function (response) { + data = JSON.parse(response.data); + // data.forEach(nom_ctm_value => scope.ctms.push(nom_ctm_value)); + for (var nom_ctm_value in data) { + scope.ctms.push(data[nom_ctm_value]); + } + } + }); + // récupération du contenu de la liste déroulante + ajaxRequest({ + "method": "GET", + "url": oVmap['properties']['web_server_name'] + "/" + oVmap['properties']['services_alias'] + "/suivi_prod_immo/getlist/getcommunelist", + 'async': false, + 'responseType': '', + "success": function (response) { + data = JSON.parse(response.data); + // data.forEach(nom_commune_value => scope.communes.push(nom_commune_value)); + for (var nom_commune_value in data) { + scope.communes.push(data[nom_commune_value]); + } + } + }); + // récupération du contenu de la liste déroulante + ajaxRequest({ + "method": "GET", + "url": oVmap['properties']['web_server_name'] + "/" + oVmap['properties']['services_alias'] + "/suivi_prod_immo/getlist/getfinancementlist", + 'async': false, + 'responseType': '', + "success": function (response) { + data = JSON.parse(response.data); + // data.forEach(code_financement_value => scope.financement_equ_publics.push(code_financement_value)); + for (var code_financement_value in data) { + scope.financement_equ_publics.push(data[code_financement_value]); + } + } + }); + // récupération du contenu de la liste déroulante + ajaxRequest({ + "method": "GET", + "url": oVmap['properties']['web_server_name'] + "/" + oVmap['properties']['services_alias'] + "/suivi_prod_immo/getlist/getprocedureamenagementlist", + 'async': false, + 'responseType': '', + "success": function (response) { + data = JSON.parse(response.data); + // data.forEach(code_procedure_amenagement_value => scope.procedure_amenagements.push(code_procedure_amenagement_value)); + for (var code_procedure_amenagement_value in data) { + scope.procedure_amenagements.push(data[code_procedure_amenagement_value]); + } + } + }); + // récupération du contenu de la liste déroulante + ajaxRequest({ + "method": "GET", + "url": oVmap['properties']['web_server_name'] + "/" + oVmap['properties']['services_alias'] + "/suivi_prod_immo/getlist/getsuivilist", + 'async': false, + 'responseType': '', + "success": function (response) { + data = JSON.parse(response.data); + // data.forEach(code_suivi_value => scope.suivis.push(code_suivi_value)); + for (var code_suivi_value in data) { + scope.suivis.push(data[code_suivi_value]); + } + } + }); + + } + }; +}; +vitisApp.module.directive("appTypeoperation", vitisApp.type_operationDirective); diff --git a/src/module_suivi_prod_immo/module/component/type_operation/type_operation.less b/src/module_suivi_prod_immo/module/component/type_operation/type_operation.less new file mode 100644 index 0000000000000000000000000000000000000000..281d7d3c36fa31be8538333b07ef3c60740326a5 --- /dev/null +++ b/src/module_suivi_prod_immo/module/component/type_operation/type_operation.less @@ -0,0 +1,30 @@ + +.select_id_ctm{ + width:500px; +} + +.select_id_commune{ + width:500px; +} + +.select_code_procedure_amenagement{ + width:500px; +} + +.select_code_financement_equ_public{ + width:500px; +} + +.select_code_suivi{ + width:500px; +} + +.title_fiche{ + padding-left: 20px; + font-size: 35px; +} + +.button_fiche{ + border-color: gainsboro; + border: 1px solid; +} \ No newline at end of file diff --git a/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_operation.json b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_operation.json index 22a8de54f828362d6665f72e92fb15cbd0388737..746bf3d0bf66d8c01352a8d20921b0c8ca6b4574 100644 --- a/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_operation.json +++ b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_operation.json @@ -39,10 +39,10 @@ "fields":[ { "type":"label", - "name":"nom_perimetre", - "label":"Périmètre projet urbain", + "name":"perimetres_label", + "label":"Périmètre(s) projet(s) urbain(s)", "nb_cols":12, - "id":"nom_perimetre" + "id":"perimetres_label" } ] }, @@ -69,62 +69,16 @@ ] }, { - "fields": [ - { - "type": "map_osm", - "name": "geom", - "label": "Périmètre", - "required": false, - "nb_cols": 12, - "id": "pop90_3_1", - "style": { - "height": "250px" - }, - "map_options": { - "proj": "EPSG:2154", - "type": "OSM", - "output_format": "ewkt", - "center": { - "extent": [ - 828118.6537970116, - 6512133.97777543, - 862347.0524710228, - 6524271.707801675 - ], - "coord": [ - 845232.8531340172, - 6518202.842788553 - ], - "scale": 183342 - }, - "controls": { - "MP": false, - "ZO": true, - "SL": true, - "CP": false - }, - "layers": [], - "interactions": { - "multi_geometry": false, - "full_screen": false, - "RA": false, - "RO": false, - "ED": false, - "DP": false, - "DL": false, - "DPol": false, - "SE": true - }, - "draw_color": "rgba(54,184,255,0.6)", - "contour_color": "rgba(0,0,0,0.4)", - "contour_size": 2, - "circle_radius": 6, - "features": [], - "coord_accuracy": 8 - } - } - ] - }, + "fields":[ + { + "type":"label", + "name":"contexte_urbain", + "label":"Contexte urbain de l'opération", + "nb_cols":5, + "id":"contexte_urbain" + } + ] + }, { "fields":[ { @@ -178,11 +132,12 @@ "alinea", "nom_operation", "communes_label", - "nom_perimetre", + "perimetres_label", "ctms_label", "surface", "geom", "date_mise_a_jour", + "contexte_urbain", "Element_1", "commentaire_operation" ] @@ -299,21 +254,21 @@ }, { "type":"select", - "name":"nom_amenageur", + "name":"concessionnaire_amenagement", "label":"Nom de l'aménageur ou du partenaire", "required":false, "nb_cols":3, - "id":"nom_amenageur", + "id":"concessionnaire_amenagement", "datasource":{ - "datasource_id":"datasource_nom_amenageur", + "datasource_id":"datasource_concessionnaire_amenagement", "sort_order":"ASC", "distinct":"true", - "label_key":"nom_amenageur", - "order_by":"nom_amenageur", - "id_key":"nom_amenageur", - "attributs":"nom_amenageur|nom_amenageur" + "label_key":"concessionnaire_amenagement", + "order_by":"concessionnaire_amenagement", + "id_key":"concessionnaire_amenagement", + "attributs":"concessionnaire_amenagement|concessionnaire_amenagement" }, - "id_from":"nom_amenageur_from" + "id_from":"concessionnaire_amenagement_from" } ] }, @@ -362,7 +317,7 @@ { "type":"select", "name":"code_suivi", - "label":"Suivi", + "label":"Mode opératoire", "required":false, "nb_cols":3, "id":"code_suivi", @@ -457,10 +412,9 @@ "id_operation", "nom_operation", "cdp_mo", - "nom_amenageur", + "concessionnaire_amenagement", "nom_moe", "architecte_moe", - "nom_amenageur", "annee_init", "annee_achevement", "code_avancement", @@ -544,28 +498,46 @@ }, { "fields": [ - { - "type": "double_select", - "name": "communes", - "label": "Communes de l'opération", - "required": false, - "nb_cols": 4, - "id": "Element_0_4_1", - "name_to": "communes", - "name_from": "communes_from", - "size": 6, - "label_from": "communes non associées", - "label_to": "communes associées à l'opération", - "web_service": { - "ressource_id": "suivi_prod_immo/communes", - "id_key": "id_commune", - "label_key": "nom_commune", - "parameters": { - "order_by": "nom_commune" + { + "type": "double_select", + "name": "communes", + "label": "Communes de l'opération", + "required": false, + "nb_cols": 6, + "id": "Element_0_4_1", + "name_to": "communes", + "name_from": "communes_from", + "size": 6, + "label_from": "communes non associées", + "label_to": "communes associées à l'opération", + "web_service": { + "ressource_id": "suivi_prod_immo/communes", + "id_key": "id_commune", + "label_key": "nom_commune", + "parameters": { + "order_by": "nom_commune" + } } - } - } - ] + }, + { + "type":"select", + "name":"id_commune", + "label":"Commune principale", + "required":false, + "nb_cols":3, + "id":"id_commune", + "id_from":"id_commune", + "datasource":{ + "datasource_id":"datasource_commune", + "sort_order":"ASC", + "distinct":"true", + "label_key":"nom_commune", + "order_by":"nom_commune", + "id_key":"id_commune", + "attributs":"id_commune|nom_commune" + } + } + ] }, { "fields": [ @@ -574,7 +546,7 @@ "name": "ctms", "label": "Conférences territoriales des maires de l'opération (CTM)", "required": false, - "nb_cols": 4, + "nb_cols": 6, "id": "Element_0_4_1", "name_to": "ctms", "name_from": "ctms_from", @@ -592,24 +564,49 @@ } ] }, + { + "fields": [ + { + "type": "double_select", + "name": "perimetres", + "label": "Périmètre(s) projet(s) urbain(s)", + "required": false, + "nb_cols": 8, + "id": "Element_0_4_1", + "name_to": "perimetres", + "name_from": "perimetres_from", + "size": 6, + "label_from": "périmètres non associés", + "label_to": "périmètres associés à l'opération", + "web_service": { + "ressource_id": "suivi_prod_immo/perimetres", + "id_key": "id_perimetre", + "label_key": "nom_perimetre", + "parameters": { + "order_by": "nom_perimetre" + } + } + } + ] + }, { "fields":[ { "type":"select", - "name":"id_perimetre", - "label":"Périmètre projets urbains", + "name":"code_contexte_urbain", + "label":"Contexte urbain de l'opération", "required":false, - "nb_cols":4, - "id":"id_perimetre", - "id_from":"id_perimetre_from", + "nb_cols":6, + "id":"code_contexte_urbain", + "id_from":"code_contexte_urbain_from", "datasource":{ - "datasource_id":"datasource_perimetre", + "datasource_id":"datasource_code_contexte_urbain", "sort_order":"ASC", "distinct":"true", - "label_key":"nom_perimetre", - "order_by":"nom_perimetre", - "id_key":"id_perimetre", - "attributs":"id_perimetre|nom_perimetre" + "label_key":"contexte_urbain", + "order_by":"contexte_urbain", + "id_key":"code_contexte_urbain", + "attributs":"code_contexte_urbain|contexte_urbain" } } ] @@ -682,8 +679,10 @@ "surface", "date_mise_a_jour", "communes", + "id_commune", "ctms", - "id_perimetre", + "perimetres", + "code_contexte_urbain", "commentaire_operation" ] } @@ -703,6 +702,18 @@ "ressource_id":"vitis/genericquerys", "id":"datasource_perimetre" }, + "datasource_commune":{ + "type":"web_service", + "dataType":"tableValue", + "name":"commune", + "description":"", + "parameters":{ + "schema":"prod_immo", + "table":"commune" + }, + "ressource_id":"vitis/genericquerys", + "id":"datasource_commune" + }, "datasource_code_avancement":{ "type":"web_service", "dataType":"tableValue", @@ -763,17 +774,17 @@ "ressource_id":"vitis/genericquerys", "id":"datasource_code_vocation" }, - "datasource_nom_amenageur":{ + "datasource_concessionnaire_amenagement":{ "type":"web_service", "dataType":"tableValue", - "name":"nom_amenageur", + "name":"concessionnaire_amenagement", "description":"", "parameters":{ "schema":"prod_immo", "table":"operation" }, "ressource_id":"vitis/genericquerys", - "id":"datasource_nom_amenageur" + "id":"datasource_concessionnaire_amenagement" }, "datasource_cdp_mo":{ "type":"web_service", diff --git a/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_operation_operation_acteur.json b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_operation_operation_acteur.json index 066115a2212152b5e41ba564aa2dd74068291ba3..df01d34cc2670fb2d1186b04aee27329081eb9ba 100644 --- a/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_operation_operation_acteur.json +++ b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_operation_operation_acteur.json @@ -22,14 +22,14 @@ { "type":"label", "name":"cdp_mo", - "label":"Nom / Contact du chef de projet", + "label":"Nom / Contact du chef de projet MdL", "nb_cols":6, "id":"cdp_mo" }, { "type":"label", "name":"direction_mo", - "label":"Direction maîtrise d'ouvrage", + "label":"Direction maître d'ouvrage à la MDL", "nb_cols":6, "id":"direction_mo" } @@ -39,14 +39,25 @@ "fields":[ { "type":"label", - "name":"nom_amenageur", - "label":"Nom de la structure de l'aménageur public ou privé, si gestion déléguée du suivi et de la réalisation de l'opération", + "name":"concessionnaire_amenagement", + "label":"Nom de la structure signataire du traité de concession d'aménagement", "nb_cols":6, - "id":"nom_amenageur" + "id":"concessionnaire_amenagement" } ] }, - { + { + "fields":[ + { + "type":"label", + "name":"partenaire_pup", + "label":"Partenaires PUP, co-signataires (nom de la société de promotion et / ou du bailleur social)", + "nb_cols":10, + "id":"partenaire_pup" + } + ] + }, + { "fields":[ { "type":"label", @@ -57,18 +68,18 @@ } ] }, - { + { "fields":[ { "type":"label", "name":"nom_moe", - "label":"Nom du maître d'oeuvre mandataire (cabinet archi-urba ou groupement)", + "label":"Nom du BET maître d'œuvre (si groupement nom du mandataire)", "nb_cols":6, "id":"nom_moe" } ] }, - { + { "fields":[ { "type":"label", @@ -78,6 +89,17 @@ "id":"architecte_moe" } ] + }, + { + "fields":[ + { + "type":"label", + "name":"hqe_amenagement", + "label":"Nom du bureau d'étude HQE aménagement", + "nb_cols":6, + "id":"hqe_amenagement" + } + ] }, { "fields":[ @@ -111,10 +133,12 @@ "nom_mo", "cdp_mo", "direction_mo", - "nom_amenageur", + "concessionnaire_amenagement", "cdp_amenageur", + "partenaire_pup", "nom_moe", - "architecte_moe" + "architecte_moe", + "hqe_amenagement" ] } ] @@ -192,7 +216,7 @@ { "type":"text", "name":"cdp_mo", - "label":"Nom / Contact du chef de projet", + "label":"Nom / Contact du chef de projet MdL", "required":false, "pattern":"", "nb_cols":6, @@ -203,7 +227,7 @@ { "type":"text", "name":"direction_mo", - "label":"Direction maîtrise d'ouvrage", + "label":"Direction maître d'ouvrage à la MDL", "required":false, "pattern":"", "nb_cols":6, @@ -213,22 +237,22 @@ } ] }, - { + { "fields":[ { "type":"text", - "name":"nom_amenageur", - "label":"Nom de la structure de l'aménageur public ou privé, si gestion déléguée du suivi et de la réalisation de l'opération", + "name":"concessionnaire_amenagement", + "label":"Nom de la structure signataire du traité de concession d'aménagement", "required":false, "pattern":"", "nb_cols":6, - "id":"nom_amenageur", + "id":"concessionnaire_amenagement", "dynamic_event_type": "focus", - "dynamic_event_function": "getOperationTooltipLastUpdate('nom_amenageur')" + "dynamic_event_function": "getOperationTooltipLastUpdate('concessionnaire_amenagement')" } ] }, - { + { "fields":[ { "type":"text", @@ -243,12 +267,27 @@ } ] }, - { + { + "fields":[ + { + "type":"text", + "name":"partenaire_pup", + "label":"Partenaires PUP, co-signataires (nom de la société de promotion et / ou du bailleur social)", + "required":false, + "pattern":"", + "nb_cols":10, + "id":"partenaire_pup", + "dynamic_event_type": "focus", + "dynamic_event_function": "getOperationTooltipLastUpdate('partenaire_pup')" + } + ] + }, + { "fields":[ { "type":"text", "name":"nom_moe", - "label":"Nom du maître d'oeuvre mandataire (cabinet archi-urba ou groupement)", + "label":"Nom du BET maître d'œuvre (si groupement nom du mandataire)", "required":false, "pattern":"", "nb_cols":6, @@ -272,6 +311,21 @@ "dynamic_event_function": "getOperationTooltipLastUpdate('architecte_moe')" } ] + }, + { + "fields":[ + { + "type":"text", + "name":"hqe_amenagement", + "label":"Nom du bureau d'étude HQE aménagement", + "required":false, + "pattern":"", + "nb_cols":6, + "id":"hqe_amenagement", + "dynamic_event_type": "focus", + "dynamic_event_function": "getOperationTooltipLastUpdate('hqe_amenagement')" + } + ] }, { "fields":[ @@ -312,10 +366,12 @@ "nom_mo", "cdp_mo", "direction_mo", - "nom_amenageur", + "concessionnaire_amenagement", "cdp_amenageur", + "partenaire_pup", "nom_moe", - "architecte_moe" + "architecte_moe", + "hqe_amenagement" ] } ] diff --git a/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_operation_operation_financier.json b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_operation_operation_financier.json index d2b3bb917fcf673a748c7c22444100acfca6cad1..413fefdadbabe89ebe90ff3a6d05ede95ba78927 100644 --- a/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_operation_operation_financier.json +++ b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_operation_operation_financier.json @@ -37,7 +37,7 @@ "type":"label", "name":"label_depense_cout_foncier", "label":"Dont coût affecté au Foncier (procédures et acquisitions)", - "nb_cols":2, + "nb_cols":4, "id":"Element_0_2_3" }, { @@ -72,6 +72,13 @@ "nb_cols":4, "id":"Element_0_2_5" }, + { + "type":"label", + "name":"pourc_depense_mise_etat_sol", + "label":"% par rapport au montant global", + "nb_cols":2, + "id":"pourc_depense_mise_etat_sol" + }, { "type":"label", "name":"depense_mise_etat_sol", @@ -81,6 +88,38 @@ } ] }, + { + "fields":[ + { + "type":"label", + "name":"alinea", + "label":"", + "nb_cols":1, + "id":"Element_0_2_4" + }, + { + "type":"label", + "name":"label_depense_remuneration_concess", + "label":"Dont rémunération concessionnaire", + "nb_cols":4, + "id":"Element_0_2_5" + }, + { + "type":"label", + "name":"pourc_depense_remuneration_concess", + "label":"% par rapport au montant global", + "nb_cols":2, + "id":"pourc_depense_mise_etat_sol" + }, + { + "type":"label", + "name":"depense_remuneration_concess", + "label":"M€ HT", + "nb_cols":2, + "id":"depense_remuneration_concess" + } + ] + }, { "fields":[ { @@ -111,8 +150,8 @@ { "type":"label", "name":"label_recette_cession", - "label":"Dont cessions de droits à construire sur des lots-foncier maitrisés par le public", - "nb_cols":2, + "label":"Dont participations au financement du PEP, versées par les opé immobiliers, pour lots non maîtrisés par l'aménageur", + "nb_cols":4, "id":"Element_0_2_8" }, { @@ -125,6 +164,7 @@ { "type":"label", "name":"recette_cession", + "label":"M€ HT", "pattern":"", "nb_cols":2, "id":"recette_cession" @@ -144,7 +184,7 @@ "type":"label", "name":"label_recette_part_privee", "label":"Dont participations privées des constructeurs sur les lots maîtrisés par des privés", - "nb_cols":2, + "nb_cols":4, "id":"Element_0_2_10" }, { @@ -175,8 +215,8 @@ { "type":"label", "name":"label_recette_part_publique", - "label":"Dont participations publiques des collectivités (Métropoles-Villes, ANRU, État, ...)", - "nb_cols":2, + "label":"Dont participations publiques des partenaires publics (Métropoles-Villes, ANRU, État, ...)", + "nb_cols":4, "id":"Element_0_2_12" }, { @@ -218,6 +258,13 @@ "nb_cols":2, "id":"Element_0_2_14" }, + { + "type":"label", + "name":"pourc_recette_part_publique_mdl", + "label":"% par rapport au montant global des recettes", + "nb_cols":2, + "id":"pourc_recette_part_publique_mdl" + }, { "type":"label", "name":"recette_part_publique_mdl", @@ -250,6 +297,13 @@ "nb_cols":2, "id":"Element_0_2_16" }, + { + "type":"label", + "name":"pourc_recette_part_publique_ville", + "label":"% par rapport au montant global des recettes", + "nb_cols":2, + "id":"pourc_recette_part_publique_ville" + }, { "type":"label", "name":"recette_part_publique_ville", @@ -282,6 +336,13 @@ "nb_cols":2, "id":"Element_0_2_16" }, + { + "type":"label", + "name":"pourc_recette_part_publique_anru", + "label":"% par rapport au montant global des recettes", + "nb_cols":2, + "id":"pourc_recette_part_publique_anru" + }, { "type":"label", "name":"recette_part_publique_anru", @@ -314,6 +375,13 @@ "nb_cols":2, "id":"Element_0_2_16" }, + { + "type":"label", + "name":"pourc_recette_part_publique_autre", + "label":"% par rapport au montant global des recettes", + "nb_cols":2, + "id":"pourc_recette_part_publique_autre" + }, { "type":"label", "name":"recette_part_publique_autre", @@ -332,7 +400,7 @@ "type":"label", "name":"recette_part_publique_autre_commentaire", "label":"Commentaires", - "nb_cols":4, + "nb_cols":3, "id":"recette_part_publique_autre_commentaire" } ] @@ -371,8 +439,12 @@ "pourc_depense_cout_foncier", "depense_cout_foncier", "label_depense_cout_foncier", + "pourc_depense_mise_etat_sol", "depense_mise_etat_sol", "label_depense_mise_etat_sol", + "pourc_depense_remuneration_concess", + "depense_remuneration_concess", + "label_depense_remuneration_concess", "recette_globale", "label_recette_globale", "pourc_recette_cession", @@ -381,19 +453,22 @@ "pourc_recette_part_privee", "recette_part_privee", "label_recette_part_privee", - "pourc_recette_part_publique", - "recette_part_publique", "recette_part_publique_ttc_label", + "recette_part_publique", "label_recette_part_publique", + "pourc_recette_part_publique", "recette_part_publique_mdl", "label_recette_part_publique_mdl", - "label_recette_part_publique_ville", + "pourc_recette_part_publique_mdl", "recette_part_publique_ville", "label_recette_part_publique_ville", + "pourc_recette_part_publique_ville", "recette_part_publique_anru", "label_recette_part_publique_anru", + "pourc_recette_part_publique_anru", "recette_part_publique_autre", "label_recette_part_publique_autre", + "pourc_recette_part_publique_autre", "recette_part_publique_autre_commentaire" ] } @@ -486,7 +561,7 @@ "type":"label", "name":"label_depense_cout_foncier", "label":"Dont coût affecté au Foncier (procédures et acquisitions)", - "nb_cols":2, + "nb_cols":4, "id":"Element_0_2_3" }, { @@ -529,6 +604,17 @@ "nb_cols":4, "id":"Element_0_2_5" }, + { + "type":"text", + "name":"pourc_depense_mise_etat_sol", + "label":"% par rapport au montant global", + "required":false, + "pattern":"", + "nb_cols":2, + "id":"pourc_depense_mise_etat_sol", + "dynamic_event_type": "focus", + "dynamic_event_function": "getOperationTooltipLastUpdate('pourc_depense_mise_etat_sol')" + }, { "type":"text", "name":"depense_mise_etat_sol", @@ -542,6 +628,46 @@ } ] }, + { + "fields":[ + { + "type":"label", + "name":"alinea", + "label":"", + "nb_cols":1, + "id":"Element_0_2_4" + }, + { + "type":"label", + "name":"label_depense_remuneration_concess", + "label":"Dont rémunération concessionnaire", + "nb_cols":4, + "id":"Element_0_2_5" + }, + { + "type":"text", + "name":"pourc_depense_remuneration_concess", + "label":"% par rapport au montant global", + "required":false, + "pattern":"", + "nb_cols":2, + "id":"pourc_depense_remuneration_concess", + "dynamic_event_type": "focus", + "dynamic_event_function": "getOperationTooltipLastUpdate('pourc_depense_remuneration_concess')" + }, + { + "type":"text", + "name":"depense_remuneration_concess", + "label":"M€ HT", + "required":false, + "pattern":"", + "nb_cols":2, + "id":"depense_remuneration_concess", + "dynamic_event_type": "focus", + "dynamic_event_function": "getOperationTooltipLastUpdate('depense_remuneration_concess')" + } + ] + }, { "fields":[ { @@ -577,7 +703,7 @@ "type":"label", "name":"label_recette_cession", "label":"Dont cessions de droits à construire sur des lots-foncier maitrisés par le public", - "nb_cols":2, + "nb_cols":4, "id":"Element_0_2_8" }, { @@ -616,8 +742,8 @@ { "type":"label", "name":"label_recette_part_privee", - "label":"Dont participations privées des constructeurs sur les lots maîtrisés par des privés", - "nb_cols":2, + "label":"Dont participations au financement du PEP, versées par les opé immobiliers, pour lots non maîtrisés par l'aménageur", + "nb_cols":4, "id":"Element_0_2_10" }, { @@ -656,8 +782,8 @@ { "type":"label", "name":"label_recette_part_publique", - "label":"Dont participations publiques des collectivités (Métropoles-Villes, ANRU, État, ...)", - "nb_cols":2, + "label":"Dont participations publiques des partenaires publics (Métropoles-Villes, ANRU, État, ...)", + "nb_cols":4, "id":"Element_0_2_12" }, { @@ -720,6 +846,17 @@ "nb_cols":2, "id":"Element_0_2_14" }, + { + "type":"text", + "name":"pourc_recette_part_publique_mdl", + "label":"% par rapport au montant global des recettes", + "required":false, + "pattern":"", + "nb_cols":2, + "id":"pourc_recette_part_publique_mdl", + "dynamic_event_type": "focus", + "dynamic_event_function": "getOperationTooltipLastUpdate('pourc_recette_part_publique_mdl')" + }, { "type":"text", "name":"recette_part_publique_mdl", @@ -749,6 +886,17 @@ "nb_cols":2, "id":"Element_0_2_16" }, + { + "type":"text", + "name":"pourc_recette_part_publique_ville", + "label":"% par rapport au montant global des recettes", + "required":false, + "pattern":"", + "nb_cols":2, + "id":"pourc_recette_part_publique_ville", + "dynamic_event_type": "focus", + "dynamic_event_function": "getOperationTooltipLastUpdate('pourc_recette_part_publique_ville')" + }, { "type":"text", "name":"recette_part_publique_ville", @@ -778,6 +926,17 @@ "nb_cols":2, "id":"Element_0_2_16" }, + { + "type":"text", + "name":"pourc_recette_part_publique_anru", + "label":"% par rapport au montant global des recettes", + "required":false, + "pattern":"", + "nb_cols":2, + "id":"pourc_recette_part_publique_anru", + "dynamic_event_type": "focus", + "dynamic_event_function": "getOperationTooltipLastUpdate('pourc_recette_part_publique_anru')" + }, { "type":"text", "name":"recette_part_publique_anru", @@ -807,6 +966,17 @@ "nb_cols":2, "id":"Element_0_2_16" }, + { + "type":"text", + "name":"pourc_recette_part_publique_autre", + "label":"% par rapport au montant global des recettes", + "required":false, + "pattern":"", + "nb_cols":2, + "id":"pourc_recette_part_publique_autre", + "dynamic_event_type": "focus", + "dynamic_event_function": "getOperationTooltipLastUpdate('pourc_recette_part_publique_autre')" + }, { "type":"text", "name":"recette_part_publique_autre", @@ -824,7 +994,7 @@ "label":"Commentaires", "required":false, "pattern":"", - "nb_cols":4, + "nb_cols":3, "dynamic_event_type": "focus", "dynamic_event_function": "getOperationTooltipLastUpdate('recette_part_publique_autre_commentaire')", "id":"recette_part_publique_autre_commentaire", @@ -875,28 +1045,36 @@ "pourc_depense_cout_foncier", "depense_cout_foncier", "label_depense_cout_foncier", - "label_depense_mise_etat_sol", "depense_mise_etat_sol", + "label_depense_mise_etat_sol", + "pourc_depense_mise_etat_sol", + "depense_remuneration_concess", + "label_depense_remuneration_concess", + "pourc_depense_remuneration_concess", "recette_globale", "label_recette_globale", + "recette_cession", "label_recette_cession", "pourc_recette_cession", - "recette_cession", + "recette_part_privee", "label_recette_part_privee", "pourc_recette_part_privee", - "recette_part_privee", + "recette_part_publique", "label_recette_part_publique", "pourc_recette_part_publique", - "recette_part_publique", "recette_part_publique_ttc", - "label_recette_part_publique_mdl", "recette_part_publique_mdl", - "label_recette_part_publique_ville", + "label_recette_part_publique_mdl", + "pourc_recette_part_publique_mdl", "recette_part_publique_ville", - "label_recette_part_publique_anru", + "label_recette_part_publique_ville", + "pourc_recette_part_publique_ville", "recette_part_publique_anru", - "label_recette_part_publique_autre", + "label_recette_part_publique_anru", + "pourc_recette_part_publique_anru", "recette_part_publique_autre", + "label_recette_part_publique_autre", + "pourc_recette_part_publique_autre", "recette_part_publique_autre_commentaire" ] } diff --git a/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_operation_operation_mode_operatoire.json b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_operation_operation_mode_operatoire.json index a660fc74280cac0d75304c8051f74394e62264ee..05aa5dda3cf5a22c9d9c4c1d2ccebeda50ebcb14 100644 --- a/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_operation_operation_mode_operatoire.json +++ b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_operation_operation_mode_operatoire.json @@ -6,18 +6,7 @@ "nb_cols":12, "javascript":false, "rows":[ - { - "fields":[ - { - "type":"label", - "name":"contexte_urbain", - "label":"Contexte urbain de l'opération", - "nb_cols":5, - "id":"contexte_urbain" - } - ] - }, - { + { "fields":[ { "type":"label", @@ -43,6 +32,13 @@ "label":"Procédure d'aménagement", "nb_cols":5, "id":"procedure_amenagement" + }, + { + "type":"label", + "name":"procedure_amenagement_date_creation", + "label":"Date de création / date d'obtention", + "nb_cols":2, + "id":"procedure_amenagement_date_creation" } ] }, @@ -86,10 +82,10 @@ "label":"Tab 0", "elements":[ "display_button", - "contexte_urbain", "suivi", "commentaire_operation_mixte", "procedure_amenagement", + "procedure_amenagement_date_creation", "mode_financements_label" ] } @@ -147,28 +143,6 @@ "nb_cols":12, "javascript":false, "rows":[ - { - "fields":[ - { - "type":"select", - "name":"code_contexte_urbain", - "label":"Contexte urbain de l'opération", - "required":false, - "nb_cols":4, - "id":"code_contexte_urbain", - "id_from":"code_contexte_urbain_from", - "datasource":{ - "datasource_id":"datasource_code_contexte_urbain", - "sort_order":"ASC", - "distinct":"true", - "label_key":"contexte_urbain", - "order_by":"contexte_urbain", - "id_key":"code_contexte_urbain", - "attributs":"code_contexte_urbain|contexte_urbain" - } - } - ] - }, { "fields":[ { @@ -209,8 +183,8 @@ "name":"code_procedure_amenagement", "label":"Procédure de l'aménagement", "required":false, - "nb_cols":3, - "id":"code_contexte_urbain", + "nb_cols":4, + "id":"code_procedure_amenagement", "id_from":"code_procedure_amenagement_from", "datasource":{ "datasource_id":"datasource_code_procedure_amenagement", @@ -221,6 +195,15 @@ "id_key":"code_procedure_amenagement", "attributs":"code_procedure_amenagement|procedure_amenagement" } + }, + { + "type":"text", + "name":"procedure_amenagement_date_creation", + "label":"Date de création / date d'obtention", + "required":false, + "pattern":"", + "nb_cols":3, + "id":"procedure_amenagement_date_creation" } ] }, @@ -231,11 +214,11 @@ "name": "mode_financements", "label": "Modes de financement des équipements publics", "required": false, - "nb_cols": 8, + "nb_cols": 10, "id": "Element_0_4_2", "name_to": "mode_financements", "name_from": "mode_financements_from", - "size": 4, + "size": 5, "label_from": "modes de financement non associées", "label_to": "modes de financement associées à l'opération", "web_service": { @@ -249,6 +232,28 @@ } ] }, + { + "fields":[ + { + "type":"select", + "name":"code_financement_equ_public", + "label":"Mode principal de financement des équipements publics", + "required":false, + "nb_cols":6, + "id":"code_financement_equ_public", + "id_from":"financement_equ_public_from", + "datasource":{ + "datasource_id":"datasource_code_financement_equ_public", + "sort_order":"ASC", + "distinct":"true", + "label_key":"financement_equ_public", + "order_by":"financement_equ_public", + "id_key":"code_financement_equ_public", + "attributs":"code_financement_equ_public|financement_equ_public" + } + } + ] + }, { "fields":[ { @@ -286,11 +291,12 @@ "update_button", "alinea", "title", - "code_contexte_urbain", "code_suivi", "commentaire_operation_mixte", "code_procedure_amenagement", - "mode_financements" + "procedure_amenagement_date_creation", + "mode_financements", + "code_financement_equ_public" ] } ] @@ -344,6 +350,18 @@ }, "ressource_id":"vitis/genericquerys", "id":"datasource_code_vocation" + }, + "datasource_code_financement_equ_public":{ + "type":"web_service", + "dataType":"tableValue", + "name":"code_financement_equ_public", + "description":"", + "parameters":{ + "schema":"prod_immo", + "table":"tr_financement_equ_public" + }, + "ressource_id":"vitis/genericquerys", + "id":"datasource_code_financement_equ_public" } } } diff --git a/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_operation_operation_programmation.json b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_operation_operation_programmation.json index f35a5ca001c78ec8b79859ff973b2dae4e59c78f..ffad6054f049de6119b1cfc9957c23b8f1fd63f7 100644 --- a/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_operation_operation_programmation.json +++ b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_operation_operation_programmation.json @@ -206,17 +206,24 @@ "fields":[ { "type":"label", - "name":"label_logement", - "label":"Logements", + "name":"alinea", + "label":"Logements familiaux", "nb_cols":2, "id":"Element_5_2_5" }, { "type":"label", - "name":"sdp_logement", - "label":"SDP globale programmée en logements en m²", + "name":"sdp_lgt_fam", + "label":"SDP programmée en m²", "nb_cols":2, - "id":"sdp_logement" + "id":"sdp_lgt_fam" + }, + { + "type":"label", + "name":"nb_lgt_fam", + "label":"Nombre prévisionnel", + "nb_cols":2, + "id":"nb_lgt_fam" } ] }, @@ -225,37 +232,76 @@ { "type":"label", "name":"alinea", - "label":"", + "label":"Logements spécifiques", "nb_cols":2, "id":"Element_5_2_5" }, { "type":"label", - "name":"nb_logement", - "label":"Nombre prévisionnel total de logements", + "name":"sdp_lgt_spe", + "label":"SDP programmée en m²", "nb_cols":2, - "id":"nb_logement" + "id":"sdp_lgt_spe" }, { "type":"label", - "name":"alinea", - "label":"", + "name":"nb_lgt_spe", + "label":"Nombre prévisionnel", + "nb_cols":2, + "id":"nb_lgt_spe" + } + ] + }, + { + "fields": [ + { + "type": "bo_grid", + "name": "repartition", + "label": "Répartition envisagée par types de logements", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "Element_0_38_1", + "options": { + "enableRowSelection": true, + "enableSelectAll": true, + "enablePagination": false, + "enablePaginationControls": false, + "enableColumnMenus": true, + "enableColumnResizing": true, + "appHeader": false, + "appHeaderTitleBar": false, + "columnDefs": [], + "data": [] + }, + "bo_id": "operation_repartition_logement", + "bo_filter_attr": "id_operation", + "form_filter_value": "id_operation" + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"label_logement", + "label":"Total logements", "nb_cols":2, "id":"Element_5_2_5" }, { "type":"label", - "name":"nb_lgt_fam", - "label":"Total nombre de logements familiaux", + "name":"sdp_logement", + "label":"SDP globale programmée en m²", "nb_cols":2, - "id":"nb_lgt_fam" + "id":"sdp_logement" }, { "type":"label", - "name":"nb_lgt_spe", - "label":"Total nombre de logements spécifiques", + "name":"nb_logement", + "label":"Nombre prévisionnel", "nb_cols":2, - "id":"nb_lgt_spe" + "id":"nb_logement" } ] }, @@ -340,9 +386,11 @@ "label_logement", "sdp_logement", "nb_logement", + "sdp_lgt_fam", "nb_lgt_fam", + "sdp_lgt_spe", "nb_lgt_spe", - "repartition_type_logement", + "repartition", "nb_lgt_hectare", "coef_emprise_sol_moyen", "densite_batie" @@ -403,6 +451,45 @@ "nb_cols":12, "javascript":false, "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_operation", + "nb_cols": 12, + "id": "id_operation_2_1" + } + ] + }, + { + "fields": [ + { + "type": "section_grid", + "name": "repartition_type_logement", + "label": "Répartition des logements", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "repartition_type_logement", + "selected": false, + "options": { + "enableRowSelection": true, + "enableSelectAll": true, + "enablePagination": false, + "enablePaginationControls": false, + "enableColumnMenus": true, + "enableColumnResizing": true, + "appHeader": true, + "appHeaderTitleBar": true, + "columnDefs": [], + "data": [] + }, + "section_id": 473, + "form_filter_value": "id_operation", + "section_filter_attr": "id_operation" + } + ] + }, { "fields":[ { @@ -654,21 +741,32 @@ "fields":[ { "type":"label", - "name":"label_logement", - "label":"Logements", + "name":"alinea", + "label":"Logements familiaux", "nb_cols":2, "id":"Element_5_2_5" }, { "type":"text", - "name":"sdp_logement", - "label":"SDP globale programmée en logements en m²", + "name":"sdp_lgt_fam", + "label":"SDP programmée en m²", "required":false, "pattern":"", "nb_cols":2, - "id":"sdp_logement", + "id":"sdp_lgt_fam", "dynamic_event_type": "focus", - "dynamic_event_function": "getOperationTooltipLastUpdate('sdp_logement')" + "dynamic_event_function": "getOperationTooltipLastUpdate('sdp_lgt_fam')" + }, + { + "type":"text", + "name":"nb_lgt_fam", + "label":"Nombre prévisionnel", + "required":false, + "pattern":"", + "nb_cols":2, + "id":"nb_lgt_fam", + "dynamic_event_type": "focus", + "dynamic_event_function": "getOperationTooltipLastUpdate('nb_lgt_fam')" } ] }, @@ -677,52 +775,95 @@ { "type":"label", "name":"alinea", - "label":"", + "label":"Logements spécifiques", "nb_cols":2, "id":"Element_5_2_5" }, { "type":"text", - "name":"nb_logement", - "label":"Nombre prévisionnel total de logements", + "name":"sdp_lgt_spe", + "label":"SDP programmée en m²", "required":false, "pattern":"", "nb_cols":2, - "id":"nb_logement", + "id":"sdp_lgt_spe", "dynamic_event_type": "focus", - "dynamic_event_function": "getOperationTooltipLastUpdate('nb_logement')" + "dynamic_event_function": "getOperationTooltipLastUpdate('sdp_lgt_spe')" }, + { + "type":"text", + "name":"nb_lgt_spe", + "label":"Nombre prévisionnel", + "required":false, + "pattern":"", + "nb_cols":2, + "id":"nb_lgt_spe", + "dynamic_event_type": "focus", + "dynamic_event_function": "getOperationTooltipLastUpdate('nb_lgt_spe')" + } + ] + }, + { + "fields":[ { "type":"label", - "name":"alinea", - "label":"", + "name":"label_logement", + "label":"Total logements", "nb_cols":2, "id":"Element_5_2_5" }, { "type":"text", - "name":"nb_lgt_fam", - "label":"Total nombre de logements familiaux", + "name":"sdp_logement", + "label":"SDP globale programmée en m²", "required":false, "pattern":"", "nb_cols":2, - "id":"nb_lgt_fam", + "id":"sdp_logement", "dynamic_event_type": "focus", - "dynamic_event_function": "getOperationTooltipLastUpdate('nb_lgt_fam')" + "dynamic_event_function": "getOperationTooltipLastUpdate('sdp_logement')" }, { "type":"text", - "name":"nb_lgt_spe", - "label":"Total nombre de logements spécifiques", + "name":"nb_logement", + "label":"Nombre prévisionnel", "required":false, "pattern":"", "nb_cols":2, - "id":"nb_lgt_spe", + "id":"nb_logement", "dynamic_event_type": "focus", - "dynamic_event_function": "getOperationTooltipLastUpdate('nb_lgt_spe')" + "dynamic_event_function": "getOperationTooltipLastUpdate('nb_logement')" } ] }, + { + "fields": [ + { + "type": "bo_grid", + "name": "repartition", + "label": "Répartition envisagée par types de logements", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "Element_0_38_1", + "options": { + "enableRowSelection": true, + "enableSelectAll": true, + "enablePagination": false, + "enablePaginationControls": false, + "enableColumnMenus": true, + "enableColumnResizing": true, + "appHeader": false, + "appHeaderTitleBar": false, + "columnDefs": [], + "data": [] + }, + "bo_id": "operation_repartition_logement", + "bo_filter_attr": "id_operation", + "form_filter_value": "id_operation" + } + ] + }, { "fields":[ { @@ -758,6 +899,7 @@ "label":"Tab 0", "elements":[ "update_button", + "id_operation", "alinea", "title", "code_vocation", @@ -779,8 +921,11 @@ "label_logement", "sdp_logement", "nb_logement", + "sdp_lgt_fam", "nb_lgt_fam", - "nb_lgt_spe" + "sdp_lgt_spe", + "nb_lgt_spe", + "repartition_type_logement" ] } ] diff --git a/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_programme_programme_acteur.json b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_programme_programme_acteur.json index b19a898f588483bd0ef4c0acd634c02fb84a6f7f..8cf57e49857a7a1bb18518b879a27fe6ff75d9ba 100644 --- a/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_programme_programme_acteur.json +++ b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_programme_programme_acteur.json @@ -33,7 +33,7 @@ { "type":"label", "name":"nom_moe", - "label":"Nom du Maître d'OEuvre (cabinet architecte, ...)", + "label":"Nom du Maître d'OEuvre (nom du cabinet architecte, ...)", "nb_cols":10, "id":"nom_moe" } @@ -242,7 +242,7 @@ { "type":"text", "name":"nom_moe", - "label":"Nom du Maître d'OEuvre (cabinet architecte, ...)", + "label":"Nom du Maître d'OEuvre (nom du cabinet architecte, ...)", "required":false, "pattern":"", "nb_cols":5, @@ -264,11 +264,7 @@ "id":"annee_debut", "dynamic_event_type": "focus", "dynamic_event_function": "getProgrammeTooltipLastUpdate('annee_debut')" - } - ] - }, - { - "fields":[ + }, { "type":"number", "name":"annee_fin", @@ -279,11 +275,7 @@ "id":"annee_fin", "dynamic_event_type": "focus", "dynamic_event_function": "getProgrammeTooltipLastUpdate('annee_fin')" - } - ] - }, - { - "fields":[ + }, { "type":"number", "name":"annee_achat_terrain_operateur", @@ -309,11 +301,7 @@ "id":"date_debut_commercialisation", "dynamic_event_type": "focus", "dynamic_event_function": "getProgrammeTooltipLastUpdate('date_debut_commercialisation')" - } - ] - }, - { - "fields":[ + }, { "type":"number", "name":"date_fin_commercialisation", @@ -324,11 +312,7 @@ "id":"date_fin_commercialisation", "dynamic_event_type": "focus", "dynamic_event_function": "getProgrammeTooltipLastUpdate('date_fin_commercialisation')" - } - ] - }, - { - "fields":[ + }, { "type":"number", "name":"tx_ecoulement_commercialisation", diff --git a/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_programme_programme_detail.json b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_programme_programme_detail.json new file mode 100644 index 0000000000000000000000000000000000000000..76186b6be3ba2d3839bb8398c5b5f7f53cbbb784 --- /dev/null +++ b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_programme_programme_detail.json @@ -0,0 +1,806 @@ +{ + "display":{ + "name":"suivi_prod_immo_saisie_suivi_prod_immo_programme_programme_details-form", + "title":"SUIVI_PROD_IMMO_PROGRAMME_PROGRAMME_DETAILS_TITLE_DISPLAY", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "bo_grid", + "name": "profil_acheteur_accession_libre", + "label": "Profil des acheteurs - logements en Accession Libre", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "Element_0_1578496052660", + "options": { + "enableRowSelection": false, + "enableSelectAll": true, + "enablePagination": false, + "enablePaginationControls": false, + "enableColumnMenus": true, + "enableColumnResizing": true, + "appHeader": false, + "appHeaderTitleBar": false, + "columnDefs": [], + "data": [] + }, + "bo_id": "profil_acheteur_accession_libre", + "bo_filter_attr": "id_programme", + "form_filter_value": "id_programme" + } + ] + }, + { + "fields": [ + { + "type": "bo_grid", + "name": "logement_familliaux_accession", + "label": "Logements familiaux en accession", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "Element_0_1578673563602", + "options": { + "enableRowSelection": false, + "enableSelectAll": true, + "enablePagination": false, + "enablePaginationControls": false, + "enableColumnMenus": true, + "enableColumnResizing": true, + "appHeader": false, + "appHeaderTitleBar": false, + "columnDefs": [], + "data": [] + }, + "bo_id": "programme_log_fam_accession", + "bo_filter_attr": "id_programme", + "form_filter_value": "id_programme" + } + ] + }, + { + "fields": [ + { + "type": "bo_grid", + "name": "logement_familliaux_location", + "label": "Logements familiaux en Location (hors habitat spécifique)", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "Element_0_1578925427668", + "options": { + "enableRowSelection": false, + "enableSelectAll": true, + "enablePagination": false, + "enablePaginationControls": false, + "enableColumnMenus": true, + "enableColumnResizing": true, + "appHeader": false, + "appHeaderTitleBar": false, + "columnDefs": [], + "data": [] + }, + "bo_id": "programme_log_fam_location", + "bo_filter_attr": "id_programme", + "form_filter_value": "id_programme" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "logement_familliaux_location_nom_bailleur", + "label": "Logements familieux en location - Nom du bailleur", + "nb_cols": 12, + "id": "logement_familliaux_location_nom_bailleur" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "logement_familliaux_location_nom_investisseur", + "label": "Logements familieux en location - Nom de l'investisseur", + "nb_cols": 12, + "id": "logement_familliaux_location_nom_investisseur" + } + ] + }, + { + "fields": [ + { + "type": "bo_grid", + "name": "habitat_specifique", + "label": "Habitat spécifique", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "Element_1_1578925494748", + "options": { + "enableRowSelection": false, + "enableSelectAll": true, + "enablePagination": false, + "enablePaginationControls": false, + "enableColumnMenus": true, + "enableColumnResizing": true, + "appHeader": false, + "appHeaderTitleBar": false, + "columnDefs": [], + "data": [] + }, + "bo_id": "programme_habitat_specifique", + "bo_filter_attr": "id_programme", + "form_filter_value": "id_programme" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "habitat_specifique_nom_bailleur", + "label": "Habitat spécifique - Nom du bailleur", + "nb_cols": 12, + "id": "habitat_specifique_nom_bailleur" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "habitat_specifique_nom_gestionnaire", + "label": "Habitat spécifique - Nom du gestionnaire", + "nb_cols": 12, + "id": "habitat_specifique_nom_gestionnaire" + } + ] + }, + { + "fields": [ + { + "type": "bo_grid", + "name": "activite_industrie", + "label": "Activités /industrie", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "Element_0_1578650516432", + "options": { + "enableRowSelection": false, + "enableSelectAll": true, + "enablePagination": false, + "enablePaginationControls": false, + "enableColumnMenus": true, + "enableColumnResizing": true, + "appHeader": false, + "appHeaderTitleBar": false, + "columnDefs": [], + "data": [] + }, + "bo_id": "programme_activite_industrie", + "bo_filter_attr": "id_programme", + "form_filter_value": "id_programme" + } + ] + }, + { + "fields": [ + { + "type": "bo_grid", + "name": "bureau", + "label": "Bureaux", + "required": false, + "pattern": "", + "nb_cols": 6, + "id": "Element_0_1578650693264", + "options": { + "enableRowSelection": false, + "enableSelectAll": true, + "enablePagination": false, + "enablePaginationControls": false, + "enableColumnMenus": true, + "enableColumnResizing": true, + "appHeader": false, + "appHeaderTitleBar": false, + "columnDefs": [], + "data": [] + }, + "bo_id": "programme_bureau", + "bo_filter_attr": "id_programme", + "form_filter_value": "id_programme" + } + ] + }, + { + "fields": [ + { + "type": "bo_grid", + "name": "equipement_structure", + "label": "Équipements de superstructures", + "required": false, + "pattern": "", + "nb_cols": 8, + "id": "Element_0_1578669108546", + "options": { + "enableRowSelection": false, + "enableSelectAll": true, + "enablePagination": false, + "enablePaginationControls": false, + "enableColumnMenus": true, + "enableColumnResizing": true, + "appHeader": false, + "appHeaderTitleBar": false, + "columnDefs": [], + "data": [] + }, + "bo_id": "programme_equipement_structure", + "bo_filter_attr": "id_programme", + "form_filter_value": "id_programme" + } + ] + }, + { + "fields": [ + { + "type": "bo_grid", + "name": "hotel_commerce_service", + "label": "Hôtellerie / Commerces / Services", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "Element_0_1578567712800", + "options": { + "enableRowSelection": false, + "enableSelectAll": true, + "enablePagination": false, + "enablePaginationControls": false, + "enableColumnMenus": true, + "enableColumnResizing": true, + "appHeader": false, + "appHeaderTitleBar": false, + "columnDefs": [], + "data": [] + }, + "bo_id": "programme_hotel_commerce_service", + "bo_filter_attr": "id_programme", + "form_filter_value": "id_programme" + } + ] + }, + { + "fields": [ + { + "type": "bo_grid", + "name": "stationnement", + "label": "Places de stationnement du programme (hors parkings en ouvrages - superstructures)", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "Element_0_1578562071288", + "options": { + "enableRowSelection": false, + "enableSelectAll": true, + "enablePagination": false, + "enablePaginationControls": false, + "enableColumnMenus": true, + "enableColumnResizing": true, + "appHeader": false, + "appHeaderTitleBar": false, + "columnDefs": [], + "data": [] + }, + "bo_id": "programme_stationnement", + "bo_filter_attr": "id_programme", + "form_filter_value": "id_programme" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"display_button", + "id":"display_button", + "buttons":[ + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + + ], + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "display_button", + "logement_familliaux_accession", + "profil_acheteur_accession_libre", + "logement_familliaux_location_nom_bailleur", + "logement_familliaux_location_nom_investisseur", + "logement_familliaux_location", + "habitat_specifique_nom_bailleur", + "habitat_specifique_nom_gestionnaire", + "habitat_specifique", + "activite_industrie", + "bureau", + "equipement_structure", + "hotel_commerce_service", + "stationnement" + ] + } + ] + } + }, + "search":{ + "name":"suivi_prod_immo_saisie_suivi_prod_immo_programme_programme_details-form", + "title":"SUIVI_PROD_IMMO_PROGRAMME_PROGRAMME_DETAILS_TITLE_SEARCH", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + + ], + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + + ] + } + ] + } + }, + "insert":{ + "name":"suivi_prod_immo_saisie_suivi_prod_immo_programme_programme_details-form", + "title":"SUIVI_PROD_IMMO_PROGRAMME_PROGRAMME_DETAILS_TITLE_INSERT", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + + ], + "event":"sendSimpleForm()", + "afterEvent":"editSectionForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + + ] + } + ] + } + }, + "update":{ + "name":"suivi_prod_immo_saisie_suivi_prod_immo_programme_programme_details-form", + "title":"SUIVI_PROD_IMMO_PROGRAMME_PROGRAMME_DETAILS_TITLE_UPDATE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "section_grid", + "name": "logement_familliaux_accession", + "label": "Logements familliaux en accession", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "logement_familliaux_accession", + "selected": false, + "options": { + "enableRowSelection": true, + "enableSelectAll": true, + "enablePagination": false, + "enablePaginationControls": false, + "enableColumnMenus": true, + "enableColumnResizing": true, + "appHeader": true, + "appHeaderTitleBar": true, + "columnDefs": [], + "data": [] + }, + "section_id": 511, + "form_filter_value": "id_programme", + "section_filter_attr": "id_programme" + } + ] + }, + { + "fields": [ + { + "type": "section_grid", + "name": "profil_acheteur_accession_libre", + "label": "Profil des acheteurs-logements en accession libre", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "profil_acheteur_accession_libre", + "selected": false, + "options": { + "enableRowSelection": true, + "enableSelectAll": true, + "enablePagination": false, + "enablePaginationControls": false, + "enableColumnMenus": true, + "enableColumnResizing": true, + "appHeader": true, + "appHeaderTitleBar": true, + "columnDefs": [], + "data": [] + }, + "section_id": 499, + "form_filter_value": "id_programme", + "section_filter_attr": "id_programme" + } + ] + }, + { + "fields": [ + { + "type": "hidden", + "name": "id_logement_familliaux_location", + "nb_cols": 12, + "id": "id_logement_familliaux_location" + } + ] + }, + { + "fields": [ + { + "type": "section_grid", + "name": "composition_logement_familliaux_location_cp", + "label": "Logements familliaux en location", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "composition_logement_familliaux_location_cp", + "selected": false, + "options": { + "enableRowSelection": true, + "enableSelectAll": true, + "enablePagination": false, + "enablePaginationControls": false, + "enableColumnMenus": true, + "enableColumnResizing": true, + "appHeader": true, + "appHeaderTitleBar": true, + "columnDefs": [], + "data": [] + }, + "section_id": 580, + "form_filter_value": "id_logement_familliaux_location", + "section_filter_attr": "id_logement_familliaux_location" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "logement_familliaux_location_nom_bailleur", + "label": "Logements familieux en location - Nom du bailleur", + "required":false, + "pattern":"", + "nb_cols": 12, + "id": "logement_familliaux_location_nom_bailleur" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "logement_familliaux_location_nom_investisseur", + "label": "Logements familieux en location - Nom de l'investisseur", + "required":false, + "pattern":"", + "nb_cols": 12, + "id": "logement_familliaux_location_nom_investisseur" + } + ] + }, + { + "fields": [ + { + "type": "hidden", + "name": "id_habitat_specifique", + "nb_cols": 12, + "id": "id_habitat_specifique" + } + ] + }, + { + "fields": [ + { + "type": "section_grid", + "name": "composition_habitat_specifique_cp", + "label": "Habitat spécifique", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "composition_habitat_specifique_cp", + "selected": false, + "options": { + "enableRowSelection": true, + "enableSelectAll": true, + "enablePagination": false, + "enablePaginationControls": false, + "enableColumnMenus": true, + "enableColumnResizing": true, + "appHeader": true, + "appHeaderTitleBar": true, + "columnDefs": [], + "data": [] + }, + "section_id": 570, + "form_filter_value": "id_habitat_specifique", + "section_filter_attr": "id_habitat_specifique" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "habitat_specifique_nom_bailleur", + "label": "Habitat spécifique - Nom du bailleur", + "required":false, + "pattern":"", + "nb_cols": 12, + "id": "habitat_specifique_nom_bailleur" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "habitat_specifique_nom_gestionnaire", + "label": "Habitat spécifique - Nom du gestionnaire", + "required":false, + "pattern":"", + "nb_cols": 12, + "id": "habitat_specifique_nom_gestionnaire" + } + ] + }, + { + "fields": [ + { + "type": "section_grid", + "name": "activite_industrie", + "label": "Activités / Industrie", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "activite_industrie", + "selected": false, + "options": { + "enableRowSelection": true, + "enableSelectAll": true, + "enablePagination": false, + "enablePaginationControls": false, + "enableColumnMenus": true, + "enableColumnResizing": true, + "appHeader": true, + "appHeaderTitleBar": true, + "columnDefs": [], + "data": [] + }, + "section_id": 556, + "form_filter_value": "id_programme", + "section_filter_attr": "id_programme" + } + ] + }, + { + "fields": [ + { + "type": "section_grid", + "name": "bureau", + "label": "Bureaux", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "bureau", + "selected": false, + "options": { + "enableRowSelection": true, + "enableSelectAll": true, + "enablePagination": false, + "enablePaginationControls": false, + "enableColumnMenus": true, + "enableColumnResizing": true, + "appHeader": true, + "appHeaderTitleBar": true, + "columnDefs": [], + "data": [] + }, + "section_id": 546, + "form_filter_value": "id_programme", + "section_filter_attr": "id_programme" + } + ] + }, + { + "fields": [ + { + "type": "section_grid", + "name": "equipement_structure", + "label": "Equipements de superstructures", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "equipement_structure", + "selected": false, + "options": { + "enableRowSelection": true, + "enableSelectAll": true, + "enablePagination": false, + "enablePaginationControls": false, + "enableColumnMenus": true, + "enableColumnResizing": true, + "appHeader": true, + "appHeaderTitleBar": true, + "columnDefs": [], + "data": [] + }, + "section_id": 539, + "form_filter_value": "id_programme", + "section_filter_attr": "id_programme" + } + ] + }, + { + "fields": [ + { + "type": "section_grid", + "name": "hotel_commerce_service", + "label": "Hotellerie / Commerces /servicesment", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "hotel_commerce_service", + "selected": false, + "options": { + "enableRowSelection": true, + "enableSelectAll": true, + "enablePagination": false, + "enablePaginationControls": false, + "enableColumnMenus": true, + "enableColumnResizing": true, + "appHeader": true, + "appHeaderTitleBar": true, + "columnDefs": [], + "data": [] + }, + "section_id": 531, + "form_filter_value": "id_programme", + "section_filter_attr": "id_programme" + } + ] + }, + { + "fields": [ + { + "type": "section_grid", + "name": "stationnement", + "label": "Places de stationnement", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "stationnement", + "selected": false, + "options": { + "enableRowSelection": true, + "enableSelectAll": true, + "enablePagination": false, + "enablePaginationControls": false, + "enableColumnMenus": true, + "enableColumnResizing": true, + "appHeader": true, + "appHeaderTitleBar": true, + "columnDefs": [], + "data": [] + }, + "section_id": 520, + "form_filter_value": "id_programme", + "section_filter_attr": "id_programme" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"update_button", + "id":"update_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_UPDATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "event":"sendSimpleForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "update_button", + "logement_familliaux_accession", + "profil_acheteur_accession_libre", + "composition_logement_familliaux_location_cp", + "id_logement_familliaux_location", + "logement_familliaux_location_nom_bailleur", + "logement_familliaux_location_nom_investisseur", + "logement_familliaux_location", + "composition_habitat_specifique_cp", + "id_habitat_specifique", + "habitat_specifique_nom_bailleur", + "habitat_specifique_nom_gestionnaire", + "activite_industrie", + "bureau", + "equipement_structure", + "hotel_commerce_service", + "stationnement" + ] + } + ] + } + }, + "datasources":{ + "datasource_cahier_prescription_archi_urb_paysagere":{ + "type":"web_service", + "dataType":"tableValue", + "name":"cahier_prescription_archi_urb_paysagere", + "description":"", + "parameters":{ + "schema":"prod_immo", + "table":"param_liste", + "filter": {"id_nom_table": "programme_immobilier", "nom_liste": "cahier_prescription_archi_urb_paysagere"} + }, + "ressource_id":"vitis/genericquerys" + } + } +} diff --git a/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_programme_programme_encadrement.json b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_programme_programme_encadrement.json index f9934343c6b921e71975702c46f32dd04c66a33b..ba35643f16944f8da10a1bb6725390b92fe4cbf8 100644 --- a/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_programme_programme_encadrement.json +++ b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_programme_programme_encadrement.json @@ -22,7 +22,7 @@ { "type":"label", "name":"cahier_prescription_archi_urb_paysagere_label", - "label":"Programme encadré par un Cahier de Prescriptions architecturales, urbaines et paysagères", + "label":"Programme encadré par un Cahier de Prescriptions architecturales, urbaines, paysagères et environnementales", "nb_cols":10, "id":"cahier_prescription_archi_urb_paysagere_label" } @@ -33,7 +33,7 @@ { "type":"label", "name":"encadrement_plu", - "label":"Encadrement via le PLU :", + "label":"Encadrement via le PLUH :", "nb_cols":12, "id":"encadrement_plu" } @@ -44,7 +44,7 @@ { "type":"label", "name":"charge_fonciere_imposee_fixee_label", - "label":"(CFi) Charge foncière 'imposée-fixée' (Vente de CF-encadrement via CCCT)", + "label":"(CFi) Charge foncière 'imposée-fixée' (Vente de CF)", "nb_cols":10, "id":"charge_fonciere_imposee_fixee_label" } @@ -61,6 +61,102 @@ } ] }, + { + "fields": [ + { + "type":"label", + "name":"label_accession_abordable", + "label":"accession abordable", + "nb_cols":2, + "id":"label_accession_abordable" + }, + { + "type": "label", + "name": "sdp_encadree_access_abordable", + "label": "SDP encadrée en nombre de m²", + "nb_cols": 3, + "id": "sdp_encadree_access_abordable" + }, + { + "type": "label", + "name": "cf_plafonnee_access_abordable", + "label": "montant HT/m² SDP de la CF plafonnée", + "nb_cols": 3, + "id": "cf_plafonnee_access_abordable" + }, + { + "type": "label", + "name": "prix_vente_plafonnee_access_abordable", + "label": "montant TTC/m² SH de prix vente plafonné", + "nb_cols": 3, + "id": "prix_vente_plafonnee_access_abordable" + } + ] + }, + { + "fields": [ + { + "type":"label", + "name":"label_accession_libre", + "label":"accession libre", + "nb_cols":2, + "id":"label_accession_libre" + }, + { + "type": "label", + "name": "sdp_encadree_access_libre", + "label": "SDP encadrée en nombre de m²", + "nb_cols": 3, + "id": "sdp_encadree_access_libre" + }, + { + "type": "label", + "name": "cf_plafonnee_access_libre", + "label": "montant HT/m² SDP de la CF plafonnée", + "nb_cols": 3, + "id": "cf_plafonnee_access_libre" + }, + { + "type": "label", + "name": "prix_vente_plafonnee_access_libre", + "label": "montant TTC/m² SH de prix vente plafonné", + "nb_cols": 3, + "id": "prix_vente_plafonnee_access_libre" + } + ] + }, + { + "fields": [ + { + "type":"label", + "name":"label_location_libre", + "label":"location libre", + "nb_cols":2, + "id":"label_location_libre" + }, + { + "type": "label", + "name": "sdp_encadree_loc_libre", + "label": "SDP encadrée en nombre de m²", + "nb_cols": 3, + "id": "sdp_encadree_loc_libre" + }, + { + "type": "label", + "name": "cf_plafonnee_loc_libre", + "label": "montant HT/m² SDP de la CF plafonnée", + "nb_cols": 3, + "id": "cf_plafonnee_loc_libre" + }, + { + "type": "label", + "name": "prix_vente_plafonnee_loc_libre", + "label": "montant TTC/m² SH de prix vente plafonné", + "nb_cols": 3, + "id": "prix_vente_plafonnee_loc_libre" + } + ] + }, { "fields":[ { @@ -95,7 +191,19 @@ "cahier_prescription_archi_urb_paysagere_label", "encadrement_plu", "charge_fonciere_imposee_fixee_label", - "prix_sortie_encadree_label" + "prix_sortie_encadree_label", + "label_accession_abordable", + "label_accession_libre", + "label_location_libre", + "sdp_encadree_access_abordable", + "sdp_encadree_access_libre", + "sdp_encadree_loc_libre", + "cf_plafonnee_access_abordable", + "cf_plafonnee_access_libre", + "cf_plafonnee_loc_libre", + "prix_vente_plafonnee_access_abordable", + "prix_vente_plafonnee_access_libre", + "prix_vente_plafonnee_loc_libre" ] } ] @@ -179,7 +287,7 @@ { "type":"select", "name":"cahier_prescription_archi_urb_paysagere", - "label":"Programme encadré par un Cahier de Prescriptions architecturales, urbaines et paysagères", + "label":"Programme encadré par un Cahier de Prescriptions architecturales, urbaines, paysagères et environnementales", "required":false, "nb_cols":4, "id":"Element_8_22_3", @@ -201,7 +309,7 @@ { "type":"label", "name":"encadrement_plu", - "label":"Encadrement via le PLU :", + "label":"Encadrement via le PLUH :", "nb_cols":12, "id":"encadrement_plu" } @@ -212,7 +320,7 @@ { "type":"select", "name":"charge_fonciere_imposee_fixee", - "label":"(CFi) Charge foncière 'imposée-fixée' (Vente de CF-encadrement via CCCT)", + "label":"(CFi) Charge foncière 'imposée-fixée' (Vente de CF)", "required":false, "nb_cols":4, "id":"Element_8_22_3", @@ -251,6 +359,138 @@ } ] }, + { + "fields": [ + { + "type":"label", + "name":"label_accession_abordable", + "label":"accession abordable", + "nb_cols":2, + "id":"label_accession_abordable" + }, + { + "type": "number", + "name": "sdp_encadree_access_abordable", + "label": "SDP encadrée en nombre de m²", + "required":false, + "pattern":"", + "nb_cols": 3, + "id": "sdp_encadree_access_abordable", + "dynamic_event_type": "focus", + "dynamic_event_function": "getProgrammeTooltipLastUpdate('sdp_encadree_access_abordable')" + }, + { + "type": "number", + "name": "cf_plafonnee_access_abordable", + "label": "montant HT/m² SDP de la CF plafonnée", + "required":false, + "pattern":"", + "nb_cols": 3, + "id": "cf_plafonnee_access_abordable", + "dynamic_event_type": "focus", + "dynamic_event_function": "getProgrammeTooltipLastUpdate('cf_plafonnee_access_abordable')" + }, + { + "type": "number", + "name": "prix_vente_plafonnee_access_abordable", + "label": "montant TTC/m² SH de prix vente plafonné", + "required":false, + "pattern":"", + "nb_cols": 3, + "id": "prix_vente_plafonnee_access_abordable", + "dynamic_event_type": "focus", + "dynamic_event_function": "getProgrammeTooltipLastUpdate('prix_vente_plafonnee_access_abordable')" + } + ] + }, + { + "fields": [ + { + "type":"label", + "name":"label_accession_libre", + "label":"accession libre", + "nb_cols":2, + "id":"label_accession_libre" + }, + { + "type": "number", + "name": "sdp_encadree_access_libre", + "label": "SDP encadrée en nombre de m²", + "required":false, + "pattern":"", + "nb_cols": 3, + "id": "sdp_encadree_access_libre", + "dynamic_event_type": "focus", + "dynamic_event_function": "getProgrammeTooltipLastUpdate('sdp_encadree_access_libre')" + }, + { + "type": "number", + "name": "cf_plafonnee_access_libre", + "label": "montant HT/m² SDP de la CF plafonnée", + "required":false, + "pattern":"", + "nb_cols": 3, + "id": "cf_plafonnee_access_libre", + "dynamic_event_type": "focus", + "dynamic_event_function": "getProgrammeTooltipLastUpdate('cf_plafonnee_access_libre')" + }, + { + "type": "number", + "name": "prix_vente_plafonnee_access_libre", + "label": "montant TTC/m² SH de prix vente plafonné", + "required":false, + "pattern":"", + "nb_cols": 3, + "id": "prix_vente_plafonnee_access_libre", + "dynamic_event_type": "focus", + "dynamic_event_function": "getProgrammeTooltipLastUpdate('prix_vente_plafonnee_access_libre')" + } + ] + }, + { + "fields": [ + { + "type":"label", + "name":"label_location_libre", + "label":"location libre", + "nb_cols":2, + "id":"label_location_libre" + }, + { + "type": "number", + "name": "sdp_encadree_loc_libre", + "label": "SDP encadrée en nombre de m²", + "required":false, + "pattern":"", + "nb_cols": 3, + "id": "sdp_encadree_loc_libre", + "dynamic_event_type": "focus", + "dynamic_event_function": "getProgrammeTooltipLastUpdate('sdp_encadree_loc_libre')" + }, + { + "type": "number", + "name": "cf_plafonnee_loc_libre", + "label": "montant HT/m² SDP de la CF plafonnée", + "required":false, + "pattern":"", + "nb_cols": 3, + "id": "cf_plafonnee_loc_libre", + "dynamic_event_type": "focus", + "dynamic_event_function": "getProgrammeTooltipLastUpdate('cf_plafonnee_loc_libre')" + }, + { + "type": "number", + "name": "prix_vente_plafonnee_loc_libre", + "label": "montant TTC/m² SH de prix vente plafonné", + "required":false, + "pattern":"", + "nb_cols": 3, + "id": "prix_vente_plafonnee_loc_libre", + "dynamic_event_type": "focus", + "dynamic_event_function": "getProgrammeTooltipLastUpdate('prix_vente_plafonnee_loc_libre')" + } + ] + }, { "fields":[ { @@ -291,7 +531,19 @@ "cahier_prescription_archi_urb_paysagere", "encadrement_plu", "charge_fonciere_imposee_fixee", - "prix_sortie_encadree" + "prix_sortie_encadree", + "label_accession_abordable", + "label_accession_libre", + "label_location_libre", + "sdp_encadree_access_abordable", + "sdp_encadree_access_libre", + "sdp_encadree_loc_libre", + "cf_plafonnee_access_abordable", + "cf_plafonnee_access_libre", + "cf_plafonnee_loc_libre", + "prix_vente_plafonnee_access_abordable", + "prix_vente_plafonnee_access_libre", + "prix_vente_plafonnee_loc_libre" ] } ] diff --git a/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_programme_programme_synthese.json b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_programme_programme_synthese.json index 371392a64deb0dab3b18a211ecb379e88b626819..8fab6ee89548448c392d3600239490a887e44387 100644 --- a/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_programme_programme_synthese.json +++ b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie/suivi_prod_immo_saisie_suivi_prod_immo_programme_programme_synthese.json @@ -6,6 +6,44 @@ "nb_cols":12, "javascript":false, "rows":[ + { + "fields": [ + { + "type": "bo_grid", + "name": "synthese", + "label": "Synthèse du programme immobilier", + "nb_cols": 12, + "id": "Element_0_1578489308285", + "cm_options": { + "mode": "javascript", + "readOnly": true, + "styleActiveLine": true, + "lineNumbers": false, + "lineSeparator": "\r\n", + "indentWithTabs": true, + "tabSize": 2, + "viewportMargin": 50, + "theme": "Veremes" + }, + "ui": true, + "options": { + "enableRowSelection": false, + "enableSelectAll": true, + "enablePagination": false, + "enablePaginationControls": false, + "enableColumnMenus": true, + "enableColumnResizing": true, + "appHeader": false, + "appHeaderTitleBar": false, + "columnDefs": [], + "data": [] + }, + "bo_id": "programme_granulometrie", + "bo_filter_attr": "id_programme", + "form_filter_value": "id_programme" + } + ] + }, { "fields":[ { @@ -79,6 +117,7 @@ "label":"Tab 0", "elements":[ "display_button", + "synthese", "alinea", "surface_moy_logement", "cout_construction_moyen", @@ -138,6 +177,35 @@ "nb_cols":12, "javascript":false, "rows":[ + { + "fields": [ + { + "type": "section_grid", + "name": "granulometrie", + "label": "Synthèse du programme immobilier", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "granulometrie", + "selected": false, + "options": { + "enableRowSelection": true, + "enableSelectAll": true, + "enablePagination": false, + "enablePaginationControls": false, + "enableColumnMenus": true, + "enableColumnResizing": true, + "appHeader": true, + "appHeaderTitleBar": true, + "columnDefs": [], + "data": [] + }, + "section_id": 491, + "form_filter_value": "id_programme", + "section_filter_attr": "id_programme" + } + ] + }, { "fields":[ { @@ -234,6 +302,7 @@ "elements":[ "update_button", "alinea", + "granulometrie", "surface_moy_logement", "cout_construction_moyen", "charge_fonciere_moy", diff --git a/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_activite_industrie_activite_industrie.json b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_activite_industrie_activite_industrie.json new file mode 100644 index 0000000000000000000000000000000000000000..e0b874b7b059090b12c47d9c85c4224aa9edf29c --- /dev/null +++ b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_activite_industrie_activite_industrie.json @@ -0,0 +1,489 @@ +{ + "display":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_activite_industrie-form", + "title":"SUIVI_PROD_IMMO_ACTIVITE_INDUSTRIE_TITLE_DISPLAY", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_programme", + "nb_cols": 12, + "id": "id_programme_2_1" + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"indicateur_activite_industrie", + "label":"Type", + "nb_cols":12, + "id":"indicateur_activite_industrie" + } + ] + }, + { + "fields":[ + { + "type": "label", + "name": "production_industrie", + "label": "Production industrie", + "nb_cols": 3, + "id": "production_industrie" + }, + { + "type": "label", + "name": "logistique", + "label": "Logistique", + "nb_cols": 3, + "id": "logistique" + }, + { + "type":"label", + "name":"autre", + "label":"Autres activités", + "nb_cols":3, + "id":"autre" + }, + { + "type": "label", + "name": "total", + "label": "Total", + "nb_cols": 3, + "id": "total" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"display_button", + "id":"display_button", + "buttons":[ + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "display_button", + "id_programme", + "indicateur_activite_industrie", + "production_industrie", + "logistique", + "autre", + "total" + ] + } + ] + } + }, + "search":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_activite_industrie-form", + "title":"SUIVI_PROD_IMMO_ACTIVITE_INDUSTRIE_TITLE_SEARCH", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"select", + "name":"id_programme", + "label":"Opération", + "required":true, + "nb_cols":3, + "id":"id_programme", + "datasource":{ + "datasource_id":"datasource_38", + "sort_order":"ASC", + "distinct":"true", + "label_key":"nom_programme", + "order_by":"nom_programme", + "id_key":"id_programme", + "attributs":"id_programme|nom_programme" + }, + "id_from":"id_programme_from" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "id_indicateur_activite_industrie", + "label": "Type", + "required": false, + "nb_cols": 7, + "id": "id_indicateur_activite_industrie_3_1", + "id_from": "id_indicateur_activite_industrie_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "id_indicateur_activite_industrie", + "label_key": "indicateur_activite_industrie", + "attributs": "id_indicateur_activite_industrie|indicateur_activite_industrie", + "order_by": "indicateur_activite_industrie" + } + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-xs", + "nb_cols":12, + "name":"search_button", + "id":"search_button", + "buttons":[ + { + "type":"button", + "name":"search", + "label":"FORM_SEARCH_BUTTON", + "class":"btn-primary", + "event":"setGridFilter()" + }, + { + "type":"reset", + "name":"reset", + "label":"FORM_RESET_BUTTON", + "class":"btn-primary", + "event":"resetGridFilter()" + } + ] + } + ] + } + ], + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "search_button", + "id_indicateur_activite_industrie", + "id_programme" + ] + } + ] + } + }, + "insert":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_activite_industrie-form", + "title":"SUIVI_PROD_IMMO_ACTIVITE_INDUSTRIE_TITLE_INSERT", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_programme", + "nb_cols": 12, + "id": "id_programme_2_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "id_indicateur_activite_industrie", + "label": "Type", + "required": true, + "nb_cols": 7, + "id": "id_indicateur_activite_industrie_3_1", + "id_from": "id_indicateur_activite_industrie_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "id_indicateur_activite_industrie", + "label_key": "indicateur_activite_industrie", + "attributs": "id_indicateur_activite_industrie|indicateur_activite_industrie", + "order_by": "indicateur_activite_industrie" + } + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "production_industrie", + "label": "Production industrie", + "disabled": false, + "required": false, + "nb_cols": 3, + "id": "production_industrie" + }, + { + "type": "text", + "name": "logistique", + "label": "Logistique", + "disabled": false, + "required": false, + "nb_cols": 3, + "id": "logistique" + }, + { + "type":"text", + "name":"autre", + "label":"Autres activités", + "disabled": false, + "required": false, + "nb_cols":3, + "id":"autre" + }, + { + "type": "text", + "name": "total", + "label": "Total", + "disabled": false, + "required": false, + "nb_cols": 3, + "id": "total" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"insert_button", + "id":"insert_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_CREATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "initEvent": "", + "event":"sendSimpleForm()", + "afterEvent":"editSectionForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "insert_button", + "id_programme", + "id_indicateur_activite_industrie", + "production_industrie", + "logistique", + "autre", + "total" + ] + } + ] + } + }, + "update":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_activite_industrie-form", + "title":"SUIVI_PROD_IMMO_ACTIVITE_INDUSTRIE_TITLE_UPDATE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_activite_industrie", + "nb_cols": 12, + "id": "id_activite_industrie_1_1" + } + ] + }, + { + "fields": [ + { + "type": "hidden", + "name": "id_programme", + "nb_cols": 12, + "id": "id_programme_2_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "id_indicateur_activite_industrie", + "label": "Type", + "required": true, + "nb_cols": 7, + "id": "id_indicateur_activite_industrie_3_1", + "id_from": "id_indicateur_activite_industrie_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "id_indicateur_activite_industrie", + "label_key": "indicateur_activite_industrie", + "attributs": "id_indicateur_activite_industrie|indicateur_activite_industrie", + "order_by": "indicateur_activite_industrie" + } + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "production_industrie", + "label": "Production industrie", + "disabled": false, + "required": false, + "nb_cols": 3, + "id": "production_industrie" + }, + { + "type": "text", + "name": "logistique", + "label": "Logistique", + "disabled": false, + "required": false, + "nb_cols": 3, + "id": "logistique" + }, + { + "type":"text", + "name":"autre", + "label":"Autres activités", + "disabled": false, + "required": false, + "nb_cols":3, + "id":"autre" + }, + { + "type": "text", + "name": "total", + "label": "Total", + "disabled": false, + "required": false, + "nb_cols": 3, + "id": "total" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"update_button", + "id":"update_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_UPDATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "initEvent": "", + "event":"sendSimpleForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "update_button", + "id_activite_industrie", + "id_programme", + "id_indicateur_activite_industrie", + "production_industrie", + "logistique", + "autre", + "total" + ] + } + ] + } + }, + "datasources":{ + "datasource_2": { + "type": "web_service", + "dataType": "tableValue", + "name": "datasource_indicateur_activite_industrie", + "description": "", + "parameters": { + "filter": { + "relation": "AND", + "operators": [] + }, + "database": "suivi_prod_immo", + "schema": "prod_immo", + "table": "indicateur_activite_industrie" + }, + "ressource_id": "vitis/genericquerys", + "id": "datasource_2" + }, + "datasource_38":{ + "type":"web_service", + "dataType":"tableValue", + "name":"programme_immobilier", + "description":"", + "parameters":{ + "schema":"prod_immo", + "table":"programme_immobilier" + }, + "ressource_id":"vitis/genericquerys", + "id":"datasource_38" + } + } +} diff --git a/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_bureau_bureau.json b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_bureau_bureau.json new file mode 100644 index 0000000000000000000000000000000000000000..08a37cbe7834a22edd6e18b5a4893315602cd066 --- /dev/null +++ b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_bureau_bureau.json @@ -0,0 +1,405 @@ +{ + "display":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_bureau-form", + "title":"SUIVI_PROD_IMMO_BUREAU_TITLE_DISPLAY", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_programme", + "nb_cols": 12, + "id": "id_programme_2_1" + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"indicateur_bureau", + "label":"Type", + "nb_cols":12, + "id":"indicateur_bureau" + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"total", + "label":"Total", + "nb_cols":2, + "id":"total" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"display_button", + "id":"display_button", + "buttons":[ + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "display_button", + "id_programme", + "indicateur_bureau", + "total" + ] + } + ] + } + }, + "search":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_bureau-form", + "title":"SUIVI_PROD_IMMO_BUREAU_TITLE_SEARCH", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"select", + "name":"id_programme", + "label":"Opération", + "required":true, + "nb_cols":3, + "id":"id_programme", + "datasource":{ + "datasource_id":"datasource_38", + "sort_order":"ASC", + "distinct":"true", + "label_key":"nom_programme", + "order_by":"nom_programme", + "id_key":"id_programme", + "attributs":"id_programme|nom_programme" + }, + "id_from":"id_programme_from" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "id_indicateur_bureau", + "label": "Type", + "required": false, + "nb_cols": 7, + "id": "id_indicateur_bureau_3_1", + "id_from": "id_indicateur_bureau_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "id_indicateur_bureau", + "label_key": "indicateur_bureau", + "attributs": "id_indicateur_bureau|indicateur_bureau", + "order_by": "indicateur_bureau" + } + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-xs", + "nb_cols":12, + "name":"search_button", + "id":"search_button", + "buttons":[ + { + "type":"button", + "name":"search", + "label":"FORM_SEARCH_BUTTON", + "class":"btn-primary", + "event":"setGridFilter()" + }, + { + "type":"reset", + "name":"reset", + "label":"FORM_RESET_BUTTON", + "class":"btn-primary", + "event":"resetGridFilter()" + } + ] + } + ] + } + ], + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "search_button", + "id_indicateur_bureau", + "id_programme" + ] + } + ] + } + }, + "insert":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_bureau-form", + "title":"SUIVI_PROD_IMMO_BUREAU_TITLE_INSERT", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_programme", + "nb_cols": 12, + "id": "id_programme_2_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "id_indicateur_bureau", + "label": "Type", + "required": true, + "nb_cols": 7, + "id": "id_indicateur_bureau_3_1", + "id_from": "id_indicateur_bureau_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "id_indicateur_bureau", + "label_key": "indicateur_bureau", + "attributs": "id_indicateur_bureau|indicateur_bureau", + "order_by": "indicateur_bureau" + } + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "total", + "label": "Total", + "disabled": false, + "required": false, + "nb_cols": 2, + "id": "total" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"insert_button", + "id":"insert_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_CREATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "initEvent": "", + "event":"sendSimpleForm()", + "afterEvent":"editSectionForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "insert_button", + "id_programme", + "id_indicateur_bureau", + "total" + ] + } + ] + } + }, + "update":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_bureau-form", + "title":"SUIVI_PROD_IMMO_BUREAU_TITLE_UPDATE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_bureau", + "nb_cols": 12, + "id": "id_bureau_1_1" + } + ] + }, + { + "fields": [ + { + "type": "hidden", + "name": "id_programme", + "nb_cols": 12, + "id": "id_programme_2_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "id_indicateur_bureau", + "label": "Type", + "required": true, + "nb_cols": 7, + "id": "id_indicateur_bureau_3_1", + "id_from": "id_indicateur_bureau_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "id_indicateur_bureau", + "label_key": "indicateur_bureau", + "attributs": "id_indicateur_bureau|indicateur_bureau", + "order_by": "indicateur_bureau" + } + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "total", + "label": "Total", + "disabled": false, + "required": false, + "nb_cols": 2, + "id": "nb_5_1" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"update_button", + "id":"update_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_UPDATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "initEvent": "", + "event":"sendSimpleForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "update_button", + "id_bureau", + "id_programme", + "id_indicateur_bureau", + "total" + ] + } + ] + } + }, + "datasources":{ + "datasource_2": { + "type": "web_service", + "dataType": "tableValue", + "name": "datasource_indicateur_bureau", + "description": "", + "parameters": { + "filter": { + "relation": "AND", + "operators": [] + }, + "database": "suivi_prod_immo", + "schema": "prod_immo", + "table": "indicateur_bureau" + }, + "ressource_id": "vitis/genericquerys", + "id": "datasource_2" + }, + "datasource_38":{ + "type":"web_service", + "dataType":"tableValue", + "name":"programme_immobilier", + "description":"", + "parameters":{ + "schema":"prod_immo", + "table":"programme_immobilier" + }, + "ressource_id":"vitis/genericquerys", + "id":"datasource_38" + } + } +} diff --git a/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_composition_habitat_specifique_cp_composition_habitat_specifique_cp.json b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_composition_habitat_specifique_cp_composition_habitat_specifique_cp.json new file mode 100644 index 0000000000000000000000000000000000000000..f78b1d61bca4a401d211fc3b688568c52bb373e9 --- /dev/null +++ b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_composition_habitat_specifique_cp_composition_habitat_specifique_cp.json @@ -0,0 +1,613 @@ +{ + "display":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_composition_habitat_specifique_cp-form", + "title":"SUIVI_PROD_IMMO_COMPOSITION_HABITAT_SPECIFIQUE_CP_TITLE_DISPLAY", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_habitat_specifique", + "nb_cols": 12, + "id": "id_habitat_specifique_2_1" + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"indicateur_habitat_specifique", + "label":"Type", + "nb_cols":12, + "id":"indicateur_habitat_specifique" + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"residence_etudiant", + "label":"Résidence étudiante", + "nb_cols":3, + "id":"residence_etudiant" + }, + { + "type":"label", + "name":"residence_personne_agee", + "label":"Résidence personnes agées", + "nb_cols":3, + "id":"residence_personne_agee" + }, + { + "type":"label", + "name":"residence_personne_handi", + "label":"Résidence personnes handicapées", + "nb_cols":3, + "id":"residence_personne_handi" + } + ] + }, + { + "fields": [ + { + "type":"label", + "name":"residence_intergenerationnelle", + "label":"Résidence intergénérationnelle", + "nb_cols":3, + "id":"residence_intergenerationnelle" + }, + { + "type":"label", + "name":"residence_sociale", + "label":"Résidence sociale", + "nb_cols":3, + "id":"residence_sociale" + }, + { + "type":"label", + "name":"pension_famille", + "label":"Pension de famille", + "nb_cols":3, + "id":"pension_famille" + }, + { + "type":"label", + "name":"autre", + "label":"Autres (foyers, ...)", + "nb_cols":3, + "id":"autre" + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"commentaire", + "label":"Commentaire", + "nb_cols":12, + "id":"commentaire" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"display_button", + "id":"display_button", + "buttons":[ + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "display_button", + "id_habitat_specifique", + "id_indicateur_habitat_specifique", + "residence_etudiant", + "residence_personne_agee", + "residence_personne_handi", + "residence_intergenerationnelle", + "residence_sociale", + "pension_famille", + "autre", + "commentaire" + ] + } + ] + } + }, + "search":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_composition_habitat_specifique_cp-form", + "title":"SUIVI_PROD_IMMO_COMPOSITION_HABITAT_SPECIFIQUE_CP_TITLE_SEARCH", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_habitat_specifique", + "nb_cols": 12, + "id": "id_habitat_specifique_2_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "id_indicateur_habitat_specifique", + "label": "Type", + "required": false, + "nb_cols": 7, + "id": "id_indicateur_habitat_specifique_3_1", + "id_from": "id_indicateur_habitat_specifique_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "id_indicateur_habitat_specifique", + "label_key": "indicateur_habitat_specifique", + "attributs": "id_indicateur_habitat_specifique|indicateur_habitat_specifique", + "order_by": "indicateur_habitat_specifique" + } + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-xs", + "nb_cols":12, + "name":"search_button", + "id":"search_button", + "buttons":[ + { + "type":"button", + "name":"search", + "label":"FORM_SEARCH_BUTTON", + "class":"btn-primary", + "event":"setGridFilter()" + }, + { + "type":"reset", + "name":"reset", + "label":"FORM_RESET_BUTTON", + "class":"btn-primary", + "event":"resetGridFilter()" + } + ] + } + ] + } + ], + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "search_button", + "id_indicateur_habitat_specifique", + "id_habitat_specifique" + ] + } + ] + } + }, + "insert":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_composition_habitat_specifique_cp-form", + "title":"SUIVI_PROD_IMMO_COMPOSITION_HABITAT_SPECIFIQUE_CP_TITLE_INSERT", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_habitat_specifique", + "nb_cols": 12, + "id": "id_habitat_specifique_2_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "id_indicateur_habitat_specifique", + "label": "Type", + "required": true, + "nb_cols": 7, + "id": "id_indicateur_habitat_specifique_3_1", + "id_from": "id_indicateur_habitat_specifique_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "id_indicateur_habitat_specifique", + "label_key": "indicateur_habitat_specifique", + "attributs": "id_indicateur_habitat_specifique|indicateur_habitat_specifique", + "order_by": "indicateur_habitat_specifique" + } + } + ] + }, + { + "fields": [ + { + "type":"text", + "name":"residence_etudiant", + "label":"Résidence étudiante", + "disabled": false, + "required": false, + "nb_cols":3, + "id":"residence_etudiant" + }, + { + "type":"text", + "name":"residence_personne_agee", + "label":"Résidence personnes agées", + "disabled": false, + "required": false, + "nb_cols":3, + "id":"residence_personne_agee" + }, + { + "type":"text", + "name":"residence_personne_handi", + "label":"Résidence personnes handicapées", + "disabled": false, + "required": false, + "nb_cols":3, + "id":"residence_personne_handi" + } + ] + }, + { + "fields": [ + { + "type":"text", + "name":"residence_intergenerationnelle", + "label":"Résidence intergénérationnelle", + "disabled": false, + "required": false, + "nb_cols":3, + "id":"residence_intergenerationnelle" + }, + { + "type":"text", + "name":"residence_sociale", + "label":"Résidence sociale", + "disabled": false, + "required": false, + "nb_cols":3, + "id":"residence_sociale" + }, + { + "type":"text", + "name":"pension_famille", + "label":"Pension de famille", + "disabled": false, + "required": false, + "nb_cols":3, + "id":"pension_famille" + }, + { + "type":"text", + "name":"autre", + "label":"Autres (foyers, ...)", + "disabled": false, + "required": false, + "nb_cols":3, + "id":"autre" + } + ] + }, + { + "fields": [ + { + "type": "textarea", + "name": "commentaire", + "label": "Commentaire", + "disabled": false, + "required": false, + "nb_cols": 12, + "id": "commentaire_5_1" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"insert_button", + "id":"insert_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_CREATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "initEvent": "", + "event":"sendSimpleForm()", + "afterEvent":"editSectionForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "insert_button", + "id_habitat_specifique", + "id_indicateur_habitat_specifique", + "residence_etudiant", + "residence_personne_agee", + "residence_personne_handi", + "residence_intergenerationnelle", + "residence_sociale", + "pension_famille", + "autre", + "commentaire" + ] + } + ] + } + }, + "update":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_composition_habitat_specifique_cp-form", + "title":"SUIVI_PROD_IMMO_COMPOSITION_HABITAT_SPECIFIQUE_CP_TITLE_UPDATE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_composition_habitat_specifique", + "nb_cols": 12, + "id": "id_composition_habitat_specifique_1_1" + } + ] + }, + { + "fields": [ + { + "type": "hidden", + "name": "id_habitat_specifique", + "nb_cols": 12, + "id": "id_habitat_specifique_2_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "id_indicateur_habitat_specifique", + "label": "Type", + "required": true, + "nb_cols": 7, + "id": "id_indicateur_habitat_specifique_3_1", + "id_from": "id_indicateur_habitat_specifique_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "id_indicateur_habitat_specifique", + "label_key": "indicateur_habitat_specifique", + "attributs": "id_indicateur_habitat_specifique|indicateur_habitat_specifique", + "order_by": "indicateur_habitat_specifique" + } + } + ] + }, + { + "fields": [ + { + "type":"text", + "name":"residence_etudiant", + "label":"Résidence étudiante", + "disabled": false, + "required": false, + "nb_cols":3, + "id":"residence_etudiant" + }, + { + "type":"text", + "name":"residence_personne_agee", + "label":"Résidence personnes agées", + "disabled": false, + "required": false, + "nb_cols":3, + "id":"residence_personne_agee" + }, + { + "type":"text", + "name":"residence_personne_handi", + "label":"Résidence personnes handicapées", + "disabled": false, + "required": false, + "nb_cols":3, + "id":"residence_personne_handi" + } + ] + }, + { + "fields": [ + { + "type":"text", + "name":"residence_intergenerationnelle", + "label":"Résidence intergénérationnelle", + "disabled": false, + "required": false, + "nb_cols":3, + "id":"residence_intergenerationnelle" + }, + { + "type":"text", + "name":"residence_sociale", + "label":"Résidence sociale", + "disabled": false, + "required": false, + "nb_cols":3, + "id":"residence_sociale" + }, + { + "type":"text", + "name":"pension_famille", + "label":"Pension de famille", + "disabled": false, + "required": false, + "nb_cols":3, + "id":"pension_famille" + }, + { + "type":"text", + "name":"autre", + "label":"Autres (foyers, ...)", + "disabled": false, + "required": false, + "nb_cols":3, + "id":"autre" + } + ] + }, + { + "fields": [ + { + "type": "textarea", + "name": "commentaire", + "label": "Commentaire", + "disabled": false, + "required": false, + "nb_cols": 12, + "id": "commentaire_5_1" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"update_button", + "id":"update_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_UPDATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "initEvent": "", + "event":"sendSimpleForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "update_button", + "id_composition_habitat_specifique", + "id_habitat_specifique", + "id_indicateur_habitat_specifique", + "residence_etudiant", + "residence_personne_agee", + "residence_personne_handi", + "residence_intergenerationnelle", + "residence_sociale", + "pension_famille", + "autre", + "commentaire" + ] + } + ] + } + }, + "datasources":{ + "datasource_2": { + "type": "web_service", + "dataType": "tableValue", + "name": "datasource_indicateur_habitat_specifique", + "description": "", + "parameters": { + "filter": { + "relation": "AND", + "operators": [] + }, + "database": "suivi_prod_immo", + "schema": "prod_immo", + "table": "indicateur_habitat_specifique" + }, + "ressource_id": "vitis/genericquerys", + "id": "datasource_2" + }, + "datasource_38":{ + "type":"web_service", + "dataType":"tableValue", + "name":"programme_immobilier", + "description":"", + "parameters":{ + "schema":"prod_immo", + "table":"programme_immobilier" + }, + "ressource_id":"vitis/genericquerys", + "id":"datasource_38" + } + } +} diff --git a/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_composition_logement_familliaux_location_cp_composition_logement_familliaux_location_cp.json b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_composition_logement_familliaux_location_cp_composition_logement_familliaux_location_cp.json new file mode 100644 index 0000000000000000000000000000000000000000..09700da9f6e1c22fdbef4b6d1507491230536f35 --- /dev/null +++ b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_composition_logement_familliaux_location_cp_composition_logement_familliaux_location_cp.json @@ -0,0 +1,561 @@ +{ + "display":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_composition_logement_familliaux_location_cp-form", + "title":"SUIVI_PROD_IMMO_COMPOSITION_LOGEMENT_FAMILLIAUX_LOCATION_CP_TITLE_DISPLAY", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_logement_familliaux_location", + "nb_cols": 12, + "id": "id_logement_familliaux_location_2_1" + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"indicateur_logement_familliaux_location", + "label":"Type", + "nb_cols":12, + "id":"indicateur_logement_familliaux_location" + } + ] + }, + { + "fields":[ + { + "type":"title", + "name":"title_lls", + "label":"Social (LLS)", + "nb_cols":12, + "id":"title_lls" + } + ] + }, + { + "fields":[ + { + "type": "label", + "name": "social_pls", + "label": "PLS", + "nb_cols": 2, + "id": "social_pls" + }, + { + "type": "label", + "name": "social_plus_plai", + "label": "PLUS PLAI", + "nb_cols": 3, + "id": "social_plus_plai" + } + ] + }, + { + "fields":[ + { + "type":"title", + "name":"title_lli", + "label":"Intémerdiaire (LLI)", + "nb_cols":12, + "id":"title_lli" + } + ] + }, + { + "fields":[ + { + "type": "label", + "name": "intermediaire_pli", + "label": "Locatif intémédiaire PLI", + "nb_cols": 4, + "id": "intermediaire_pli" + }, + { + "type":"label", + "name":"intermediaire_afl", + "label":"AFL", + "nb_cols":2, + "id":"intermediaire_afl" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"display_button", + "id":"display_button", + "buttons":[ + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "display_button", + "id_logement_familliaux_location", + "indicateur_logement_familliaux_location", + "title_lls", + "social_pls", + "social_plus_plai", + "title_lli", + "intermediaire_pli", + "intermediaire_afl" + ] + } + ] + } + }, + "search":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_composition_logement_familliaux_location_cp-form", + "title":"SUIVI_PROD_IMMO_COMPOSITION_LOGEMENT_FAMILLIAUX_LOCATION_CP_TITLE_SEARCH", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_logement_familliaux_location", + "nb_cols": 12, + "id": "id_logement_familliaux_location_2_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "id_indicateur_logement_familliaux_location", + "label": "Type", + "required": false, + "nb_cols": 7, + "id": "id_indicateur_logement_familliaux_location_3_1", + "id_from": "id_indicateur_logement_familliaux_location_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "id_indicateur_logement_familliaux_location", + "label_key": "indicateur_logement_familliaux_location", + "attributs": "id_indicateur_logement_familliaux_location|indicateur_logement_familliaux_location", + "order_by": "indicateur_logement_familliaux_location" + } + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-xs", + "nb_cols":12, + "name":"search_button", + "id":"search_button", + "buttons":[ + { + "type":"button", + "name":"search", + "label":"FORM_SEARCH_BUTTON", + "class":"btn-primary", + "event":"setGridFilter()" + }, + { + "type":"reset", + "name":"reset", + "label":"FORM_RESET_BUTTON", + "class":"btn-primary", + "event":"resetGridFilter()" + } + ] + } + ] + } + ], + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "search_button", + "id_indicateur_logement_familliaux_location", + "id_logement_familliaux_location" + ] + } + ] + } + }, + "insert":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_composition_logement_familliaux_location_cp-form", + "title":"SUIVI_PROD_IMMO_COMPOSITION_LOGEMENT_FAMILLIAUX_LOCATION_CP_TITLE_INSERT", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_logement_familliaux_location", + "nb_cols": 12, + "id": "id_logement_familliaux_location_2_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "id_indicateur_logement_familliaux_location", + "label": "Type", + "required": true, + "nb_cols": 7, + "id": "id_indicateur_logement_familliaux_location_3_1", + "id_from": "id_indicateur_logement_familliaux_location_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "id_indicateur_logement_familliaux_location", + "label_key": "indicateur_logement_familliaux_location", + "attributs": "id_indicateur_logement_familliaux_location|indicateur_logement_familliaux_location", + "order_by": "indicateur_logement_familliaux_location" + } + } + ] + }, + { + "fields":[ + { + "type":"title", + "name":"title_lls", + "label":"Social (LLS)", + "nb_cols":12, + "id":"title_lls" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "social_pls", + "label": "PLS", + "disabled": false, + "required": false, + "nb_cols": 2, + "id": "social_pls" + }, + { + "type": "text", + "name": "social_plus_plai", + "label": "PLUS PLAI", + "disabled": false, + "required": false, + "nb_cols": 3, + "id": "social_plus_plai" + } + ] + }, + { + "fields":[ + { + "type":"title", + "name":"title_lli", + "label":"Intémerdiaire (LLI)", + "nb_cols":12, + "id":"title_lli" + } + ] + }, + { + "fields":[ + { + "type": "text", + "name": "intermediaire_pli", + "label": "Locatif intémédiaire PLI", + "disabled": false, + "required": false, + "nb_cols": 4, + "id": "intermediaire_pli" + }, + { + "type":"text", + "name":"intermediaire_afl", + "label":"AFL", + "disabled": false, + "required": false, + "nb_cols":2, + "id":"intermediaire_afl" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"insert_button", + "id":"insert_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_CREATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "initEvent": "", + "event":"sendSimpleForm()", + "afterEvent":"editSectionForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "insert_button", + "id_logement_familliaux_location", + "id_indicateur_logement_familliaux_location", + "title_lls", + "social_pls", + "social_plus_plai", + "title_lli", + "intermediaire_pli", + "intermediaire_afl" + ] + } + ] + } + }, + "update":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_composition_logement_familliaux_location_cp-form", + "title":"SUIVI_PROD_IMMO_COMPOSITION_LOGEMENT_FAMILLIAUX_LOCATION_CP_TITLE_UPDATE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_composition_logement_familliaux_location", + "nb_cols": 12, + "id": "id_composition_logement_familliaux_location_1_1" + } + ] + }, + { + "fields": [ + { + "type": "hidden", + "name": "id_logement_familliaux_location", + "nb_cols": 12, + "id": "id_logement_familliaux_location_2_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "id_indicateur_logement_familliaux_location", + "label": "Type", + "required": true, + "nb_cols": 7, + "id": "id_indicateur_logement_familliaux_location_3_1", + "id_from": "id_indicateur_logement_familliaux_location_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "id_indicateur_logement_familliaux_location", + "label_key": "indicateur_logement_familliaux_location", + "attributs": "id_indicateur_logement_familliaux_location|indicateur_logement_familliaux_location", + "order_by": "indicateur_logement_familliaux_location" + } + } + ] + }, + { + "fields":[ + { + "type":"title", + "name":"title_lls", + "label":"Social (LLS)", + "nb_cols":12, + "id":"title_lls" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "social_pls", + "label": "PLS", + "disabled": false, + "required": false, + "nb_cols": 2, + "id": "social_pls" + }, + { + "type": "text", + "name": "social_plus_plai", + "label": "PLUS PLAI", + "disabled": false, + "required": false, + "nb_cols": 3, + "id": "social_plus_plai" + } + ] + }, + { + "fields":[ + { + "type":"title", + "name":"title_lli", + "label":"Intémerdiaire (LLI)", + "nb_cols":12, + "id":"title_lli" + } + ] + }, + { + "fields":[ + { + "type": "text", + "name": "intermediaire_pli", + "label": "Locatif intémédiaire PLI", + "disabled": false, + "required": false, + "nb_cols": 4, + "id": "intermediaire_pli" + }, + { + "type":"text", + "name":"intermediaire_afl", + "label":"AFL", + "disabled": false, + "required": false, + "nb_cols":2, + "id":"intermediaire_afl" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"update_button", + "id":"update_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_UPDATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "initEvent": "", + "event":"sendSimpleForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "update_button", + "id_composition_logement_familliaux_location", + "id_logement_familliaux_location", + "id_indicateur_logement_familliaux_location", + "title_lls", + "social_pls", + "social_plus_plai", + "title_lli", + "intermediaire_pli", + "intermediaire_afl" + ] + } + ] + } + }, + "datasources":{ + "datasource_2": { + "type": "web_service", + "dataType": "tableValue", + "name": "datasource_indicateur_logement_familliaux_location", + "description": "", + "parameters": { + "filter": { + "relation": "AND", + "operators": [] + }, + "database": "suivi_prod_immo", + "schema": "prod_immo", + "table": "indicateur_logement_familliaux_location" + }, + "ressource_id": "vitis/genericquerys", + "id": "datasource_2" + }, + "datasource_38":{ + "type":"web_service", + "dataType":"tableValue", + "name":"programme_immobilier", + "description":"", + "parameters":{ + "schema":"prod_immo", + "table":"programme_immobilier" + }, + "ressource_id":"vitis/genericquerys", + "id":"datasource_38" + } + } +} diff --git a/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_equipement_structure_equipement_structure.json b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_equipement_structure_equipement_structure.json new file mode 100644 index 0000000000000000000000000000000000000000..6b02be4813bc63601f4e8fa16881a9994ebf58f4 --- /dev/null +++ b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_equipement_structure_equipement_structure.json @@ -0,0 +1,445 @@ +{ + "display":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_equipement_structure-form", + "title":"SUIVI_PROD_IMMO_STATIONNEMENT_TITLE_DISPLAY", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_programme", + "nb_cols": 12, + "id": "id_programme_2_1" + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"indicateur_equipement_structure", + "label":"Type", + "nb_cols":12, + "id":"indicateur_equipement_structure" + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"sdp", + "label":"SdP (m²)", + "nb_cols":2, + "id":"sdp" + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"commentaire", + "label":"Commentaire", + "nb_cols":12, + "id":"commentaire" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"display_button", + "id":"display_button", + "buttons":[ + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "display_button", + "id_programme", + "indicateur_equipement_structure", + "sdp", + "commentaire" + ] + } + ] + } + }, + "search":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_equipement_structure-form", + "title":"SUIVI_PROD_IMMO_STATIONNEMENT_TITLE_SEARCH", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"select", + "name":"id_programme", + "label":"Opération", + "required":true, + "nb_cols":3, + "id":"id_programme", + "datasource":{ + "datasource_id":"datasource_38", + "sort_order":"ASC", + "distinct":"true", + "label_key":"nom_programme", + "order_by":"nom_programme", + "id_key":"id_programme", + "attributs":"id_programme|nom_programme" + }, + "id_from":"id_programme_from" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "id_indicateur_equipement_structure", + "label": "Type", + "required": false, + "nb_cols": 7, + "id": "id_indicateur_equipement_structure_3_1", + "id_from": "id_indicateur_equipement_structure_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "id_indicateur_equipement_structure", + "label_key": "indicateur_equipement_structure", + "attributs": "id_indicateur_equipement_structure|indicateur_equipement_structure", + "order_by": "indicateur_equipement_structure" + } + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-xs", + "nb_cols":12, + "name":"search_button", + "id":"search_button", + "buttons":[ + { + "type":"button", + "name":"search", + "label":"FORM_SEARCH_BUTTON", + "class":"btn-primary", + "event":"setGridFilter()" + }, + { + "type":"reset", + "name":"reset", + "label":"FORM_RESET_BUTTON", + "class":"btn-primary", + "event":"resetGridFilter()" + } + ] + } + ] + } + ], + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "search_button", + "id_indicateur_equipement_structure", + "id_programme" + ] + } + ] + } + }, + "insert":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_equipement_structure-form", + "title":"SUIVI_PROD_IMMO_STATIONNEMENT_TITLE_INSERT", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_programme", + "nb_cols": 12, + "id": "id_programme_2_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "id_indicateur_equipement_structure", + "label": "Type", + "required": true, + "nb_cols": 7, + "id": "id_indicateur_equipement_structure_3_1", + "id_from": "id_indicateur_equipement_structure_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "id_indicateur_equipement_structure", + "label_key": "indicateur_equipement_structure", + "attributs": "id_indicateur_equipement_structure|indicateur_equipement_structure", + "order_by": "indicateur_equipement_structure" + } + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "sdp", + "label": "SdP (m²)", + "disabled": false, + "required": false, + "nb_cols": 2, + "id": "sdp" + } + ] + }, + { + "fields": [ + { + "type": "textarea", + "name": "commentaire", + "label": "Commentaire", + "disabled": false, + "required": false, + "nb_cols": 12, + "id": "commentaire_5_1" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"insert_button", + "id":"insert_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_CREATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "initEvent": "", + "event":"sendSimpleForm()", + "afterEvent":"editSectionForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "insert_button", + "id_programme", + "id_indicateur_equipement_structure", + "sdp", + "commentaire" + ] + } + ] + } + }, + "update":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_equipement_structure-form", + "title":"SUIVI_PROD_IMMO_STATIONNEMENT_TITLE_UPDATE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_equipement_structure", + "nb_cols": 12, + "id": "id_equipement_structure_1_1" + } + ] + }, + { + "fields": [ + { + "type": "hidden", + "name": "id_programme", + "nb_cols": 12, + "id": "id_programme_2_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "id_indicateur_equipement_structure", + "label": "Type", + "required": true, + "nb_cols": 7, + "id": "id_indicateur_equipement_structure_3_1", + "id_from": "id_indicateur_equipement_structure_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "id_indicateur_equipement_structure", + "label_key": "indicateur_equipement_structure", + "attributs": "id_indicateur_equipement_structure|indicateur_equipement_structure", + "order_by": "indicateur_equipement_structure" + } + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "sdp", + "label": "SdP (m²)", + "disabled": false, + "required": false, + "nb_cols": 2, + "id": "sdp" + } + ] + }, + { + "fields": [ + { + "type": "textarea", + "name": "commentaire", + "label": "Commentaire", + "disabled": false, + "required": false, + "nb_cols": 12, + "id": "commentaire_5_1" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"update_button", + "id":"update_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_UPDATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "initEvent": "", + "event":"sendSimpleForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "update_button", + "id_equipement_structure", + "id_programme", + "id_indicateur_equipement_structure", + "sdp", + "commentaire" + ] + } + ] + } + }, + "datasources":{ + "datasource_2": { + "type": "web_service", + "dataType": "tableValue", + "name": "datasource_indicateur_equipement_structure", + "description": "", + "parameters": { + "filter": { + "relation": "AND", + "operators": [] + }, + "database": "suivi_prod_immo", + "schema": "prod_immo", + "table": "indicateur_equipement_structure" + }, + "ressource_id": "vitis/genericquerys", + "id": "datasource_2" + }, + "datasource_38":{ + "type":"web_service", + "dataType":"tableValue", + "name":"programme_immobilier", + "description":"", + "parameters":{ + "schema":"prod_immo", + "table":"programme_immobilier" + }, + "ressource_id":"vitis/genericquerys", + "id":"datasource_38" + } + } +} diff --git a/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_granulometrie_granulometrie.json b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_granulometrie_granulometrie.json new file mode 100644 index 0000000000000000000000000000000000000000..c62cd6e8c59a7bd2b59dd24da0aefac782cf88ba --- /dev/null +++ b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_granulometrie_granulometrie.json @@ -0,0 +1,503 @@ +{ + "display":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_granulometrie-form", + "title":"SUIVI_PROD_IMMO_GRANULOMETRIE_TITLE_DISPLAY", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_programme", + "nb_cols": 12, + "id": "id_programme_2_1" + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"composition_programme", + "label":"Composition", + "nb_cols":12, + "id":"composition_programme" + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"valeur", + "label":"Valeur", + "nb_cols":6, + "id":"valeur" + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"type_granulometrie", + "label":"Type", + "nb_cols":12, + "id":"type_granulometrie" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"display_button", + "id":"display_button", + "buttons":[ + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "display_button", + "id_programme", + "composition_programme", + "valeur", + "type_granulometrie" + ] + } + ] + } + }, + "search":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_granulometrie-form", + "title":"SUIVI_PROD_IMMO_GRANULOMETRIE_TITLE_SEARCH", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"select", + "name":"id_programme", + "label":"Opération", + "required":true, + "nb_cols":3, + "id":"id_programme", + "datasource":{ + "datasource_id":"datasource_38", + "sort_order":"ASC", + "distinct":"true", + "label_key":"nom_programme", + "order_by":"nom_programme", + "id_key":"id_programme", + "attributs":"id_programme|nom_programme" + }, + "id_from":"id_programme_from" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "code_composition_programme", + "label": "Composition", + "required": false, + "nb_cols": 7, + "id": "Element_0_1586248310338", + "id_from": "Element_0_1586248310338_from", + "datasource": { + "datasource_id": "datasource_1", + "sort_order": "ASC", + "distinct": "true", + "id_key": "code_composition_programme", + "label_key": "composition_programme", + "attributs": "code_composition_programme|composition_programme", + "order_by": "composition_programme" + } + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "code_type_granulometrie", + "label": "Type", + "required": false, + "nb_cols": 7, + "id": "code_type_granulometrie_3_1", + "id_from": "code_type_granulometrie_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "code_type_granulometrie", + "label_key": "type_granulometrie", + "attributs": "code_type_granulometrie|type_granulometrie", + "order_by": "type_granulometrie" + } + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-xs", + "nb_cols":12, + "name":"search_button", + "id":"search_button", + "buttons":[ + { + "type":"button", + "name":"search", + "label":"FORM_SEARCH_BUTTON", + "class":"btn-primary", + "event":"setGridFilter()" + }, + { + "type":"reset", + "name":"reset", + "label":"FORM_RESET_BUTTON", + "class":"btn-primary", + "event":"resetGridFilter()" + } + ] + } + ] + } + ], + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "search_button", + "code_composition_programme", + "code_type_granulometrie", + "id_programme" + ] + } + ] + } + }, + "insert":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_granulometrie-form", + "title":"SUIVI_PROD_IMMO_GRANULOMETRIE_TITLE_INSERT", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_programme", + "nb_cols": 12, + "id": "id_programme_2_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "code_composition_programme", + "label": "Composition", + "required": true, + "nb_cols": 7, + "id": "Element_0_1586248310338", + "id_from": "Element_0_1586248310338_from", + "datasource": { + "datasource_id": "datasource_1", + "sort_order": "ASC", + "distinct": "true", + "id_key": "code_composition_programme", + "label_key": "composition_programme", + "attributs": "code_composition_programme|composition_programme", + "order_by": "composition_programme" + } + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "valeur", + "label": "Valeur", + "disabled": false, + "required": false, + "nb_cols": 2, + "id": "valeur_5_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "code_type_granulometrie", + "label": "Type", + "required": true, + "nb_cols": 7, + "id": "code_type_granulometrie_3_1", + "id_from": "code_type_granulometrie_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "code_type_granulometrie", + "label_key": "type_granulometrie", + "attributs": "code_type_granulometrie|type_granulometrie", + "order_by": "type_granulometrie" + } + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"insert_button", + "id":"insert_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_CREATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "initEvent": "", + "event":"sendSimpleForm()", + "afterEvent":"editSectionForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "insert_button", + "id_programme", + "code_type_granulometrie", + "valeur", + "code_composition_programme" + ] + } + ] + } + }, + "update":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_granulometrie-form", + "title":"SUIVI_PROD_IMMO_GRANULOMETRIE_TITLE_UPDATE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_granulometrie", + "nb_cols": 12, + "id": "id_granulometrie_1_1" + } + ] + }, + { + "fields": [ + { + "type": "hidden", + "name": "id_programme", + "nb_cols": 12, + "id": "id_programme_2_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "code_composition_programme", + "label": "Type", + "required": true, + "nb_cols": 7, + "id": "Element_0_1586248310338", + "id_from": "Element_0_1586248310338_from", + "datasource": { + "datasource_id": "datasource_1", + "sort_order": "ASC", + "distinct": "true", + "id_key": "code_composition_programme", + "label_key": "composition_programme", + "attributs": "code_composition_programme|composition_programme", + "order_by": "composition_programme" + } + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "valeur", + "label": "Valeur", + "disabled": false, + "required": false, + "nb_cols": 2, + "id": "valeur_5_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "code_type_granulometrie", + "label": "Type", + "required": true, + "nb_cols": 7, + "id": "code_type_granulometrie_3_1", + "id_from": "code_type_granulometrie_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "code_type_granulometrie", + "label_key": "type_granulometrie", + "attributs": "code_type_granulometrie|type_granulometrie", + "order_by": "type_granulometrie" + } + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"update_button", + "id":"update_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_UPDATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "initEvent": "", + "event":"sendSimpleForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "update_button", + "id_granulometrie", + "id_programme", + "code_type_granulometrie", + "valeur", + "code_composition_programme" + ] + } + ] + } + }, + "datasources":{ + "datasource_1": { + "type": "web_service", + "dataType": "tableValue", + "name": "datasource_composition_programme", + "description": "", + "parameters": { + "filter": { + "relation": "AND", + "operators": [] + }, + "database": "suivi_prod_immo", + "schema": "prod_immo", + "table": "composition_programme" + }, + "ressource_id": "vitis/genericquerys", + "id": "datasource_1" + }, + "datasource_2": { + "type": "web_service", + "dataType": "tableValue", + "name": "datasource_type_granulometrie", + "description": "", + "parameters": { + "filter": { + "relation": "AND", + "operators": [] + }, + "database": "suivi_prod_immo", + "schema": "prod_immo", + "table": "type_granulometrie" + }, + "ressource_id": "vitis/genericquerys", + "id": "datasource_2" + }, + "datasource_38":{ + "type":"web_service", + "dataType":"tableValue", + "name":"programme_immobilier", + "description":"", + "parameters":{ + "schema":"prod_immo", + "table":"programme_immobilier" + }, + "ressource_id":"vitis/genericquerys", + "id":"datasource_38" + } + } +} diff --git a/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_hotel_commerce_service_hotel_commerce_service.json b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_hotel_commerce_service_hotel_commerce_service.json new file mode 100644 index 0000000000000000000000000000000000000000..42a4b70b2cf61d5fc571926b79db58d17d951622 --- /dev/null +++ b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_hotel_commerce_service_hotel_commerce_service.json @@ -0,0 +1,529 @@ +{ + "display":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_hotel_commerce_service-form", + "title":"SUIVI_PROD_IMMO_HOTEL_COMMERCE_SERVICE_TITLE_DISPLAY", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_programme", + "nb_cols": 12, + "id": "id_programme_2_1" + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"indicateur_hotel_commerce_service", + "label":"Type", + "nb_cols":12, + "id":"indicateur_hotel_commerce_service" + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"commerce", + "label":"Commerces", + "nb_cols":3, + "id":"commerce" + }, + { + "type":"label", + "name":"loisir_marchand", + "label":"Loisirs (marchands)", + "nb_cols":3, + "id":"loisir_marchand" + }, + { + "type":"label", + "name":"service_act_artisanale", + "label":"Services / Act. artisanale", + "nb_cols":3, + "id":"service_act_artisanale" + }, + { + "type":"label", + "name":"hotel", + "label":"Hotels", + "nb_cols":3, + "id":"hotel" + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"commentaire", + "label":"Commentaire", + "nb_cols":12, + "id":"commentaire" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"display_button", + "id":"display_button", + "buttons":[ + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "display_button", + "id_programme", + "indicateur_hotel_commerce_service", + "commerce", + "loisir_marchand", + "service_act_artisanale", + "hotel", + "commentaire" + ] + } + ] + } + }, + "search":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_hotel_commerce_service-form", + "title":"SUIVI_PROD_IMMO_HOTEL_COMMERCE_SERVICE_TITLE_SEARCH", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"select", + "name":"id_programme", + "label":"Opération", + "required":true, + "nb_cols":3, + "id":"id_programme", + "datasource":{ + "datasource_id":"datasource_38", + "sort_order":"ASC", + "distinct":"true", + "label_key":"nom_programme", + "order_by":"nom_programme", + "id_key":"id_programme", + "attributs":"id_programme|nom_programme" + }, + "id_from":"id_programme_from" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "id_indicateur_hotel_commerce_service", + "label": "Type", + "required": false, + "nb_cols": 7, + "id": "id_indicateur_hotel_commerce_service_3_1", + "id_from": "id_indicateur_hotel_commerce_service_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "id_indicateur_hotel_commerce_service", + "label_key": "indicateur_hotel_commerce_service", + "attributs": "id_indicateur_hotel_commerce_service|indicateur_hotel_commerce_service", + "order_by": "indicateur_hotel_commerce_service" + } + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-xs", + "nb_cols":12, + "name":"search_button", + "id":"search_button", + "buttons":[ + { + "type":"button", + "name":"search", + "label":"FORM_SEARCH_BUTTON", + "class":"btn-primary", + "event":"setGridFilter()" + }, + { + "type":"reset", + "name":"reset", + "label":"FORM_RESET_BUTTON", + "class":"btn-primary", + "event":"resetGridFilter()" + } + ] + } + ] + } + ], + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "search_button", + "id_indicateur_hotel_commerce_service", + "id_programme" + ] + } + ] + } + }, + "insert":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_hotel_commerce_service-form", + "title":"SUIVI_PROD_IMMO_HOTEL_COMMERCE_SERVICE_TITLE_INSERT", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_programme", + "nb_cols": 12, + "id": "id_programme_2_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "id_indicateur_hotel_commerce_service", + "label": "Type", + "required": true, + "nb_cols": 7, + "id": "id_indicateur_hotel_commerce_service_3_1", + "id_from": "id_indicateur_hotel_commerce_service_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "id_indicateur_hotel_commerce_service", + "label_key": "indicateur_hotel_commerce_service", + "attributs": "id_indicateur_hotel_commerce_service|indicateur_hotel_commerce_service", + "order_by": "indicateur_hotel_commerce_service" + } + } + ] + }, + { + "fields": [ + { + "type":"text", + "name":"commerce", + "label":"Commerces", + "disabled": false, + "required": false, + "nb_cols":3, + "id":"commerce" + }, + { + "type":"text", + "name":"loisir_marchand", + "label":"Loisirs (marchands)", + "disabled": false, + "required": false, + "nb_cols":3, + "id":"loisir_marchand" + }, + { + "type":"text", + "name":"service_act_artisanale", + "label":"Services / Act. artisanale", + "disabled": false, + "required": false, + "nb_cols":3, + "id":"service_act_artisanale" + }, + { + "type":"text", + "name":"hotel", + "label":"Hotels", + "disabled": false, + "required": false, + "nb_cols":3, + "id":"hotel" + } + ] + }, + { + "fields": [ + { + "type": "textarea", + "name": "commentaire", + "label": "Commentaire", + "disabled": false, + "required": false, + "nb_cols": 12, + "id": "commentaire_5_1" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"insert_button", + "id":"insert_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_CREATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "initEvent": "", + "event":"sendSimpleForm()", + "afterEvent":"editSectionForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "insert_button", + "id_programme", + "id_indicateur_hotel_commerce_service", + "commerce", + "loisir_marchand", + "service_act_artisanale", + "hotel", + "commentaire" + ] + } + ] + } + }, + "update":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_hotel_commerce_service-form", + "title":"SUIVI_PROD_IMMO_HOTEL_COMMERCE_SERVICE_TITLE_UPDATE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_hotel_commerce_service", + "nb_cols": 12, + "id": "id_hotel_commerce_service_1_1" + } + ] + }, + { + "fields": [ + { + "type": "hidden", + "name": "id_programme", + "nb_cols": 12, + "id": "id_programme_2_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "id_indicateur_hotel_commerce_service", + "label": "Type", + "required": true, + "nb_cols": 7, + "id": "id_indicateur_hotel_commerce_service_3_1", + "id_from": "id_indicateur_hotel_commerce_service_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "id_indicateur_hotel_commerce_service", + "label_key": "indicateur_hotel_commerce_service", + "attributs": "id_indicateur_hotel_commerce_service|indicateur_hotel_commerce_service", + "order_by": "indicateur_hotel_commerce_service" + } + } + ] + }, + { + "fields": [ + { + "type":"text", + "name":"commerce", + "label":"Commerces", + "disabled": false, + "required": false, + "nb_cols":3, + "id":"commerce" + }, + { + "type":"text", + "name":"loisir_marchand", + "label":"Loisirs (marchands)", + "disabled": false, + "required": false, + "nb_cols":3, + "id":"loisir_marchand" + }, + { + "type":"text", + "name":"service_act_artisanale", + "label":"Services / Act. artisanale", + "disabled": false, + "required": false, + "nb_cols":3, + "id":"service_act_artisanale" + }, + { + "type":"text", + "name":"hotel", + "label":"Hotels", + "disabled": false, + "required": false, + "nb_cols":3, + "id":"hotel" + } + ] + }, + { + "fields": [ + { + "type": "textarea", + "name": "commentaire", + "label": "Commentaire", + "disabled": false, + "required": false, + "nb_cols": 12, + "id": "commentaire_5_1" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"update_button", + "id":"update_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_UPDATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "initEvent": "", + "event":"sendSimpleForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "update_button", + "id_hotel_commerce_service", + "id_programme", + "id_indicateur_hotel_commerce_service", + "commerce", + "loisir_marchand", + "service_act_artisanale", + "hotel", + "commentaire" + ] + } + ] + } + }, + "datasources":{ + "datasource_2": { + "type": "web_service", + "dataType": "tableValue", + "name": "datasource_indicateur_hotel_commerce_service", + "description": "", + "parameters": { + "filter": { + "relation": "AND", + "operators": [] + }, + "database": "suivi_prod_immo", + "schema": "prod_immo", + "table": "indicateur_hotel_commerce_service" + }, + "ressource_id": "vitis/genericquerys", + "id": "datasource_2" + }, + "datasource_38":{ + "type":"web_service", + "dataType":"tableValue", + "name":"programme_immobilier", + "description":"", + "parameters":{ + "schema":"prod_immo", + "table":"programme_immobilier" + }, + "ressource_id":"vitis/genericquerys", + "id":"datasource_38" + } + } +} diff --git a/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_logement_familliaux_accession_logement_familliaux_accession.json b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_logement_familliaux_accession_logement_familliaux_accession.json new file mode 100644 index 0000000000000000000000000000000000000000..782a142ece78fc9886713b397096e75cb97c98cb --- /dev/null +++ b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_logement_familliaux_accession_logement_familliaux_accession.json @@ -0,0 +1,518 @@ +{ + "display":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_logement_familliaux_accession-form", + "title":"SUIVI_PROD_IMMO_LOGEMENT_FAMILLIAUX_ACCESSION_TITLE_DISPLAY", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_programme", + "nb_cols": 12, + "id": "id_programme_2_1" + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"indicateur_logement_familliaux_accession", + "label":"Type", + "nb_cols":12, + "id":"indicateur_logement_familliaux_accession" + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"accession_libre", + "label":"Accession libre", + "nb_cols":2, + "id":"accession_libre" + }, + { + "type":"label", + "name": "accession_abordable", + "label": "Accession abordable", + "nb_cols": 2, + "id": "accession_abordable_5_1" + }, + { + "type":"label", + "name": "accession_sociale_securise", + "label": "Accession sociale (sécurisée)", + "nb_cols": 3, + "id": "accession_sociale_securise_5_1" + }, + { + "type":"label", + "name": "psla", + "label": "PSLA", + "nb_cols": 2, + "id": "psla_5_1" + }, + { + "type":"label", + "name": "brs", + "label": "Bail Réel Solidaire", + "nb_cols": 2, + "id": "brs_5_1" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"display_button", + "id":"display_button", + "buttons":[ + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "display_button", + "id_programme", + "accession_libre", + "accession_abordable", + "accession_sociale_securise", + "psla", + "brs", + "indicateur_logement_familliaux_accession" + ] + } + ] + } + }, + "search":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_logement_familliaux_accession-form", + "title":"SUIVI_PROD_IMMO_LOGEMENT_FAMILLIAUX_ACCESSION_TITLE_SEARCH", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"select", + "name":"id_programme", + "label":"Opération", + "required":true, + "nb_cols":3, + "id":"id_programme", + "datasource":{ + "datasource_id":"datasource_38", + "sort_order":"ASC", + "distinct":"true", + "label_key":"nom_programme", + "order_by":"nom_programme", + "id_key":"id_programme", + "attributs":"id_programme|nom_programme" + }, + "id_from":"id_programme_from" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "id_indicateur_logement_familliaux_accession", + "label": "Type", + "required": false, + "nb_cols": 7, + "id": "id_indicateur_logement_familliaux_accession_3_1", + "id_from": "id_indicateur_logement_familliaux_accession_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "id_indicateur_logement_familliaux_accession", + "label_key": "indicateur_logement_familliaux_accession", + "attributs": "id_indicateur_logement_familliaux_accession|indicateur_logement_familliaux_accession", + "order_by": "indicateur_logement_familliaux_accession" + } + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-xs", + "nb_cols":12, + "name":"search_button", + "id":"search_button", + "buttons":[ + { + "type":"button", + "name":"search", + "label":"FORM_SEARCH_BUTTON", + "class":"btn-primary", + "event":"setGridFilter()" + }, + { + "type":"reset", + "name":"reset", + "label":"FORM_RESET_BUTTON", + "class":"btn-primary", + "event":"resetGridFilter()" + } + ] + } + ] + } + ], + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "search_button", + "code_composition_programme", + "id_indicateur_logement_familliaux_accession", + "id_programme" + ] + } + ] + } + }, + "insert":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_logement_familliaux_accession-form", + "title":"SUIVI_PROD_IMMO_LOGEMENT_FAMILLIAUX_ACCESSION_TITLE_INSERT", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_programme", + "nb_cols": 12, + "id": "id_programme_2_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "id_indicateur_logement_familliaux_accession", + "label": "Type", + "required": true, + "nb_cols": 7, + "id": "id_indicateur_logement_familliaux_accession_3_1", + "id_from": "id_indicateur_logement_familliaux_accession_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "id_indicateur_logement_familliaux_accession", + "label_key": "indicateur_logement_familliaux_accession", + "attributs": "id_indicateur_logement_familliaux_accession|indicateur_logement_familliaux_accession", + "order_by": "indicateur_logement_familliaux_accession" + } + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "accession_libre", + "label": "Accession libre", + "disabled": false, + "required": false, + "nb_cols": 2, + "id": "accession_libre_5_1" + }, + { + "type": "text", + "name": "accession_abordable", + "label": "Accession abordable", + "disabled": false, + "required": false, + "nb_cols": 2, + "id": "accession_abordable_5_1" + }, + { + "type": "text", + "name": "accession_sociale_securise", + "label": "Accession sociale (sécurisée)", + "disabled": false, + "required": false, + "nb_cols": 3, + "id": "accession_sociale_securise_5_1" + }, + { + "type": "text", + "name": "psla", + "label": "PSLA", + "disabled": false, + "required": false, + "nb_cols": 2, + "id": "psla_5_1" + }, + { + "type": "text", + "name": "brs", + "label": "Bail Réel Solidaire", + "disabled": false, + "required": false, + "nb_cols": 2, + "id": "brs_5_1" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"insert_button", + "id":"insert_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_CREATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "initEvent": "", + "event":"sendSimpleForm()", + "afterEvent":"editSectionForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "insert_button", + "id_programme", + "id_indicateur_logement_familliaux_accession", + "accession_libre", + "accession_abordable", + "accession_sociale_securise", + "psla", + "brs" + ] + } + ] + } + }, + "update":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_logement_familliaux_accession-form", + "title":"SUIVI_PROD_IMMO_LOGEMENT_FAMILLIAUX_ACCESSION_TITLE_UPDATE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_logement_familliaux_accession", + "nb_cols": 12, + "id": "id_logement_familliaux_accession_1_1" + } + ] + }, + { + "fields": [ + { + "type": "hidden", + "name": "id_programme", + "nb_cols": 12, + "id": "id_programme_2_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "id_indicateur_logement_familliaux_accession", + "label": "Type", + "required": true, + "nb_cols": 7, + "id": "id_indicateur_logement_familliaux_accession_3_1", + "id_from": "id_indicateur_logement_familliaux_accession_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "id_indicateur_logement_familliaux_accession", + "label_key": "indicateur_logement_familliaux_accession", + "attributs": "id_indicateur_logement_familliaux_accession|indicateur_logement_familliaux_accession", + "order_by": "indicateur_logement_familliaux_accession" + } + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "accession_libre", + "label": "Accession libre", + "disabled": false, + "required": false, + "nb_cols": 2, + "id": "accession_libre_5_1" + }, + { + "type": "text", + "name": "accession_abordable", + "label": "Accession abordable", + "disabled": false, + "required": false, + "nb_cols": 2, + "id": "accession_abordable_5_1" + }, + { + "type": "text", + "name": "accession_sociale_securise", + "label": "Accession sociale (sécurisée)", + "disabled": false, + "required": false, + "nb_cols": 3, + "id": "accession_sociale_securise_5_1" + }, + { + "type": "text", + "name": "psla", + "label": "PSLA", + "disabled": false, + "required": false, + "nb_cols": 2, + "id": "psla_5_1" + }, + { + "type": "text", + "name": "brs", + "label": "Bail Réel Solidaire", + "disabled": false, + "required": false, + "nb_cols": 2, + "id": "brs_5_1" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"update_button", + "id":"update_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_UPDATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "initEvent": "", + "event":"sendSimpleForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "update_button", + "id_logement_familliaux_accession", + "id_programme", + "id_indicateur_logement_familliaux_accession", + "accession_libre", + "accession_abordable", + "accession_sociale_securise", + "psla", + "brs" + ] + } + ] + } + }, + "datasources":{ + "datasource_2": { + "type": "web_service", + "dataType": "tableValue", + "name": "datasource_indicateur_logement_familliaux_accession", + "description": "", + "parameters": { + "filter": { + "relation": "AND", + "operators": [] + }, + "database": "suivi_prod_immo", + "schema": "prod_immo", + "table": "indicateur_logement_familliaux_accession" + }, + "ressource_id": "vitis/genericquerys", + "id": "datasource_2" + }, + "datasource_38":{ + "type":"web_service", + "dataType":"tableValue", + "name":"programme_immobilier", + "description":"", + "parameters":{ + "schema":"prod_immo", + "table":"programme_immobilier" + }, + "ressource_id":"vitis/genericquerys", + "id":"datasource_38" + } + } +} diff --git a/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_profil_acheteur_accession_libre_profil_acheteur_accession_libre.json b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_profil_acheteur_accession_libre_profil_acheteur_accession_libre.json new file mode 100644 index 0000000000000000000000000000000000000000..6653bd351186d35a55f30599cea23708c15e1126 --- /dev/null +++ b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_profil_acheteur_accession_libre_profil_acheteur_accession_libre.json @@ -0,0 +1,473 @@ +{ + "display":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_profil_acheteur_accession_libre-form", + "title":"SUIVI_PROD_IMMO_PROFIL_ACHETEUR_ACCESSION_LIBRE_TITLE_DISPLAY", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_programme", + "nb_cols": 12, + "id": "id_programme_2_1" + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"type_acheteur_accession_libre", + "label":"Type", + "nb_cols":12, + "id":"type_acheteur_accession_libre" + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"nb", + "label":"Nombre", + "nb_cols":2, + "id":"nb" + }, + { + "type":"label", + "name":"pourc", + "label":"Pourcentage", + "nb_cols":2, + "id":"pourc" + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"commentaire", + "label":"Commentaire", + "nb_cols":12, + "id":"commentaire" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"display_button", + "id":"display_button", + "buttons":[ + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "display_button", + "id_programme", + "pourc", + "commentaire", + "nb", + "type_acheteur_accession_libre" + ] + } + ] + } + }, + "search":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_profil_acheteur_accession_libre-form", + "title":"SUIVI_PROD_IMMO_PROFIL_ACHETEUR_ACCESSION_LIBRE_TITLE_SEARCH", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"select", + "name":"id_programme", + "label":"Opération", + "required":true, + "nb_cols":3, + "id":"id_programme", + "datasource":{ + "datasource_id":"datasource_38", + "sort_order":"ASC", + "distinct":"true", + "label_key":"nom_programme", + "order_by":"nom_programme", + "id_key":"id_programme", + "attributs":"id_programme|nom_programme" + }, + "id_from":"id_programme_from" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "id_type_acheteur_accession_libre", + "label": "Type", + "required": false, + "nb_cols": 7, + "id": "id_type_acheteur_accession_libre_3_1", + "id_from": "id_type_acheteur_accession_libre_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "id_type_acheteur_accession_libre", + "label_key": "type_acheteur_accession_libre", + "attributs": "id_type_acheteur_accession_libre|type_acheteur_accession_libre", + "order_by": "type_acheteur_accession_libre" + } + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-xs", + "nb_cols":12, + "name":"search_button", + "id":"search_button", + "buttons":[ + { + "type":"button", + "name":"search", + "label":"FORM_SEARCH_BUTTON", + "class":"btn-primary", + "event":"setGridFilter()" + }, + { + "type":"reset", + "name":"reset", + "label":"FORM_RESET_BUTTON", + "class":"btn-primary", + "event":"resetGridFilter()" + } + ] + } + ] + } + ], + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "search_button", + "id_type_acheteur_accession_libre", + "id_programme" + ] + } + ] + } + }, + "insert":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_profil_acheteur_accession_libre-form", + "title":"SUIVI_PROD_IMMO_PROFIL_ACHETEUR_ACCESSION_LIBRE_TITLE_INSERT", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_programme", + "nb_cols": 12, + "id": "id_programme_2_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "id_type_acheteur_accession_libre", + "label": "Type", + "required": true, + "nb_cols": 7, + "id": "id_type_acheteur_accession_libre_3_1", + "id_from": "id_type_acheteur_accession_libre_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "id_type_acheteur_accession_libre", + "label_key": "type_acheteur_accession_libre", + "attributs": "id_type_acheteur_accession_libre|type_acheteur_accession_libre", + "order_by": "type_acheteur_accession_libre" + } + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "nb", + "label": "Nombre", + "disabled": false, + "required": false, + "nb_cols": 2, + "id": "nb_5_1" + }, + { + "type": "text", + "name": "pourc", + "label": "Pourcentage", + "disabled": false, + "required": false, + "nb_cols": 2, + "id": "pourc_5_1" + } + ] + }, + { + "fields": [ + { + "type": "textarea", + "name": "commentaire", + "label": "Commentaire", + "disabled": false, + "required": false, + "nb_cols": 12, + "id": "commentaire_5_1" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"insert_button", + "id":"insert_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_CREATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "initEvent": "", + "event":"sendSimpleForm()", + "afterEvent":"editSectionForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "insert_button", + "id_programme", + "id_type_acheteur_accession_libre", + "nb", + "pourc", + "commentaire" + ] + } + ] + } + }, + "update":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_profil_acheteur_accession_libre-form", + "title":"SUIVI_PROD_IMMO_PROFIL_ACHETEUR_ACCESSION_LIBRE_TITLE_UPDATE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_profil_acheteur_accession_libre", + "nb_cols": 12, + "id": "id_profil_acheteur_accession_libre_1_1" + } + ] + }, + { + "fields": [ + { + "type": "hidden", + "name": "id_programme", + "nb_cols": 12, + "id": "id_programme_2_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "id_type_acheteur_accession_libre", + "label": "Type", + "required": true, + "nb_cols": 7, + "id": "id_type_acheteur_accession_libre_3_1", + "id_from": "id_type_acheteur_accession_libre_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "id_type_acheteur_accession_libre", + "label_key": "type_acheteur_accession_libre", + "attributs": "id_type_acheteur_accession_libre|type_acheteur_accession_libre", + "order_by": "type_acheteur_accession_libre" + } + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "nb", + "label": "Nombre", + "disabled": false, + "required": false, + "nb_cols": 2, + "id": "nb_5_1" + }, + { + "type": "text", + "name": "pourc", + "label": "Pourcentage", + "disabled": false, + "required": false, + "nb_cols": 2, + "id": "pourc_5_1" + } + ] + }, + { + "fields": [ + { + "type": "textarea", + "name": "commentaire", + "label": "Commentaire", + "disabled": false, + "required": false, + "nb_cols": 12, + "id": "commentaire_5_1" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"update_button", + "id":"update_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_UPDATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "initEvent": "", + "event":"sendSimpleForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "update_button", + "id_profil_acheteur_accession_libre", + "id_programme", + "id_type_acheteur_accession_libre", + "nb", + "pourc", + "commentaire" + ] + } + ] + } + }, + "datasources":{ + "datasource_2": { + "type": "web_service", + "dataType": "tableValue", + "name": "datasource_type_acheteur_accession_libre", + "description": "", + "parameters": { + "filter": { + "relation": "AND", + "operators": [] + }, + "database": "suivi_prod_immo", + "schema": "prod_immo", + "table": "type_acheteur_accession_libre" + }, + "ressource_id": "vitis/genericquerys", + "id": "datasource_2" + }, + "datasource_38":{ + "type":"web_service", + "dataType":"tableValue", + "name":"programme_immobilier", + "description":"", + "parameters":{ + "schema":"prod_immo", + "table":"programme_immobilier" + }, + "ressource_id":"vitis/genericquerys", + "id":"datasource_38" + } + } +} diff --git a/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_repartition_type_logement.json b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_repartition_type_logement.json new file mode 100644 index 0000000000000000000000000000000000000000..18f6c1babdff785781b9f5f77dd7e981906d5ff9 --- /dev/null +++ b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_repartition_type_logement.json @@ -0,0 +1,503 @@ +{ + "display":{ + "name":"suivi_prod_immo_saisie_suivi_prod_immo_repartition_type_logement-form", + "title":"SUIVI_PROD_IMMO_REPARTITION_TYPE_LOGEMENT_TITLE_DISPLAY", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_operation", + "nb_cols": 12, + "id": "id_operation_2_1" + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"repartition", + "label":"Type", + "nb_cols":12, + "id":"repartition" + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"valeur", + "label":"Valeur", + "nb_cols":6, + "id":"valeur" + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"type_logement", + "label":"Type de logement", + "nb_cols":12, + "id":"type_logement" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"display_button", + "id":"display_button", + "buttons":[ + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "display_button", + "id_operation", + "repartition", + "valeur", + "type_logement" + ] + } + ] + } + }, + "search":{ + "name":"suivi_prod_immo_saisie_suivi_prod_immo_repartition_type_logement-form", + "title":"SUIVI_PROD_IMMO_REPARTITION_TYPE_LOGEMENT_TITLE_SEARCH", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"select", + "name":"id_operation", + "label":"Opération", + "required":true, + "nb_cols":3, + "id":"id_operation", + "datasource":{ + "datasource_id":"datasource_38", + "sort_order":"ASC", + "distinct":"true", + "label_key":"nom_operation", + "order_by":"nom_operation", + "id_key":"id_operation", + "attributs":"id_operation|nom_operation" + }, + "id_from":"id_operation_from" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "code_repartition", + "label": "Type", + "required": false, + "nb_cols": 7, + "id": "Element_0_1586248310338", + "id_from": "Element_0_1586248310338_from", + "datasource": { + "datasource_id": "datasource_1", + "sort_order": "ASC", + "distinct": "true", + "id_key": "code_repartition", + "label_key": "repartition", + "attributs": "code_repartition|repartition", + "order_by": "repartition" + } + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "code_type_logement", + "label": "Type de logement", + "required": false, + "nb_cols": 7, + "id": "code_type_logement_3_1", + "id_from": "code_type_logement_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "code_type_logement", + "label_key": "type_logement", + "attributs": "code_type_logement|type_logement", + "order_by": "type_logement" + } + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-xs", + "nb_cols":12, + "name":"search_button", + "id":"search_button", + "buttons":[ + { + "type":"button", + "name":"search", + "label":"FORM_SEARCH_BUTTON", + "class":"btn-primary", + "event":"setGridFilter()" + }, + { + "type":"reset", + "name":"reset", + "label":"FORM_RESET_BUTTON", + "class":"btn-primary", + "event":"resetGridFilter()" + } + ] + } + ] + } + ], + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "search_button", + "code_repartition", + "code_type_logement", + "id_operation" + ] + } + ] + } + }, + "insert":{ + "name":"suivi_prod_immo_saisie_suivi_prod_immo_repartition_type_logement-form", + "title":"SUIVI_PROD_IMMO_REPARTITION_TYPE_LOGEMENT_TITLE_INSERT", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_operation", + "nb_cols": 12, + "id": "id_operation_2_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "code_repartition", + "label": "Type", + "required": true, + "nb_cols": 7, + "id": "Element_0_1586248310338", + "id_from": "Element_0_1586248310338_from", + "datasource": { + "datasource_id": "datasource_1", + "sort_order": "ASC", + "distinct": "true", + "id_key": "code_repartition", + "label_key": "repartition", + "attributs": "code_repartition|repartition", + "order_by": "repartition" + } + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "valeur", + "label": "Valeur", + "disabled": false, + "required": false, + "nb_cols": 2, + "id": "valeur_5_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "code_type_logement", + "label": "Type de logement", + "required": true, + "nb_cols": 7, + "id": "code_type_logement_3_1", + "id_from": "code_type_logement_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "code_type_logement", + "label_key": "type_logement", + "attributs": "code_type_logement|type_logement", + "order_by": "type_logement" + } + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"insert_button", + "id":"insert_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_CREATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "initEvent": "", + "event":"sendSimpleForm()", + "afterEvent":"editSectionForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "insert_button", + "id_operation", + "code_type_logement", + "valeur", + "code_repartition" + ] + } + ] + } + }, + "update":{ + "name":"suivi_prod_immo_saisie_suivi_prod_immo_repartition_type_logement-form", + "title":"SUIVI_PROD_IMMO_REPARTITION_TYPE_LOGEMENT_TITLE_UPDATE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_repartition_type_logement", + "nb_cols": 12, + "id": "id_repartition_type_logement_1_1" + } + ] + }, + { + "fields": [ + { + "type": "hidden", + "name": "id_operation", + "nb_cols": 12, + "id": "id_operation_2_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "code_repartition", + "label": "Type", + "required": true, + "nb_cols": 7, + "id": "Element_0_1586248310338", + "id_from": "Element_0_1586248310338_from", + "datasource": { + "datasource_id": "datasource_1", + "sort_order": "ASC", + "distinct": "true", + "id_key": "code_repartition", + "label_key": "repartition", + "attributs": "code_repartition|repartition", + "order_by": "repartition" + } + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "valeur", + "label": "Valeur", + "disabled": false, + "required": false, + "nb_cols": 2, + "id": "valeur_5_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "code_type_logement", + "label": "Type de logement", + "required": true, + "nb_cols": 7, + "id": "code_type_logement_3_1", + "id_from": "code_type_logement_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "code_type_logement", + "label_key": "type_logement", + "attributs": "code_type_logement|type_logement", + "order_by": "type_logement" + } + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"update_button", + "id":"update_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_UPDATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "initEvent": "", + "event":"sendSimpleForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "update_button", + "id_repartition_type_logement", + "id_operation", + "code_type_logement", + "valeur", + "code_repartition" + ] + } + ] + } + }, + "datasources":{ + "datasource_1": { + "type": "web_service", + "dataType": "tableValue", + "name": "datasource_repartition", + "description": "", + "parameters": { + "filter": { + "relation": "AND", + "operators": [] + }, + "database": "suivi_prod_immo", + "schema": "prod_immo", + "table": "repartition" + }, + "ressource_id": "vitis/genericquerys", + "id": "datasource_1" + }, + "datasource_2": { + "type": "web_service", + "dataType": "tableValue", + "name": "datasource_type_logement", + "description": "", + "parameters": { + "filter": { + "relation": "AND", + "operators": [] + }, + "database": "suivi_prod_immo", + "schema": "prod_immo", + "table": "type_logement" + }, + "ressource_id": "vitis/genericquerys", + "id": "datasource_2" + }, + "datasource_38":{ + "type":"web_service", + "dataType":"tableValue", + "name":"operation", + "description":"", + "parameters":{ + "schema":"prod_immo", + "table":"operation" + }, + "ressource_id":"vitis/genericquerys", + "id":"datasource_38" + } + } +} diff --git a/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_stationnement_stationnement.json b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_stationnement_stationnement.json new file mode 100644 index 0000000000000000000000000000000000000000..737e9b987f4f223fd519723f1c15ee2075755459 --- /dev/null +++ b/src/module_suivi_prod_immo/module/forms/suivi_prod_immo_saisie_dep/suivi_prod_immo_saisie_dep_suivi_prod_immo_stationnement_stationnement.json @@ -0,0 +1,473 @@ +{ + "display":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_stationnement-form", + "title":"SUIVI_PROD_IMMO_STATIONNEMENT_TITLE_DISPLAY", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_programme", + "nb_cols": 12, + "id": "id_programme_2_1" + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"indicateur_stationnement", + "label":"Type", + "nb_cols":12, + "id":"indicateur_stationnement" + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"nb", + "label":"Nombre", + "nb_cols":2, + "id":"nb" + }, + { + "type":"label", + "name":"prix_moyen_ttc", + "label":"Prix moyen en € TTC", + "nb_cols":4, + "id":"prix_moyen_ttc" + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"commentaire", + "label":"Commentaire", + "nb_cols":12, + "id":"commentaire" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"display_button", + "id":"display_button", + "buttons":[ + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "display_button", + "id_programme", + "indicateur_stationnement", + "nb", + "prix_moyen_ttc", + "commentaire" + ] + } + ] + } + }, + "search":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_stationnement-form", + "title":"SUIVI_PROD_IMMO_STATIONNEMENT_TITLE_SEARCH", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"select", + "name":"id_programme", + "label":"Opération", + "required":true, + "nb_cols":3, + "id":"id_programme", + "datasource":{ + "datasource_id":"datasource_38", + "sort_order":"ASC", + "distinct":"true", + "label_key":"nom_programme", + "order_by":"nom_programme", + "id_key":"id_programme", + "attributs":"id_programme|nom_programme" + }, + "id_from":"id_programme_from" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "id_indicateur_stationnement", + "label": "Type", + "required": false, + "nb_cols": 7, + "id": "id_indicateur_stationnement_3_1", + "id_from": "id_indicateur_stationnement_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "id_indicateur_stationnement", + "label_key": "indicateur_stationnement", + "attributs": "id_indicateur_stationnement|indicateur_stationnement", + "order_by": "indicateur_stationnement" + } + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-xs", + "nb_cols":12, + "name":"search_button", + "id":"search_button", + "buttons":[ + { + "type":"button", + "name":"search", + "label":"FORM_SEARCH_BUTTON", + "class":"btn-primary", + "event":"setGridFilter()" + }, + { + "type":"reset", + "name":"reset", + "label":"FORM_RESET_BUTTON", + "class":"btn-primary", + "event":"resetGridFilter()" + } + ] + } + ] + } + ], + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "search_button", + "id_indicateur_stationnement", + "id_programme" + ] + } + ] + } + }, + "insert":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_stationnement-form", + "title":"SUIVI_PROD_IMMO_STATIONNEMENT_TITLE_INSERT", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_programme", + "nb_cols": 12, + "id": "id_programme_2_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "id_indicateur_stationnement", + "label": "Type", + "required": true, + "nb_cols": 7, + "id": "id_indicateur_stationnement_3_1", + "id_from": "id_indicateur_stationnement_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "id_indicateur_stationnement", + "label_key": "indicateur_stationnement", + "attributs": "id_indicateur_stationnement|indicateur_stationnement", + "order_by": "indicateur_stationnement" + } + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "nb", + "label": "Nombre", + "disabled": false, + "required": false, + "nb_cols": 2, + "id": "nb_5_1" + }, + { + "type":"text", + "name":"prix_moyen_ttc", + "label":"Prix moyen en € TTC", + "disabled": false, + "required": false, + "nb_cols":3, + "id":"prix_moyen_ttc" + } + ] + }, + { + "fields": [ + { + "type": "textarea", + "name": "commentaire", + "label": "Commentaire", + "disabled": false, + "required": false, + "nb_cols": 12, + "id": "commentaire_5_1" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"insert_button", + "id":"insert_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_CREATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "initEvent": "", + "event":"sendSimpleForm()", + "afterEvent":"editSectionForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "insert_button", + "id_programme", + "id_indicateur_stationnement", + "nb", + "prix_moyen_ttc", + "commentaire" + ] + } + ] + } + }, + "update":{ + "name":"suivi_prod_immo_saisie_dep_suivi_prod_immo_stationnement-form", + "title":"SUIVI_PROD_IMMO_STATIONNEMENT_TITLE_UPDATE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields": [ + { + "type": "hidden", + "name": "id_stationnement", + "nb_cols": 12, + "id": "id_stationnement_1_1" + } + ] + }, + { + "fields": [ + { + "type": "hidden", + "name": "id_programme", + "nb_cols": 12, + "id": "id_programme_2_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "id_indicateur_stationnement", + "label": "Type", + "required": true, + "nb_cols": 7, + "id": "id_indicateur_stationnement_3_1", + "id_from": "id_indicateur_stationnement_3_1_from", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "id_key": "id_indicateur_stationnement", + "label_key": "indicateur_stationnement", + "attributs": "id_indicateur_stationnement|indicateur_stationnement", + "order_by": "indicateur_stationnement" + } + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "nb", + "label": "Nombre", + "disabled": false, + "required": false, + "nb_cols": 2, + "id": "nb_5_1" + }, + { + "type":"text", + "name":"prix_moyen_ttc", + "label":"Prix moyen en € TTC", + "disabled": false, + "required": false, + "nb_cols":3, + "id":"prix_moyen_ttc" + } + ] + }, + { + "fields": [ + { + "type": "textarea", + "name": "commentaire", + "label": "Commentaire", + "disabled": false, + "required": false, + "nb_cols": 12, + "id": "commentaire_5_1" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"update_button", + "id":"update_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_UPDATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "initEvent": "", + "event":"sendSimpleForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "update_button", + "id_stationnement", + "id_programme", + "id_indicateur_stationnement", + "nb", + "prix_moyen_ttc", + "commentaire" + ] + } + ] + } + }, + "datasources":{ + "datasource_2": { + "type": "web_service", + "dataType": "tableValue", + "name": "datasource_indicateur_stationnement", + "description": "", + "parameters": { + "filter": { + "relation": "AND", + "operators": [] + }, + "database": "suivi_prod_immo", + "schema": "prod_immo", + "table": "indicateur_stationnement" + }, + "ressource_id": "vitis/genericquerys", + "id": "datasource_2" + }, + "datasource_38":{ + "type":"web_service", + "dataType":"tableValue", + "name":"programme_immobilier", + "description":"", + "parameters":{ + "schema":"prod_immo", + "table":"programme_immobilier" + }, + "ressource_id":"vitis/genericquerys", + "id":"datasource_38" + } + } +} diff --git a/src/module_suivi_prod_immo/module/index_fiche_operation.html b/src/module_suivi_prod_immo/module/index_fiche_operation.html new file mode 100644 index 0000000000000000000000000000000000000000..bcf3e085ebf5480c619c953320f6080758a77414 --- /dev/null +++ b/src/module_suivi_prod_immo/module/index_fiche_operation.html @@ -0,0 +1,4 @@ +<br> +<div class="title_fiche">Fiche opération</div> +<br> +<div app-ficheoperation id="app-ficheoperation"></div> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/module/index_porteur.html b/src/module_suivi_prod_immo/module/index_porteur.html new file mode 100644 index 0000000000000000000000000000000000000000..dc66171180709b4cee5faf90c2d8f4d7e3c5a4fb --- /dev/null +++ b/src/module_suivi_prod_immo/module/index_porteur.html @@ -0,0 +1,4 @@ +<br> +<div class="title_fiche">Porteurs de programmes immobiliers</div> +<br> +<div app-porteur id="app-porteur"></div> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/module/index_programme_logement.html b/src/module_suivi_prod_immo/module/index_programme_logement.html new file mode 100644 index 0000000000000000000000000000000000000000..e4bacde535b8bff82b79a2c19312e8635768ff1b --- /dev/null +++ b/src/module_suivi_prod_immo/module/index_programme_logement.html @@ -0,0 +1,4 @@ +<br> +<div class="title_fiche">Fiche des programmes immobiliers de logements</div> +<br> +<div app-programmelogement id="app-programmelogement"></div> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/module/index_type_operation.html b/src/module_suivi_prod_immo/module/index_type_operation.html new file mode 100644 index 0000000000000000000000000000000000000000..d25b37dc61c5eec2545c7112a37fe2b051152ec0 --- /dev/null +++ b/src/module_suivi_prod_immo/module/index_type_operation.html @@ -0,0 +1,4 @@ +<br> +<div class="title_fiche">Type d'opération</div> +<br> +<div app-typeoperation id="app-typeoperation"></div> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/module/javascript/script_module.js b/src/module_suivi_prod_immo/module/javascript/script_module.js index dbabe56de8919053ee3bf9c8d11b52c78d088405..5a8a53b7c166f3fdc21f537ea5763ec592645f8b 100644 --- a/src/module_suivi_prod_immo/module/javascript/script_module.js +++ b/src/module_suivi_prod_immo/module/javascript/script_module.js @@ -3,6 +3,11 @@ 'use strict'; goog.provide('vmap.suivi_prod_immo.script_module'); goog.require('vmap.suivi_prod_immo.dashboard'); +goog.require('vmap.suivi_prod_immo.fiche_operation'); +goog.require('vmap.suivi_prod_immo.porteur'); +goog.require('vmap.suivi_prod_immo.type_operation'); +goog.require('vmap.suivi_prod_immo.programme_logement'); + vitisApp.on('appMainDrtvLoaded', function () { /** diff --git a/src/module_suivi_prod_immo/module/lang/lang-en.json b/src/module_suivi_prod_immo/module/lang/lang-en.json index 2aa13bbe59b0113eef12ed39b9e680ebbaf51a60..21bb0cd2287c0a1c25e7b32a7cd5e5b8e9b4fffa 100644 --- a/src/module_suivi_prod_immo/module/lang/lang-en.json +++ b/src/module_suivi_prod_immo/module/lang/lang-en.json @@ -2,5 +2,7 @@ "TEXT_MODE_SUIVI_PROD_IMMO_SAISIE" : "Suivi de la production immobilière dans les opérations d'aménagement sous pilotage de la Métropole de Lyon", "TITLE_MODE_SUIVI_PROD_IMMO_SAISIE" : "Suivi de la production immobilière", "TEXT_MODE_SUIVI_PROD_IMMO_BI" : "Indicateurs sur le suivi de la production immobilière", - "TITLE_MODE_SUIVI_PROD_IMMO_BI" : "Indicateurs de la production immobilière" + "TITLE_MODE_SUIVI_PROD_IMMO_BI" : "Indicateurs de la production immobilière", + "TEXT_MODE_SUIVI_PROD_IMMO_DASHBOARD" : "Module d'analyse sur le suivi de la production immobilière", + "TITLE_MODE_SUIVI_PROD_IMMO_DASHBOARD" : "Module d'analyse sur la production immobilière" } diff --git a/src/module_suivi_prod_immo/module/lang/lang-fr.json b/src/module_suivi_prod_immo/module/lang/lang-fr.json index a00c0741a87e90d7766b9247dd04ecb5e7661cba..e408d7ab5b386de06d6d49182d6ff6cccdf8f37b 100644 --- a/src/module_suivi_prod_immo/module/lang/lang-fr.json +++ b/src/module_suivi_prod_immo/module/lang/lang-fr.json @@ -3,6 +3,8 @@ "TITLE_MODE_SUIVI_PROD_IMMO_SAISIE" : "Suivi de la production immobilière", "TEXT_MODE_SUIVI_PROD_IMMO_BI" : "Indicateurs sur le suivi de la production immobilière", "TITLE_MODE_SUIVI_PROD_IMMO_BI" : "Indicateurs sur la production immobilière", + "TEXT_MODE_SUIVI_PROD_IMMO_DASHBOARD" : "Module d'analyse sur le suivi de la production immobilière", + "TITLE_MODE_SUIVI_PROD_IMMO_DASHBOARD" : "Module d'analyse sur la production immobilière", "SUIVI_PROD_IMMO_SAISIE_OPERATION_TITLE" : "", "SUIVI_PROD_IMMO_SAISIE_OPERATION_TITLE_INSERT" : "Opération", "SUIVI_PROD_IMMO_SAISIE_OPERATION_TITLE_UPDATE" : "Opération {{nom_operation}}", @@ -25,8 +27,53 @@ "SUIVI_PROD_IMMO_OPERATION_OPERATION_PROGRAMMATION_TITLE_UPDATE" : "Programmation prévisionnelle - densités", "SUIVI_PROD_IMMO_OPERATION_OPERATION_FINANCIER_TITLE_UPDATE" : "Aspects financier - coûts", "SECTION_UPDATE_TITLE_SUIVI_PROD_IMMO_SAISIE_SUIVI_PROD_IMMO_OPERATION" : "Opération", + "SUIVI_PROD_IMMO_REPARTITION_TYPE_LOGEMENT_TITLE_INSERT" : "Répartition des logements", + "SUIVI_PROD_IMMO_REPARTITION_TYPE_LOGEMENT_TITLE_SEARCH" : "Répartition des logements", + "SUIVI_PROD_IMMO_REPARTITION_TYPE_LOGEMENT_TITLE_UPDATE" : "Répartition des logements", + "SUIVI_PROD_IMMO_REPARTITION_TYPE_LOGEMENT_TITLE_DISPLAY" : "Répartition des logements", + "SUIVI_PROD_IMMO_GRANULOMETRIE_TITLE_INSERT" : "Synthèse du programme", + "SUIVI_PROD_IMMO_GRANULOMETRIE_TITLE_SEARCH" : "Synthèse du programme", + "SUIVI_PROD_IMMO_GRANULOMETRIE_TITLE_UPDATE" : "Synthèse du programme", + "SUIVI_PROD_IMMO_GRANULOMETRIE_TITLE_DISPLAY" : "Synthèse du programme", + "SUIVI_PROD_IMMO_LOGEMENT_FAMILLIAUX_ACCESSION_TITLE_INSERT" : "Logements familliaux en accession", + "SUIVI_PROD_IMMO_LOGEMENT_FAMILLIAUX_ACCESSION_TITLE_SEARCH" : "Logements familliaux en accession", + "SUIVI_PROD_IMMO_LOGEMENT_FAMILLIAUX_ACCESSION_TITLE_UPDATE" : "Logements familliaux en accession", + "SUIVI_PROD_IMMO_LOGEMENT_FAMILLIAUX_ACCESSION_TITLE_DISPLAY" : "Logements familliaux en accession", + "SUIVI_PROD_IMMO_PROFIL_ACHETEUR_ACCESSION_LIBRE_TITLE_INSERT" : "Profil des acheteurs-logements en accession libre", + "SUIVI_PROD_IMMO_PROFIL_ACHETEUR_ACCESSION_LIBRE_TITLE_SEARCH" : "Profil des acheteurs-logements en accession libre", + "SUIVI_PROD_IMMO_PROFIL_ACHETEUR_ACCESSION_LIBRE_TITLE_UPDATE" : "Profil des acheteurs-logements en accession libre", + "SUIVI_PROD_IMMO_PROFIL_ACHETEUR_ACCESSION_LIBRE_TITLE_DISPLAY" : "Profil des acheteurs-logements en accession libre", + "SUIVI_PROD_IMMO_COMPOSITION_LOGEMENT_FAMILLIAUX_LOCATION_CP_TITLE_INSERT" : "Logements familliaux en location", + "SUIVI_PROD_IMMO_COMPOSITION_LOGEMENT_FAMILLIAUX_LOCATION_CP_TITLE_SEARCH" : "Logements familliaux en location", + "SUIVI_PROD_IMMO_COMPOSITION_LOGEMENT_FAMILLIAUX_LOCATION_CP_TITLE_UPDATE" : "Logements familliaux en location", + "SUIVI_PROD_IMMO_COMPOSITION_LOGEMENT_FAMILLIAUX_LOCATION_CP_TITLE_DISPLAY" : "Logements familliaux en location", + "SUIVI_PROD_IMMO_COMPOSITION_HABITAT_SPECIFIQUE_CP_TITLE_INSERT" : "Habitat spécifique", + "SUIVI_PROD_IMMO_COMPOSITION_HABITAT_SPECIFIQUE_CP_TITLE_SEARCH" : "Habitat spécifique", + "SUIVI_PROD_IMMO_COMPOSITION_HABITAT_SPECIFIQUE_CP_TITLE_UPDATE" : "Habitat spécifique", + "SUIVI_PROD_IMMO_COMPOSITION_HABITAT_SPECIFIQUE_CP_TITLE_DISPLAY" : "Habitat spécifique", + "SUIVI_PROD_IMMO_ACTIVITE_INDUSTRIE_TITLE_INSERT" : "Activités / Industrie", + "SUIVI_PROD_IMMO_ACTIVITE_INDUSTRIE_TITLE_SEARCH" : "Activités / Industrie", + "SUIVI_PROD_IMMO_ACTIVITE_INDUSTRIE_TITLE_UPDATE" : "Activités / Industrie", + "SUIVI_PROD_IMMO_ACTIVITE_INDUSTRIE_TITLE_DISPLAY" : "Activités / Industrie", + "SUIVI_PROD_IMMO_BUREAU_TITLE_INSERT" : "Bureaux", + "SUIVI_PROD_IMMO_BUREAU_TITLE_SEARCH" : "Bureaux", + "SUIVI_PROD_IMMO_BUREAU_TITLE_UPDATE" : "Bureaux", + "SUIVI_PROD_IMMO_BUREAU_TITLE_DISPLAY" : "Bureaux", + "SUIVI_PROD_IMMO_EQUIPEMENT_STRUCTURE_TITLE_INSERT" : "Equipements de superstructures", + "SUIVI_PROD_IMMO_EQUIPEMENT_STRUCTURE_TITLE_SEARCH" : "Equipements de superstructures", + "SUIVI_PROD_IMMO_EQUIPEMENT_STRUCTURE_TITLE_UPDATE" : "Equipements de superstructures", + "SUIVI_PROD_IMMO_EQUIPEMENT_STRUCTURE_TITLE_DISPLAY" : "Equipements de superstructures", + "SUIVI_PROD_IMMO_HOTEL_COMMERCE_SERVICE_TITLE_INSERT" : "Hotellerie / Commerces / Services", + "SUIVI_PROD_IMMO_HOTEL_COMMERCE_SERVICE_TITLE_SEARCH" : "Hotellerie / Commerces / Services", + "SUIVI_PROD_IMMO_HOTEL_COMMERCE_SERVICE_TITLE_UPDATE" : "Hotellerie / Commerces / Services", + "SUIVI_PROD_IMMO_HOTEL_COMMERCE_SERVICE_TITLE_DISPLAY" : "Hotellerie / Commerces / Services", + "SUIVI_PROD_IMMO_STATIONNEMENT_TITLE_INSERT" : "Places de stationnement", + "SUIVI_PROD_IMMO_STATIONNEMENT_TITLE_SEARCH" : "Places de stationnement", + "SUIVI_PROD_IMMO_STATIONNEMENT_TITLE_UPDATE" : "Places de stationnement", + "SUIVI_PROD_IMMO_STATIONNEMENT_TITLE_DISPLAY" : "Places de stationnement", "SUIVI_PROD_IMMO_ILOT_TITLE_INSERT" : "Îlot", + "SUIVI_PROD_IMMO_ILOT_TITLE_SEARCH" : "Îlot", "SUIVI_PROD_IMMO_ILOT_TITLE_UPDATE" : "Îlot n°{{id_ilot}}", "SUIVI_PROD_IMMO_ILOT_TITLE_DISPLAY" : "Îlot n°{{id_ilot}}", @@ -35,6 +82,7 @@ "SUIVI_PROD_IMMO_PROGRAMME_PROGRAMME_ENCADREMENT_TITLE_DISPLAY" : "Encadrement du programme immobilier", "SUIVI_PROD_IMMO_PROGRAMME_PROGRAMME_COUT_TITLE_DISPLAY" : "Coûts (indicateurs au programme immobilier)", "SUIVI_PROD_IMMO_PROGRAMME_PROGRAMME_SYNTHESE_TITLE_DISPLAY" : "Synthèse - éléments principaux du programme immobilier (surfaces, charges foncières, prix de sortie, ...)", + "SUIVI_PROD_IMMO_PROGRAMME_PROGRAMME_DETAILS_TITLE_DISPLAY" : "Détails du programme immobilier - (surfaces, coûts, charges foncières, prix de sorties, ...)", "SECTION_DISPLAY_TITLE_SUIVI_PROD_IMMO_SAISIE_SUIVI_PROD_IMMO_PROGRAMME" : "Programme", "SUIVI_PROD_IMMO_PROGRAMME_TITLE_INSERT" : "Programme", "SUIVI_PROD_IMMO_PROGRAMME_TITLE_UPDATE" : "Programme n°{{id_programme}}", @@ -42,5 +90,6 @@ "SUIVI_PROD_IMMO_PROGRAMME_PROGRAMME_ENCADREMENT_TITLE_UPDATE" : "Encadrement du programme immobilier", "SUIVI_PROD_IMMO_PROGRAMME_PROGRAMME_COUT_TITLE_UPDATE" : "Coûts (indicateurs au programme immobilier)", "SUIVI_PROD_IMMO_PROGRAMME_PROGRAMME_SYNTHESE_TITLE_UPDATE" : "Synthèse - éléments principaux du programme immobilier (surfaces, charges foncières, prix de sortie, ...)", + "SUIVI_PROD_IMMO_PROGRAMME_PROGRAMME_DETAILS_TITLE_UPDATE" : "Détails du programme immobilier - (surfaces, coûts, charges foncières, prix de sorties, ...)", "SECTION_UPDATE_TITLE_SUIVI_PROD_IMMO_SAISIE_SUIVI_PROD_IMMO_PROGRAMME" : "Programme" } diff --git a/src/module_suivi_prod_immo/module/less/main.less b/src/module_suivi_prod_immo/module/less/main.less index dc471d4831a3c0aaa7c7eeb359791606edb7c91c..07fa8dd66537fdfc1d461632bc5cbb435e56af2a 100644 --- a/src/module_suivi_prod_immo/module/less/main.less +++ b/src/module_suivi_prod_immo/module/less/main.less @@ -1,5 +1,15 @@ @import '../component/dashboard/dashboard.less'; +@import '../component/fiche_operation/fiche_operation.less'; +@import '../component/porteur/porteur.less'; +@import '../component/type_operation/type_operation.less'; +@import '../component/programme_logement/programme_logement.less'; +.icon-suivi_prod_immo_saisie:before { + content: "\e94e"; +} +.icon-suivi_prod_immo_bi:before { + content: "\f043"; +} .icon-suivi_prod_immo_dashboard:before { - content: 'h'; + content: "\f043"; } \ No newline at end of file diff --git a/src/module_suivi_prod_immo/web_service/ws/Activite_industrie.class.inc b/src/module_suivi_prod_immo/web_service/ws/Activite_industrie.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..ef6444fec5e2a4003a71136b1b7914c2413e4565 --- /dev/null +++ b/src/module_suivi_prod_immo/web_service/ws/Activite_industrie.class.inc @@ -0,0 +1,57 @@ +<?php + +require_once __DIR__ . '/Suivi_prod_immo.class.inc'; +require_once __DIR__ . '/../../../vitis/vas/rest/class/vitis_lib/Connection.class.inc'; + +/** + * \file Suivi_prod_immo.class.inc + * \class Suivi_prod_immo + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Suivi_prod_immo php class + * + * This class defines activite_industrie for one Suivi_prod_immo + * + */ + +class Activite_industrie extends Suivi_prod_immo { + + public $oError; + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + * @param type $oConnection connection object + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $this->aProperties); + } + + /** + * get informations about activite_industrie + */ + function GET() { + $this->aFields = $this->getFields('prod_immo', "activite_industrie", "id_activite_industrie"); + } + + /** + * delete a activite_industrie + */ + function DELETE() { + $this->oConnection->oBd->delete('prod_immo', 'activite_industrie', 'id_activite_industrie', $this->aValues["my_vitis_id"], 'integer'); + if ($this->oConnection->oBd->enErreur()) { + $this->oError = new VitisError(1, $this->oConnection->oBd->getBDMessage()); + } else { + $this->aFields["id_activite_industrie"] = $this->aValues["my_vitis_id"]; + } + } + +} + +?> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/web_service/ws/Activite_industries.class.inc b/src/module_suivi_prod_immo/web_service/ws/Activite_industries.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..d18c3f71eee31b75efec9e8a3dcd6d8c27168c49 --- /dev/null +++ b/src/module_suivi_prod_immo/web_service/ws/Activite_industries.class.inc @@ -0,0 +1,313 @@ +<?php + +/** + * \file Activite_industries.class.inc + * \class Activite_industries + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Activite_industries php class + * + * This class defines Rest Api to Vitis Activite_industries + * + */ +require_once __DIR__ . '/Suivi_prod_immo.class.inc'; +require_once 'Activite_industrie.class.inc'; + + +class Activite_industries extends Suivi_prod_immo { + /** + * @SWG\Definition( + * definition="/activite_industries", + * allOf={ + * @SWG\Schema(ref="#/definitions/activite_industries") + * } + * ) + * * @SWG\Tag( + * name="Activite_industries", + * description="Activite_industries about Activite_industries" + * ) + */ + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $properties); + } + + /** + * @SWG\Get(path="/activite_industries", + * tags={"Activite_industries"}, + * summary="Get Activite_industries", + * description="Request to get Activite_industries", + * operationId="GET", + * produces={"application/xml", "application/json", "application/x-vm-json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="order_by", + * in="query", + * description="list of ordering fields", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="sort_order", + * in="query", + * description="sort_order", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="limit", + * in="query", + * description="number of element", + * required=false, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="offset", + * in="query", + * description="index of first element", + * required=false, + * type="string", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="filter", + * in="query", + * description="filter results", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="distinct", + * in="query", + * description="delete duplicates", + * required=false, + * type="boolean" + * ), + * @SWG\Response( + * response=200, + * description="traitement Response", + * @SWG\Schema(ref="#/definitions/activite_industries") + * ) + * ) + */ + + /** + * get Activite_industries + * @return Activite_industries + */ + function GET() { + $aReturn = $this->genericGet('prod_immo', "activite_industrie", "id_activite_industrie"); + $aActivite_industries=json_decode($aReturn['sMessage'],true); + if(isset($aActivite_industries['activite_industries'])){ + $aActivite_industriesData=$aActivite_industries['activite_industries']; + $sDataArrayName="activite_industries"; + }elseif (isset($aActivite_industries['data'])){ + $aActivite_industriesData=$aActivite_industries['data']; + $sDataArrayName="data"; + }else{ + return $aReturn['sMessage']; + } + if(isset($aActivite_industriesData)){ + // error_log(print_r($aActivite_industries,true)); + $aActivite_industries2=array(); + foreach ($aActivite_industriesData as $aActivite_industrie){ + $aActivite_industrie['indicateur_activite_industrie']= $this->getIndicateur_activite_industrie($aActivite_industrie['id_indicateur_activite_industrie']); + $aActivite_industries2[count($aActivite_industries2)]=$aActivite_industrie; + } + $sActivite_industries=json_encode(array($sDataArrayName=>$aActivite_industries2,"list_count"=>$aActivite_industries['list_count'],"total_row_number"=>$aActivite_industries['total_row_number'],"status"=>$aActivite_industries['status'])); + //error_log($sActivite_industries); + return $sActivite_industries; + } + } + + /** + * get indicateur_activite_industrie of activite_industrie + */ + function getIndicateur_activite_industrie($iIndicateurActivite_industrie) { + if(isset($iIndicateurActivite_industrie) and !is_null($iIndicateurActivite_industrie)){ + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'prod_immo', 'type' => 'schema_name'); + $aParams['id_indicateur_activite_industrie'] = array('value' => $iIndicateurActivite_industrie, 'type' => 'string'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getIndicateur_activite_industrie'], $aParams); + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + return $aLigne["indicateur_activite_industrie"]; + }else{ + return null; + } + } + + /** + * @SWG\Post(path="/activite_industries", + * tags={"activite_industrie"}, + * summary="Add activite_industrie", + * description="Request to add activite_industrie", + * operationId="POST", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="activite_industrie Response", + * @SWG\Schema(ref="#/definitions/activite_industries") + * ) + * ) + */ + + /** + * insert activite_industrie + * @return id of the activite_industrie created + */ + function POST(){ + require $this->sRessourcesFile; + // get value sequence from suivi_prod_immo database to set id + $oConnexion = new PDO('pgsql:host=\'srv-postgres\' port=5432 dbname=\'suivi_prod_immo\'', $_SESSION["ses_Login"], trim(des(rtrim(utf8_decode($_SESSION["ses_Login"])), hexToString(rtrim($_SESSION["ses_Password"])), 0, 0, null))); + $oPDOresult = $oConnexion->query($aSql['getSequenceActivite_industrie']); + if (!$oPDOresult) { + $aError=$oConnexion->errorInfo(); + error_log($aError[2]); + }else{ + $aResult = $oPDOresult->fetch(PDO::FETCH_ASSOC); + $this->aValues['id_activite_industrie'] = $aResult['nextval']; + } + $aReturn = $this->genericPost('prod_immo', 'activite_industrie', null, 'id_activite_industrie'); + return $aReturn['sMessage']; + } + + /** + * @SWG\Put(path="/activite_industries/{id_activite_industrie}", + * tags={"activite_industrie"}, + * summary="update activite_industrie", + * description="Request to update activite_industrie", + * operationId="PUT", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_activite_industrie", + * in="path", + * description="id of the activite_industrie", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/activite_industries") + * ) + * ) + */ + + /** + * update activite_industries + * @return id of activite_industries updated or error object if a activite_industries is not updated + */ + function PUT() { + $aReturn = $this->genericPut('prod_immo', 'activite_industrie', 'id_activite_industrie'); + return $aReturn['sMessage']; + } + + /** + * @SWG\Delete(path="/activite_industries", + * tags={"activite_industrie"}, + * summary="delete activite_industrie", + * description="Request to delete activite_industrie", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="idList", + * in="query", + * description="id of the activite_industrie", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="activite_industrie Response", + * @SWG\Schema(ref="#/definitions/activite_industries") + * ) + * ) + */ + /** + * @SWG\Delete(path="/activite_industries/{id_activite_industrie}", + * tags={"activite_industrie"}, + * summary="delete activite_industrie", + * description="Request to delete activite_industrie", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Traitement token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_activite_industrie", + * in="path", + * description="id of the activite_industrie", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/activite_industries") + * ) + * ) + */ + + /** + * delete activite_industries + * @return id of activite_industries deleted or error object if a activite_industries is not deleted + */ + function DELETE() { + $aReturn = $this->genericDelete('prod_immo', 'activite_industrie', 'id_activite_industrie'); + return $aReturn['sMessage']; + } +} + +?> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/web_service/ws/Bureau.class.inc b/src/module_suivi_prod_immo/web_service/ws/Bureau.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..d96925501fcfe595df48d768d332d961ef731f23 --- /dev/null +++ b/src/module_suivi_prod_immo/web_service/ws/Bureau.class.inc @@ -0,0 +1,57 @@ +<?php + +require_once __DIR__ . '/Suivi_prod_immo.class.inc'; +require_once __DIR__ . '/../../../vitis/vas/rest/class/vitis_lib/Connection.class.inc'; + +/** + * \file Suivi_prod_immo.class.inc + * \class Suivi_prod_immo + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Suivi_prod_immo php class + * + * This class defines bureau for one Suivi_prod_immo + * + */ + +class Bureau extends Suivi_prod_immo { + + public $oError; + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + * @param type $oConnection connection object + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $this->aProperties); + } + + /** + * get informations about bureau + */ + function GET() { + $this->aFields = $this->getFields('prod_immo', "bureau", "id_bureau"); + } + + /** + * delete a bureau + */ + function DELETE() { + $this->oConnection->oBd->delete('prod_immo', 'bureau', 'id_bureau', $this->aValues["my_vitis_id"], 'integer'); + if ($this->oConnection->oBd->enErreur()) { + $this->oError = new VitisError(1, $this->oConnection->oBd->getBDMessage()); + } else { + $this->aFields["id_bureau"] = $this->aValues["my_vitis_id"]; + } + } + +} + +?> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/web_service/ws/Bureaus.class.inc b/src/module_suivi_prod_immo/web_service/ws/Bureaus.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..97814dad9292bc14759bcf987aa57336ccc371a7 --- /dev/null +++ b/src/module_suivi_prod_immo/web_service/ws/Bureaus.class.inc @@ -0,0 +1,313 @@ +<?php + +/** + * \file Bureaus.class.inc + * \class Bureaus + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Bureaus php class + * + * This class defines Rest Api to Vitis Bureaus + * + */ +require_once __DIR__ . '/Suivi_prod_immo.class.inc'; +require_once 'Bureau.class.inc'; + + +class Bureaus extends Suivi_prod_immo { + /** + * @SWG\Definition( + * definition="/bureaus", + * allOf={ + * @SWG\Schema(ref="#/definitions/bureaus") + * } + * ) + * * @SWG\Tag( + * name="Bureaus", + * description="Bureaus about Bureaus" + * ) + */ + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $properties); + } + + /** + * @SWG\Get(path="/bureaus", + * tags={"Bureaus"}, + * summary="Get Bureaus", + * description="Request to get Bureaus", + * operationId="GET", + * produces={"application/xml", "application/json", "application/x-vm-json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="order_by", + * in="query", + * description="list of ordering fields", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="sort_order", + * in="query", + * description="sort_order", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="limit", + * in="query", + * description="number of element", + * required=false, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="offset", + * in="query", + * description="index of first element", + * required=false, + * type="string", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="filter", + * in="query", + * description="filter results", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="distinct", + * in="query", + * description="delete duplicates", + * required=false, + * type="boolean" + * ), + * @SWG\Response( + * response=200, + * description="traitement Response", + * @SWG\Schema(ref="#/definitions/bureaus") + * ) + * ) + */ + + /** + * get Bureaus + * @return Bureaus + */ + function GET() { + $aReturn = $this->genericGet('prod_immo', "bureau", "id_bureau"); + $aBureaus=json_decode($aReturn['sMessage'],true); + if(isset($aBureaus['bureaus'])){ + $aBureausData=$aBureaus['bureaus']; + $sDataArrayName="bureaus"; + }elseif (isset($aBureaus['data'])){ + $aBureausData=$aBureaus['data']; + $sDataArrayName="data"; + }else{ + return $aReturn['sMessage']; + } + if(isset($aBureausData)){ + // error_log(print_r($aBureaus,true)); + $aBureaus2=array(); + foreach ($aBureausData as $aBureau){ + $aBureau['indicateur_bureau']= $this->getIndicateur_bureau($aBureau['id_indicateur_bureau']); + $aBureaus2[count($aBureaus2)]=$aBureau; + } + $sBureaus=json_encode(array($sDataArrayName=>$aBureaus2,"list_count"=>$aBureaus['list_count'],"total_row_number"=>$aBureaus['total_row_number'],"status"=>$aBureaus['status'])); + //error_log($sBureaus); + return $sBureaus; + } + } + + /** + * get indicateur_bureau of bureau + */ + function getIndicateur_bureau($iIndicateurBureau) { + if(isset($iIndicateurBureau) and !is_null($iIndicateurBureau)){ + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'prod_immo', 'type' => 'schema_name'); + $aParams['id_indicateur_bureau'] = array('value' => $iIndicateurBureau, 'type' => 'string'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getIndicateur_bureau'], $aParams); + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + return $aLigne["indicateur_bureau"]; + }else{ + return null; + } + } + + /** + * @SWG\Post(path="/bureaus", + * tags={"bureau"}, + * summary="Add bureau", + * description="Request to add bureau", + * operationId="POST", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="bureau Response", + * @SWG\Schema(ref="#/definitions/bureaus") + * ) + * ) + */ + + /** + * insert bureau + * @return id of the bureau created + */ + function POST(){ + require $this->sRessourcesFile; + // get value sequence from suivi_prod_immo database to set id + $oConnexion = new PDO('pgsql:host=\'srv-postgres\' port=5432 dbname=\'suivi_prod_immo\'', $_SESSION["ses_Login"], trim(des(rtrim(utf8_decode($_SESSION["ses_Login"])), hexToString(rtrim($_SESSION["ses_Password"])), 0, 0, null))); + $oPDOresult = $oConnexion->query($aSql['getSequenceBureau']); + if (!$oPDOresult) { + $aError=$oConnexion->errorInfo(); + error_log($aError[2]); + }else{ + $aResult = $oPDOresult->fetch(PDO::FETCH_ASSOC); + $this->aValues['id_bureau'] = $aResult['nextval']; + } + $aReturn = $this->genericPost('prod_immo', 'bureau', null, 'id_bureau'); + return $aReturn['sMessage']; + } + + /** + * @SWG\Put(path="/bureaus/{id_bureau}", + * tags={"bureau"}, + * summary="update bureau", + * description="Request to update bureau", + * operationId="PUT", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_bureau", + * in="path", + * description="id of the bureau", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/bureaus") + * ) + * ) + */ + + /** + * update bureaus + * @return id of bureaus updated or error object if a bureaus is not updated + */ + function PUT() { + $aReturn = $this->genericPut('prod_immo', 'bureau', 'id_bureau'); + return $aReturn['sMessage']; + } + + /** + * @SWG\Delete(path="/bureaus", + * tags={"bureau"}, + * summary="delete bureau", + * description="Request to delete bureau", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="idList", + * in="query", + * description="id of the bureau", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="bureau Response", + * @SWG\Schema(ref="#/definitions/bureaus") + * ) + * ) + */ + /** + * @SWG\Delete(path="/bureaus/{id_bureau}", + * tags={"bureau"}, + * summary="delete bureau", + * description="Request to delete bureau", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Traitement token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_bureau", + * in="path", + * description="id of the bureau", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/bureaus") + * ) + * ) + */ + + /** + * delete bureaus + * @return id of bureaus deleted or error object if a bureaus is not deleted + */ + function DELETE() { + $aReturn = $this->genericDelete('prod_immo', 'bureau', 'id_bureau'); + return $aReturn['sMessage']; + } +} + +?> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/web_service/ws/Composition_habitat_specifique_cp.class.inc b/src/module_suivi_prod_immo/web_service/ws/Composition_habitat_specifique_cp.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..857cb65f8c1ecb702b3d3a59ac8d988513e460d7 --- /dev/null +++ b/src/module_suivi_prod_immo/web_service/ws/Composition_habitat_specifique_cp.class.inc @@ -0,0 +1,57 @@ +<?php + +require_once __DIR__ . '/Suivi_prod_immo.class.inc'; +require_once __DIR__ . '/../../../vitis/vas/rest/class/vitis_lib/Connection.class.inc'; + +/** + * \file Suivi_prod_immo.class.inc + * \class Suivi_prod_immo + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Suivi_prod_immo php class + * + * This class defines composition_habitat_specifique_cp for one Suivi_prod_immo + * + */ + +class Composition_habitat_specifique_cp extends Suivi_prod_immo { + + public $oError; + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + * @param type $oConnection connection object + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $this->aProperties); + } + + /** + * get informations about composition_habitat_specifique_cp + */ + function GET() { + $this->aFields = $this->getFields('prod_immo', "composition_habitat_specifique_cp", "id_composition_habitat_specifique"); + } + + /** + * delete a composition_habitat_specifique_cp + */ + function DELETE() { + $this->oConnection->oBd->delete('prod_immo', 'composition_habitat_specifique_cp', 'id_composition_habitat_specifique', $this->aValues["my_vitis_id"], 'integer'); + if ($this->oConnection->oBd->enErreur()) { + $this->oError = new VitisError(1, $this->oConnection->oBd->getBDMessage()); + } else { + $this->aFields["id_composition_habitat_specifique"] = $this->aValues["my_vitis_id"]; + } + } + +} + +?> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/web_service/ws/Composition_habitat_specifique_cps.class.inc b/src/module_suivi_prod_immo/web_service/ws/Composition_habitat_specifique_cps.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..0ab8c34624c05e0116b2794912a632b761030c74 --- /dev/null +++ b/src/module_suivi_prod_immo/web_service/ws/Composition_habitat_specifique_cps.class.inc @@ -0,0 +1,313 @@ +<?php + +/** + * \file Composition_habitat_specifique_cps.class.inc + * \class Composition_habitat_specifique_cps + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Composition_habitat_specifique_cps php class + * + * This class defines Rest Api to Vitis Composition_habitat_specifique_cps + * + */ +require_once __DIR__ . '/Suivi_prod_immo.class.inc'; +require_once 'Composition_habitat_specifique_cp.class.inc'; + + +class Composition_habitat_specifique_cps extends Suivi_prod_immo { + /** + * @SWG\Definition( + * definition="/composition_habitat_specifique_cps", + * allOf={ + * @SWG\Schema(ref="#/definitions/composition_habitat_specifique_cps") + * } + * ) + * * @SWG\Tag( + * name="Composition_habitat_specifique_cps", + * description="Composition_habitat_specifique_cps about Composition_habitat_specifique_cps" + * ) + */ + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $properties); + } + + /** + * @SWG\Get(path="/composition_habitat_specifique_cps", + * tags={"Composition_habitat_specifique_cps"}, + * summary="Get Composition_habitat_specifique_cps", + * description="Request to get Composition_habitat_specifique_cps", + * operationId="GET", + * produces={"application/xml", "application/json", "application/x-vm-json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="order_by", + * in="query", + * description="list of ordering fields", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="sort_order", + * in="query", + * description="sort_order", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="limit", + * in="query", + * description="number of element", + * required=false, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="offset", + * in="query", + * description="index of first element", + * required=false, + * type="string", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="filter", + * in="query", + * description="filter results", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="distinct", + * in="query", + * description="delete duplicates", + * required=false, + * type="boolean" + * ), + * @SWG\Response( + * response=200, + * description="traitement Response", + * @SWG\Schema(ref="#/definitions/composition_habitat_specifique_cps") + * ) + * ) + */ + + /** + * get Composition_habitat_specifique_cps + * @return Composition_habitat_specifique_cps + */ + function GET() { + $aReturn = $this->genericGet('prod_immo', "composition_habitat_specifique_cp", "id_composition_habitat_specifique"); + $aComposition_habitat_specifique_cps=json_decode($aReturn['sMessage'],true); + if(isset($aComposition_habitat_specifique_cps['composition_habitat_specifique_cps'])){ + $aComposition_habitat_specifique_cpsData=$aComposition_habitat_specifique_cps['composition_habitat_specifique_cps']; + $sDataArrayName="composition_habitat_specifique_cps"; + }elseif (isset($aComposition_habitat_specifique_cps['data'])){ + $aComposition_habitat_specifique_cpsData=$aComposition_habitat_specifique_cps['data']; + $sDataArrayName="data"; + }else{ + return $aReturn['sMessage']; + } + if(isset($aComposition_habitat_specifique_cpsData)){ + // error_log(print_r($aComposition_habitat_specifique_cps,true)); + $aComposition_habitat_specifique_cps2=array(); + foreach ($aComposition_habitat_specifique_cpsData as $aComposition_habitat_specifique_cp){ + $aComposition_habitat_specifique_cp['indicateur_habitat_specifique']= $this->getIndicateur_habitat_specifique($aComposition_habitat_specifique_cp['id_indicateur_habitat_specifique']); + $aComposition_habitat_specifique_cps2[count($aComposition_habitat_specifique_cps2)]=$aComposition_habitat_specifique_cp; + } + $sComposition_habitat_specifique_cps=json_encode(array($sDataArrayName=>$aComposition_habitat_specifique_cps2,"list_count"=>$aComposition_habitat_specifique_cps['list_count'],"total_row_number"=>$aComposition_habitat_specifique_cps['total_row_number'],"status"=>$aComposition_habitat_specifique_cps['status'])); + //error_log($sComposition_habitat_specifique_cps); + return $sComposition_habitat_specifique_cps; + } + } + + /** + * get indicateur_habitat_specifique of composition_habitat_specifique_cp + */ + function getIndicateur_habitat_specifique($iIndicateurHabitatSpecifique) { + if(isset($iIndicateurHabitatSpecifique) and !is_null($iIndicateurHabitatSpecifique)){ + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'prod_immo', 'type' => 'schema_name'); + $aParams['id_indicateur_habitat_specifique'] = array('value' => $iIndicateurHabitatSpecifique, 'type' => 'string'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getIndicateur_habitat_specifique'], $aParams); + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + return $aLigne["indicateur_habitat_specifique"]; + }else{ + return null; + } + } + + /** + * @SWG\Post(path="/composition_habitat_specifique_cps", + * tags={"composition_habitat_specifique_cp"}, + * summary="Add composition_habitat_specifique_cp", + * description="Request to add composition_habitat_specifique_cp", + * operationId="POST", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="composition_habitat_specifique_cp Response", + * @SWG\Schema(ref="#/definitions/composition_habitat_specifique_cps") + * ) + * ) + */ + + /** + * insert composition_habitat_specifique_cp + * @return id of the composition_habitat_specifique_cp created + */ + function POST(){ + require $this->sRessourcesFile; + // get value sequence from suivi_prod_immo database to set id + $oConnexion = new PDO('pgsql:host=\'srv-postgres\' port=5432 dbname=\'suivi_prod_immo\'', $_SESSION["ses_Login"], trim(des(rtrim(utf8_decode($_SESSION["ses_Login"])), hexToString(rtrim($_SESSION["ses_Password"])), 0, 0, null))); + $oPDOresult = $oConnexion->query($aSql['getSequenceComposition_habitat_specifique_cp']); + if (!$oPDOresult) { + $aError=$oConnexion->errorInfo(); + error_log($aError[2]); + }else{ + $aResult = $oPDOresult->fetch(PDO::FETCH_ASSOC); + $this->aValues['id_composition_habitat_specifique'] = $aResult['nextval']; + } + $aReturn = $this->genericPost('prod_immo', 'composition_habitat_specifique_cp', null, 'id_composition_habitat_specifique'); + return $aReturn['sMessage']; + } + + /** + * @SWG\Put(path="/composition_habitat_specifique_cps/{id_composition_habitat_specifique}", + * tags={"composition_habitat_specifique_cp"}, + * summary="update composition_habitat_specifique_cp", + * description="Request to update composition_habitat_specifique_cp", + * operationId="PUT", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_composition_habitat_specifique", + * in="path", + * description="id of the composition_habitat_specifique_cp", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/composition_habitat_specifique_cps") + * ) + * ) + */ + + /** + * update composition_habitat_specifique_cps + * @return id of composition_habitat_specifique_cps updated or error object if a composition_habitat_specifique_cps is not updated + */ + function PUT() { + $aReturn = $this->genericPut('prod_immo', 'composition_habitat_specifique_cp', 'id_composition_habitat_specifique'); + return $aReturn['sMessage']; + } + + /** + * @SWG\Delete(path="/composition_habitat_specifique_cps", + * tags={"composition_habitat_specifique_cp"}, + * summary="delete composition_habitat_specifique_cp", + * description="Request to delete composition_habitat_specifique_cp", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="idList", + * in="query", + * description="id of the composition_habitat_specifique_cp", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="composition_habitat_specifique_cp Response", + * @SWG\Schema(ref="#/definitions/composition_habitat_specifique_cps") + * ) + * ) + */ + /** + * @SWG\Delete(path="/composition_habitat_specifique_cps/{id_composition_habitat_specifique}", + * tags={"composition_habitat_specifique_cp"}, + * summary="delete composition_habitat_specifique_cp", + * description="Request to delete composition_habitat_specifique_cp", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Traitement token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_composition_habitat_specifique", + * in="path", + * description="id of the composition_habitat_specifique_cp", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/composition_habitat_specifique_cps") + * ) + * ) + */ + + /** + * delete composition_habitat_specifique_cps + * @return id of composition_habitat_specifique_cps deleted or error object if a composition_habitat_specifique_cps is not deleted + */ + function DELETE() { + $aReturn = $this->genericDelete('prod_immo', 'composition_habitat_specifique_cp', 'id_composition_habitat_specifique'); + return $aReturn['sMessage']; + } +} + +?> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/web_service/ws/Composition_logement_familliaux_location_cp.class.inc b/src/module_suivi_prod_immo/web_service/ws/Composition_logement_familliaux_location_cp.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..e6ec02ee76b17a3485c0ec7a473d49e9c98033ae --- /dev/null +++ b/src/module_suivi_prod_immo/web_service/ws/Composition_logement_familliaux_location_cp.class.inc @@ -0,0 +1,57 @@ +<?php + +require_once __DIR__ . '/Suivi_prod_immo.class.inc'; +require_once __DIR__ . '/../../../vitis/vas/rest/class/vitis_lib/Connection.class.inc'; + +/** + * \file Suivi_prod_immo.class.inc + * \class Suivi_prod_immo + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Suivi_prod_immo php class + * + * This class defines composition_logement_familliaux_location_cp for one Suivi_prod_immo + * + */ + +class Composition_logement_familliaux_location_cp extends Suivi_prod_immo { + + public $oError; + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + * @param type $oConnection connection object + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $this->aProperties); + } + + /** + * get informations about composition_logement_familliaux_location_cp + */ + function GET() { + $this->aFields = $this->getFields('prod_immo', "composition_logement_familliaux_location_cp", "id_composition_logement_familliaux_location"); + } + + /** + * delete a composition_logement_familliaux_location_cp + */ + function DELETE() { + $this->oConnection->oBd->delete('prod_immo', 'composition_logement_familliaux_location_cp', 'id_composition_logement_familliaux_location', $this->aValues["my_vitis_id"], 'integer'); + if ($this->oConnection->oBd->enErreur()) { + $this->oError = new VitisError(1, $this->oConnection->oBd->getBDMessage()); + } else { + $this->aFields["id_composition_logement_familliaux_location"] = $this->aValues["my_vitis_id"]; + } + } + +} + +?> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/web_service/ws/Composition_logement_familliaux_location_cps.class.inc b/src/module_suivi_prod_immo/web_service/ws/Composition_logement_familliaux_location_cps.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..207c950163082044e697cede00c8577c064177a4 --- /dev/null +++ b/src/module_suivi_prod_immo/web_service/ws/Composition_logement_familliaux_location_cps.class.inc @@ -0,0 +1,313 @@ +<?php + +/** + * \file Composition_logement_familliaux_location_cps.class.inc + * \class Composition_logement_familliaux_location_cps + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Composition_logement_familliaux_location_cps php class + * + * This class defines Rest Api to Vitis Composition_logement_familliaux_location_cps + * + */ +require_once __DIR__ . '/Suivi_prod_immo.class.inc'; +require_once 'Composition_logement_familliaux_location_cp.class.inc'; + + +class Composition_logement_familliaux_location_cps extends Suivi_prod_immo { + /** + * @SWG\Definition( + * definition="/composition_logement_familliaux_location_cps", + * allOf={ + * @SWG\Schema(ref="#/definitions/composition_logement_familliaux_location_cps") + * } + * ) + * * @SWG\Tag( + * name="Composition_logement_familliaux_location_cps", + * description="Composition_logement_familliaux_location_cps about Composition_logement_familliaux_location_cps" + * ) + */ + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $properties); + } + + /** + * @SWG\Get(path="/composition_logement_familliaux_location_cps", + * tags={"Composition_logement_familliaux_location_cps"}, + * summary="Get Composition_logement_familliaux_location_cps", + * description="Request to get Composition_logement_familliaux_location_cps", + * operationId="GET", + * produces={"application/xml", "application/json", "application/x-vm-json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="order_by", + * in="query", + * description="list of ordering fields", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="sort_order", + * in="query", + * description="sort_order", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="limit", + * in="query", + * description="number of element", + * required=false, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="offset", + * in="query", + * description="index of first element", + * required=false, + * type="string", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="filter", + * in="query", + * description="filter results", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="distinct", + * in="query", + * description="delete duplicates", + * required=false, + * type="boolean" + * ), + * @SWG\Response( + * response=200, + * description="traitement Response", + * @SWG\Schema(ref="#/definitions/composition_logement_familliaux_location_cps") + * ) + * ) + */ + + /** + * get Composition_logement_familliaux_location_cps + * @return Composition_logement_familliaux_location_cps + */ + function GET() { + $aReturn = $this->genericGet('prod_immo', "composition_logement_familliaux_location_cp", "id_composition_logement_familliaux_location"); + $aComposition_logement_familliaux_location_cps=json_decode($aReturn['sMessage'],true); + if(isset($aComposition_logement_familliaux_location_cps['composition_logement_familliaux_location_cps'])){ + $aComposition_logement_familliaux_location_cpsData=$aComposition_logement_familliaux_location_cps['composition_logement_familliaux_location_cps']; + $sDataArrayName="composition_logement_familliaux_location_cps"; + }elseif (isset($aComposition_logement_familliaux_location_cps['data'])){ + $aComposition_logement_familliaux_location_cpsData=$aComposition_logement_familliaux_location_cps['data']; + $sDataArrayName="data"; + }else{ + return $aReturn['sMessage']; + } + if(isset($aComposition_logement_familliaux_location_cpsData)){ + // error_log(print_r($aComposition_logement_familliaux_location_cps,true)); + $aComposition_logement_familliaux_location_cps2=array(); + foreach ($aComposition_logement_familliaux_location_cpsData as $aComposition_logement_familliaux_location_cp){ + $aComposition_logement_familliaux_location_cp['indicateur_logement_familliaux_location']= $this->getIndicateur_logement_familliaux_location($aComposition_logement_familliaux_location_cp['id_indicateur_logement_familliaux_location']); + $aComposition_logement_familliaux_location_cps2[count($aComposition_logement_familliaux_location_cps2)]=$aComposition_logement_familliaux_location_cp; + } + $sComposition_logement_familliaux_location_cps=json_encode(array($sDataArrayName=>$aComposition_logement_familliaux_location_cps2,"list_count"=>$aComposition_logement_familliaux_location_cps['list_count'],"total_row_number"=>$aComposition_logement_familliaux_location_cps['total_row_number'],"status"=>$aComposition_logement_familliaux_location_cps['status'])); + //error_log($sComposition_logement_familliaux_location_cps); + return $sComposition_logement_familliaux_location_cps; + } + } + + /** + * get indicateur_logement_familliaux_location of composition_logement_familliaux_location_cp + */ + function getIndicateur_logement_familliaux_location($iIndicateurLogementFamilliauxLocation) { + if(isset($iIndicateurLogementFamilliauxLocation) and !is_null($iIndicateurLogementFamilliauxLocation)){ + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'prod_immo', 'type' => 'schema_name'); + $aParams['id_indicateur_logement_familliaux_location'] = array('value' => $iIndicateurLogementFamilliauxLocation, 'type' => 'string'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getIndicateur_logement_familliaux_location'], $aParams); + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + return $aLigne["indicateur_logement_familliaux_location"]; + }else{ + return null; + } + } + + /** + * @SWG\Post(path="/composition_logement_familliaux_location_cps", + * tags={"composition_logement_familliaux_location_cp"}, + * summary="Add composition_logement_familliaux_location_cp", + * description="Request to add composition_logement_familliaux_location_cp", + * operationId="POST", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="composition_logement_familliaux_location_cp Response", + * @SWG\Schema(ref="#/definitions/composition_logement_familliaux_location_cps") + * ) + * ) + */ + + /** + * insert composition_logement_familliaux_location_cp + * @return id of the composition_logement_familliaux_location_cp created + */ + function POST(){ + require $this->sRessourcesFile; + // get value sequence from suivi_prod_immo database to set id + $oConnexion = new PDO('pgsql:host=\'srv-postgres\' port=5432 dbname=\'suivi_prod_immo\'', $_SESSION["ses_Login"], trim(des(rtrim(utf8_decode($_SESSION["ses_Login"])), hexToString(rtrim($_SESSION["ses_Password"])), 0, 0, null))); + $oPDOresult = $oConnexion->query($aSql['getSequenceComposition_logement_familliaux_location_cp']); + if (!$oPDOresult) { + $aError=$oConnexion->errorInfo(); + error_log($aError[2]); + }else{ + $aResult = $oPDOresult->fetch(PDO::FETCH_ASSOC); + $this->aValues['id_composition_logement_familliaux_location'] = $aResult['nextval']; + } + $aReturn = $this->genericPost('prod_immo', 'composition_logement_familliaux_location_cp', null, 'id_composition_logement_familliaux_location'); + return $aReturn['sMessage']; + } + + /** + * @SWG\Put(path="/composition_logement_familliaux_location_cps/{id_composition_logement_familliaux_location}", + * tags={"composition_logement_familliaux_location_cp"}, + * summary="update composition_logement_familliaux_location_cp", + * description="Request to update composition_logement_familliaux_location_cp", + * operationId="PUT", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_composition_logement_familliaux_location", + * in="path", + * description="id of the composition_logement_familliaux_location_cp", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/composition_logement_familliaux_location_cps") + * ) + * ) + */ + + /** + * update composition_logement_familliaux_location_cps + * @return id of composition_logement_familliaux_location_cps updated or error object if a composition_logement_familliaux_location_cps is not updated + */ + function PUT() { + $aReturn = $this->genericPut('prod_immo', 'composition_logement_familliaux_location_cp', 'id_composition_logement_familliaux_location'); + return $aReturn['sMessage']; + } + + /** + * @SWG\Delete(path="/composition_logement_familliaux_location_cps", + * tags={"composition_logement_familliaux_location_cp"}, + * summary="delete composition_logement_familliaux_location_cp", + * description="Request to delete composition_logement_familliaux_location_cp", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="idList", + * in="query", + * description="id of the composition_logement_familliaux_location_cp", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="composition_logement_familliaux_location_cp Response", + * @SWG\Schema(ref="#/definitions/composition_logement_familliaux_location_cps") + * ) + * ) + */ + /** + * @SWG\Delete(path="/composition_logement_familliaux_location_cps/{id_composition_logement_familliaux_location}", + * tags={"composition_logement_familliaux_location_cp"}, + * summary="delete composition_logement_familliaux_location_cp", + * description="Request to delete composition_logement_familliaux_location_cp", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Traitement token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_composition_logement_familliaux_location", + * in="path", + * description="id of the composition_logement_familliaux_location_cp", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/composition_logement_familliaux_location_cps") + * ) + * ) + */ + + /** + * delete composition_logement_familliaux_location_cps + * @return id of composition_logement_familliaux_location_cps deleted or error object if a composition_logement_familliaux_location_cps is not deleted + */ + function DELETE() { + $aReturn = $this->genericDelete('prod_immo', 'composition_logement_familliaux_location_cp', 'id_composition_logement_familliaux_location'); + return $aReturn['sMessage']; + } +} + +?> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/web_service/ws/Equipement_structure.class.inc b/src/module_suivi_prod_immo/web_service/ws/Equipement_structure.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..821ec11f889d641fab955a8f03b5167a1201b46a --- /dev/null +++ b/src/module_suivi_prod_immo/web_service/ws/Equipement_structure.class.inc @@ -0,0 +1,57 @@ +<?php + +require_once __DIR__ . '/Suivi_prod_immo.class.inc'; +require_once __DIR__ . '/../../../vitis/vas/rest/class/vitis_lib/Connection.class.inc'; + +/** + * \file Suivi_prod_immo.class.inc + * \class Suivi_prod_immo + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Suivi_prod_immo php class + * + * This class defines equipement_structure for one Suivi_prod_immo + * + */ + +class Equipement_structure extends Suivi_prod_immo { + + public $oError; + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + * @param type $oConnection connection object + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $this->aProperties); + } + + /** + * get informations about equipement_structure + */ + function GET() { + $this->aFields = $this->getFields('prod_immo', "equipement_structure", "id_equipement_structure"); + } + + /** + * delete a equipement_structure + */ + function DELETE() { + $this->oConnection->oBd->delete('prod_immo', 'equipement_structure', 'id_equipement_structure', $this->aValues["my_vitis_id"], 'integer'); + if ($this->oConnection->oBd->enErreur()) { + $this->oError = new VitisError(1, $this->oConnection->oBd->getBDMessage()); + }else{ + $this->aFields["id_equipement_structure"] = $this->aValues["my_vitis_id"]; + } + } + +} + +?> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/web_service/ws/Equipement_structures.class.inc b/src/module_suivi_prod_immo/web_service/ws/Equipement_structures.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..3935b73935d4f0fc7e2c93373441c1d919c69978 --- /dev/null +++ b/src/module_suivi_prod_immo/web_service/ws/Equipement_structures.class.inc @@ -0,0 +1,313 @@ +<?php + +/** + * \file Equipement_structures.class.inc + * \class Equipement_structures + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Equipement_structures php class + * + * This class defines Rest Api to Vitis Equipement_structures + * + */ +require_once __DIR__ . '/Suivi_prod_immo.class.inc'; +require_once 'Equipement_structure.class.inc'; + + +class Equipement_structures extends Suivi_prod_immo { + /** + * @SWG\Definition( + * definition="/equipement_structures", + * allOf={ + * @SWG\Schema(ref="#/definitions/equipement_structures") + * } + * ) + * * @SWG\Tag( + * name="Equipement_structures", + * description="Equipement_structures about Equipement_structures" + * ) + */ + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $properties); + } + + /** + * @SWG\Get(path="/equipement_structures", + * tags={"Equipement_structures"}, + * summary="Get Equipement_structures", + * description="Request to get Equipement_structures", + * operationId="GET", + * produces={"application/xml", "application/json", "application/x-vm-json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="order_by", + * in="query", + * description="list of ordering fields", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="sort_order", + * in="query", + * description="sort_order", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="limit", + * in="query", + * description="number of element", + * required=false, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="offset", + * in="query", + * description="index of first element", + * required=false, + * type="string", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="filter", + * in="query", + * description="filter results", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="distinct", + * in="query", + * description="delete duplicates", + * required=false, + * type="boolean" + * ), + * @SWG\Response( + * response=200, + * description="traitement Response", + * @SWG\Schema(ref="#/definitions/equipement_structures") + * ) + * ) + */ + + /** + * get Equipement_structures + * @return Equipement_structures + */ + function GET() { + $aReturn = $this->genericGet('prod_immo', "equipement_structure", "id_equipement_structure"); + $aEquipement_structures=json_decode($aReturn['sMessage'],true); + if(isset($aEquipement_structures['equipement_structures'])){ + $aEquipement_structuresData=$aEquipement_structures['equipement_structures']; + $sDataArrayName="equipement_structures"; + }elseif (isset($aEquipement_structures['data'])){ + $aEquipement_structuresData=$aEquipement_structures['data']; + $sDataArrayName="data"; + }else{ + return $aReturn['sMessage']; + } + if(isset($aEquipement_structuresData)){ + // error_log(print_r($aEquipement_structures,true)); + $aEquipement_structures2=array(); + foreach ($aEquipement_structuresData as $aEquipement_structure){ + $aEquipement_structure['indicateur_equipement_structure']= $this->getIndicateur_equipement_structure($aEquipement_structure['id_indicateur_equipement_structure']); + $aEquipement_structures2[count($aEquipement_structures2)]=$aEquipement_structure; + } + $sEquipement_structures=json_encode(array($sDataArrayName=>$aEquipement_structures2,"list_count"=>$aEquipement_structures['list_count'],"total_row_number"=>$aEquipement_structures['total_row_number'],"status"=>$aEquipement_structures['status'])); + //error_log($sEquipement_structures); + return $sEquipement_structures; + } + } + + /** + * get indicateur_equipement_structure of equipement_structure + */ + function getIndicateur_equipement_structure($iIndicateurEquipement_structure) { + if(isset($iIndicateurEquipement_structure) and !is_null($iIndicateurEquipement_structure)){ + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'prod_immo', 'type' => 'schema_name'); + $aParams['id_indicateur_equipement_structure'] = array('value' => $iIndicateurEquipement_structure, 'type' => 'number'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getIndicateur_equipement_structure'], $aParams); + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + return $aLigne["indicateur_equipement_structure"]; + }else{ + return null; + } + } + + /** + * @SWG\Post(path="/equipement_structures", + * tags={"equipement_structure"}, + * summary="Add equipement_structure", + * description="Request to add equipement_structure", + * operationId="POST", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="equipement_structure Response", + * @SWG\Schema(ref="#/definitions/equipement_structures") + * ) + * ) + */ + + /** + * insert equipement_structure + * @return id of the equipement_structure created + */ + function POST(){ + require $this->sRessourcesFile; + // get value sequence from suivi_prod_immo database to set id + $oConnexion = new PDO('pgsql:host=\'srv-postgres\' port=5432 dbname=\'suivi_prod_immo\'', $_SESSION["ses_Login"], trim(des(rtrim(utf8_decode($_SESSION["ses_Login"])), hexToString(rtrim($_SESSION["ses_Password"])), 0, 0, null))); + $oPDOresult = $oConnexion->query($aSql['getSequenceEquipement_structure']); + if (!$oPDOresult) { + $aError=$oConnexion->errorInfo(); + error_log($aError[2]); + }else{ + $aResult = $oPDOresult->fetch(PDO::FETCH_ASSOC); + $this->aValues['id_equipement_structure'] = $aResult['nextval']; + } + $aReturn = $this->genericPost('prod_immo', 'equipement_structure', null, 'id_equipement_structure'); + return $aReturn['sMessage']; + } + + /** + * @SWG\Put(path="/equipement_structures/{id_equipement_structure}", + * tags={"equipement_structure"}, + * summary="update equipement_structure", + * description="Request to update equipement_structure", + * operationId="PUT", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_equipement_structure", + * in="path", + * description="id of the equipement_structure", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/equipement_structures") + * ) + * ) + */ + + /** + * update equipement_structures + * @return id of equipement_structures updated or error object if a equipement_structures is not updated + */ + function PUT() { + $aReturn = $this->genericPut('prod_immo', 'equipement_structure', 'id_equipement_structure'); + return $aReturn['sMessage']; + } + + /** + * @SWG\Delete(path="/equipement_structures", + * tags={"equipement_structure"}, + * summary="delete equipement_structure", + * description="Request to delete equipement_structure", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="idList", + * in="query", + * description="id of the equipement_structure", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="equipement_structure Response", + * @SWG\Schema(ref="#/definitions/equipement_structures") + * ) + * ) + */ + /** + * @SWG\Delete(path="/equipement_structures/{id_equipement_structure}", + * tags={"equipement_structure"}, + * summary="delete equipement_structure", + * description="Request to delete equipement_structure", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Traitement token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_equipement_structure", + * in="path", + * description="id of the equipement_structure", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/equipement_structures") + * ) + * ) + */ + + /** + * delete equipement_structures + * @return id of equipement_structures deleted or error object if a equipement_structures is not deleted + */ + function DELETE() { + $aReturn = $this->genericDelete('prod_immo', 'equipement_structure', 'id_equipement_structure'); + return $aReturn['sMessage']; + } +} + +?> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/web_service/ws/GetList.class.inc b/src/module_suivi_prod_immo/web_service/ws/GetList.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..149c81aa975c3ef256266ef1be10f0dae5f1de29 --- /dev/null +++ b/src/module_suivi_prod_immo/web_service/ws/GetList.class.inc @@ -0,0 +1,273 @@ +<?php + +require_once __DIR__ . '/Suivi_prod_immo.class.inc'; +require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/ws/vitis/Vitis.class.inc'; +require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/class/vitis_lib/Connection.class.inc'; +require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/class/vmlib/BdDataAccess.inc'; + +/** + * \file GetList.class.inc + * \class GetList + * + * \author Armand Bahi <armand.bahi@veremes.com>. + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the GetList php class + * + * This class defines the rest api for getlist + * + */ +class GetList extends Suivi_prod_immo { + /** + * @SWG\Definition( + * definition="/getlist", + * allOf={ + * @SWG\Schema(ref="#/definitions/getlist") + * } + * ) + * * @SWG\Tag( + * name="GetList", + * description="Operations about GetList" + * ) + */ + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + * @param type $bShortcut false to reinit variables + * @param type $oConnection connection object + */ + function __construct($aPath, $aValues, $properties, $bShortcut = false, $oConnection = false) { + parent::__construct($aPath, $aValues, $properties, $bShortcut, $oConnection); + } + + /** + * @SWG\Get(path="/getlist", + * tags={"Parcelle"}, + * summary="Get the operation list", + * description="Request to get the operation list", + * operationId="GET", + * produces={"application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="sListName", + * in="path", + * description="sListName", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="GetList Response", + * @SWG\Schema(ref="#/definitions/getlist") + * ) + * ) + */ + + /** + * Get function to get the list + * @return the list values + */ + function GET() { + $sListName = $this->aPath[2]; + + switch ($sListName) { + case "getoperationlist": + $aRecords=$this->getOperationList(); + break; + case "getamenageurlist": + $aRecords=$this->getAmenageurList(); + break; + case "getctmlist": + $aRecords=$this->getCTMList(); + break; + case "getcommunelist": + $aRecords=$this->getCommuneList(); + break; + case "getfinancementlist": + $aRecords=$this->getFinancementList(); + break; + case "getsuivilist": + $aRecords=$this->getSuiviList(); + break; + case "getprocedureamenagementlist": + $aRecords=$this->getProcedureAmenagementList(); + break; + } + + // error_log(json_encode($aRecords[0])); + return json_encode($aRecords); + } + + /** + * Get function to get the operation list + * @return the list values + */ + function getOperationList(){ + require $this->sRessourcesFile; + $aRecords = Array(); + $aSQLParams = array(); + $oResult = $this->oConnection->oBd->executeWithParams($aSql['getListOperation'], $aSQLParams); + if ($this->oConnection->oBd->enErreur()) { + $this->oError = new VitisError(1, $this->oConnection->oBd->getBDMessage()); + return $this->oError->aFields; + } + + if (gettype($oResult) == 'object') { + while ($aLigne = $this->oConnection->oBd->ligneSuivante($oResult)) { + array_push($aRecords, $aLigne); + } + } + + return $aRecords; + } + + /** + * Get function to get the amenageur list + * @return the list values + */ + function getAmenageurList(){ + require $this->sRessourcesFile; + $aRecords = Array(); + $aSQLParams = array(); + $oResult = $this->oConnection->oBd->executeWithParams($aSql['getListAmenageur'], $aSQLParams); + if ($this->oConnection->oBd->enErreur()) { + $this->oError = new VitisError(1, $this->oConnection->oBd->getBDMessage()); + return $this->oError->aFields; + } + + if (gettype($oResult) == 'object') { + while ($aLigne = $this->oConnection->oBd->ligneSuivante($oResult)) { + array_push($aRecords, array("code_amenageur"=>urlencode($aLigne['nom_amenageur']), "nom_amenageur"=>$aLigne['nom_amenageur']." (".$aLigne['count'].")")); + } + } + + return $aRecords; + } + + /** + * Get function to get the ctm list + * @return the list values + */ + function getCTMList(){ + require $this->sRessourcesFile; + $aRecords = Array(); + $aSQLParams = array(); + $oResult = $this->oConnection->oBd->executeWithParams($aSql['getListCTM'], $aSQLParams); + if ($this->oConnection->oBd->enErreur()) { + $this->oError = new VitisError(1, $this->oConnection->oBd->getBDMessage()); + return $this->oError->aFields; + } + + if (gettype($oResult) == 'object') { + while ($aLigne = $this->oConnection->oBd->ligneSuivante($oResult)) { + array_push($aRecords, array("id_ctm"=>urlencode($aLigne['id_ctm']), "nom_ctm"=>$aLigne['nom_ctm'])); + } + } + + return $aRecords; + } + + /** + * Get function to get the commune list + * @return the list values + */ + function getCommuneList(){ + require $this->sRessourcesFile; + $aRecords = Array(); + $aSQLParams = array(); + $oResult = $this->oConnection->oBd->executeWithParams($aSql['getListCommune'], $aSQLParams); + if ($this->oConnection->oBd->enErreur()) { + $this->oError = new VitisError(1, $this->oConnection->oBd->getBDMessage()); + return $this->oError->aFields; + } + + if (gettype($oResult) == 'object') { + while ($aLigne = $this->oConnection->oBd->ligneSuivante($oResult)) { + array_push($aRecords, array("id_commune"=>urlencode($aLigne['id_commune']), "nom_commune"=>$aLigne['nom_commune'])); + } + } + + return $aRecords; + } + + /** + * Get function to get the financement list + * @return the list values + */ + function getFinancementList(){ + require $this->sRessourcesFile; + $aRecords = Array(); + $aSQLParams = array(); + $oResult = $this->oConnection->oBd->executeWithParams($aSql['getListFinancement'], $aSQLParams); + if ($this->oConnection->oBd->enErreur()) { + $this->oError = new VitisError(1, $this->oConnection->oBd->getBDMessage()); + return $this->oError->aFields; + } + + if (gettype($oResult) == 'object') { + while ($aLigne = $this->oConnection->oBd->ligneSuivante($oResult)) { + array_push($aRecords, array("code_financement_equ_public"=>urlencode($aLigne['code_financement_equ_public']), "financement_equ_public"=>$aLigne['financement_equ_public'])); + } + } + + return $aRecords; + } + + /** + * Get function to get the suivi list + * @return the list values + */ + function getSuiviList(){ + require $this->sRessourcesFile; + $aRecords = Array(); + $aSQLParams = array(); + $oResult = $this->oConnection->oBd->executeWithParams($aSql['getListSuivi'], $aSQLParams); + if ($this->oConnection->oBd->enErreur()) { + $this->oError = new VitisError(1, $this->oConnection->oBd->getBDMessage()); + return $this->oError->aFields; + } + + if (gettype($oResult) == 'object') { + while ($aLigne = $this->oConnection->oBd->ligneSuivante($oResult)) { + array_push($aRecords, array("code_suivi"=>urlencode($aLigne['code_suivi']), "suivi"=>$aLigne['suivi'])); + } + } + + return $aRecords; + } + + /** + * Get function to get the procedure amenagement list + * @return the list values + */ + function getProcedureAmenagementList(){ + require $this->sRessourcesFile; + $aRecords = Array(); + $aSQLParams = array(); + $oResult = $this->oConnection->oBd->executeWithParams($aSql['getListProcedureAmenagement'], $aSQLParams); + if ($this->oConnection->oBd->enErreur()){ + $this->oError = new VitisError(1, $this->oConnection->oBd->getBDMessage()); + return $this->oError->aFields; + } + + if (gettype($oResult) == 'object'){ + while ($aLigne = $this->oConnection->oBd->ligneSuivante($oResult)){ + array_push($aRecords, array("code_procedure_amenagement"=>urlencode($aLigne['code_procedure_amenagement']), "procedure_amenagement"=>$aLigne['procedure_amenagement'])); + } + } + + return $aRecords; + } + +} + +?> diff --git a/src/module_suivi_prod_immo/web_service/ws/Granulometrie.class.inc b/src/module_suivi_prod_immo/web_service/ws/Granulometrie.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..661e7847a4dea50268d008a1de765bfcc91237e5 --- /dev/null +++ b/src/module_suivi_prod_immo/web_service/ws/Granulometrie.class.inc @@ -0,0 +1,57 @@ +<?php + +require_once __DIR__ . '/Suivi_prod_immo.class.inc'; +require_once __DIR__ . '/../../../vitis/vas/rest/class/vitis_lib/Connection.class.inc'; + +/** + * \file Suivi_prod_immo.class.inc + * \class Suivi_prod_immo + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Suivi_prod_immo php class + * + * This class defines granulometrie for one Suivi_prod_immo + * + */ + +class Granulometrie extends Suivi_prod_immo { + + public $oError; + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + * @param type $oConnection connection object + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $this->aProperties); + } + + /** + * get informations about granulometrie + */ + function GET() { + $this->aFields = $this->getFields('prod_immo', "granulometrie", "id_granulometrie"); + } + + /** + * delete a granulometrie + */ + function DELETE() { + $this->oConnection->oBd->delete('prod_immo', 'granulometrie', 'id_granulometrie', $this->aValues["my_vitis_id"], 'integer'); + if ($this->oConnection->oBd->enErreur()) { + $this->oError = new VitisError(1, $this->oConnection->oBd->getBDMessage()); + } else { + $this->aFields["id_granulometrie"] = $this->aValues["my_vitis_id"]; + } + } + +} + +?> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/web_service/ws/Granulometries.class.inc b/src/module_suivi_prod_immo/web_service/ws/Granulometries.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..d08af232db45c8e51020d6ffabdf6637d9b0e3cc --- /dev/null +++ b/src/module_suivi_prod_immo/web_service/ws/Granulometries.class.inc @@ -0,0 +1,331 @@ +<?php + +/** + * \file Granulometries.class.inc + * \class Granulometries + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Granulometries php class + * + * This class defines Rest Api to Vitis Granulometries + * + */ +require_once __DIR__ . '/Suivi_prod_immo.class.inc'; +require_once 'Granulometrie.class.inc'; + + +class Granulometries extends Suivi_prod_immo { + /** + * @SWG\Definition( + * definition="/granulometries", + * allOf={ + * @SWG\Schema(ref="#/definitions/granulometries") + * } + * ) + * * @SWG\Tag( + * name="Granulometries", + * description="Granulometries about Granulometries" + * ) + */ + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $properties); + } + + /** + * @SWG\Get(path="/granulometries", + * tags={"Granulometries"}, + * summary="Get Granulometries", + * description="Request to get Granulometries", + * operationId="GET", + * produces={"application/xml", "application/json", "application/x-vm-json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="order_by", + * in="query", + * description="list of ordering fields", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="sort_order", + * in="query", + * description="sort_order", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="limit", + * in="query", + * description="number of element", + * required=false, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="offset", + * in="query", + * description="index of first element", + * required=false, + * type="string", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="filter", + * in="query", + * description="filter results", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="distinct", + * in="query", + * description="delete duplicates", + * required=false, + * type="boolean" + * ), + * @SWG\Response( + * response=200, + * description="traitement Response", + * @SWG\Schema(ref="#/definitions/granulometries") + * ) + * ) + */ + + /** + * get Granulometries + * @return Granulometries + */ + function GET() { + $aReturn = $this->genericGet('prod_immo', "granulometrie", "id_granulometrie"); + $aGranulometries=json_decode($aReturn['sMessage'],true); + if(isset($aGranulometries['granulometries'])){ + $aGranulometriesData=$aGranulometries['granulometries']; + $sDataArrayName="granulometries"; + }elseif (isset($aGranulometries['data'])){ + $aGranulometriesData=$aGranulometries['data']; + $sDataArrayName="data"; + }else{ + return $aReturn['sMessage']; + } + if(isset($aGranulometriesData)){ + // error_log(print_r($aGranulometries,true)); + $aGranulometries2=array(); + foreach ($aGranulometriesData as $aGranulometrie){ + $aGranulometrie['composition_programme']= $this->getCompositionProgramme($aGranulometrie['code_composition_programme']); + $aGranulometrie['type_granulometrie']= $this->getTypeGranulometrie($aGranulometrie['code_type_granulometrie']); + $aGranulometries2[count($aGranulometries2)]=$aGranulometrie; + } + $sGranulometries=json_encode(array($sDataArrayName=>$aGranulometries2,"list_count"=>$aGranulometries['list_count'],"total_row_number"=>$aGranulometries['total_row_number'],"status"=>$aGranulometries['status'])); + //error_log($sGranulometries); + return $sGranulometries; + } + } + + /** + * get composition_programme of granulometrie + */ + function getCompositionProgramme($sCodeCompositionProgramme) { + if(isset($sCodeCompositionProgramme) and !is_null($sCodeCompositionProgramme)){ + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'prod_immo', 'type' => 'schema_name'); + $aParams['code_composition_programme'] = array('value' => $sCodeCompositionProgramme, 'type' => 'string'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getCompositionProgramme'], $aParams); + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + return $aLigne["composition_programme"]; + }else{ + return null; + } + } + + /** + * get type_granulometrie of granulometrie + */ + function getTypeGranulometrie($sCodeTypeGranulometrie) { + if(isset($sCodeTypeGranulometrie) and !is_null($sCodeTypeGranulometrie)){ + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'prod_immo', 'type' => 'schema_name'); + $aParams['code_type_granulometrie'] = array('value' => $sCodeTypeGranulometrie, 'type' => 'string'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getTypeGranulometrie'], $aParams); + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + return $aLigne["type_granulometrie"]; + }else{ + return null; + } + } + + /** + * @SWG\Post(path="/granulometries", + * tags={"granulométrie"}, + * summary="Add granulometrie", + * description="Request to add granulométrie", + * operationId="POST", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="granulometrie Response", + * @SWG\Schema(ref="#/definitions/granulometries") + * ) + * ) + */ + + /** + * insert granulometrie + * @return id of the granulometrie created + */ + function POST(){ + require $this->sRessourcesFile; + // get value sequence from suivi_prod_immo database to set id + $oConnexion = new PDO('pgsql:host=\'srv-postgres\' port=5432 dbname=\'suivi_prod_immo\'', $_SESSION["ses_Login"], trim(des(rtrim(utf8_decode($_SESSION["ses_Login"])), hexToString(rtrim($_SESSION["ses_Password"])), 0, 0, null))); + $oPDOresult = $oConnexion->query($aSql['getSequenceGranulometrie']); + if (!$oPDOresult) { + $aError=$oConnexion->errorInfo(); + error_log($aError[2]); + }else{ + $aResult = $oPDOresult->fetch(PDO::FETCH_ASSOC); + $this->aValues['id_granulometrie'] = $aResult['nextval']; + } + $aReturn = $this->genericPost('prod_immo', 'granulometrie', null, 'id_granulometrie'); + return $aReturn['sMessage']; + } + + /** + * @SWG\Put(path="/granulometries/{id_granulometrie}", + * tags={"granulométrie"}, + * summary="update granulométrie", + * description="Request to update granulométrie", + * operationId="PUT", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_granulometrie", + * in="path", + * description="id of the granulométrie", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/granulometries") + * ) + * ) + */ + + /** + * update granulometries + * @return id of granulometries updated or error object if a granulometries is not updated + */ + function PUT() { + $aReturn = $this->genericPut('prod_immo', 'granulometrie', 'id_granulometrie'); + return $aReturn['sMessage']; + } + + /** + * @SWG\Delete(path="/granulometries", + * tags={"granulométrie"}, + * summary="delete granulométrie", + * description="Request to delete granulométrie", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="idList", + * in="query", + * description="id of the granulométrie", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="granulométrie Response", + * @SWG\Schema(ref="#/definitions/granulometries") + * ) + * ) + */ + /** + * @SWG\Delete(path="/granulometries/{id_granulometrie}", + * tags={"granulométrie"}, + * summary="delete granulométrie", + * description="Request to delete granulométrie", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Traitement token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_granulometrie", + * in="path", + * description="id of the granulométrie", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/granulometries") + * ) + * ) + */ + + /** + * delete granulometries + * @return id of granulometries deleted or error object if a granulometries is not deleted + */ + function DELETE() { + $aReturn = $this->genericDelete('prod_immo', 'granulometrie', 'id_granulometrie'); + return $aReturn['sMessage']; + } +} + +?> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/web_service/ws/Hotel_commerce_service.class.inc b/src/module_suivi_prod_immo/web_service/ws/Hotel_commerce_service.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..f0c94b3e6f9808949115d207410d20f4b349234a --- /dev/null +++ b/src/module_suivi_prod_immo/web_service/ws/Hotel_commerce_service.class.inc @@ -0,0 +1,57 @@ +<?php + +require_once __DIR__ . '/Suivi_prod_immo.class.inc'; +require_once __DIR__ . '/../../../vitis/vas/rest/class/vitis_lib/Connection.class.inc'; + +/** + * \file Suivi_prod_immo.class.inc + * \class Suivi_prod_immo + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Suivi_prod_immo php class + * + * This class defines hotel_commerce_service for one Suivi_prod_immo + * + */ + +class Hotel_commerce_service extends Suivi_prod_immo { + + public $oError; + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + * @param type $oConnection connection object + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $this->aProperties); + } + + /** + * get informations about hotel_commerce_service + */ + function GET() { + $this->aFields = $this->getFields('prod_immo', "hotel_commerce_service", "id_hotel_commerce_service"); + } + + /** + * delete a hotel_commerce_service + */ + function DELETE() { + $this->oConnection->oBd->delete('prod_immo', 'hotel_commerce_service', 'id_hotel_commerce_service', $this->aValues["my_vitis_id"], 'integer'); + if ($this->oConnection->oBd->enErreur()) { + $this->oError = new VitisError(1, $this->oConnection->oBd->getBDMessage()); + } else { + $this->aFields["id_hotel_commerce_service"] = $this->aValues["my_vitis_id"]; + } + } + +} + +?> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/web_service/ws/Hotel_commerce_services.class.inc b/src/module_suivi_prod_immo/web_service/ws/Hotel_commerce_services.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..eab05ae729352d8c2a4c1aba12d3014fe4b51592 --- /dev/null +++ b/src/module_suivi_prod_immo/web_service/ws/Hotel_commerce_services.class.inc @@ -0,0 +1,313 @@ +<?php + +/** + * \file Hotel_commerce_services.class.inc + * \class Hotel_commerce_services + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Hotel_commerce_services php class + * + * This class defines Rest Api to Vitis Hotel_commerce_services + * + */ +require_once __DIR__ . '/Suivi_prod_immo.class.inc'; +require_once 'Hotel_commerce_service.class.inc'; + + +class Hotel_commerce_services extends Suivi_prod_immo { + /** + * @SWG\Definition( + * definition="/hotel_commerce_services", + * allOf={ + * @SWG\Schema(ref="#/definitions/hotel_commerce_services") + * } + * ) + * * @SWG\Tag( + * name="Hotel_commerce_services", + * description="Hotel_commerce_services about Hotel_commerce_services" + * ) + */ + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $properties); + } + + /** + * @SWG\Get(path="/hotel_commerce_services", + * tags={"Hotel_commerce_services"}, + * summary="Get Hotel_commerce_services", + * description="Request to get Hotel_commerce_services", + * operationId="GET", + * produces={"application/xml", "application/json", "application/x-vm-json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="order_by", + * in="query", + * description="list of ordering fields", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="sort_order", + * in="query", + * description="sort_order", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="limit", + * in="query", + * description="number of element", + * required=false, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="offset", + * in="query", + * description="index of first element", + * required=false, + * type="string", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="filter", + * in="query", + * description="filter results", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="distinct", + * in="query", + * description="delete duplicates", + * required=false, + * type="boolean" + * ), + * @SWG\Response( + * response=200, + * description="traitement Response", + * @SWG\Schema(ref="#/definitions/hotel_commerce_services") + * ) + * ) + */ + + /** + * get Hotel_commerce_services + * @return Hotel_commerce_services + */ + function GET() { + $aReturn = $this->genericGet('prod_immo', "hotel_commerce_service", "id_hotel_commerce_service"); + $aHotel_commerce_services=json_decode($aReturn['sMessage'],true); + if(isset($aHotel_commerce_services['hotel_commerce_services'])){ + $aHotel_commerce_servicesData=$aHotel_commerce_services['hotel_commerce_services']; + $sDataArrayName="hotel_commerce_services"; + }elseif (isset($aHotel_commerce_services['data'])){ + $aHotel_commerce_servicesData=$aHotel_commerce_services['data']; + $sDataArrayName="data"; + }else{ + return $aReturn['sMessage']; + } + if(isset($aHotel_commerce_servicesData)){ + // error_log(print_r($aHotel_commerce_services,true)); + $aHotel_commerce_services2=array(); + foreach ($aHotel_commerce_servicesData as $aHotel_commerce_service){ + $aHotel_commerce_service['indicateur_hotel_commerce_service']= $this->getIndicateur_hotel_commerce_service($aHotel_commerce_service['id_indicateur_hotel_commerce_service']); + $aHotel_commerce_services2[count($aHotel_commerce_services2)]=$aHotel_commerce_service; + } + $sHotel_commerce_services=json_encode(array($sDataArrayName=>$aHotel_commerce_services2,"list_count"=>$aHotel_commerce_services['list_count'],"total_row_number"=>$aHotel_commerce_services['total_row_number'],"status"=>$aHotel_commerce_services['status'])); + //error_log($sHotel_commerce_services); + return $sHotel_commerce_services; + } + } + + /** + * get indicateur_hotel_commerce_service of hotel_commerce_service + */ + function getIndicateur_hotel_commerce_service($iIndicateurHotel_commerce_service) { + if(isset($iIndicateurHotel_commerce_service) and !is_null($iIndicateurHotel_commerce_service)){ + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'prod_immo', 'type' => 'schema_name'); + $aParams['id_indicateur_hotel_commerce_service'] = array('value' => $iIndicateurHotel_commerce_service, 'type' => 'string'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getIndicateur_hotel_commerce_service'], $aParams); + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + return $aLigne["indicateur_hotel_commerce_service"]; + }else{ + return null; + } + } + + /** + * @SWG\Post(path="/hotel_commerce_services", + * tags={"hotel_commerce_service"}, + * summary="Add hotel_commerce_service", + * description="Request to add hotel_commerce_service", + * operationId="POST", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="hotel_commerce_service Response", + * @SWG\Schema(ref="#/definitions/hotel_commerce_services") + * ) + * ) + */ + + /** + * insert hotel_commerce_service + * @return id of the hotel_commerce_service created + */ + function POST(){ + require $this->sRessourcesFile; + // get value sequence from suivi_prod_immo database to set id + $oConnexion = new PDO('pgsql:host=\'srv-postgres\' port=5432 dbname=\'suivi_prod_immo\'', $_SESSION["ses_Login"], trim(des(rtrim(utf8_decode($_SESSION["ses_Login"])), hexToString(rtrim($_SESSION["ses_Password"])), 0, 0, null))); + $oPDOresult = $oConnexion->query($aSql['getSequenceHotel_commerce_service']); + if (!$oPDOresult) { + $aError=$oConnexion->errorInfo(); + error_log($aError[2]); + }else{ + $aResult = $oPDOresult->fetch(PDO::FETCH_ASSOC); + $this->aValues['id_hotel_commerce_service'] = $aResult['nextval']; + } + $aReturn = $this->genericPost('prod_immo', 'hotel_commerce_service', null, 'id_hotel_commerce_service'); + return $aReturn['sMessage']; + } + + /** + * @SWG\Put(path="/hotel_commerce_services/{id_hotel_commerce_service}", + * tags={"hotel_commerce_service"}, + * summary="update hotel_commerce_service", + * description="Request to update hotel_commerce_service", + * operationId="PUT", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_hotel_commerce_service", + * in="path", + * description="id of the hotel_commerce_service", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/hotel_commerce_services") + * ) + * ) + */ + + /** + * update hotel_commerce_services + * @return id of hotel_commerce_services updated or error object if a hotel_commerce_services is not updated + */ + function PUT() { + $aReturn = $this->genericPut('prod_immo', 'hotel_commerce_service', 'id_hotel_commerce_service'); + return $aReturn['sMessage']; + } + + /** + * @SWG\Delete(path="/hotel_commerce_services", + * tags={"hotel_commerce_service"}, + * summary="delete hotel_commerce_service", + * description="Request to delete hotel_commerce_service", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="idList", + * in="query", + * description="id of the hotel_commerce_service", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="hotel_commerce_service Response", + * @SWG\Schema(ref="#/definitions/hotel_commerce_services") + * ) + * ) + */ + /** + * @SWG\Delete(path="/hotel_commerce_services/{id_hotel_commerce_service}", + * tags={"hotel_commerce_service"}, + * summary="delete hotel_commerce_service", + * description="Request to delete hotel_commerce_service", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Traitement token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_hotel_commerce_service", + * in="path", + * description="id of the hotel_commerce_service", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/hotel_commerce_services") + * ) + * ) + */ + + /** + * delete hotel_commerce_services + * @return id of hotel_commerce_services deleted or error object if a hotel_commerce_services is not deleted + */ + function DELETE() { + $aReturn = $this->genericDelete('prod_immo', 'hotel_commerce_service', 'id_hotel_commerce_service'); + return $aReturn['sMessage']; + } +} + +?> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/web_service/ws/Ilots.class.inc b/src/module_suivi_prod_immo/web_service/ws/Ilots.class.inc index 113033e12353b3ce2c2a70a3a376b487f37c4e2d..a5a553db751a136b53476f3e0c8cd10c41949bc1 100644 --- a/src/module_suivi_prod_immo/web_service/ws/Ilots.class.inc +++ b/src/module_suivi_prod_immo/web_service/ws/Ilots.class.inc @@ -119,12 +119,60 @@ class Ilots extends Suivi_prod_immo { * get Ilots * @return Ilots */ - function GET() { - $aReturn = $this->genericGet('prod_immo', "ilot", "id_ilot"); - $sMessage = $aReturn['sMessage']; - return $sMessage; + function GET(){ + if($this->setRestriction()){ + $aReturn = $this->genericGet('prod_immo', "ilot", "id_ilot"); + $sMessage = $aReturn['sMessage']; + return $sMessage; + }else{ + // si pas d'autorisation, on retourne une liste vide + return json_encode(array("list_count"=>0,"total_row_number"=>0,"status"=>1)); + } } + + /** + * set filter restriction for user connected + */ + function setRestriction(){ + require $this->sRessourcesFile; + $aParams = array(); + $aParams['sSchemaFramework'] = array('value' => 'prod_immo', 'type' => 'schema_name'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getRestrictionUpdate'], $aParams); + if($oPDOresult->rowCount()==1){ + // le user existe dans la table de restriction + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + $oPDOresult2 = $this->oConnection->oBd->executeWithParams($aSql['getRestrictionUpdateIdOperation'], $aParams); + if($oPDOresult2->rowCount()>0){ + // il y a un ou plusieurs ID pour le user, on filtre + $aID=array(); + while ($aIdOperation = $this->oConnection->oBd->ligneSuivante($oPDOresult2)){ + $aID[] = $aIdOperation["id_operation"]; + } + $oPDOresult2 = $this->oConnection->oBd->fermeResultat(); + // injection du filtre + if (isset($this->aValues['filter'])){ + // il existe d�j� un filtre + $aFilter=json_decode($this->aValues['filter'],true); + $aOperators=$aFilter['operators']; + $aOperators[]=array("column"=>"id_operation","compare_operator"=>"IN","value"=>$aID); + $aFilter['operators']=$aOperators; + $this->aValues['filter']=json_encode($aFilter); + }else{ + // il n'y a pas de filtre, on le cr�e + $this->aValues['filter']=json_encode(array('relation'=>'AND','operators'=>array(array("column"=>"id_operation","compare_operator"=>"IN","value"=>$aID)))); + } + return true; + }else{ + return false; + } + }else{ + // le user n'existe pas dans la table de restriction, on affiche rien + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + error_log("Aucunes op�rations autoris�es en saisie, ajouter l'utilisateur dans la table prod_immo.user_restriction ."); + return false; + } + } /** * @SWG\Post(path="/ilots", * tags={"Ilots"}, diff --git a/src/module_suivi_prod_immo/web_service/ws/Logement_familliaux_accession.class.inc b/src/module_suivi_prod_immo/web_service/ws/Logement_familliaux_accession.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..0ac51c265c0d4d3c007d8a6f946e75f36b98a2ce --- /dev/null +++ b/src/module_suivi_prod_immo/web_service/ws/Logement_familliaux_accession.class.inc @@ -0,0 +1,57 @@ +<?php + +require_once __DIR__ . '/Suivi_prod_immo.class.inc'; +require_once __DIR__ . '/../../../vitis/vas/rest/class/vitis_lib/Connection.class.inc'; + +/** + * \file Suivi_prod_immo.class.inc + * \class Suivi_prod_immo + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Suivi_prod_immo php class + * + * This class defines logement_familliaux_accession for one Suivi_prod_immo + * + */ + +class Logement_familliaux_accession extends Suivi_prod_immo { + + public $oError; + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + * @param type $oConnection connection object + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $this->aProperties); + } + + /** + * get informations about logement_familliaux_accession + */ + function GET() { + $this->aFields = $this->getFields('prod_immo', "logement_familliaux_accession", "id_logement_familliaux_accession"); + } + + /** + * delete a logement_familliaux_accession + */ + function DELETE() { + $this->oConnection->oBd->delete('prod_immo', 'logement_familliaux_accession', 'id_logement_familliaux_accession', $this->aValues["my_vitis_id"], 'integer'); + if ($this->oConnection->oBd->enErreur()) { + $this->oError = new VitisError(1, $this->oConnection->oBd->getBDMessage()); + } else { + $this->aFields["id_logement_familliaux_accession"] = $this->aValues["my_vitis_id"]; + } + } + +} + +?> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/web_service/ws/Logement_familliaux_accessions.class.inc b/src/module_suivi_prod_immo/web_service/ws/Logement_familliaux_accessions.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..10b4b6d2ebf2b18d98beff3333d21cd12f6ccfe5 --- /dev/null +++ b/src/module_suivi_prod_immo/web_service/ws/Logement_familliaux_accessions.class.inc @@ -0,0 +1,313 @@ +<?php + +/** + * \file Logement_familliaux_accessions.class.inc + * \class Logement_familliaux_accessions + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Logement_familliaux_accessions php class + * + * This class defines Rest Api to Vitis Logement_familliaux_accessions + * + */ +require_once __DIR__ . '/Suivi_prod_immo.class.inc'; +require_once 'Logement_familliaux_accession.class.inc'; + + +class Logement_familliaux_accessions extends Suivi_prod_immo { + /** + * @SWG\Definition( + * definition="/logement_familliaux_accessions", + * allOf={ + * @SWG\Schema(ref="#/definitions/logement_familliaux_accessions") + * } + * ) + * * @SWG\Tag( + * name="Logement_familliaux_accessions", + * description="Logement_familliaux_accessions about Logement_familliaux_accessions" + * ) + */ + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $properties); + } + + /** + * @SWG\Get(path="/logement_familliaux_accessions", + * tags={"Logement_familliaux_accessions"}, + * summary="Get Logement_familliaux_accessions", + * description="Request to get Logement_familliaux_accessions", + * operationId="GET", + * produces={"application/xml", "application/json", "application/x-vm-json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="order_by", + * in="query", + * description="list of ordering fields", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="sort_order", + * in="query", + * description="sort_order", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="limit", + * in="query", + * description="number of element", + * required=false, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="offset", + * in="query", + * description="index of first element", + * required=false, + * type="string", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="filter", + * in="query", + * description="filter results", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="distinct", + * in="query", + * description="delete duplicates", + * required=false, + * type="boolean" + * ), + * @SWG\Response( + * response=200, + * description="traitement Response", + * @SWG\Schema(ref="#/definitions/logement_familliaux_accessions") + * ) + * ) + */ + + /** + * get Logement_familliaux_accessions + * @return Logement_familliaux_accessions + */ + function GET() { + $aReturn = $this->genericGet('prod_immo', "logement_familliaux_accession", "id_logement_familliaux_accession"); + $aLogement_familliaux_accessions=json_decode($aReturn['sMessage'],true); + if(isset($aLogement_familliaux_accessions['logement_familliaux_accessions'])){ + $aLogement_familliaux_accessionsData=$aLogement_familliaux_accessions['logement_familliaux_accessions']; + $sDataArrayName="logement_familliaux_accessions"; + }elseif (isset($aLogement_familliaux_accessions['data'])){ + $aLogement_familliaux_accessionsData=$aLogement_familliaux_accessions['data']; + $sDataArrayName="data"; + }else{ + return $aReturn['sMessage']; + } + if(isset($aLogement_familliaux_accessionsData)){ + // error_log(print_r($aLogement_familliaux_accessions,true)); + $aLogement_familliaux_accessions2=array(); + foreach ($aLogement_familliaux_accessionsData as $aLogement_familliaux_accession){ + $aLogement_familliaux_accession['indicateur_logement_familliaux_accession']= $this->getIndicateur_logement_familliaux_accession($aLogement_familliaux_accession['id_indicateur_logement_familliaux_accession']); + $aLogement_familliaux_accessions2[count($aLogement_familliaux_accessions2)]=$aLogement_familliaux_accession; + } + $sLogement_familliaux_accessions=json_encode(array($sDataArrayName=>$aLogement_familliaux_accessions2,"list_count"=>$aLogement_familliaux_accessions['list_count'],"total_row_number"=>$aLogement_familliaux_accessions['total_row_number'],"status"=>$aLogement_familliaux_accessions['status'])); + //error_log($sLogement_familliaux_accessions); + return $sLogement_familliaux_accessions; + } + } + + /** + * get indicateur_logement_familliaux_accession of logement_familliaux_accession + */ + function getIndicateur_logement_familliaux_accession($sCodeTypeGranulometrie) { + if(isset($sCodeTypeGranulometrie) and !is_null($sCodeTypeGranulometrie)){ + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'prod_immo', 'type' => 'schema_name'); + $aParams['id_indicateur_logement_familliaux_accession'] = array('value' => $sCodeTypeGranulometrie, 'type' => 'number'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getIndicateur_logement_familliaux_accession'], $aParams); + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + return $aLigne["indicateur_logement_familliaux_accession"]; + }else{ + return null; + } + } + + /** + * @SWG\Post(path="/logement_familliaux_accessions", + * tags={"logement familliaux en accession"}, + * summary="Add logement_familliaux_accession", + * description="Request to add logement familliaux en accession", + * operationId="POST", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="logement_familliaux_accession Response", + * @SWG\Schema(ref="#/definitions/logement_familliaux_accessions") + * ) + * ) + */ + + /** + * insert logement_familliaux_accession + * @return id of the logement_familliaux_accession created + */ + function POST(){ + require $this->sRessourcesFile; + // get value sequence from suivi_prod_immo database to set id + $oConnexion = new PDO('pgsql:host=\'srv-postgres\' port=5432 dbname=\'suivi_prod_immo\'', $_SESSION["ses_Login"], trim(des(rtrim(utf8_decode($_SESSION["ses_Login"])), hexToString(rtrim($_SESSION["ses_Password"])), 0, 0, null))); + $oPDOresult = $oConnexion->query($aSql['getSequenceLogement_familliaux_accession']); + if (!$oPDOresult) { + $aError=$oConnexion->errorInfo(); + error_log($aError[2]); + }else{ + $aResult = $oPDOresult->fetch(PDO::FETCH_ASSOC); + $this->aValues['id_logement_familliaux_accession'] = $aResult['nextval']; + } + $aReturn = $this->genericPost('prod_immo', 'logement_familliaux_accession', null, 'id_logement_familliaux_accession'); + return $aReturn['sMessage']; + } + + /** + * @SWG\Put(path="/logement_familliaux_accessions/{id_logement_familliaux_accession}", + * tags={"logement familliaux en accession"}, + * summary="update logement familliaux en accession", + * description="Request to update logement familliaux en accession", + * operationId="PUT", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_logement_familliaux_accession", + * in="path", + * description="id of the logement familliaux en accession", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/logement_familliaux_accessions") + * ) + * ) + */ + + /** + * update logement_familliaux_accessions + * @return id of logement_familliaux_accessions updated or error object if a logement_familliaux_accessions is not updated + */ + function PUT() { + $aReturn = $this->genericPut('prod_immo', 'logement_familliaux_accession', 'id_logement_familliaux_accession'); + return $aReturn['sMessage']; + } + + /** + * @SWG\Delete(path="/logement_familliaux_accessions", + * tags={"logement familliaux en accession"}, + * summary="delete logement familliaux en accession", + * description="Request to delete logement familliaux en accession", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="idList", + * in="query", + * description="id of the logement familliaux en accession", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="logement familliaux en accession Response", + * @SWG\Schema(ref="#/definitions/logement_familliaux_accessions") + * ) + * ) + */ + /** + * @SWG\Delete(path="/logement_familliaux_accessions/{id_logement_familliaux_accession}", + * tags={"logement familliaux en accession"}, + * summary="delete logement familliaux en accession", + * description="Request to delete logement familliaux en accession", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Traitement token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_logement_familliaux_accession", + * in="path", + * description="id of the logement familliaux en accession", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/logement_familliaux_accessions") + * ) + * ) + */ + + /** + * delete logement_familliaux_accessions + * @return id of logement_familliaux_accessions deleted or error object if a logement_familliaux_accessions is not deleted + */ + function DELETE() { + $aReturn = $this->genericDelete('prod_immo', 'logement_familliaux_accession', 'id_logement_familliaux_accession'); + return $aReturn['sMessage']; + } +} + +?> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/web_service/ws/Operation.class.inc b/src/module_suivi_prod_immo/web_service/ws/Operation.class.inc index 6a5cd28ffa2f45e28d986d007dfa32c8d3d7f647..bfdd2d49c3deed28894b7e760eae68b49e895f02 100644 --- a/src/module_suivi_prod_immo/web_service/ws/Operation.class.inc +++ b/src/module_suivi_prod_immo/web_service/ws/Operation.class.inc @@ -39,8 +39,8 @@ class Operation extends Suivi_prod_immo { function GET() { $this->aFields = $this->getFields('prod_immo', "operation", "id_operation"); $this->getCommunes(); - $this->getPerimetre(); $this->getCTM(); + $this->getPerimetres(); $this->getModeFinancement(); $this->getAvancement(); $this->getContexteUrbain(); @@ -100,6 +100,30 @@ class Operation extends Suivi_prod_immo { $this->aFields['ctms'] = $sListCTMId; $this->aFields['ctms_label'] = implode(',', $aListCTMNom); } + + /** + * get perimetres of operation + */ + function getPerimetres() { + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'prod_immo', 'type' => 'schema_name'); + $aParams['id_operation'] = array('value' => $this->aValues["my_vitis_id"], 'type' => 'number'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getOperationPerimetre'], $aParams); + $sListPerimetreId = ""; + $aListPerimetreNom = array(); + while ($aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult)) { + if ($sListPerimetreId == "") { + $sListPerimetreId = $aLigne["id_perimetre"]; + } else { + $sListPerimetreId .= "|" . $aLigne["id_perimetre"]; + } + $aListPerimetreNom[] = $aLigne["nom_perimetre"]; + } + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + $this->aFields['perimetres'] = $sListPerimetreId; + $this->aFields['perimetres_label'] = implode(',', $aListPerimetreNom); + + } /** * get Modes financement of operation @@ -127,7 +151,7 @@ class Operation extends Suivi_prod_immo { /** * get perimetre projet urbain of programme */ - function getPerimetre() { + /*function getPerimetre() { if(isset($this->aFields['id_perimetre']) and !is_null($this->aFields['id_perimetre'])){ require $this->sRessourcesFile; $aParams['sSchemaFramework'] = array('value' => 'prod_immo', 'type' => 'schema_name'); @@ -137,7 +161,7 @@ class Operation extends Suivi_prod_immo { $this->aFields['nom_perimetre'] = $aLigne["nom_perimetre"]." (".$aLigne["type_perimetre"].")"; $oPDOresult = $this->oConnection->oBd->fermeResultat(); } - } + }*/ /** * get avancement of programme diff --git a/src/module_suivi_prod_immo/web_service/ws/OperationLastUpdate.class.inc b/src/module_suivi_prod_immo/web_service/ws/OperationLastUpdate.class.inc index bc87f2e1c397c41af937d6d5ee0e9562c8b495ff..4e81b74df0b72f7da16a5bb75ab78daec1305744 100644 --- a/src/module_suivi_prod_immo/web_service/ws/OperationLastUpdate.class.inc +++ b/src/module_suivi_prod_immo/web_service/ws/OperationLastUpdate.class.inc @@ -46,8 +46,8 @@ class OperationLastUpdate extends Suivi_prod_immo { /** * @SWG\Get(path="/operationlastupdate/{iIdOperation}/{sAttributeName}", * tags={"Parcelle"}, - * summary="Get the tooltip "last update" content", - * description="Request to get tooltip "last update" content", + * summary="Get the tooltip 'last update' content", + * description="Request to get tooltip 'last update' content", * operationId="GET", * produces={"application/json"}, * @SWG\Parameter( @@ -69,7 +69,7 @@ class OperationLastUpdate extends Suivi_prod_immo { * in="path", * description="sAttributeName", * required=true, - * type="sting" + * type="string" * ), * @SWG\Response( * response=200, diff --git a/src/module_suivi_prod_immo/web_service/ws/Operations.class.inc b/src/module_suivi_prod_immo/web_service/ws/Operations.class.inc index 2a6a16d3b8a382badb8b57cbcd7f5ae6784ac17f..75252785740345e88315ccd7640f94fbef9821f9 100644 --- a/src/module_suivi_prod_immo/web_service/ws/Operations.class.inc +++ b/src/module_suivi_prod_immo/web_service/ws/Operations.class.inc @@ -122,17 +122,25 @@ class Operations extends Suivi_prod_immo { * @return Operations */ function GET() { - $aReturn = $this->genericGet('prod_immo', "v_operation", "id_operation"); - $sMessage = $aReturn['sMessage']; - $aOperations=json_decode($aReturn['sMessage'],true); - $aOperations2=array(); - foreach ($aOperations['operations'] as $aOperation){ - unset($aOperation['geom']); - $aOperation['nom_commune']= $this->getCommunes($aOperation['id_operation']); - $aOperations2[count($aOperations2)]=$aOperation; + if($this->setRestriction()){ + $aReturn = $this->genericGet('prod_immo', "v_operation", "id_operation"); + $aOperations=json_decode($aReturn['sMessage'],true); + if(isset($aOperations['operations'])){ + $aOperations2=array(); + foreach ($aOperations['operations'] as $aOperation){ + unset($aOperation['geom']); + $aOperation['nom_commune']= $this->getCommunes($aOperation['id_operation']); + $aOperations2[count($aOperations2)]=$aOperation; + } + $sOperations=json_encode(array("operations"=>$aOperations2,"list_count"=>$aOperations['list_count'],"total_row_number"=>$aOperations['total_row_number'],"status"=>$aOperations['status'])); + }else{ + $sOperations=$aReturn['sMessage']; + } + return $sOperations; + }else{ + // si pas d'autorisation, on retourne une liste vide + return json_encode(array("list_count"=>0,"total_row_number"=>0,"status"=>1)); } - $sOperations=json_encode(array("operations"=>$aOperations2,"list_count"=>$aOperations['list_count'],"total_row_number"=>$aOperations['total_row_number'],"status"=>$aOperations['status'])); - return $sOperations; } /** @@ -149,9 +157,51 @@ class Operations extends Suivi_prod_immo { } $oPDOresult = $this->oConnection->oBd->fermeResultat(); return implode(',', $aListCommuneNom); - } + /** + * set filter restriction for user connected + */ + function setRestriction(){ + require $this->sRessourcesFile; + $aParams = array(); + $aParams['sSchemaFramework'] = array('value' => 'prod_immo', 'type' => 'schema_name'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getRestrictionUpdate'], $aParams); + if($oPDOresult->rowCount()==1){ + // le user existe dans la table de restriction + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + $oPDOresult2 = $this->oConnection->oBd->executeWithParams($aSql['getRestrictionUpdateIdOperation'], $aParams); + if($oPDOresult2->rowCount()>0){ + // il y a un ou plusieurs ID pour le user, on filtre + $aID=array(); + while ($aIdOperation = $this->oConnection->oBd->ligneSuivante($oPDOresult2)){ + $aID[] = $aIdOperation["id_operation"]; + } + $oPDOresult2 = $this->oConnection->oBd->fermeResultat(); + // injection du filtre + if (isset($this->aValues['filter'])){ + // il existe déjà un filtre + $aFilter=json_decode($this->aValues['filter'],true); + $aOperators=$aFilter['operators']; + $aOperators[]=array("column"=>"id_operation","compare_operator"=>"IN","value"=>$aID); + $aFilter['operators']=$aOperators; + $this->aValues['filter']=json_encode($aFilter); + }else{ + // il n'y a pas de filtre, on le crée + $this->aValues['filter']=json_encode(array('relation'=>'AND','operators'=>array(array("column"=>"id_operation","compare_operator"=>"IN","value"=>$aID)))); + } + return true; + }else{ + return false; + } + }else{ + // le user n'existe pas dans la table de restriction, on affiche rien + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + error_log("Aucunes opérations autorisées en saisie, ajouter l'utilisateur dans la table prod_immo.user_restriction ."); + return false; + } + } + /** * @SWG\Post(path="/operations", * tags={"Operations"}, @@ -229,7 +279,8 @@ class Operations extends Suivi_prod_immo { if ($aReturn['sStatus'] == 1) { $aXmlRacineAttribute['status'] = 1; $sMessage = $this->asDocument('', 'vitis', $this->aValues['sEncoding'], True, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']); - $oOperation = new Operation($this->aPath, $this->aValues, $this->aProperties, $this->oConnection); + // ces deux lignes ne servent à rien - tester sans ! + $oOperation = new Operation($this->aPath, $this->aValues, $this->aProperties, $this->oConnection); $oOperation->GET(); //***** communes *****// // Le paramètre "communes" est passé dans la requête ? @@ -264,6 +315,22 @@ class Operations extends Suivi_prod_immo { } } } + //***** Périmètres *****// + // Le paramètre "perimetres" est passé dans la requête ? + if ($this->aValues['perimetres'] !== NULL) { + $this->oConnection->oBd->delete('prod_immo', 'operation_perimetre', 'id_operation', $this->aValues["my_vitis_id"]); + if (!empty($this->aValues['perimetres'])) { + require $this->sRessourcesFile; + $aPerimetres = explode('|', $this->aValues['perimetres']); + foreach ($aPerimetres as $iPerimetreId) { + $aParams = array(); + $aParams['sSchemaFramework'] = array('value' => 'prod_immo', 'type' => 'schema_name'); + $aParams['id_perimetre'] = array('value' => $iPerimetreId, 'type' => 'number'); + $aParams['id_operation'] = array('value' => $this->aValues["my_vitis_id"], 'type' => 'number'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['insertOperationPerimetre'], $aParams); + } + } + } //***** Modes financement *****// // Le paramètre "mode_financements" est passé dans la requête ? //error_log($this->aValues['mode_financements']); @@ -286,7 +353,7 @@ class Operations extends Suivi_prod_immo { } return $sMessage; - return $aReturn['sMessage']; + // return $aReturn['sMessage']; } /** diff --git a/src/module_suivi_prod_immo/web_service/ws/Perimetre.class.inc b/src/module_suivi_prod_immo/web_service/ws/Perimetre.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..d843f093b1eaffa9c6722bfebecbf1bc5bcade9f --- /dev/null +++ b/src/module_suivi_prod_immo/web_service/ws/Perimetre.class.inc @@ -0,0 +1,45 @@ +<?php + +require_once __DIR__ . '/Suivi_prod_immo.class.inc'; +require_once __DIR__ . '/../../../vitis/vas/rest/class/vitis_lib/Connection.class.inc'; + +/** + * \file Suivi_prod_immo.class.inc + * \class Suivi_prod_immo + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Suivi_prod_immo php class + * + * This class defines perimetre for one Suivi_prod_immo + * + */ + +class Perimetre extends Suivi_prod_immo { + + public $oError; + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + * @param type $oConnection connection object + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $this->aProperties); + } + + /** + * get informations about perimetre + */ + function GET() { + $this->aFields = $this->getFields('prod_immo', "perimetre", "id_perimetre"); + } + +} + +?> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/web_service/ws/Perimetres.class.inc b/src/module_suivi_prod_immo/web_service/ws/Perimetres.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..1912b200085ce52513eadff45d6b254cfa6d4497 --- /dev/null +++ b/src/module_suivi_prod_immo/web_service/ws/Perimetres.class.inc @@ -0,0 +1,131 @@ +<?php + +/** + * \file Perimetres.class.inc + * \class Perimetres + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Perimetres php class + * + * This class defines Rest Api to Vitis Perimetres + * + */ +require_once __DIR__ . '/Suivi_prod_immo.class.inc'; +require_once 'Perimetre.class.inc'; + + +class Perimetres extends Suivi_prod_immo { + /** + * @SWG\Definition( + * definition="/perimetres", + * allOf={ + * @SWG\Schema(ref="#/definitions/perimetres") + * } + * ) + * * @SWG\Tag( + * name="Perimetres", + * description="Perimetres about Perimetres" + * ) + */ + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $properties); + } + + /** + * @SWG\Get(path="/perimetres", + * tags={"Perimetres"}, + * summary="Get Perimetres", + * description="Request to get Perimetres", + * operationId="GET", + * produces={"application/xml", "application/json", "application/x-vm-json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="order_by", + * in="query", + * description="list of ordering fields", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="sort_order", + * in="query", + * description="sort_order", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="limit", + * in="query", + * description="number of element", + * required=false, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="offset", + * in="query", + * description="index of first element", + * required=false, + * type="string", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="filter", + * in="query", + * description="filter results", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="distinct", + * in="query", + * description="delete duplicates", + * required=false, + * type="boolean" + * ), + * @SWG\Response( + * response=200, + * description="traitement Response", + * @SWG\Schema(ref="#/definitions/perimetres") + * ) + * ) + */ + + /** + * get Perimetres + * @return Perimetres + */ + function GET() { + $aReturn = $this->genericGet('prod_immo', "perimetre", "id_perimetre"); + $sMessage = $aReturn['sMessage']; + return $sMessage; + } + + +} + +?> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/web_service/ws/Profil_acheteur_accession_libre.class.inc b/src/module_suivi_prod_immo/web_service/ws/Profil_acheteur_accession_libre.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..6a2ff113d0e2fa196cc53e4185c43ab409c19c03 --- /dev/null +++ b/src/module_suivi_prod_immo/web_service/ws/Profil_acheteur_accession_libre.class.inc @@ -0,0 +1,57 @@ +<?php + +require_once __DIR__ . '/Suivi_prod_immo.class.inc'; +require_once __DIR__ . '/../../../vitis/vas/rest/class/vitis_lib/Connection.class.inc'; + +/** + * \file Suivi_prod_immo.class.inc + * \class Suivi_prod_immo + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Suivi_prod_immo php class + * + * This class defines profil_acheteur_accession_libre for one Suivi_prod_immo + * + */ + +class Profil_acheteur_accession_libre extends Suivi_prod_immo { + + public $oError; + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + * @param type $oConnection connection object + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $this->aProperties); + } + + /** + * get informations about profil_acheteur_accession_libre + */ + function GET() { + $this->aFields = $this->getFields('prod_immo', "profil_acheteur_accession_libre", "id_profil_acheteur_accession_libre"); + } + + /** + * delete a profil_acheteur_accession_libre + */ + function DELETE() { + $this->oConnection->oBd->delete('prod_immo', 'profil_acheteur_accession_libre', 'id_profil_acheteur_accession_libre', $this->aValues["my_vitis_id"], 'integer'); + if ($this->oConnection->oBd->enErreur()) { + $this->oError = new VitisError(1, $this->oConnection->oBd->getBDMessage()); + } else { + $this->aFields["id_profil_acheteur_accession_libre"] = $this->aValues["my_vitis_id"]; + } + } + +} + +?> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/web_service/ws/Profil_acheteur_accession_libres.class.inc b/src/module_suivi_prod_immo/web_service/ws/Profil_acheteur_accession_libres.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..08327f6d724ef98a56372d64a4c4a716423ae946 --- /dev/null +++ b/src/module_suivi_prod_immo/web_service/ws/Profil_acheteur_accession_libres.class.inc @@ -0,0 +1,313 @@ +<?php + +/** + * \file Profil_acheteur_accession_libres.class.inc + * \class Profil_acheteur_accession_libres + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Profil_acheteur_accession_libres php class + * + * This class defines Rest Api to Vitis Profil_acheteur_accession_libres + * + */ +require_once __DIR__ . '/Suivi_prod_immo.class.inc'; +require_once 'Profil_acheteur_accession_libre.class.inc'; + + +class Profil_acheteur_accession_libres extends Suivi_prod_immo { + /** + * @SWG\Definition( + * definition="/profil_acheteur_accession_libres", + * allOf={ + * @SWG\Schema(ref="#/definitions/profil_acheteur_accession_libres") + * } + * ) + * * @SWG\Tag( + * name="Profil_acheteur_accession_libres", + * description="Profil_acheteur_accession_libres about Profil_acheteur_accession_libres" + * ) + */ + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $properties); + } + + /** + * @SWG\Get(path="/profil_acheteur_accession_libres", + * tags={"Profil_acheteur_accession_libres"}, + * summary="Get Profil_acheteur_accession_libres", + * description="Request to get Profil_acheteur_accession_libres", + * operationId="GET", + * produces={"application/xml", "application/json", "application/x-vm-json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="order_by", + * in="query", + * description="list of ordering fields", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="sort_order", + * in="query", + * description="sort_order", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="limit", + * in="query", + * description="number of element", + * required=false, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="offset", + * in="query", + * description="index of first element", + * required=false, + * type="string", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="filter", + * in="query", + * description="filter results", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="distinct", + * in="query", + * description="delete duplicates", + * required=false, + * type="boolean" + * ), + * @SWG\Response( + * response=200, + * description="traitement Response", + * @SWG\Schema(ref="#/definitions/profil_acheteur_accession_libres") + * ) + * ) + */ + + /** + * get Profil_acheteur_accession_libres + * @return Profil_acheteur_accession_libres + */ + function GET() { + $aReturn = $this->genericGet('prod_immo', "profil_acheteur_accession_libre", "id_profil_acheteur_accession_libre"); + $aProfil_acheteur_accession_libres=json_decode($aReturn['sMessage'],true); + if(isset($aProfil_acheteur_accession_libres['profil_acheteur_accession_libres'])){ + $aProfil_acheteur_accession_libresData=$aProfil_acheteur_accession_libres['profil_acheteur_accession_libres']; + $sDataArrayName="profil_acheteur_accession_libres"; + }elseif (isset($aProfil_acheteur_accession_libres['data'])){ + $aProfil_acheteur_accession_libresData=$aProfil_acheteur_accession_libres['data']; + $sDataArrayName="data"; + }else{ + return $aReturn['sMessage']; + } + if(isset($aProfil_acheteur_accession_libresData)){ + // error_log(print_r($aProfil_acheteur_accession_libres,true)); + $aProfil_acheteur_accession_libres2=array(); + foreach ($aProfil_acheteur_accession_libresData as $aProfil_acheteur_accession_libre){ + $aProfil_acheteur_accession_libre['type_acheteur_accession_libre']= $this->getType_acheteur_accession_libre($aProfil_acheteur_accession_libre['id_type_acheteur_accession_libre']); + $aProfil_acheteur_accession_libres2[count($aProfil_acheteur_accession_libres2)]=$aProfil_acheteur_accession_libre; + } + $sProfil_acheteur_accession_libres=json_encode(array($sDataArrayName=>$aProfil_acheteur_accession_libres2,"list_count"=>$aProfil_acheteur_accession_libres['list_count'],"total_row_number"=>$aProfil_acheteur_accession_libres['total_row_number'],"status"=>$aProfil_acheteur_accession_libres['status'])); + //error_log($sProfil_acheteur_accession_libres); + return $sProfil_acheteur_accession_libres; + } + } + + /** + * get type_acheteur_accession_libre of profil_acheteur_accession_libre + */ + function getType_acheteur_accession_libre($sCodeTypeProfil_acheteur_accession_libre) { + if(isset($sCodeTypeProfil_acheteur_accession_libre) and !is_null($sCodeTypeProfil_acheteur_accession_libre)){ + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'prod_immo', 'type' => 'schema_name'); + $aParams['id_type_acheteur_accession_libre'] = array('value' => $sCodeTypeProfil_acheteur_accession_libre, 'type' => 'number'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getType_acheteur_accession_libre'], $aParams); + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + return $aLigne["type_acheteur_accession_libre"]; + }else{ + return null; + } + } + + /** + * @SWG\Post(path="/profil_acheteur_accession_libres", + * tags={"profil acheteur accession libre"}, + * summary="Add profil_acheteur_accession_libre", + * description="Request to add profil acheteur accession libre", + * operationId="POST", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="profil_acheteur_accession_libre Response", + * @SWG\Schema(ref="#/definitions/profil_acheteur_accession_libres") + * ) + * ) + */ + + /** + * insert profil_acheteur_accession_libre + * @return id of the profil_acheteur_accession_libre created + */ + function POST(){ + require $this->sRessourcesFile; + // get value sequence from suivi_prod_immo database to set id + $oConnexion = new PDO('pgsql:host=\'srv-postgres\' port=5432 dbname=\'suivi_prod_immo\'', $_SESSION["ses_Login"], trim(des(rtrim(utf8_decode($_SESSION["ses_Login"])), hexToString(rtrim($_SESSION["ses_Password"])), 0, 0, null))); + $oPDOresult = $oConnexion->query($aSql['getSequenceProfil_acheteur_accession_libre']); + if (!$oPDOresult) { + $aError=$oConnexion->errorInfo(); + error_log($aError[2]); + }else{ + $aResult = $oPDOresult->fetch(PDO::FETCH_ASSOC); + $this->aValues['id_profil_acheteur_accession_libre'] = $aResult['nextval']; + } + $aReturn = $this->genericPost('prod_immo', 'profil_acheteur_accession_libre', null, 'id_profil_acheteur_accession_libre'); + return $aReturn['sMessage']; + } + + /** + * @SWG\Put(path="/profil_acheteur_accession_libres/{id_profil_acheteur_accession_libre}", + * tags={"profil acheteur accession libre"}, + * summary="update profil acheteur accession libre", + * description="Request to update profil acheteur accession libre", + * operationId="PUT", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_profil_acheteur_accession_libre", + * in="path", + * description="id of the profil acheteur accession libre", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/profil_acheteur_accession_libres") + * ) + * ) + */ + + /** + * update profil_acheteur_accession_libres + * @return id of profil_acheteur_accession_libres updated or error object if a profil_acheteur_accession_libres is not updated + */ + function PUT() { + $aReturn = $this->genericPut('prod_immo', 'profil_acheteur_accession_libre', 'id_profil_acheteur_accession_libre'); + return $aReturn['sMessage']; + } + + /** + * @SWG\Delete(path="/profil_acheteur_accession_libres", + * tags={"profil acheteur accession libre"}, + * summary="delete profil acheteur accession libre", + * description="Request to delete profil acheteur accession libre", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="idList", + * in="query", + * description="id of the profil acheteur accession libre", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="profil acheteur accession libre Response", + * @SWG\Schema(ref="#/definitions/profil_acheteur_accession_libres") + * ) + * ) + */ + /** + * @SWG\Delete(path="/profil_acheteur_accession_libres/{id_profil_acheteur_accession_libre}", + * tags={"profil acheteur accession libre"}, + * summary="delete profil acheteur accession libre", + * description="Request to delete profil acheteur accession libre", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Traitement token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_profil_acheteur_accession_libre", + * in="path", + * description="id of the profil acheteur accession libre", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/profil_acheteur_accession_libres") + * ) + * ) + */ + + /** + * delete profil_acheteur_accession_libres + * @return id of profil_acheteur_accession_libres deleted or error object if a profil_acheteur_accession_libres is not deleted + */ + function DELETE() { + $aReturn = $this->genericDelete('prod_immo', 'profil_acheteur_accession_libre', 'id_profil_acheteur_accession_libre'); + return $aReturn['sMessage']; + } +} + +?> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/web_service/ws/Programme.class.inc b/src/module_suivi_prod_immo/web_service/ws/Programme.class.inc index 67f3d6ba9ebe3d7b2cf18875a6e43f71c081a74d..5fd111e4195161fc969b07459faa2cb1ca050d7f 100644 --- a/src/module_suivi_prod_immo/web_service/ws/Programme.class.inc +++ b/src/module_suivi_prod_immo/web_service/ws/Programme.class.inc @@ -16,7 +16,7 @@ require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/class/vitis_lib/Connection */ class Programme extends Suivi_prod_immo { - + public $oError; /** @@ -42,6 +42,8 @@ class Programme extends Suivi_prod_immo { $this->getCommune(); $this->getTypeOperateur(); $this->getModeConsultation(); + $this->getLogementFamLocation(); + $this->getHabitatSpecifique(); // Date de mise à jour $date_mise_a_jour = new DateTime($this->aFields['date_mise_a_jour']); $this->aFields['date_mise_a_jour'] = $date_mise_a_jour->format('d/m/Y'); @@ -115,6 +117,40 @@ class Programme extends Suivi_prod_immo { $oPDOresult = $this->oConnection->oBd->fermeResultat(); } } + + /** + * get logement fammilliaux location of programme + */ + function getLogementFamLocation(){ + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'prod_immo', 'type' => 'schema_name'); + $aParams['id_programme'] = array('value' => $this->aFields['id_programme'], 'type' => 'number'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getLogementFamLocation'], $aParams); + if($oPDOresult!=false){ + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $this->aFields['logement_familliaux_location_nom_bailleur'] = $aLigne["nom_bailleur"]; + $this->aFields['logement_familliaux_location_nom_investisseur'] = $aLigne["nom_investisseur"]; + $this->aFields['id_logement_familliaux_location'] = $aLigne["id_logement_familliaux_location"]; + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + } + } + + /** + * get habitat spécifique of programme + */ + function getHabitatSpecifique(){ + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'prod_immo', 'type' => 'schema_name'); + $aParams['id_programme'] = array('value' => $this->aFields['id_programme'], 'type' => 'number'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getHabitatSpecifique'], $aParams); + if($oPDOresult!=false){ + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $this->aFields['habitat_specifique_nom_bailleur'] = $aLigne["nom_bailleur"]; + $this->aFields['habitat_specifique_nom_gestionnaire'] = $aLigne["nom_gestionnaire"]; + $this->aFields['id_habitat_specifique'] = $aLigne["id_habitat_specifique"]; + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + } + } function replaceOuiNonLes2($sValue){ switch ($sValue) { diff --git a/src/module_suivi_prod_immo/web_service/ws/ProgrammeLastUpdate.class.inc b/src/module_suivi_prod_immo/web_service/ws/ProgrammeLastUpdate.class.inc index 59c0640fa06e62534280a19257b686480be6a1e6..17dcde91fbe33a8bcaf851c7bf3675c109d6536c 100644 --- a/src/module_suivi_prod_immo/web_service/ws/ProgrammeLastUpdate.class.inc +++ b/src/module_suivi_prod_immo/web_service/ws/ProgrammeLastUpdate.class.inc @@ -45,10 +45,9 @@ class ProgrammeLastUpdate extends Suivi_prod_immo { /** * @SWG\Get(path="/programmelastupdate/{iIdProgramme}/{sAttributeName}", - * tags={"Parcelle"}, - * summary="Get the tooltip "last update" content", - * description="Request to get tooltip "last update" content", - * programmeId="GET", + * tags={"Programme"}, + * summary="Get the tooltip 'last update' content", + * description="Request to get tooltip 'last update' content", * produces={"application/json"}, * @SWG\Parameter( * name="token", @@ -69,7 +68,7 @@ class ProgrammeLastUpdate extends Suivi_prod_immo { * in="path", * description="sAttributeName", * required=true, - * type="sting" + * type="string" * ), * @SWG\Response( * response=200, diff --git a/src/module_suivi_prod_immo/web_service/ws/Programmes.class.inc b/src/module_suivi_prod_immo/web_service/ws/Programmes.class.inc index 1a70c95d76369f621d4932a0978cd3bad670972e..3cbf19d2d8a7b7a83c3bd054adcfd05b8e93800e 100644 --- a/src/module_suivi_prod_immo/web_service/ws/Programmes.class.inc +++ b/src/module_suivi_prod_immo/web_service/ws/Programmes.class.inc @@ -120,20 +120,23 @@ class Programmes extends Suivi_prod_immo { * @return Programmes */ function GET() { - $aReturn = $this->genericGet('prod_immo', "programme_immobilier", "id_programme"); - $sMessage = $aReturn['sMessage']; - $aProgrammes=json_decode($aReturn['sMessage'],true); - $aProgrammes2=array(); - foreach ($aProgrammes['programmes'] as $aProgramme){ - unset($aProgramme['geom']); - $aProgramme['nom_commune']= $this->getCommune($aProgramme['id_commune']); - $aProgramme['nom_ilot']= $this->getIlot($aProgramme['id_ilot']); - $aProgramme['nom_operation']= $this->getOperation($aProgramme['id_ilot']); - $aProgrammes2[count($aProgrammes2)]=$aProgramme; + if($this->setRestriction()){ + $aReturn = $this->genericGet('prod_immo', "programme_immobilier", "id_programme"); + $aProgrammes=json_decode($aReturn['sMessage'],true); + $aProgrammes2=array(); + foreach ($aProgrammes['programmes'] as $aProgramme){ + unset($aProgramme['geom']); + $aProgramme['nom_commune']= $this->getCommune($aProgramme['id_commune']); + $aProgramme['nom_ilot']= $this->getIlot($aProgramme['id_ilot']); + $aProgramme['nom_operation']= $this->getOperation($aProgramme['id_ilot']); + $aProgrammes2[count($aProgrammes2)]=$aProgramme; + } + $sProgrammes=json_encode(array("programmes"=>$aProgrammes2,"list_count"=>$aProgrammes['list_count'],"total_row_number"=>$aProgrammes['total_row_number'],"status"=>$aProgrammes['status'])); + return $sProgrammes; + }else{ + // si pas d'autorisation, on retourne une liste vide + return json_encode(array("list_count"=>0,"total_row_number"=>0,"status"=>1)); } - $sProgrammes=json_encode(array("programmes"=>$aProgrammes2,"list_count"=>$aProgrammes['list_count'],"total_row_number"=>$aProgrammes['total_row_number'],"status"=>$aProgrammes['status'])); - //error_log($sProgrammes); - return $sProgrammes; } /** @@ -187,10 +190,53 @@ class Programmes extends Suivi_prod_immo { } } + /** + * set filter restriction for user connected + */ + function setRestriction(){ + require $this->sRessourcesFile; + $aParams = array(); + $aParams['sSchemaFramework'] = array('value' => 'prod_immo', 'type' => 'schema_name'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getRestrictionUpdate'], $aParams); + if($oPDOresult->rowCount()==1){ + // le user existe dans la table de restriction + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + $oPDOresult2 = $this->oConnection->oBd->executeWithParams($aSql['getRestrictionUpdateIdIlot'], $aParams); + if($oPDOresult2->rowCount()>0){ + // il y a un ou plusieurs ID pour le user, on filtre + $aID=array(); + while ($aIdIlot=$this->oConnection->oBd->ligneSuivante($oPDOresult2)){ + $aID[]=$aIdIlot["id_ilot"]; + } + $oPDOresult2=$this->oConnection->oBd->fermeResultat(); + // injection du filtre + if (isset($this->aValues['filter'])){ + // il existe d�j� un filtre + $aFilter=json_decode($this->aValues['filter'],true); + $aOperators=$aFilter['operators']; + $aOperators[]=array("column"=>"id_ilot","compare_operator"=>"IN","value"=>$aID); + $aFilter['operators']=$aOperators; + $this->aValues['filter']=json_encode($aFilter); + }else{ + // il n'y a pas de filtre, on le cr�e + $this->aValues['filter']=json_encode(array('relation'=>'AND','operators'=>array(array("column"=>"id_ilot","compare_operator"=>"IN","value"=>$aID)))); + } + return true; + }else{ + return false; + } + }else{ + // le user n'existe pas dans la table de restriction, on affiche rien + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + error_log("Aucunes op�rations autoris�es en saisie, ajouter l'utilisateur dans la table prod_immo.user_restriction ."); + return false; + } + } + /** * @SWG\Post(path="/programmes", * tags={"Programmes"}, - * summary="Add traitement", + * summary="Add programme", * description="Request to add Programmes", * operationId="POST", * produces={"application/xml", "application/json"}, @@ -203,15 +249,15 @@ class Programmes extends Suivi_prod_immo { * ), * @SWG\Response( * response=200, - * description="traitement Response", + * description= Response", * @SWG\Schema(ref="#/definitions/programmes") * ) * ) */ /** - * insert traitement - * @return id of the traitement created + * insert programme + * @return id of the programme created */ function POST() { //$this->aValues['create'] = $_SESSION["ses_Login"]; @@ -255,10 +301,53 @@ class Programmes extends Suivi_prod_immo { * @return id of programmes updated or error object if a programmes is not updated */ function PUT() { - /*if (empty($this->aValues['maj'])) - $this->aValues['maj'] = $_SESSION["ses_Login"]; - if (empty($this->aValues['maj_date'])) - $this->aValues['maj_date'] = date('Y-m-d');*/ + require $this->sRessourcesFile; + $oConnection=$this->oConnection->oBd; + $aParams['sSchemaFramework'] = array('value' => 'prod_immo', 'type' => 'schema_name'); + $aParams['id_programme'] = array('value' => $this->aValues['my_vitis_id'], 'type' => 'number'); + if(isset($this->aValues['logement_familliaux_location_nom_bailleur'])){ + $aParams['nom_bailleur'] = array('value' => $this->aValues['logement_familliaux_location_nom_bailleur'], 'type' => 'string'); + $oPDOresult = $oConnection->executeWithParams($aSql['setLogementFamilliauxLocationNomBailleur'], $aParams); + if (!$oPDOresult){ + $aError=$oConnection->errorInfo(); + error_log($aError[2]); + } + $oPDOresult = $oConnection->fermeResultat(); + unset($this->aValues['logement_familliaux_location_nom_bailleur']); + unset($aParams['nom_bailleur']); + } + if(isset($this->aValues['logement_familliaux_location_nom_investisseur'])){ + $aParams['nom_investisseur'] = array('value' => $this->aValues['logement_familliaux_location_nom_investisseur'], 'type' => 'string'); + $oPDOresult = $oConnection->executeWithParams($aSql['setLogementFamilliauxLocationNomInvestisseur'], $aParams); + if (!$oPDOresult){ + $aError=$oConnection->errorInfo(); + error_log($aError[2]); + } + $oPDOresult = $oConnection->fermeResultat(); + unset($this->aValues['logement_familliaux_location_nom_investisseur']); + unset($aParams['nom_investisseur']); + } + if(isset($this->aValues['habitat_specifique_nom_bailleur'])){ + $aParams['nom_bailleur'] = array('value' => $this->aValues['habitat_specifique_nom_bailleur'], 'type' => 'string'); + $oPDOresult = $oConnection->executeWithParams($aSql['setHabitatSpecifiqueNomBailleur'], $aParams); + if (!$oPDOresult){ + $aError=$oConnection->errorInfo(); + error_log($aError[2]); + } + $oPDOresult = $oConnection->fermeResultat(); + unset($this->aValues['habitat_specifique_nom_bailleur']); + unset($aParams['nom_bailleur']); + } + if(isset($this->aValues['habitat_specifique_nom_gestionnaire'])){ + $aParams['nom_gestionnaire'] = array('value' => $this->aValues['habitat_specifique_nom_gestionnaire'], 'type' => 'string'); + $oPDOresult = $oConnection->executeWithParams($aSql['setHabitatSpecifiqueNomGestionnaire'], $aParams); + if (!$oPDOresult){ + $aError=$oConnection->errorInfo(); + error_log($aError[2]); + } + $oPDOresult = $oConnection->fermeResultat(); + unset($this->aValues['habitat_specifique_nom_gestionnaire']); + } $aReturn = $this->genericPut('prod_immo', 'programme_immobilier', 'id_programme'); return $aReturn['sMessage']; } @@ -280,13 +369,13 @@ class Programmes extends Suivi_prod_immo { * * @SWG\Parameter( * name="idList", * in="query", - * description="id of the traitement", + * description="id of the programme", * required=true, * type="string" * ), * @SWG\Response( * response=200, - * description="traitement Response", + * description="Response", * @SWG\Schema(ref="#/definitions/programmes") * ) * ) @@ -301,7 +390,7 @@ class Programmes extends Suivi_prod_immo { * @SWG\Parameter( * name="token", * in="query", - * description="Traitement token", + * description="token", * required=true, * type="string" * ), diff --git a/src/module_suivi_prod_immo/web_service/ws/Repartition_type_logement.class.inc b/src/module_suivi_prod_immo/web_service/ws/Repartition_type_logement.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..c6ea5739a6e38c7d342c581e825d8ef30a22d330 --- /dev/null +++ b/src/module_suivi_prod_immo/web_service/ws/Repartition_type_logement.class.inc @@ -0,0 +1,57 @@ +<?php + +require_once __DIR__ . '/Suivi_prod_immo.class.inc'; +require_once __DIR__ . '/../../../vitis/vas/rest/class/vitis_lib/Connection.class.inc'; + +/** + * \file Suivi_prod_immo.class.inc + * \class Suivi_prod_immo + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Suivi_prod_immo php class + * + * This class defines repartition_type_logement for one Suivi_prod_immo + * + */ + +class Repartition_type_logement extends Suivi_prod_immo { + + public $oError; + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + * @param type $oConnection connection object + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $this->aProperties); + } + + /** + * get informations about repartition_type_logement + */ + function GET() { + $this->aFields = $this->getFields('prod_immo', "repartition_type_logement", "id_repartition_type_logement"); + } + + /** + * delete a repartition_type_logement + */ + function DELETE() { + $this->oConnection->oBd->delete('prod_immo', 'repartition_type_logement', 'id_repartition_type_logement', $this->aValues["my_vitis_id"], 'integer'); + if ($this->oConnection->oBd->enErreur()) { + $this->oError = new VitisError(1, $this->oConnection->oBd->getBDMessage()); + } else { + $this->aFields["id_repartition_type_logement"] = $this->aValues["my_vitis_id"]; + } + } + +} + +?> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/web_service/ws/Repartition_type_logements.class.inc b/src/module_suivi_prod_immo/web_service/ws/Repartition_type_logements.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..4e3af863a4ed30f921fc8430e637141c292e256c --- /dev/null +++ b/src/module_suivi_prod_immo/web_service/ws/Repartition_type_logements.class.inc @@ -0,0 +1,328 @@ +<?php + +/** + * \file Repartition_type_logements.class.inc + * \class Repartition_type_logements + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Repartition_type_logements php class + * + * This class defines Rest Api to Vitis Repartition_type_logements + * + */ +require_once __DIR__ . '/Suivi_prod_immo.class.inc'; +require_once 'Repartition_type_logement.class.inc'; + + +class Repartition_type_logements extends Suivi_prod_immo { + /** + * @SWG\Definition( + * definition="/repartition_type_logements", + * allOf={ + * @SWG\Schema(ref="#/definitions/repartition_type_logements") + * } + * ) + * * @SWG\Tag( + * name="Repartition_type_logements", + * description="Repartition_type_logements about Repartition_type_logements" + * ) + */ + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $properties); + } + + /** + * @SWG\Get(path="/repartition_type_logements", + * tags={"Repartition_type_logements"}, + * summary="Get Repartition_type_logements", + * description="Request to get Repartition_type_logements", + * operationId="GET", + * produces={"application/xml", "application/json", "application/x-vm-json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="order_by", + * in="query", + * description="list of ordering fields", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="sort_order", + * in="query", + * description="sort_order", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="limit", + * in="query", + * description="number of element", + * required=false, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="offset", + * in="query", + * description="index of first element", + * required=false, + * type="string", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="filter", + * in="query", + * description="filter results", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="distinct", + * in="query", + * description="delete duplicates", + * required=false, + * type="boolean" + * ), + * @SWG\Response( + * response=200, + * description="traitement Response", + * @SWG\Schema(ref="#/definitions/repartition_type_logements") + * ) + * ) + */ + + /** + * get Repartition_type_logements + * @return Repartition_type_logements + */ + function GET() { + $aReturn = $this->genericGet('prod_immo', "repartition_type_logement", "id_repartition_type_logement"); + // $sMessage = $aReturn['sMessage']; + $aRepartitionTypeLogements=json_decode($aReturn['sMessage'],true); + if(isset($aRepartitionTypeLogements['repartition_type_logements'])){ + $aRepartitionTypeLogementsData=$aRepartitionTypeLogements['repartition_type_logements']; + $sDataArrayName="repartition_type_logements"; + }else{ + $aRepartitionTypeLogementsData=$aRepartitionTypeLogements['data']; + $sDataArrayName="data"; + } + // error_log(print_r($aRepartitionTypeLogements,true)); + $aRepartitionTypeLogements2=array(); + foreach ($aRepartitionTypeLogementsData as $aRepartitionTypeLogement){ + $aRepartitionTypeLogement['repartition']= $this->getRepartition($aRepartitionTypeLogement['code_repartition']); + $aRepartitionTypeLogement['type_logement']= $this->getTypeLogement($aRepartitionTypeLogement['code_type_logement']); + $aRepartitionTypeLogements2[count($aRepartitionTypeLogements2)]=$aRepartitionTypeLogement; + } + $sRepartitionTypeLogements=json_encode(array($sDataArrayName=>$aRepartitionTypeLogements2,"list_count"=>$aRepartitionTypeLogements['list_count'],"total_row_number"=>$aRepartitionTypeLogements['total_row_number'],"status"=>$aRepartitionTypeLogements['status'])); + //error_log($sRepartitionTypeLogements); + return $sRepartitionTypeLogements; + } + + /** + * get repartition of repartition_type_logement + */ + function getRepartition($sCodeRepartition) { + if(isset($sCodeRepartition) and !is_null($sCodeRepartition)){ + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'prod_immo', 'type' => 'schema_name'); + $aParams['code_repartition'] = array('value' => $sCodeRepartition, 'type' => 'string'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getRepartition'], $aParams); + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + return $aLigne["repartition"]; + }else{ + return null; + } + } + + /** + * get type_logement of repartition_type_logement + */ + function getTypeLogement($sCodeTypeLogement) { + if(isset($sCodeTypeLogement) and !is_null($sCodeTypeLogement)){ + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'prod_immo', 'type' => 'schema_name'); + $aParams['code_type_logement'] = array('value' => $sCodeTypeLogement, 'type' => 'string'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getTypeLogement'], $aParams); + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + return $aLigne["type_logement"]; + }else{ + return null; + } + } + + /** + * @SWG\Post(path="/repartition_type_logements", + * tags={"Repartition type logements"}, + * summary="Add repartition_type_logement", + * description="Request to add Repartition type logements", + * operationId="POST", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="repartition_type_logement Response", + * @SWG\Schema(ref="#/definitions/repartition_type_logements") + * ) + * ) + */ + + /** + * insert repartition_type_logement + * @return id of the repartition_type_logement created + */ + function POST(){ + require $this->sRessourcesFile; + // get value sequence from suivi_prod_immo database to set id + $oConnexion = new PDO('pgsql:host=\'srv-postgres\' port=5432 dbname=\'suivi_prod_immo\'', $_SESSION["ses_Login"], trim(des(rtrim(utf8_decode($_SESSION["ses_Login"])), hexToString(rtrim($_SESSION["ses_Password"])), 0, 0, null))); + $oPDOresult = $oConnexion->query($aSql['getSequenceRepartition_type_logement']); + if (!$oPDOresult) { + $aError=$oConnexion->errorInfo(); + error_log($aError[2]); + }else{ + $aResult = $oPDOresult->fetch(PDO::FETCH_ASSOC); + $this->aValues['id_repartition_type_logement'] = $aResult['nextval']; + } + $aReturn = $this->genericPost('prod_immo', 'repartition_type_logement', null, 'id_repartition_type_logement'); + return $aReturn['sMessage']; + } + + /** + * @SWG\Put(path="/repartition_type_logements/{id_repartition_type_logement}", + * tags={"Répartitions"}, + * summary="update Répartitions", + * description="Request to update Répartitions", + * operationId="PUT", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_repartition_type_logement", + * in="path", + * description="id of the Répartitions", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/repartition_type_logements") + * ) + * ) + */ + + /** + * update repartition_type_logements + * @return id of repartition_type_logements updated or error object if a repartition_type_logements is not updated + */ + function PUT() { + $aReturn = $this->genericPut('prod_immo', 'repartition_type_logement', 'id_repartition_type_logement'); + return $aReturn['sMessage']; + } + + /** + * @SWG\Delete(path="/repartition_type_logements", + * tags={"Répartitions"}, + * summary="delete Répartitions", + * description="Request to delete Répartitions", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="idList", + * in="query", + * description="id of the traitement", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="traitement Response", + * @SWG\Schema(ref="#/definitions/repartition_type_logements") + * ) + * ) + */ + /** + * @SWG\Delete(path="/repartition_type_logements/{id_repartition_type_logement}", + * tags={"Répartitions"}, + * summary="delete Répartitions", + * description="Request to delete Répartitions", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Traitement token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_repartition_type_logement", + * in="path", + * description="id of the Répartitions", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/repartition_type_logements") + * ) + * ) + */ + + /** + * delete repartition_type_logements + * @return id of repartition_type_logements deleted or error object if a repartition_type_logements is not deleted + */ + function DELETE() { + $aReturn = $this->genericDelete('prod_immo', 'repartition_type_logement', 'id_repartition_type_logement'); + return $aReturn['sMessage']; + } +} + +?> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/web_service/ws/Stationnement.class.inc b/src/module_suivi_prod_immo/web_service/ws/Stationnement.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..e19fc6ef869f54dc3440e18548d189c934da1f18 --- /dev/null +++ b/src/module_suivi_prod_immo/web_service/ws/Stationnement.class.inc @@ -0,0 +1,57 @@ +<?php + +require_once __DIR__ . '/Suivi_prod_immo.class.inc'; +require_once __DIR__ . '/../../../vitis/vas/rest/class/vitis_lib/Connection.class.inc'; + +/** + * \file Suivi_prod_immo.class.inc + * \class Suivi_prod_immo + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Suivi_prod_immo php class + * + * This class defines stationnement for one Suivi_prod_immo + * + */ + +class Stationnement extends Suivi_prod_immo { + + public $oError; + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + * @param type $oConnection connection object + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $this->aProperties); + } + + /** + * get informations about stationnement + */ + function GET() { + $this->aFields = $this->getFields('prod_immo', "stationnement", "id_stationnement"); + } + + /** + * delete a stationnement + */ + function DELETE() { + $this->oConnection->oBd->delete('prod_immo', 'stationnement', 'id_stationnement', $this->aValues["my_vitis_id"], 'integer'); + if ($this->oConnection->oBd->enErreur()) { + $this->oError = new VitisError(1, $this->oConnection->oBd->getBDMessage()); + } else { + $this->aFields["id_stationnement"] = $this->aValues["my_vitis_id"]; + } + } + +} + +?> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/web_service/ws/Stationnements.class.inc b/src/module_suivi_prod_immo/web_service/ws/Stationnements.class.inc new file mode 100644 index 0000000000000000000000000000000000000000..20aa38ca702afee2d9ff6ca269b52136489b4cb6 --- /dev/null +++ b/src/module_suivi_prod_immo/web_service/ws/Stationnements.class.inc @@ -0,0 +1,313 @@ +<?php + +/** + * \file Stationnements.class.inc + * \class Stationnements + * + * \author Fabien Marty <f.marty@urbalyon.org>. + * + * \brief This file contains the Stationnements php class + * + * This class defines Rest Api to Vitis Stationnements + * + */ +require_once __DIR__ . '/Suivi_prod_immo.class.inc'; +require_once 'Stationnement.class.inc'; + + +class Stationnements extends Suivi_prod_immo { + /** + * @SWG\Definition( + * definition="/stationnements", + * allOf={ + * @SWG\Schema(ref="#/definitions/stationnements") + * } + * ) + * * @SWG\Tag( + * name="Stationnements", + * description="Stationnements about Stationnements" + * ) + */ + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + */ + function __construct($aPath, $aValues, $properties) { + $this->aValues = $aValues; + $this->aPath = $aPath; + $this->aProperties = $properties; + $this->oConnection = new Connection($this->aValues, $properties); + } + + /** + * @SWG\Get(path="/stationnements", + * tags={"Stationnements"}, + * summary="Get Stationnements", + * description="Request to get Stationnements", + * operationId="GET", + * produces={"application/xml", "application/json", "application/x-vm-json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="order_by", + * in="query", + * description="list of ordering fields", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="sort_order", + * in="query", + * description="sort_order", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="limit", + * in="query", + * description="number of element", + * required=false, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="offset", + * in="query", + * description="index of first element", + * required=false, + * type="string", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="filter", + * in="query", + * description="filter results", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="distinct", + * in="query", + * description="delete duplicates", + * required=false, + * type="boolean" + * ), + * @SWG\Response( + * response=200, + * description="traitement Response", + * @SWG\Schema(ref="#/definitions/stationnements") + * ) + * ) + */ + + /** + * get Stationnements + * @return Stationnements + */ + function GET() { + $aReturn = $this->genericGet('prod_immo', "stationnement", "id_stationnement"); + $aStationnements=json_decode($aReturn['sMessage'],true); + if(isset($aStationnements['stationnements'])){ + $aStationnementsData=$aStationnements['stationnements']; + $sDataArrayName="stationnements"; + }elseif (isset($aStationnements['data'])){ + $aStationnementsData=$aStationnements['data']; + $sDataArrayName="data"; + }else{ + return $aReturn['sMessage']; + } + if(isset($aStationnementsData)){ + // error_log(print_r($aStationnements,true)); + $aStationnements2=array(); + foreach ($aStationnementsData as $aStationnement){ + $aStationnement['indicateur_stationnement']= $this->getIndicateur_stationnement($aStationnement['id_indicateur_stationnement']); + $aStationnements2[count($aStationnements2)]=$aStationnement; + } + $sStationnements=json_encode(array($sDataArrayName=>$aStationnements2,"list_count"=>$aStationnements['list_count'],"total_row_number"=>$aStationnements['total_row_number'],"status"=>$aStationnements['status'])); + //error_log($sStationnements); + return $sStationnements; + } + } + + /** + * get indicateur_stationnement of stationnement + */ + function getIndicateur_stationnement($iIndicateurStationnement) { + if(isset($iIndicateurStationnement) and !is_null($iIndicateurStationnement)){ + require $this->sRessourcesFile; + $aParams['sSchemaFramework'] = array('value' => 'prod_immo', 'type' => 'schema_name'); + $aParams['id_indicateur_stationnement'] = array('value' => $iIndicateurStationnement, 'type' => 'string'); + $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getIndicateur_stationnement'], $aParams); + $aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult); + $oPDOresult = $this->oConnection->oBd->fermeResultat(); + return $aLigne["indicateur_stationnement"]; + }else{ + return null; + } + } + + /** + * @SWG\Post(path="/stationnements", + * tags={"stationnement"}, + * summary="Add stationnement", + * description="Request to add stationnement", + * operationId="POST", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="stationnement Response", + * @SWG\Schema(ref="#/definitions/stationnements") + * ) + * ) + */ + + /** + * insert stationnement + * @return id of the stationnement created + */ + function POST(){ + require $this->sRessourcesFile; + // get value sequence from suivi_prod_immo database to set id + $oConnexion = new PDO('pgsql:host=\'srv-postgres\' port=5432 dbname=\'suivi_prod_immo\'', $_SESSION["ses_Login"], trim(des(rtrim(utf8_decode($_SESSION["ses_Login"])), hexToString(rtrim($_SESSION["ses_Password"])), 0, 0, null))); + $oPDOresult = $oConnexion->query($aSql['getSequenceStationnement']); + if (!$oPDOresult) { + $aError=$oConnexion->errorInfo(); + error_log($aError[2]); + }else{ + $aResult = $oPDOresult->fetch(PDO::FETCH_ASSOC); + $this->aValues['id_stationnement'] = $aResult['nextval']; + } + $aReturn = $this->genericPost('prod_immo', 'stationnement', null, 'id_stationnement'); + return $aReturn['sMessage']; + } + + /** + * @SWG\Put(path="/stationnements/{id_stationnement}", + * tags={"stationnement"}, + * summary="update stationnement", + * description="Request to update stationnement", + * operationId="PUT", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_stationnement", + * in="path", + * description="id of the stationnement", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/stationnements") + * ) + * ) + */ + + /** + * update stationnements + * @return id of stationnements updated or error object if a stationnements is not updated + */ + function PUT() { + $aReturn = $this->genericPut('prod_immo', 'stationnement', 'id_stationnement'); + return $aReturn['sMessage']; + } + + /** + * @SWG\Delete(path="/stationnements", + * tags={"stationnement"}, + * summary="delete stationnement", + * description="Request to delete stationnement", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="idList", + * in="query", + * description="id of the stationnement", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="stationnement Response", + * @SWG\Schema(ref="#/definitions/stationnements") + * ) + * ) + */ + /** + * @SWG\Delete(path="/stationnements/{id_stationnement}", + * tags={"stationnement"}, + * summary="delete stationnement", + * description="Request to delete stationnement", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Traitement token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_stationnement", + * in="path", + * description="id of the stationnement", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/stationnements") + * ) + * ) + */ + + /** + * delete stationnements + * @return id of stationnements deleted or error object if a stationnements is not deleted + */ + function DELETE() { + $aReturn = $this->genericDelete('prod_immo', 'stationnement', 'id_stationnement'); + return $aReturn['sMessage']; + } +} + +?> \ No newline at end of file diff --git a/src/module_suivi_prod_immo/web_service/ws/Suivi_prod_immo.class.sql.inc b/src/module_suivi_prod_immo/web_service/ws/Suivi_prod_immo.class.sql.inc index fa773e4a985a19d752fbaf2546f7338fc164ef45..02e97329ea197a2920a93b9e140348b0c7efd9f8 100644 --- a/src/module_suivi_prod_immo/web_service/ws/Suivi_prod_immo.class.sql.inc +++ b/src/module_suivi_prod_immo/web_service/ws/Suivi_prod_immo.class.sql.inc @@ -15,6 +15,9 @@ $aSql['insertOperationCommunes'] = "INSERT INTO [sSchemaFramework].operation_com // CTM $aSql['getOperationCTM'] = "SELECT operation_ctm.id_ctm, \"conference_territoriale_maire\".nom_ctm FROM [sSchemaFramework].operation_ctm LEFT JOIN [sSchemaFramework].conference_territoriale_maire ON operation_ctm.id_ctm = \"conference_territoriale_maire\".id_ctm WHERE operation_ctm.id_operation = [id_operation]"; $aSql['insertOperationCTM'] = "INSERT INTO [sSchemaFramework].operation_ctm(id_ctm, id_operation) VALUES([id_ctm], [id_operation])"; +// Perimetres +$aSql['getOperationPerimetre'] = "SELECT operation_perimetre.id_perimetre, \"perimetre\".nom_perimetre FROM [sSchemaFramework].operation_perimetre LEFT JOIN [sSchemaFramework].perimetre ON operation_perimetre.id_perimetre = \"perimetre\".id_perimetre WHERE operation_perimetre.id_operation = [id_operation]"; +$aSql['insertOperationPerimetre'] = "INSERT INTO [sSchemaFramework].operation_perimetre(id_perimetre, id_operation) VALUES([id_perimetre], [id_operation])"; // Modes financement $aSql['getOperationModesFinancement'] = "SELECT operation_tr_financement_equ_public.code_financement_equ_public, \"tr_financement_equ_public\".financement_equ_public FROM [sSchemaFramework].operation_tr_financement_equ_public LEFT JOIN [sSchemaFramework].tr_financement_equ_public ON operation_tr_financement_equ_public.code_financement_equ_public = \"tr_financement_equ_public\".code_financement_equ_public WHERE operation_tr_financement_equ_public.id_operation = [id_operation]"; $aSql['insertOperationModesFinancement'] = "INSERT INTO [sSchemaFramework].operation_tr_financement_equ_public(code_financement_equ_public, id_operation) VALUES([code_financement_equ_public], [id_operation])"; @@ -40,10 +43,63 @@ $aSql['getSuivi'] = "SELECT \"tr_suivi\".code_suivi, \"tr_suivi\".suivi FROM [sS $aSql['getProcedureAmenagement'] = "SELECT \"tr_procedure_amenagement\".code_procedure_amenagement, \"tr_procedure_amenagement\".procedure_amenagement FROM [sSchemaFramework].tr_procedure_amenagement WHERE code_procedure_amenagement = [code_procedure_amenagement]"; // Vocation $aSql['getVocation'] = "SELECT \"tr_vocation\".code_vocation, \"tr_vocation\".vocation FROM [sSchemaFramework].tr_vocation WHERE code_vocation = [code_vocation]"; +// Logement Familliaux Location +$aSql['getLogementFamLocation'] = "SELECT nom_bailleur, nom_investisseur, id_logement_familliaux_location FROM [sSchemaFramework].logement_familliaux_location WHERE id_programme=[id_programme]"; +// Logement Habitat spécifique +$aSql['getHabitatSpecifique'] = "SELECT nom_bailleur, nom_gestionnaire, id_habitat_specifique FROM [sSchemaFramework].habitat_specifique WHERE id_programme =[id_programme]"; +// Répartition logement +$aSql['getRepartition'] = "SELECT repartition FROM prod_immo.repartition WHERE code_repartition =[code_repartition]"; +$aSql['getTypeLogement'] = "SELECT type_logement FROM prod_immo.type_logement WHERE code_type_logement =[code_type_logement]"; +$aSql['getSequenceRepartition_type_logement'] = "SELECT nextval('prod_immo.repartition_type_logement_id_repartition_type_logement_seq')"; +// Granulométrie +$aSql['getCompositionProgramme'] = "SELECT composition_programme FROM prod_immo.composition_programme WHERE code_composition_programme =[code_composition_programme]"; +$aSql['getTypeGranulometrie'] = "SELECT type_granulometrie FROM prod_immo.type_granulometrie WHERE code_type_granulometrie =[code_type_granulometrie]"; +$aSql['getSequenceGranulometrie'] = "SELECT nextval('prod_immo.granulometrie_id_granulometrie_seq')"; +// Logement familliaux en accession +$aSql['getIndicateur_logement_familliaux_accession'] = "SELECT indicateur_logement_familliaux_accession FROM prod_immo.indicateur_logement_familliaux_accession WHERE id_indicateur_logement_familliaux_accession =[id_indicateur_logement_familliaux_accession]"; +$aSql['getSequenceLogement_familliaux_accession'] = "SELECT nextval('prod_immo.logement_familliaux_accession_id_logement_familliaux_access_seq')"; +// Profil acheteur accession libre +$aSql['getType_acheteur_accession_libre'] = "SELECT type_acheteur_accession_libre FROM prod_immo.type_acheteur_accession_libre WHERE id_type_acheteur_accession_libre =[id_type_acheteur_accession_libre]"; +$aSql['getSequenceProfil_acheteur_accession_libre'] = "SELECT nextval('prod_immo.profil_acheteur_accession_lib_id_profil_acheteur_accession__seq')"; +// Logement familliaux en location +$aSql['getIndicateur_logement_familliaux_location'] = "SELECT indicateur_logement_familliaux_location FROM prod_immo.indicateur_logement_familliaux_location WHERE id_indicateur_logement_familliaux_location =[id_indicateur_logement_familliaux_location]"; +$aSql['getSequenceComposition_logement_familliaux_location_cp'] = "SELECT nextval('prod_immo.composition_logement_famillia_id_composition_logement_famil_seq')"; +$aSql['setLogementFamilliauxLocationNomBailleur'] = "UPDATE [sSchemaFramework].logement_familliaux_location SET nom_bailleur=[nom_bailleur] WHERE id_programme=[id_programme]"; +$aSql['setLogementFamilliauxLocationNomInvestisseur'] = "UPDATE [sSchemaFramework].logement_familliaux_location SET nom_investisseur=[nom_investisseur] WHERE id_programme=[id_programme]"; +// Habitat spécifique +$aSql['getIndicateur_habitat_specifique'] = "SELECT indicateur_habitat_specifique FROM prod_immo.indicateur_habitat_specifique WHERE id_indicateur_habitat_specifique =[id_indicateur_habitat_specifique]"; +$aSql['getSequenceComposition_habitat_specifique_cp'] = "SELECT nextval('prod_immo.composition_habitat_specifiqu_id_composition_habitat_specif_seq')"; +$aSql['setHabitatSpecifiqueNomBailleur'] = "UPDATE [sSchemaFramework].habitat_specifique SET nom_bailleur=[nom_bailleur] WHERE id_programme=[id_programme]"; +$aSql['setHabitatSpecifiqueNomGestionnaire'] = "UPDATE [sSchemaFramework].habitat_specifique SET nom_gestionnaire=[nom_gestionnaire] WHERE id_programme=[id_programme]"; +// Activité et industrie +$aSql['getIndicateur_activite_industrie'] = "SELECT indicateur_activite_industrie FROM prod_immo.indicateur_activite_industrie WHERE id_indicateur_activite_industrie =[id_indicateur_activite_industrie]"; +$aSql['getSequenceActivite_industrie'] = "SELECT nextval('prod_immo.activite_industrie_id_activite_industrie_seq')"; +// Bureau +$aSql['getIndicateur_bureau'] = "SELECT indicateur_bureau FROM prod_immo.indicateur_bureau WHERE id_indicateur_bureau =[id_indicateur_bureau]"; +$aSql['getSequenceBureau'] = "SELECT nextval('prod_immo.bureau_id_bureau_seq')"; +// Equipement de superstructure +$aSql['getIndicateur_equipement_structure'] = "SELECT indicateur_equipement_structure FROM prod_immo.indicateur_equipement_structure WHERE id_indicateur_equipement_structure =[id_indicateur_equipement_structure]"; +$aSql['getSequenceEquipement_structure'] = "SELECT nextval('prod_immo.equipement_structure_id_equipement_structure_seq')"; +// Hotel commerce service +$aSql['getIndicateur_hotel_commerce_service'] = "SELECT indicateur_hotel_commerce_service FROM prod_immo.indicateur_hotel_commerce_service WHERE id_indicateur_hotel_commerce_service =[id_indicateur_hotel_commerce_service]"; +$aSql['getSequenceHotel_commerce_service'] = "SELECT nextval('prod_immo.hotel_commerce_service_id_hotel_commerce_service_seq')"; +// Stationnement +$aSql['getIndicateur_stationnement'] = "SELECT indicateur_stationnement FROM prod_immo.indicateur_stationnement WHERE id_indicateur_stationnement =[id_indicateur_stationnement]"; +$aSql['getSequenceStationnement'] = "SELECT nextval('prod_immo.stationnement_id_stationnement_seq')"; // TooltipLastUpdate -$aSql['getUpdateTrackingOperation'] = "SELECT \"user\" AS user_update, date AS date_update, old_value FROM prod_immo.update_tracking_operation WHERE id_operation=[iIdOperation] AND field='[sField]' ORDER BY date_update DESC LIMIT 1"; -$aSql['getUpdateTrackingProgramme'] = "SELECT \"user\" AS user_update, date AS date_update, old_value FROM prod_immo.update_tracking_programme WHERE id_programme=[iIdProgramme] AND field='[sField]' ORDER BY date_update DESC LIMIT 1"; +$aSql['getUpdateTrackingOperation'] = "SELECT \"user\" AS user_update, date AS date_update, old_value FROM prod_immo.update_tracking_operation WHERE id_operation=[iIdOperation] AND field='[sField]' ORDER BY date_update DESC LIMIT 1"; +$aSql['getUpdateTrackingProgramme'] = "SELECT \"user\" AS user_update, date AS date_update, old_value FROM prod_immo.update_tracking_programme WHERE id_programme=[iIdProgramme] AND field='[sField]' ORDER BY date_update DESC LIMIT 1"; +// Restriction +$aSql['getRestrictionUpdate'] = 'SELECT restriction_update FROM [sSchemaFramework].user_restriction WHERE login::name = "current_user"()'; +$aSql['getRestrictionUpdateIdOperation'] = 'SELECT id_operation FROM [sSchemaFramework].operation WHERE id_operation::text ~ similar_escape(( SELECT restriction_update FROM [sSchemaFramework].user_restriction WHERE login::name = "current_user"()), NULL::text);'; +$aSql['getRestrictionUpdateIdIlot'] = 'SELECT id_ilot FROM [sSchemaFramework].ilot WHERE id_operation::text ~ similar_escape(( SELECT restriction_update FROM [sSchemaFramework].user_restriction WHERE login::name = "current_user"()), NULL::text);'; +// Module Analyse - LIST +$aSql['getListOperation'] = "SELECT id_operation, nom_operation FROM prod_immo.operation ORDER BY nom_operation"; +$aSql['getListAmenageur'] = "SELECT DISTINCT nom_amenageur, count(nom_amenageur) FROM prod_immo.operation WHERE nom_amenageur IS NOT NULL GROUP BY nom_amenageur ORDER BY count DESC, nom_amenageur"; +$aSql['getListCTM'] = "SELECT id_ctm, nom_ctm FROM prod_immo.conference_territoriale_maire ORDER BY nom_ctm"; +$aSql['getListCommune'] = "SELECT id_commune, nom_commune FROM prod_immo.commune ORDER BY nom_commune"; +$aSql['getListFinancement'] = "SELECT code_financement_equ_public, financement_equ_public FROM prod_immo.tr_financement_equ_public ORDER BY financement_equ_public"; +$aSql['getListSuivi'] = "SELECT code_suivi, suivi FROM prod_immo.tr_suivi ORDER BY suivi"; +$aSql['getListProcedureAmenagement'] = "SELECT code_procedure_amenagement, procedure_amenagement FROM prod_immo.tr_procedure_amenagement ORDER BY procedure_amenagement"; -// Répartition type logement DEPRECATED -// $aSql['getRepartitionTypeLogement'] = "SELECT type_logement, repartition FROM [sSchemaFramework].v_repartion_type_logement WHERE id_operation=[id_operation]"; ?> \ No newline at end of file diff --git a/src/module_urbalyon/web_service/ws/Popup.class.inc b/src/module_urbalyon/web_service/ws/Popup.class.inc index dfcae2fc33e298991f7644da36b2c4a1bcee366e..0f426e55eee09f832f213099ef61e8a3e741d2c5 100644 --- a/src/module_urbalyon/web_service/ws/Popup.class.inc +++ b/src/module_urbalyon/web_service/ws/Popup.class.inc @@ -79,13 +79,14 @@ class Popup extends Urbalyon { function GET() { $iMapId = $this->aPath[2]; - if ($iMapId==-2){ + if ($iMapId==28){ $sContent = file_get_contents('template_popup/'.$iMapId.'.html', true); $aReturn=array("result"=>1, "title"=>'<p class="text-center mb-0" style="font-weight: bold;font-size: 30px;">Atlas numérique du sport</p>', "message"=>$sContent); - } elseif ($iMapId==28) { + /*} elseif ($iMapId==-2) { $sContent = file_get_contents('template_popup/'.$iMapId.'.html', true); $aReturn=array("result"=>1, "title"=>'<p class="text-center mb-0" style="font-weight: bold;font-size: 30px;">Atlas numérique du sport</p>', "message"=>$sContent); - }else{ + */ + }else{ $aReturn=array("result"=>0, "message"=>'carte numéro '.$iMapId.' inconnu'); } diff --git a/src/vitis/client/css/icons/style.css b/src/vitis/client/css/icons/style.css index 354d19d695b830f0a1e6d873ade04a47cb0cfbd9..0dad7299c1f03dec2eddd99452cf8a91d8b98796 100755 --- a/src/vitis/client/css/icons/style.css +++ b/src/vitis/client/css/icons/style.css @@ -1058,10 +1058,3 @@ .icon-scissors:before { content: "\f0c4"; } -/******* URBALYON *********/ -.icon-suivi_prod_immo_saisie:before { - content: "\e94e"; -} -.icon-suivi_prod_immo_bi:before { - content: "\f043"; -} \ No newline at end of file diff --git a/src/vitis/vas/doc/sport/atlas_2018/atlas_athletisme.pdf b/src/vitis/vas/doc/sport/atlas_2018/atlas_athletisme.pdf new file mode 100644 index 0000000000000000000000000000000000000000..37d3701bfdb50b5c80eb589e57f5f446761f453c Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2018/atlas_athletisme.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2018/atlas_basket_handball_volley.pdf b/src/vitis/vas/doc/sport/atlas_2018/atlas_basket_handball_volley.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9e0ac392d23b5ebea0538e669d2456468d5b9547 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2018/atlas_basket_handball_volley.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2018/atlas_boulodrome.pdf b/src/vitis/vas/doc/sport/atlas_2018/atlas_boulodrome.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d2b53e5d8641d8c641810e20076610aa026234f2 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2018/atlas_boulodrome.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2018/atlas_complet.pdf b/src/vitis/vas/doc/sport/atlas_2018/atlas_complet.pdf new file mode 100644 index 0000000000000000000000000000000000000000..21ab06f24044507d4bbb49a9d7c8083c702e4082 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2018/atlas_complet.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2018/atlas_grand_jeux.pdf b/src/vitis/vas/doc/sport/atlas_2018/atlas_grand_jeux.pdf new file mode 100644 index 0000000000000000000000000000000000000000..92189bf94c09f569b9693be3ea9bbba1577625f2 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2018/atlas_grand_jeux.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2018/atlas_natation.pdf b/src/vitis/vas/doc/sport/atlas_2018/atlas_natation.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c6192621985848e19cf6491f91397716b0c07c05 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2018/atlas_natation.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2018/atlas_salle_multisport.pdf b/src/vitis/vas/doc/sport/atlas_2018/atlas_salle_multisport.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b42113add2025b330484fff5e1b9c03c47a3ff71 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2018/atlas_salle_multisport.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2018/atlas_sport_combat.pdf b/src/vitis/vas/doc/sport/atlas_2018/atlas_sport_combat.pdf new file mode 100644 index 0000000000000000000000000000000000000000..012cb3cdd3b6bc68560af3174be41681d2788d35 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2018/atlas_sport_combat.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2018/atlas_tennis.pdf b/src/vitis/vas/doc/sport/atlas_2018/atlas_tennis.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8d50e85a0c7a397e1c76b1eb9151c56e5376785d Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2018/atlas_tennis.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2018/atlas_tous_sports.pdf b/src/vitis/vas/doc/sport/atlas_2018/atlas_tous_sports.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a8707f1ace5ab0392ebdc814e5f4a57c361d0cb8 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2018/atlas_tous_sports.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM01_1.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM01_1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c66617c05853fa5bd0e21830cd8947b60df25947 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM01_1.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM01_2.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM01_2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..515adde0d939fedb917c77b5d59d9a21266bb988 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM01_2.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM01_3.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM01_3.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5f3c9e9ce7bc772e38a0dd7e219f6a63d43f6bb5 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM01_3.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM01_4.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM01_4.pdf new file mode 100644 index 0000000000000000000000000000000000000000..017413d7f4b2c6f2199a62d861652ea05575af77 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM01_4.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM01_5.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM01_5.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d8dbd20be419bf4fec1c314a72e5db512a7be61d Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM01_5.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM01_6.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM01_6.pdf new file mode 100644 index 0000000000000000000000000000000000000000..28a387821d78e8ba29135886029fba447769090a Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM01_6.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM01_7.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM01_7.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8577ea64d92821e596de2960fdab149137300f4c Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM01_7.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM01_8.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM01_8.pdf new file mode 100644 index 0000000000000000000000000000000000000000..671b6612047a106da55355c71d045373897537ec Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM01_8.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM01_9.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM01_9.pdf new file mode 100644 index 0000000000000000000000000000000000000000..316478dc1277c59362ed0cb8d825da7e4d9eb75a Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM01_9.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM02_1.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM02_1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..741c673f81547f518253bf0b0eeb8fad6d36f744 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM02_1.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM02_2.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM02_2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..415a7c94d70d66a56d85323fa24b9ff08db1c6c2 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM02_2.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM02_3.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM02_3.pdf new file mode 100644 index 0000000000000000000000000000000000000000..74b40971ed0df2a81582d113081507bb7290c63e Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM02_3.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM02_4.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM02_4.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2d10e1bfe641907216f5023a41cb82166696c313 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM02_4.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM02_5.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM02_5.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6f0920eac795919c2c59e6a7b348099af17fad08 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM02_5.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM02_6.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM02_6.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ffd9def71b1719e59e7d741d8ecf1108dd2b5854 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM02_6.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM02_7.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM02_7.pdf new file mode 100644 index 0000000000000000000000000000000000000000..752f6981f3f4960f81c8ec13408710609604d48d Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM02_7.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM02_8.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM02_8.pdf new file mode 100644 index 0000000000000000000000000000000000000000..68366e6e951034e1460268211043027ef9636078 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM02_8.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM02_9.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM02_9.pdf new file mode 100644 index 0000000000000000000000000000000000000000..3625458644d71924c39d2e53a028febcd9abef13 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM02_9.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM03_1.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM03_1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0961783771d58a1460aa03aad28fc49365f980d0 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM03_1.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM03_2.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM03_2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ea164f868b23c3ae6f2e5050511aaf0cc89eb1c0 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM03_2.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM03_3.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM03_3.pdf new file mode 100644 index 0000000000000000000000000000000000000000..eeb20d4ee04061f97ae0946ce8e17af72a7f6ad9 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM03_3.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM03_4.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM03_4.pdf new file mode 100644 index 0000000000000000000000000000000000000000..79ef2841ed69da1ff895a9e204927eaf9432c3ad Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM03_4.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM03_5.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM03_5.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f913618d03bb716014c9aefe44afc2bcdee76d3a Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM03_5.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM03_6.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM03_6.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e3ffdc0e4a0359e139c5c0c69d3cca7d06156dcf Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM03_6.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM03_7.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM03_7.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5879b902b8b307c8aadbe405c3fc3953f47548e4 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM03_7.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM03_8.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM03_8.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5f992d48f5933c2b99abe63c0e21f44d70bc8ac0 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM03_8.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM03_9.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM03_9.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1bc8a628c1af0ec7b03378aad5711f9305288d05 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM03_9.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM04_1.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM04_1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b9e7810960a314b0a45be8e0706156d654169d72 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM04_1.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM04_2.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM04_2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1a1e7b640524f35b162333edb3ebd6dd51e1bf99 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM04_2.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM04_3.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM04_3.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7c96f243e068ba16b2eedde8d8c8028f6365e733 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM04_3.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM04_4.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM04_4.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8f9d0b600831b35994e21d5c7a8aa5d7a990ca2f Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM04_4.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM04_5.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM04_5.pdf new file mode 100644 index 0000000000000000000000000000000000000000..17b871c6ac5ac6d12fa046e320bf8469124840bb Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM04_5.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM04_6.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM04_6.pdf new file mode 100644 index 0000000000000000000000000000000000000000..21986b5dc24329254fa2e0fd916d6e3cb6b32dc9 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM04_6.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM04_7.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM04_7.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9c280fa08f9f5f332664a12d33a49a792ee92da5 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM04_7.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM04_8.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM04_8.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5e53fed5bfdd7a32de8d70fe3df1fd028c175563 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM04_8.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM04_9.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM04_9.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6c698c6d6639732bd19488efe3af0b8cf4b4703b Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM04_9.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM05_1.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM05_1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f1c69770612cf08c7e6fbab8cb4cc99146557d5e Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM05_1.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM05_2.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM05_2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0a3f6f5f6ae99c59350a53884101fbf89a8a0bb8 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM05_2.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM05_3.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM05_3.pdf new file mode 100644 index 0000000000000000000000000000000000000000..dea4420969e81e9bce534d365bcdf9d4e595fcce Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM05_3.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM05_4.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM05_4.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b21049a2cc43eab5df0f8ee81a9385633448ff83 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM05_4.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM05_5.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM05_5.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7696abffe1689b08ceae0d8bd0748e5226123722 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM05_5.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM05_6.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM05_6.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0c078df166cfc760fa2179ba55af3860e81de1f1 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM05_6.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM05_7.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM05_7.pdf new file mode 100644 index 0000000000000000000000000000000000000000..74c0a344c3c7f58744307dd32831facbeac32558 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM05_7.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM05_8.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM05_8.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a7487ca1ad6b789b6dfa6cbf3d1dcd0a0bc01462 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM05_8.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM05_9.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM05_9.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8e41d9ae762cf5bc1688d447424dc491ac7f3f74 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM05_9.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM06_1.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM06_1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..11d657c4a975a89cb9a494b3cf9444d4cc5dba0f Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM06_1.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM06_2.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM06_2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7a4e8542af859b6a7d6a288e4389680068b14253 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM06_2.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM06_3.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM06_3.pdf new file mode 100644 index 0000000000000000000000000000000000000000..67c2accfd07bf362329c8404fe6ea17011d15d37 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM06_3.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM06_4.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM06_4.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1d145904e1201c8bb76cc419ac4060e0d044c488 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM06_4.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM06_5.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM06_5.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4d69ad63522ff4a0e24d417f1778400684f86207 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM06_5.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM06_6.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM06_6.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8a99ef03d0d8068caa7dd860387436c75af21526 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM06_6.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM06_7.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM06_7.pdf new file mode 100644 index 0000000000000000000000000000000000000000..17399716a73c3b40a5dede3b5763aca6badde839 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM06_7.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM06_8.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM06_8.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5d37fdf664b23ad5ca3a58838a011f99ebb1cc5e Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM06_8.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM06_9.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM06_9.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0ac43e95229b391185418c8975eb258d560e508e Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM06_9.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM07_1.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM07_1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..60123036545b3bff005a6da20c1dd16704567b77 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM07_1.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM07_2.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM07_2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ad8bf32e8597f31d95cc5e1672db3f958b9bbf93 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM07_2.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM07_3.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM07_3.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d01ef4fb4ed6f5331dd64e9c456ace64005b2631 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM07_3.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM07_4.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM07_4.pdf new file mode 100644 index 0000000000000000000000000000000000000000..219b1607d3a608bbe729f6db6277fba284423282 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM07_4.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM07_5.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM07_5.pdf new file mode 100644 index 0000000000000000000000000000000000000000..753fa3676b6589d5a2b3202ce51f5d7c4008e2b3 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM07_5.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM07_6.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM07_6.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1d9cf50e9fac400da89a03ddffded04fce2fbc0b Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM07_6.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM07_7.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM07_7.pdf new file mode 100644 index 0000000000000000000000000000000000000000..fefebd9fec94d173e09e6daf62a88df37171ef7d Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM07_7.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM07_8.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM07_8.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7a95ba0e9646d891e2176b03b763d5b53defc46b Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM07_8.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM07_9.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM07_9.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0394580464230c8a736b74360fa7549086914136 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM07_9.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM08_1.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM08_1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6cfe7c58c4ebabb99997dd8debec9ba157fae9a0 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM08_1.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM08_2.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM08_2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e61e43cc2b942d947de05619900f27ac945a365c Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM08_2.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM08_3.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM08_3.pdf new file mode 100644 index 0000000000000000000000000000000000000000..cd7bd6ec4080641c3c6068c9b4794b1899800414 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM08_3.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM08_4.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM08_4.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e227616d17004be1e33a75672a2f746dda9e19eb Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM08_4.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM08_5.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM08_5.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ca33e17579c8ad6f83f01262a49eba72960b0564 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM08_5.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM08_6.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM08_6.pdf new file mode 100644 index 0000000000000000000000000000000000000000..842f3fe21101dda33936dd9a3e9c143648d5e33c Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM08_6.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM08_7.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM08_7.pdf new file mode 100644 index 0000000000000000000000000000000000000000..99ea9e756655967421d47e1859d71622b3431a13 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM08_7.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM08_8.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM08_8.pdf new file mode 100644 index 0000000000000000000000000000000000000000..fb1c8240b41807528bd6b81804e7827e2347ecfa Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM08_8.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM08_9.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM08_9.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5b0b945e6a0c6337f36d99aa87db51c51b468c74 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM08_9.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM09_1.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM09_1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..3f6d22064cdba7b07786140b291077e9c88d73bc Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM09_1.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM09_2.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM09_2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c41a48a04bdd984ba579f1f4e4d3a5e4a9e3aec8 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM09_2.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM09_3.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM09_3.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f82d550ea3267ca6c039489688d0352639529a3f Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM09_3.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM09_4.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM09_4.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f5e7ea627ddaf63ac0081fec15e1bc68884d5dd6 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM09_4.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM09_5.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM09_5.pdf new file mode 100644 index 0000000000000000000000000000000000000000..90fc7a2ac2abbea3eb93a18d6bd1dd270799f424 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM09_5.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM09_6.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM09_6.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ccc680cd29695d83ae5a4cdb12c0dc7688489cf3 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM09_6.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM09_7.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM09_7.pdf new file mode 100644 index 0000000000000000000000000000000000000000..cfee44b1a32c4b4d0c1ef712f449dda78cf96225 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM09_7.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM09_8.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM09_8.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6e8057be7fd78bc27ced5ad1a06d1e28817410d8 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM09_8.pdf differ diff --git a/src/vitis/vas/doc/sport/atlas_2019/CTM09_9.pdf b/src/vitis/vas/doc/sport/atlas_2019/CTM09_9.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4b25c6ac64f113506464ba851aa6e413179c26f4 Binary files /dev/null and b/src/vitis/vas/doc/sport/atlas_2019/CTM09_9.pdf differ diff --git a/src/vitis/vas/doc/sport/club.php b/src/vitis/vas/doc/sport/club.php new file mode 100644 index 0000000000000000000000000000000000000000..846b16dae63f1703d8490bf078a2646513d2d87f --- /dev/null +++ b/src/vitis/vas/doc/sport/club.php @@ -0,0 +1,140 @@ +<?php +//https://geo.urbalyon.org/doc/sport/club.php?numequipement=E001I693870013 +//https://geo.urbalyon.org/doc/sport/club.php?numequipement=E001I693860017 +require_once("../../rest/conf/properties.inc"); +require_once("properties_sport.inc"); +require_once("lib_sport.inc"); + + +try{ + $oConn = new PDO('pgsql:host=srv-postgres;port=5432;dbname='.$properties['db_sport'], $properties['db_user_sport'], $properties['db_pass_sport']); + + if($oConn){ + if (isset($_REQUEST["numequipement"])){ + $numequipement = $_REQUEST["numequipement"]; + // get data Equipement + $oResult = $oConn->prepare("SELECT equipement.*, adresse, codepostal, commune FROM (".$properties['schema_res'].".equipement INNER JOIN ".$properties['schema_res'].".installation ON equipement.numinstallation=installation.numinstallation) INNER JOIN ".$properties['schema_sport'].".commune ON commune.codeinsee=installation.codeinsee WHERE numequipement='".$numequipement."'"); + $oResult->execute(); + + if ($oResult->rowCount()>0){ + $aEquipements = $oResult->fetchAll(); + $sEquipement = $aEquipements[0]["nomequipement"]; + // get data Club + $oResultClub = $oConn->prepare("SELECT club.* FROM ".$properties['schema_sport'].".club WHERE numequipement_1='".$numequipement."' ORDER BY numequipement_1"); + $oResultClub->execute(); + $aClubs = $oResultClub->fetchAll(); + include ('header_club.html'); + echo '<div class="row"><div class="col-4 font-weight-bold">Club(s) associé(s) à l\'équipement :</div></div>'; + echo '<div class="row"><div class="col-4" style="font-size: 12px"><ion-icon name="information-circle" style="font-size: 20px; color: blue;"></ion-icon> Cliquer sur un nom de club pour faire apparaitre les données sur les licenciés.</div></div>'; + echo '<div class="row"><div class="col-4"><div class="list-group" id="list-tab" role="tablist">'; + foreach ($aClubs as $aClub){ + echo '<a class="list-group-item list-group-item-action list-group-item-success" id="list-'.$aClub["id_club"].'-list" data-toggle="list" href="#list-'.$aClub["id_club"].'" role="tab" aria-controls="'.$aClub["id_club"].'">'.$aClub["nom"].'</a>'; + } + echo '</div></div>'; + echo '<div class="col-8"><div class="tab-content" id="nav-tabContent">'; + + foreach ($aClubs as $aClub){ + echo '<div class="tab-pane fade" id="list-'.$aClub["id_club"].'" role="tabpanel" aria-labelledby="list-'.$aClub["id_club"].'-list"><b>Licenciés du club "'.$aClub["nom"].'" :</b><br>'; + // echo '<div class="row"><div class="col-8" style="font-size: 12px"><ion-icon name="information-circle" style="font-size: 20px; color: blue;"></ion-icon> Cliquer sur le nom de l\'équipement pour afficher la fiche complète de l\'équipement.</div></div>'; + echo '<div class="row"><div class="col-8" style="font-size: 12px">Nombre de licencié(s) : '.$aClub["nb_licencie"].'</div></div>'; + echo '<div class="list-group">'; + // get data Licencié + $oResultLicencie = $oConn->prepare("SELECT licencie.*,commune FROM ".$properties['schema_sport'].".licencie INNER JOIN ".$properties['schema_sport'].".commune ON licencie.codeinsee=commune.codeinsee WHERE id_club=".$aClub["id_club"]); + $oResultLicencie->execute(); + $aLicencies = $oResultLicencie->fetchAll(); + $iNbHomme=0; + $iNbFemme=0; + $aCommunes=array(); + $aCommunesNom=array(); + foreach ($aLicencies as $aLicencie){ + if ($aLicencie['sexe']=='F') $iNbFemme+=1; + if ($aLicencie['sexe']=='M') $iNbHomme+=1; + if ($aLicencie['codeinsee']!=""){ + $aCommunesNom[$aLicencie['codeinsee']]=str_replace("'", "",$aLicencie['commune']); + if ( isset($aCommunes[$aLicencie['codeinsee']])) + $aCommunes[$aLicencie['codeinsee']]+=1; + else + $aCommunes[$aLicencie['codeinsee']]=1; + } + } + arsort($aCommunes); + // echo '<div class="row"><div class="col-8" style="font-size: 12px">Nombre de licencié(s) associé(s) : '.$oResultLicencie->rowCount().'</div></div>'; + // Pie chart sexe + echo '<div class="row"><div class="col-8" style="font-size: 12px"><b>Répartition des licenciés selon le sexe</b></div></div>'; + echo '<canvas height="70px" id="oChart_sexe_'.$aClub["id_club"].'"></canvas>'; + echo "<script type='text/javascript'> + var pie_ctx_".$aClub["id_club"]." = document.getElementById('oChart_sexe_".$aClub["id_club"]."').getContext('2d'); + var pie_chart_".$aClub["id_club"]." = new Chart(pie_ctx_".$aClub["id_club"].", { + type: 'pie', + data: { + labels: ['Homme', 'Femme'], + datasets: [{ + backgroundColor: [ + 'rgb(132, 195, 255)', + 'rgb(255, 144, 203)', + ], + label: 'Répartition des licenciés selon le sexe', + borderColor: 'rgb(107, 107, 107)', + data: [".$iNbHomme.", ".$iNbFemme."] + }] + }, + options: {} + }); + </script>"; + // Bar chart commune + $sCommunes=''; + $sValues=''; + $sColor=''; + foreach ($aCommunes as $iCodeInsee => $iNb){ + if ($sCommunes=='') + $sCommunes=$aCommunesNom[$iCodeInsee]; + else + $sCommunes=$sCommunes."','".$aCommunesNom[$iCodeInsee]; + if ($sValues=='') + $sValues=$iNb; + else + $sValues=$sValues.",".$iNb; + if ($sColor=='') + $sColor='dynamicColors()'; + else + $sColor=$sColor.',dynamicColors()'; + + } + echo '<div class="row"><div class="col-8" style="font-size: 12px"><b>Nombre de licencié dans la commune</b></div></div>'; + echo '<canvas height="150px" id="oChart_commune_'.$aClub["id_club"].'"></canvas>'; + echo "<script type='text/javascript'> + var bar_ctx_".$aClub["id_club"]." = document.getElementById('oChart_commune_".$aClub["id_club"]."').getContext('2d'); + var bar_chart_".$aClub["id_club"]." = new Chart(bar_ctx_".$aClub["id_club"].", { + type: 'bar', + data: { + labels: ['".$sCommunes."'], + datasets: [{ + backgroundColor: [".$sColor."], + label: 'Répartition des licenciés selon la commune', + borderColor: 'rgb(107, 107, 107)', + data: [".$sValues."] + }] + }, + options: {legend: {display: false}} + }); + </script>"; + echo '</div></div>'; + } + + echo '</div></div>'; + echo '</div><br>'; + + include ('footer_club.html'); + + }else{ + echo "Erreur : ".$oResult->rowCount()." équipement(s) trouvé(s) avec le numéro d'équipement : ".$numequipement; + } + }else{ + echo "Erreur : pas de numéro d'équipement passé en paramètre !"; + } + } +}catch (PDOException $e){ + echo "ERROR : ".$e->getMessage(); +} + +?> \ No newline at end of file diff --git a/src/vitis/vas/doc/sport/equipement.html b/src/vitis/vas/doc/sport/equipement.html new file mode 100644 index 0000000000000000000000000000000000000000..9d33b7339eb57f53e72385b95a88d377c48e1533 --- /dev/null +++ b/src/vitis/vas/doc/sport/equipement.html @@ -0,0 +1,289 @@ + <!------------------------------------------------- EQUIPEMENT -------------------------------------------------> + <div class="row mt-4 title_equipement"> + <div class="col-2 "><h4>Équipement</h4></div> + <div class="col-8"><h4><?php echo $aEquipement["nomequipement"]; ?></h4></div> + <div class="col-2">n° <?php echo $aEquipement["numequipement"]; ?></div> + </div> + <div class="row subtitle_equipement"> + <div class="col-2"></div> + <div class="col subtitle_equipement">Batiment : <?php echo $aEquipement["nom_batiment"]; ?></div> + </div> + <div class="row"><div class="col-2">Type</div><div class="col"><?php echo $aEquipement["typequipement"]; ?></div></div> + <div class="row"><div class="col-2">Adresse internet</div><div class="col"><a href="<?php echo $aEquipement["adresse_internet"]; ?>" target='about:blank'><?php echo $aEquipement["adresse_internet"]; ?></a></div></div> + <div class="row"> + <div class="col-3"></div> + <div class="col"> + <div class="container"> + <div class="row blue_title"><div class="col">Administration</div></div> + <div class="row"><div class="col-6 text-right font-weight-bold">Propriétaire principal</div><div class="col-6"><?php echo $aEquipement["type_proprietaire"]; ?></div></div> + <div class="row"><div class="col-6 text-right">Gestionnaire principal</div><div class="col-6"><?php echo $aEquipement["type_gestionnaire"]; ?></div></div> + <div class="row"><div class="col-6 text-right">Propriétaire secondaire</div><div class="col-6"><?php echo $aEquipement["type_proprietaire_secondaire"]; ?></div></div> + <div class="row"><div class="col-6 text-right">Gestionnaire secondaire</div><div class="col-6"><?php echo $aEquipement["type_cogestionnaire"]; ?></div></div> + <div class="row"><div class="col-6 text-right">Gestionnaire en DSP</div><div class="col-1"><?php echo $aEquipement["gestion_dsp"] ? "Oui" : "Non"; ?></div><div class="col-5 small">(délégation de service)</div></div> + </div> + </div> + <div class="col-3"></div> + </div> + <div class="row blue_title"><div class="col-6">Mise en service</div><div class="col-6">Homologation</div></div> + <div class="row"> + <div class="col-4 text-right">Année</div><div class="col-2"><?php echo $aEquipement["annee_mise_en_service"]; ?></div> + <div class="col-5 text-right">Soumis à la procédure de l'homologation préfectorale</div><div class="col-1"><?php echo $aEquipement["homologation_prefectorale"] ? "Oui" : "Non"; ?></div> + </div> + <div class="row"> + <div class="col-4 text-right">Tranche d'année de mise en service</div><div class="col-2"><?php echo $aEquipement["periode_mise_en_service"]; ?></div> + <div class="col-4 text-right">Arrêté d'ouverture au public</div><div class="col-2"><?php echo $aEquipement["arrete_ouverture_public"] ? "Oui" : "Non"; ?></div> + </div> + <div class="row"> + <div class="col-4 text-right">Nb de place en tribune </div><div class="col-2"><?php echo $aEquipement["nb_place_assise_tribune"]; ?></div> + <div class="col-4 text-right">Date de l'homologation préfectorale</div><div class="col-2"><?php echo $aEquipement["date_homologation_pref"]; ?></div> + </div> + <div class="row"> + <div class="col-6"></div> + <div class="col-4 text-right">Période de l'homologation préfectorale</div><div class="col-2"><?php echo $aEquipement["periode_homologation_pref"]; ?></div> + </div> + <div class="row"> + <div class="col-6 blue_title">ERP (Etablissement recevant du public)</div> + <div class="col-3 font-weight-bold text-right">Catégorie ERP (1 à 5):</div><div class="col-3"><?php echo $aEquipement["categorie_erp"]; ?></div> + </div> + <div class="row"> + <div class="col-12"><?php echo is_array($aEquipement["type_erp_etablissement"]) ? implode('<br>',$aEquipement["type_erp_etablissement"]) : $aEquipement["type_erp_etablissement"]; ?></div> + </div> + <div class="row blue_title"><div class="col">Présence de :</div></div> + <div class="row"> + <div class="col-3 text-right">Vestiaires avec douches</div><div class="col-1"><?php echo $aEquipement["douche"] ? "Oui" : "Non"; ?></div> + <div class="col-3 text-right">Eclairage</div><div class="col-1"><?php echo $aEquipement["eclairage"] ? "Oui" : "Non"; ?></div> + <div class="col-3 text-right">Accès libre</div><div class="col-1"><?php echo $aEquipement["access_libre"] ? "Oui" : "Non"; ?></div> + </div> + <div class="row blue_title"><div class="col">Fiche Technique</div></div> + <div class="row"> + <div class="col-3 text-right">Nature du sol</div><div class="col-9"><?php echo $aEquipement["nature_sol"]; ?></div> + </div> + <div class="row"> + <div class="col-3 text-right">Nature de l'équipement sportif</div><div class="col-9"><?php echo $aEquipement["nature_equipement_sportif"]; ?></div> + </div> + <div class="row"> + <div class="col-3 text-right">Aire d'évolution Hauteur</div><div class="col-3"><?php echo $aEquipement["hauteur_aire_evolution"]; ?></div> + <div class="col-3 text-right">Sanitaires</div><div class="col-3"><?php echo $aEquipement["sanitaire"] ? "Oui" : "Non"; ?></div> + </div> + <div class="row"> + <div class="col-3 text-right">Aire d'évolution Longueur</div><div class="col-2"><?php echo $aEquipement["longueur_aire_evolution"]; ?></div> + <div class="col-4 text-right">Ouverture exclusivement saisonnière</div><div class="col-3"><?php echo $aEquipement["ouverture_exclusivement_saisonniere"] ? "Oui" : "Non"; ?></div> + </div> + <div class="row"> + <div class="col-3 text-right">Aire d'évolution Largeur</div><div class="col-2"><?php echo $aEquipement["largeur_aire_evolution"]; ?></div> + <div class="col-4 text-right">Nombre de couloir / piste / poste / etc.</div><div class="col-3"><?php echo $aEquipement["nb_couloir_piste_poste_jeux_pas"]; ?></div> + </div> + <div class="row"> + <div class="col-3 text-right">Aire d'évolution Surface</div><div class="col-3"><?php echo $aEquipement["surface_aire_evolution"]; ?></div> + <div class="col-3 text-right">Vestiaire chauffé</div><div class="col-3"><?php echo $aEquipement["vestiaire_chauffe"] ? "Oui" : "Non"; ?></div> + </div> + <div class="row"> + <div class="col-3 text-right">Nombre de vestiaire sportif</div><div class="col-2"><?php echo $aEquipement["nb_vestiaire_sportif"]; ?></div> + <div class="col-4 text-right">Nombre de vestiaire arbitre enseignant</div><div class="col-3"><?php echo $aEquipement["nb_vestiaire_arbitre_enseignant"]; ?></div> + </div> + <div class="row"> + <div class="col-4 text-right">Types d'aménagements d'information</div><div class="col-8"><?php echo is_null($aEquipement["type_amenagement_information"]) ? 'Aucun' : $aEquipement["type_amenagement_information"]; ?></div> + </div> + <div class="row blue_title"><div class="col">Usage</div></div> + <div class="row"> + <div class="col-3 text-right">Type(s) d'utilisateur</div><div class="col-9"><?php echo $aEquipement["type_utilisateur"]; ?></div> + </div> + <div class="row"> + <div class="col-3 text-right">Type(s) d'utilisation</div><div class="col-9"><?php echo $aEquipement["type_utilisation"]; ?></div> + </div> + <div class="row blue_title"><div class="col">Travaux</div></div> + <div class="row"> + <div class="col-6 text-right">Tranche de date de dernier travaux</div><div class="col-6"><?php echo $aEquipement["periode_dernier_gros_travaux"]; ?></div> + </div> + <div class="row"> + <div class="col-6 text-right">Date dernier travaux réalisés </div><div class="col-6"><?php echo $aEquipement["date_dernier_travaux"]; ?></div> + </div> + <div class="row"> + <div class="col-3 text-right">Motifs des derniers gros travaux</div><div class="col-9"><?php echo $aEquipement["motif_dernier_gros_travaux"]; ?></div> + </div> + <div class="row blue_title"><div class="col">Accès handicapé</div></div> + <div class="row"><div class="col-5 text-right"></div><div class="col-2">Mobilité</div><div class="col-2">Sensoriel</div></div> + <div class="row"> + <div class="col-5 text-right">Accessibilité partielle ou totale</div> + <div class="col-2"><?php echo $aEquipement["accessibilite_partielle_totale_pmr"] ? "Oui" : "Non"; ?></div> + <div class="col-2"><?php echo $aEquipement["accessibilite_partielle_totale_handicap_sensoriel"] ? "Oui" : "Non"; ?></div> + </div> + <div class="row"> + <div class="col-5 text-right">Accessibilité à l'accueil</div> + <div class="col-2"><?php echo $aEquipement["accessibilite_pmr_acceuil"] ? "Oui" : "Non"; ?></div> + <div class="col-2">-</div> + </div> + <div class="row"> + <div class="col-5 text-right">Accessibilité à l'aire de jeu</div> + <div class="col-2"><?php echo $aEquipement["accessibilite_pmr_aire_jeu"] ? "Oui" : "Non"; ?></div> + <div class="col-2"><?php echo $aEquipement["accessibilite_handicap_sensoriel_aire_jeu"] ? "Oui" : "Non"; ?></div> + </div> + <div class="row"> + <div class="col-5 text-right">Accessibilité aux cheminements</div> + <div class="col-2"><?php echo $aEquipement["accessibilite_pmr_cheminement"] ? "Oui" : "Non"; ?></div> + <div class="col-2"><?php echo $aEquipement["accessibilite_handicap_sensoriel_cheminement"] ? "Oui" : "Non"; ?></div> + </div> + <div class="row"> + <div class="col-5 text-right">Accessibilité aux douches</div> + <div class="col-2"><?php echo $aEquipement["accessibilite_pmr_douche"] ? "Oui" : "Non"; ?></div> + <div class="col-2">-</div> + </div> + <div class="row"> + <div class="col-5 text-right">Accessibilité aux sanitaires</div> + <div class="col-2"><?php echo $aEquipement["accessibilite_pmr_sanitaire"] ? "Oui" : "Non"; ?></div> + <div class="col-2"><?php echo $aEquipement["accessibilite_handicap_sensoriel_sanitaire"] ? "Oui" : "Non"; ?></div> + </div> + <div class="row"> + <div class="col-5 text-right">Accessibilité - signalétique</div> + <div class="col-2">-</div> + <div class="col-2"><?php echo $aEquipement["accessibilite_handicap_sensoriel_signaletique"] ? "Oui" : "Non"; ?></div> + </div> + <div class="row"> + <div class="col-5 text-right">Accessibilité aux tribunes</div> + <div class="col-2"><?php echo $aEquipement["accessibilite_pmr_tribune"] ? "Oui" : "Non"; ?></div> + <div class="col-2"><?php echo $aEquipement["accessibilite_handicap_sensoriel_tribune"] ? "Oui" : "Non"; ?></div> + </div> + <div class="row"> + <div class="col-5 text-right">Accessibilité aux vestiaires</div> + <div class="col-2"><?php echo $aEquipement["accessibilite_pmr_vestiaire"] ? "Oui" : "Non"; ?></div> + <div class="col-2"><?php echo $aEquipement["accessibilite_handicap_sensoriel_vestiaire"] ? "Oui" : "Non"; ?></div> + </div> + <div class="row blue_title"><div class="col">Types de locaux complémentaires</div></div> + <div class="row"><div class="col"><?php echo is_null($aEquipement["type_locaux_complementaire"]) ? 'Aucun' : $aEquipement["type_locaux_complementaire"]; ?></div></div> + <div class="row blue_title"><div class="col">Types de chauffage - source d'énergie</div></div> + <div class="row"><div class="col"><?php echo is_null($aEquipement["type_chauffage_source_energie"]) ? 'Aucun' : $aEquipement["type_chauffage_source_energie"]; ?></div></div> + <div class="row blue_title"><div class="col">Types d'aménagements de confort</div></div> + <div class="row"><div class="col"><?php echo is_null($aEquipement["type_amenagement_confort"]) ? 'Aucun' : $aEquipement["type_amenagement_confort"]; ?></div></div> + <div class="row blue_title"><div class="col">SAE (Structure Artificielle d'Escalade)</div></div> + <div class="row"> + <div class="col-2 text-right">Nombre de couloirs</div><div class="col-2"><?php echo $aEquipement["sae_nb_couloir"]; ?></div> + <div class="col-1 text-right">Hauteur</div><div class="col-2"><?php echo $aEquipement["sae_hauteur_max"]; ?></div> + <div class="col-1 text-right">Surface</div><div class="col-2"><?php echo $aEquipement["sae_surface_totale"]; ?></div> + </div> + <div class="row blue_title"><div class="col">Accès à l'équipement</div></div> + <div class="row"> + <div class="col-4 text-right">Présence d'une signalétique de sécurité</div><div class="col-2"><?php echo $aEquipement["signaletique_securite"] ? "Oui" : "Non"; ?></div> + <div class="col-4 text-right">Présence de moyen d'alerte</div><div class="col-2"><?php echo $aEquipement["moyen_alerte"] ? "Oui" : "Non"; ?></div> + </div> + <div class="row"> + <div class="col-3 text-right">Types d'accès pour le public</div><div class="col-9"><?php echo is_null($aEquipement["type_access_public"]) ? 'Aucun' : $aEquipement["type_access_public"]; ?></div> + </div> + <div class="row"> + <div class="col-3 text-right">Types d'accès pour les secours</div><div class="col-9"><?php echo is_null($aEquipement["type_access_secours"]) ? 'Aucun' : $aEquipement["type_access_secours"]; ?></div> + </div> + <div class="row blue_title"><div class="col">Locaux</div></div> + <div class="row"> + <div class="col-4 text-right">Démarche pour la qualité environnementale</div><div class="col-2"><?php echo $aEquipement["demarche_qualite_environnementale"] ? "Oui" : "Non"; ?></div> + <div class="col-4 text-right">Existence d'une aide publique à l'investissement</div><div class="col-2"><?php echo $aEquipement["aide_publique_investissement"] ? "Oui" : "Non"; ?></div> + </div> + <div class="row"> + <div class="col-4 text-right">Présence de locaux techniques</div><div class="col-2"><?php echo $aEquipement["locaux_technique"] ? "Oui" : "Non"; ?></div> + <div class="col-4 text-right">Equipement inscrit au PDESI / PDIPR</div><div class="col-2"><?php echo $aEquipement["inscrit_pdesi_pdipr"] ? "Oui" : "Non"; ?></div> + </div> + <div class="row"> + <div class="col-4 text-right">Présence de locaux pédagogiques</div><div class="col-2"><?php echo $aEquipement["locaux_pedagogique"] ? "Oui" : "Non"; ?></div> + <div class="col-6 text-right small">(Plan Dép. des Espaces, Sites et Itinéraires relatifs aux sports de nature)</div> + </div> + <div class="row blue_title"><div class="col">Équipement</div></div> + + <div class="row"><div class="col-6 font-weight-bold">Piscine</div><div class="col font-weight-bold">Athlétisme</div></div> + <div class="row"> + <div class="col-4 text-right">Forme du bassin</div><div class="col-1"><?php echo $aEquipement["forme_bassin"]; ?></div> + <div class="col-5 text-right">Développement de la piste en mètre</div><div class="col-1"><?php echo $aEquipement["longueur_piste"]; ?></div> + </div> + <div class="row"> + <div class="col-4 text-right">Longueur du bassin</div><div class="col-1"><?php echo $aEquipement["longueur_bassin"]; ?></div> + <div class="col-5 text-right">Longueur de ligne droite</div><div class="col-1"><?php echo $aEquipement["longueur_ligne_droite_arrivee"]; ?></div> + </div> + <div class="row"> + <div class="col-4 text-right">Largeur du bassin</div><div class="col-1"><?php echo $aEquipement["largeur_bassin"]; ?></div> + <div class="col-5 text-right">Nombre de couloir en ligne droite</div><div class="col-1"><?php echo $aEquipement["nb_couloir_ligne_droite_arrivee"]; ?></div> + </div> + <div class="row"> + <div class="col-4 text-right">Surface du bassin</div><div class="col-1"><?php echo $aEquipement["surface_bassin"]; ?></div> + <div class="col-5 text-right">Nombre de couloir hors ligne droite</div><div class="col-1"><?php echo $aEquipement["nb_couloir_hors_ligne_droite"]; ?></div> + </div> + <div class="row"> + <div class="col-4 text-right">Profondeur mini</div><div class="col-1"><?php echo $aEquipement["profondeur_min_bassin"]; ?></div> + <div class="col-5 text-right">Rivière de steeple</div><div class="col-1"><?php echo $aEquipement["riviere_steeple"]; ?></div> + </div> + <div class="row"> + <div class="col-4 text-right">Profondeur maxi</div><div class="col-1"><?php echo $aEquipement["profondeur_max_bassin"]; ?></div> + <div class="col-5 text-right">Développement de la piste en mètre</div><div class="col-1"><?php echo $aEquipement["longueur_piste"]; ?></div> + </div> + <div class="row"> + <div class="col-4 text-right">Nombre de couloirs des bassins mixtes et sportifs</div><div class="col-1"><?php echo $aEquipement["nb_couloir_bassin_mixte_sportif"]; ?></div> + <div class="col-1"></div><div class="col-2">Nombre d'aires de :</div> + </div> + <div class="row"> + <div class="col-4 text-right">Surface des plages du bassin</div><div class="col-1"><?php echo $aEquipement["surface_plage_bassin"]; ?></div> + <div class="col-5 text-right">saut</div><div class="col-1"><?php echo $aEquipement["nb_aire_saut"]; ?></div> + </div> + <div class="row"> + <div class="col-4 text-right">Nombre total de tremplins</div><div class="col-1"><?php echo $aEquipement["nb_tremplin"]; ?></div> + <div class="col-5 text-right">saut en hauteur</div><div class="col-1"><?php echo $aEquipement["nb_aire_saut_hauteur"]; ?></div> + </div> + <div class="row"> + <div class="col-4 text-right">Nombre de tremplins de 1 mètre</div><div class="col-1"><?php echo $aEquipement["nb_tremplin_1m"]; ?></div> + <div class="col-5 text-right">saut en longueur</div><div class="col-1"><?php echo $aEquipement["nb_aire_saut_longueur"]; ?></div> + </div> + <div class="row"> + <div class="col-4 text-right">Nombre de tremplins de 3 mètres</div><div class="col-1"><?php echo $aEquipement["nb_tremplin_3m"]; ?></div> + <div class="col-5 text-right">saut en longueur et triple saut</div><div class="col-1"><?php echo $aEquipement["nb_aire_saut_longueur_triple_saut"]; ?></div> + </div> + <div class="row"> + <div class="col-4 text-right">Nombre total de plate-formes</div><div class="col-1"><?php echo $aEquipement["nb_plateforme"]; ?></div> + <div class="col-5 text-right">saut à la perche</div><div class="col-1"><?php echo $aEquipement["nb_aire_saut_perche"]; ?></div> + </div> + <div class="row"> + <div class="col-4 text-right">Nombre de plate-forme de 3 mètres</div><div class="col-1"><?php echo $aEquipement["nb_plateforme_3m"]; ?></div> + <div class="col-5 text-right">lancer</div><div class="col-1"><?php echo $aEquipement["nb_aire_lancer"]; ?></div> + </div> + <div class="row"> + <div class="col-4 text-right">Nombre de plate-forme de 5 mètres</div><div class="col-1"><?php echo $aEquipement["nb_plateforme_5m"]; ?></div> + <div class="col-5 text-right">lancer de poids</div><div class="col-1"><?php echo $aEquipement["nb_aire_lancer_poid"]; ?></div> + </div> + <div class="row"> + <div class="col-4 text-right">Nombre de plate-forme de 7, 5 mètres</div><div class="col-1"><?php echo $aEquipement["nb_plateforme_7_5m"]; ?></div> + <div class="col-5 text-right">lancer de disque</div><div class="col-1"><?php echo $aEquipement["nb_aire_lancer_disque"]; ?></div> + </div> + <div class="row"> + <div class="col-4 text-right">Nombre de plate-forme de 10 mètres</div><div class="col-1"><?php echo $aEquipement["nb_plateforme_10m"]; ?></div> + <div class="col-5 text-right">lancer de javelot</div><div class="col-1"><?php echo $aEquipement["nb_aire_lancer_javelot"]; ?></div> + </div> + <div class="row"> + <div class="col-4 text-right">Présence d'une pataugeoire</div><div class="col-1"><?php echo $aEquipement["pataugeoire"] ? "Oui" : "Non"; ?></div> + <div class="col-5 text-right">lancer de marteau</div><div class="col-1"><?php echo $aEquipement["nb_aire_lancer_marteau"]; ?></div> + </div> + <div class="row"> + <div class="col-4 text-right">Aménagements complémentaires des bassins</div><div class="col-1"><?php echo $aEquipement["amenagement_complement_bassin"] ? "Oui" : "Non"; ?></div> + <div class="col-5 text-right">lancer de mixte disque-marteau</div><div class="col-1"><?php echo $aEquipement["nb_aire_lancer_mixte_disque_marteau"]; ?></div> + </div> + <div class="row"> + <div class="col-5 text-right">Types d'aménagements complémentaires des bassins</div><div class="col-7"><?php echo is_null($aEquipement["type_amenagement_complementaire_bassin"]) ? 'Aucun' : $aEquipement["type_access_public"]; ?></div> + </div> + <div class="row"><div class="col-6 font-weight-bold">Tir</div></div> + <div class="row"> + <div class="col-2 text-right">Type de pas de tir</div><div class="col-10"><?php echo is_null($aEquipement["type_pas_tir"]) ? 'Aucun' : $aEquipement["type_access_public"]; ?></div> + </div> + <div class="row"><div class="col-6 font-weight-bold">Equipement dans la nature</div></div> + <div class="row"> + <div class="col-4 text-right">Présence d'une tour d'arrivée (si stade)</div><div class="col-8"><?php echo $aEquipement["tour_arrivee"] ? "Oui" : "Non"; ?></div> + </div> + <div class="row"> + <div class="col-4 text-right">Présence d'un treuil</div><div class="col-8"><?php echo $aEquipement["treuil"] ? "Oui" : "Non"; ?></div> + </div> + <!------------------------------------------------- ACTIVITE -------------------------------------------------> + <div class="row title_activite"> + <div class="col-sm "><h4>Activités</h4></div> + </div> + <div class="row"> + <div class="col-sm subtitle_activite small">"Praticable"= praticable à demeure</div> + </div> + <?php foreach($aActivites as $aActivite): ?> + <div class="row"> + <div class="col-4"><?php echo $aActivite["activite"]; ?></div> + <div class="col-4"><?php echo $aActivite["pratique"]; ?></div> + <div class="col-4"><?php echo $aActivite["niveau_pratique_plus_eleve"]; ?></div> + </div> + <?php endforeach; ?> diff --git a/src/vitis/vas/doc/sport/equipement.php b/src/vitis/vas/doc/sport/equipement.php new file mode 100644 index 0000000000000000000000000000000000000000..79a2b7b26c41687b3d45bf8954cfc4d47e80b8b3 --- /dev/null +++ b/src/vitis/vas/doc/sport/equipement.php @@ -0,0 +1,57 @@ +<?php +//https://geo.urbalyon.org/doc/sport/equipement.php?numequipement=E001I690290012 +require_once("../../rest/conf/properties.inc"); +require_once("properties_sport.inc"); +require_once("lib_sport.inc"); + + +try{ + $oConn = new PDO('pgsql:host=srv-postgres;port=5432;dbname='.$properties['db_sport'], $properties['db_user_sport'], $properties['db_pass_sport']); + + if($oConn){ + if (isset($_REQUEST["numequipement"])){ + $numequipement = $_REQUEST["numequipement"]; + // get data Equipement + $oResult = $oConn->prepare('SELECT equipement.*, typequipement FROM '.$properties['schema_res'].'.equipement INNER JOIN '.$properties['schema_res'].'.typequipement ON equipement.codetypequipement=typequipement.codetypequipement WHERE numequipement=\''.$numequipement.'\''); + $oResult->execute(); + + if ($oResult->rowCount()==1){ + $aEquipement = $oResult->fetchAll(); + $aEquipement=$aEquipement[0]; + + $aTypeErpEtablissement = explode(',',$aEquipement['type_erp_etablissement']); + if (count($aTypeErpEtablissement)>0){ + $aEquipement['type_erp_etablissement']=get_ERP($aTypeErpEtablissement); + }else{ + $aEquipement['type_erp_etablissement']='Aucun'; + } + + $oResult2 = $oConn->prepare('SELECT installation.*, commune FROM '.$properties['schema_res'].'.installation INNER JOIN sport.commune ON installation.codeinsee=commune.codeinsee WHERE numinstallation=\''.$aEquipement["numinstallation"].'\''); + $oResult2->execute(); + $aInstallation = $oResult2->fetchAll(); + $aInstallation=$aInstallation[0]; + + $oResult3 = $oConn->prepare('SELECT activite_equipement.*, activite FROM '.$properties['schema_res'].'.activite_equipement INNER JOIN '.$properties['schema_res'].'.activite ON activite_equipement.codeactivite=activite.codeactivite WHERE numequipement=\''.$numequipement.'\''); + $oResult3->execute(); + $aActivites = $oResult3->fetchAll(); + + // var_dump($aInstallation); + + include ('header.html'); + include ('installation.html'); + include ('equipement.html'); + include ('footer.html'); + + }else{ + echo "Erreur : ".$oResult->rowCount()." équipement(s) trouvé(s) avec le numéro : ".$numequipement; + } + }else{ + echo "Erreur : pas de numéro d'équipement passé en paramètre !"; + } + } +}catch (PDOException $e){ + echo "ERROR : ".$e->getMessage(); +} + + +?> \ No newline at end of file diff --git a/src/vitis/vas/doc/sport/equipement_commune.php b/src/vitis/vas/doc/sport/equipement_commune.php new file mode 100644 index 0000000000000000000000000000000000000000..bb2c5f70f4b9e525e2bd9b9818bc0a445488f291 --- /dev/null +++ b/src/vitis/vas/doc/sport/equipement_commune.php @@ -0,0 +1,63 @@ +<?php +// https://geo.urbalyon.org/doc/sport/equipement_commune.php?codeinsee=69149 +require_once("../../rest/conf/properties.inc"); +require_once("properties_sport.inc"); +require_once("lib_sport.inc"); + +try{ + $oConn = new PDO('pgsql:host=srv-postgres;port=5432;dbname='.$properties['db_sport'], $properties['db_user_sport'], $properties['db_pass_sport']); + + if($oConn){ + if (isset($_REQUEST["codeinsee"])){ + $codeinsee = $_REQUEST["codeinsee"]; + // get data Installation + $oResult = $oConn->prepare('SELECT installation.*, commune FROM '.$properties['schema_res'].'.installation INNER JOIN sport.commune ON installation.codeinsee=commune.codeinsee WHERE installation.codeinsee='.$codeinsee.' ORDER BY installation.nominstallation'); + $oResult->execute(); + + if ($oResult->rowCount()>0){ + $aInstallations = $oResult->fetchAll(); + $sCommune = $aInstallations[0]["commune"]; + include ('header_commune.html'); + echo '<div class="row"><div class="col-4 font-weight-bold">Installation(s) sportive(s) de la commune :</div></div>'; + echo '<div class="row"><div class="col-4" style="font-size: 12px"><ion-icon name="information-circle" style="font-size: 20px; color: blue;"></ion-icon> Cliquer sur un nom d\'installation pour faire apparaitre la liste des équipements.</div></div>'; + echo '<div class="row"><div class="col-4"><div class="list-group" id="list-tab" role="tablist">'; + foreach ($aInstallations as $aInstallation) { + echo '<a class="list-group-item list-group-item-action list-group-item-success" id="list-'.$aInstallation["numinstallation"].'-list" data-toggle="list" href="#list-'.$aInstallation["numinstallation"].'" role="tab" aria-controls="'.$aInstallation["numinstallation"].'">'.$aInstallation["nominstallation"].'</a>'; + } + echo '</div></div>'; + echo '<div class="col-8"><div class="tab-content" id="nav-tabContent">'; + + foreach ($aInstallations as $aInstallation) { + echo '<div class="tab-pane fade" id="list-'.$aInstallation["numinstallation"].'" role="tabpanel" aria-labelledby="list-'.$aInstallation["numinstallation"].'-list"><b>Équipement(s) de l\'installation "'.$aInstallation["nominstallation"].'" :</b><br>'; + echo '<div class="row"><div class="col-8" style="font-size: 12px"><ion-icon name="information-circle" style="font-size: 20px; color: blue;"></ion-icon> Cliquer sur le nom de l\'équipement pour afficher la fiche complète de l\'équipement.</div></div>'; + echo '<div class="list-group">'; + $oResult2 = $oConn->prepare('SELECT equipement.*, typequipement FROM '.$properties['schema_res'].'.equipement INNER JOIN '.$properties['schema_res'].'.typequipement ON equipement.codetypequipement=typequipement.codetypequipement WHERE numinstallation=\''.$aInstallation["numinstallation"].'\' ORDER BY nomequipement'); + $oResult2->execute(); + $aEquipements = $oResult2->fetchAll(); + foreach ($aEquipements as $aEquipement) { + echo '<a href="https://geo.urbalyon.org/doc/sport/equipement.php?numequipement='.$aEquipement['numequipement'].'" target="about:blank" class="list-group-item list-group-item-action">'.$aEquipement['nomequipement'].' ('.$aEquipement['typequipement'].') <ion-icon name="download"></ion-icon></a>'; + } + + echo '</div></div>'; + } + + echo '</div></div>'; + echo '</div><br>'; + + echo '<div class="alert alert-light" role="alert"><a href="https://geo.urbalyon.org/doc/sport/equipement_commune_complet.php?codeinsee='.$codeinsee.'" target="about:blank" class="alert-link"><ion-icon name="download"></ion-icon> Afficher</a> l\'ensemble des fiches de la commune</div>'; + + include ('footer.html'); + + }else{ + echo "Erreur : ".$oResult->rowCount()." équipement(s) trouvé(s) avec le code insee : ".$codeinsee; + } + }else{ + echo "Erreur : pas de numéro d'équipement passé en paramètre !"; + } + } +}catch (PDOException $e){ + echo "ERROR : ".$e->getMessage(); +} + + +?> \ No newline at end of file diff --git a/src/vitis/vas/doc/sport/equipement_commune_complet.php b/src/vitis/vas/doc/sport/equipement_commune_complet.php new file mode 100644 index 0000000000000000000000000000000000000000..77b56ce14bf1c88ab312be738914cd79556f7092 --- /dev/null +++ b/src/vitis/vas/doc/sport/equipement_commune_complet.php @@ -0,0 +1,56 @@ +<?php +// https://geo.urbalyon.org/doc/sport/equipement_commune_complet.php?codeinsee=69149 +require_once("../../rest/conf/properties.inc"); +require_once("properties_sport.inc"); +require_once("lib_sport.inc"); + + +try{ + $oConn = new PDO('pgsql:host=srv-postgres;port=5432;dbname='.$properties['db_sport'], $properties['db_user_sport'], $properties['db_pass_sport']); + + if($oConn){ + if (isset($_REQUEST["codeinsee"])){ + $codeinsee = $_REQUEST["codeinsee"]; + // get data Installation + $oResult = $oConn->prepare('SELECT installation.*, commune FROM '.$properties['schema_res'].'.installation INNER JOIN sport.commune ON installation.codeinsee=commune.codeinsee WHERE installation.codeinsee='.$codeinsee); + $oResult->execute(); + + if ($oResult->rowCount()>0){ + include ('header.html'); + $aInstallations = $oResult->fetchAll(); + foreach ($aInstallations as $aInstallation) { + include ('installation.html'); + $oResult2 = $oConn->prepare('SELECT equipement.*, typequipement FROM '.$properties['schema_res'].'.equipement INNER JOIN '.$properties['schema_res'].'.typequipement ON equipement.codetypequipement=typequipement.codetypequipement WHERE numinstallation=\''.$aInstallation["numinstallation"].'\''); + $oResult2->execute(); + $aEquipements = $oResult2->fetchAll(); + foreach ($aEquipements as $aEquipement) { + $aTypeErpEtablissement = explode(',',$aEquipement['type_erp_etablissement']); + if (count($aTypeErpEtablissement)>0){ + $aEquipement['type_erp_etablissement']=get_ERP($aTypeErpEtablissement); + }else{ + $aEquipement['type_erp_etablissement']='Aucun'; + } + + $oResult3 = $oConn->prepare('SELECT activite_equipement.*, activite FROM '.$properties['schema_res'].'.activite_equipement INNER JOIN '.$properties['schema_res'].'.activite ON activite_equipement.codeactivite=activite.codeactivite WHERE numequipement=\''.$aEquipement["numequipement"].'\''); + $oResult3->execute(); + $aActivites = $oResult3->fetchAll(); + + include ('equipement.html'); + } + } + + include ('footer.html'); + + }else{ + echo "Erreur : ".$oResult->rowCount()." équipement(s) trouvé(s) avec le code insee : ".$codeinsee; + } + }else{ + echo "Erreur : pas de numéro d'équipement passé en paramètre !"; + } + } +}catch (PDOException $e){ + echo "ERROR : ".$e->getMessage(); +} + + +?> \ No newline at end of file diff --git a/src/vitis/vas/doc/sport/footer.html b/src/vitis/vas/doc/sport/footer.html new file mode 100644 index 0000000000000000000000000000000000000000..faa2c3657f4b56e435d9d06aaf3590bfdc565e2f --- /dev/null +++ b/src/vitis/vas/doc/sport/footer.html @@ -0,0 +1,21 @@ + + <div class="row pt-5 footer_fiche"><div class="col"><img src="images/ministere_sports.png" width="130px"></div></div> + <div class="row footer_fiche"> + <div class="col"><i>Source : Recensement des équipements sportifs, espaces et sites de pratiques (RES) février 2019</i></div> + </div> + <div class="row footer_fiche"> + <div class="col">Contact pour modifier la base : res@jeunesse-sports.gouv.fr (ministère)</div> + </div> + <div class="row pt-2 footer_fiche"><div class="col"><img src="images/urbalyon.png" width="100px></div></div> + <div class="row footer_fiche"> + <div class="col">Réalisation : Agence d'urbanisme de l'aire métropolitaine de lyonnnaise</div> + </div> + </div> + <!-- Optional JavaScript --> + <!-- jQuery first, then Popper.js, then Bootstrap JS --> + <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> + <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script> + <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script> + <script src="https://unpkg.com/ionicons@4.5.10-0/dist/ionicons.js"></script> + </body> +</html> \ No newline at end of file diff --git a/src/vitis/vas/doc/sport/footer_club.html b/src/vitis/vas/doc/sport/footer_club.html new file mode 100644 index 0000000000000000000000000000000000000000..051190aa19729fff34956cbdf351c4c556feca1a --- /dev/null +++ b/src/vitis/vas/doc/sport/footer_club.html @@ -0,0 +1,11 @@ + + + </div> + <!-- Optional JavaScript --> + <!-- jQuery first, then Popper.js, then Bootstrap JS --> + <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> + <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script> + <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script> + <script src="https://unpkg.com/ionicons@4.5.10-0/dist/ionicons.js"></script> + </body> +</html> \ No newline at end of file diff --git a/src/vitis/vas/doc/sport/header.html b/src/vitis/vas/doc/sport/header.html new file mode 100644 index 0000000000000000000000000000000000000000..947bb1b0d04fbbd683456f08c176cfd789f3ac62 --- /dev/null +++ b/src/vitis/vas/doc/sport/header.html @@ -0,0 +1,15 @@ +<!doctype html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <title>Fiche Équipement</title> + <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> + <link rel="stylesheet" href="style.css"> +</head> +<body> + <div class="container"> + <div class="row pt-2 header_fiche"><div class="col"><img src="images/grand_lyon.png" width="150px"></div></div> + <div class="row"> + <div class="col-sm title_fiche"><h3>FICHE EQUIPEMENT</h3></div> + </div> diff --git a/src/vitis/vas/doc/sport/header_club.html b/src/vitis/vas/doc/sport/header_club.html new file mode 100644 index 0000000000000000000000000000000000000000..07700deab7fe0a3c6115a107e6e80055abb0f366 --- /dev/null +++ b/src/vitis/vas/doc/sport/header_club.html @@ -0,0 +1,31 @@ +<!doctype html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <title>Équipement / Fiche Club</title> + <script src="https://cdn.jsdelivr.net/npm/chart.js@2.8.0"></script> + <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> + <link rel="stylesheet" href="style.css"> + <script type='text/javascript'> + var dynamicColors = function() { + var r = Math.floor(Math.random() * 255); + var g = Math.floor(Math.random() * 255); + var b = Math.floor(Math.random() * 255); + return "rgb(" + r + "," + g + "," + b + ")"; + } + </script> +</head> +<body> + <div class="container"> + <div class="row pt-2 header_fiche"><div class="col"><img src="images/grand_lyon.png" width="150px"></div></div> + <div class="row"> + <div class="col-sm title_fiche"><h3>Équipement "<?php echo $sEquipement; ?>"</h3></div> + </div> + <div class="row"> + <div class="col-sm title_fiche">"<?php echo $aEquipements[0]["famille"]; ?>"</div> + </div> + <div class="row"> + <div class="col-sm title_fiche"><?php echo $aEquipements[0]["adresse"]." ".$aEquipements[0]["codepostal"]." ".$aEquipements[0]["commune"]; ?></div> + </div> + <br> diff --git a/src/vitis/vas/doc/sport/header_commune.html b/src/vitis/vas/doc/sport/header_commune.html new file mode 100644 index 0000000000000000000000000000000000000000..449e034109ad87ae0344a07c43ba6e3fa292b448 --- /dev/null +++ b/src/vitis/vas/doc/sport/header_commune.html @@ -0,0 +1,16 @@ +<!doctype html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <title>Commune / Fiche Équipement</title> + <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> + <link rel="stylesheet" href="style.css"> +</head> +<body> + <div class="container"> + <div class="row pt-2 header_fiche"><div class="col"><img src="images/grand_lyon.png" width="150px"></div></div> + <div class="row"> + <div class="col-sm title_fiche"><h3>Commune "<?php echo $sCommune; ?>"</h3></div> + </div> + <br> diff --git a/src/vitis/vas/doc/sport/images/grand_lyon.png b/src/vitis/vas/doc/sport/images/grand_lyon.png new file mode 100644 index 0000000000000000000000000000000000000000..7ecc936312a5c68eef586224b011b81ddc58adae Binary files /dev/null and b/src/vitis/vas/doc/sport/images/grand_lyon.png differ diff --git a/src/vitis/vas/doc/sport/images/ministere_sports.png b/src/vitis/vas/doc/sport/images/ministere_sports.png new file mode 100644 index 0000000000000000000000000000000000000000..24af61c5f571903e745e2db5b13cc1e071cda9e1 Binary files /dev/null and b/src/vitis/vas/doc/sport/images/ministere_sports.png differ diff --git a/src/vitis/vas/doc/sport/images/urbalyon.png b/src/vitis/vas/doc/sport/images/urbalyon.png new file mode 100644 index 0000000000000000000000000000000000000000..6c68f9b7ed875eddce4318780e59a09f3d5bd0cd Binary files /dev/null and b/src/vitis/vas/doc/sport/images/urbalyon.png differ diff --git a/src/vitis/vas/doc/sport/installation.html b/src/vitis/vas/doc/sport/installation.html new file mode 100644 index 0000000000000000000000000000000000000000..545dc33745c0e773df036ad7613b83fbaf3d8c63 --- /dev/null +++ b/src/vitis/vas/doc/sport/installation.html @@ -0,0 +1,39 @@ + <!------------------------------------------------- INSTALLATION -------------------------------------------------> + <div class="row mt-5 title_installation"> + <div class="col-sm"><h4>Installation</h4></div> + <div class="col-sm"></div> + <div class="col-sm">(peut intégrer plusieurs équipements)</div> + </div> + <div class="row"> + <div class="col-2 subtitle_installation text-right">n°<?php echo $aInstallation["numinstallation"]; ?></div> + <div class="col subtitle_installation"><h4><?php echo $aInstallation["nominstallation"]; ?></h4></div> + </div> + <div class="row"> + <div class="col-5 subtitle_installation text-right"><?php echo $aInstallation["adresse"]; ?></div> + <div class="col-7 subtitle_installation"><?php echo $aInstallation["codepostal"]; ?> <?php echo $aInstallation["commune"]; ?></div> + </div> + <div class="row"> + <div class="col-6 text-right">Installation particulière :</div><div class="col-6"><?php echo $aInstallation["particularite"]; ?></div> + </div> + <div class="row"> + <div class="col-6 text-right">Multi commune</div><div class="col-6"><?php echo $aInstallation["plusieurs_communes"] ? "Oui" : "Non"; ?></div> + </div> + <div class="row"> + <div class="col-6 text-right">Possibilité de restauration</div><div class="col-6"><?php echo $aInstallation["restauration"] ? "Oui" : "Non"; ?></div> + </div> + <div class="row"> + <div class="col-6 text-right">Possibilité d'hébergement</div><div class="col-1"><?php echo $aInstallation["hebergement"] ? "Oui" : "Non"; ?></div> + <div class="col-3 text-right">Nombre de lits</div><div class="col-1"><?php echo $aInstallation["nb_lit"]; ?></div> + </div> + <div class="row"> + <div class="col-6 text-right">Nombre total de places de parking</div><div class="col-6"><?php echo $aInstallation["nb_parking"]; ?></div> + </div> + <div class="row"> + <div class="col-6 text-right">Dont nombre de places de parking handicapés</div><div class="col-6"><?php echo $aInstallation["nb_parking_handicap"]; ?></div> + </div> + <div class="row"> + <div class="col-6 text-right">Emprise foncière</div><div class="col-6"><?php echo $aInstallation["emprise_fonciere"]; ?> m²</div> + </div> + <div class="row"> + <div class="col-6 text-right">Desserte</div><div class="col-6"><?php echo $aInstallation["accessibilite"]; ?></div> + </div> diff --git a/src/vitis/vas/doc/sport/lib_sport.inc b/src/vitis/vas/doc/sport/lib_sport.inc new file mode 100644 index 0000000000000000000000000000000000000000..ccee1b8ed218f7d5968b223b1fd1de7629d77be8 --- /dev/null +++ b/src/vitis/vas/doc/sport/lib_sport.inc @@ -0,0 +1,39 @@ +<?php + + +function get_ERP($aTypeErpEtablissement){ + $aTypeErpEtablissementResult=array(); + $aErpNom=array( + "REF"=>"Refuge de montagne", + "OA"=>"Hôtel-restaurant d'altitude", + "GA"=>"Gare (pour sa partie accessible au public)", + "PS"=>"Parcs de stationnement couvert", + "SG"=>"Structure gonflable", + "PA"=>"Établissement de plein air", + "Y"=>"Musée", + "X"=>"Établissement sportif clos et couvert, salle omnisports, patinoire, manège, piscine couverte, transformable ou mixte ou salle polyvalente sportive de moins de 1 200 m² ou d'une hauteur sous plafond de plus de 6,50 m", + "W"=>"Administration, banque, bureau (sauf si le professionnel ne reçoit pas de clientèle dans son bureau)", + "V"=>"Lieu de culte", + "U"=>"Établissement de santé public ou privé, clinique, hôpital, pouponnière, établissement de cure thermale", + "T"=>"Salle d'exposition", + "S"=>"Bibliothèque et centre de documentation", + "R"=>"Crèche, école maternelle, halte-garderie, jardin d'enfants ou Établissement d'enseignement et de formation ou Centre de vacance et centre de loisirs (sans hébergement)", + "P"=>"Salles de danse et salle de jeux", + "O"=>"Hôtel, pension de famille, résidence de tourisme", + "N"=>"Restaurant et débit de boisson", + "M"=>"Magasin de vente et centre commercial", + "L"=>"Salle d'audition, de conférence, multimédia ou salle de réunion, de quartier, réservée aux associations ou salle de spectacle (y compris cirque non forain) ou de cabaret ou salle de projection, multimédia ou salle polyvalente à dominante sportive de plus de 1 200 m² ou d'une hauteur sous plafond de moins de 6,50 m", + "J"=>"Structure d'accueil pour personnes âgées ou structure d'accueil personnes handicapées" + ); + foreach ($aTypeErpEtablissement as $sErp) { + if (isset($aErpNom[$sErp])) { + $aTypeErpEtablissementResult[count($aTypeErpEtablissementResult)+1]=$aErpNom[$sErp]; + }else{ + $aTypeErpEtablissementResult[count($aTypeErpEtablissementResult)+1]=$sErp; + } + } + return $aTypeErpEtablissementResult; +} + + +?> \ No newline at end of file diff --git a/src/vitis/vas/doc/sport/properties_sport.inc b/src/vitis/vas/doc/sport/properties_sport.inc new file mode 100644 index 0000000000000000000000000000000000000000..c1491cf9ca712cbbf40397dc49951cdd8b9a0ba3 --- /dev/null +++ b/src/vitis/vas/doc/sport/properties_sport.inc @@ -0,0 +1,10 @@ +<?php + +$properties['db_sport']='sport'; +$properties['db_user_sport']='sport'; +$properties['db_pass_sport']='Urbalyon35*'; +$properties['schema_res']='res_2019'; +$properties['schema_sport']='sport'; + + +?> \ No newline at end of file diff --git a/src/vitis/vas/doc/sport/style.css b/src/vitis/vas/doc/sport/style.css new file mode 100644 index 0000000000000000000000000000000000000000..29d281ab2d1899bf6733bc5f7ec5a19ab010e98d --- /dev/null +++ b/src/vitis/vas/doc/sport/style.css @@ -0,0 +1,54 @@ + + +.title_fiche { + text-align: center; +} + +.title_installation { + text-align: left; + background-color: #89BE81; + color: #4E6D48; +} + +.subtitle_installation { + text-align: left; + background-color: #CBF0C5; +} + +.title_equipement { + text-align: left; + background-color: #99C5D6; + color: #2D708A; +} + +.subtitle_equipement { + text-align: left; + background-color: #C6DAE2; +} + +.title_activite { + text-align: left; + background-color: #FFD97F; + color: #AC7B07; +} + +.subtitle_activite { + text-align: right; + background-color: #FFF3D7; +} + +.header_fiche { + text-align: right; +} +.footer_fiche { + text-align: center; +} + + +.blue_title { + text-align: left; + font-weight: bold; + color: #4d94ff; + border-top: solid; + border-color: #4d94ff; +} \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/css/bootstrap_4.3.1/bootstrap.min.css b/src/vitis/vas/doc/suivi_prod_immo/css/bootstrap_4.3.1/bootstrap.min.css new file mode 100644 index 0000000000000000000000000000000000000000..92e3fe871295c44f8fa58ddc7ac242463f13e6bd --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/css/bootstrap_4.3.1/bootstrap.min.css @@ -0,0 +1,7 @@ +/*! + * Bootstrap v4.3.1 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors + * Copyright 2011-2019 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */:root{--blue:#007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#dc3545;--orange:#fd7e14;--yellow:#ffc107;--green:#28a745;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#6c757d;--gray-dark:#343a40;--primary:#007bff;--secondary:#6c757d;--success:#28a745;--info:#17a2b8;--warning:#ffc107;--danger:#dc3545;--light:#f8f9fa;--dark:#343a40;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:2.5rem}.h2,h2{font-size:2rem}.h3,h3{font-size:1.75rem}.h4,h4{font-size:1.5rem}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:6rem;font-weight:300;line-height:1.2}.display-2{font-size:5.5rem;font-weight:300;line-height:1.2}.display-3{font-size:4.5rem;font-weight:300;line-height:1.2}.display-4{font-size:3.5rem;font-weight:300;line-height:1.2}hr{margin-top:1rem;margin-bottom:1rem;border:0;border-top:1px solid rgba(0,0,0,.1)}.small,small{font-size:80%;font-weight:400}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:90%;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote-footer{display:block;font-size:80%;color:#6c757d}.blockquote-footer::before{content:"\2014\00A0"}.img-fluid{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid #dee2e6;border-radius:.25rem;max-width:100%;height:auto}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:90%;color:#6c757d}code{font-size:87.5%;color:#e83e8c;word-break:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:87.5%;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:100%;font-weight:700}pre{display:block;font-size:87.5%;color:#212529}pre code{font-size:inherit;color:inherit;word-break:normal}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:576px){.container{max-width:540px}}@media (min-width:768px){.container{max-width:720px}}@media (min-width:992px){.container{max-width:960px}}@media (min-width:1200px){.container{max-width:1140px}}.container-fluid{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}.no-gutters{margin-right:0;margin-left:0}.no-gutters>.col,.no-gutters>[class*=col-]{padding-right:0;padding-left:0}.col,.col-1,.col-10,.col-11,.col-12,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-auto,.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-auto,.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-auto,.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-auto,.col-xl,.col-xl-1,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-auto{position:relative;width:100%;padding-right:15px;padding-left:15px}.col{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-first{-ms-flex-order:-1;order:-1}.order-last{-ms-flex-order:13;order:13}.order-0{-ms-flex-order:0;order:0}.order-1{-ms-flex-order:1;order:1}.order-2{-ms-flex-order:2;order:2}.order-3{-ms-flex-order:3;order:3}.order-4{-ms-flex-order:4;order:4}.order-5{-ms-flex-order:5;order:5}.order-6{-ms-flex-order:6;order:6}.order-7{-ms-flex-order:7;order:7}.order-8{-ms-flex-order:8;order:8}.order-9{-ms-flex-order:9;order:9}.order-10{-ms-flex-order:10;order:10}.order-11{-ms-flex-order:11;order:11}.order-12{-ms-flex-order:12;order:12}.offset-1{margin-left:8.333333%}.offset-2{margin-left:16.666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.333333%}.offset-5{margin-left:41.666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.333333%}.offset-8{margin-left:66.666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.333333%}.offset-11{margin-left:91.666667%}@media (min-width:576px){.col-sm{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-sm-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-sm-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-sm-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-sm-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-sm-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-sm-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-sm-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-sm-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-sm-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-sm-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-sm-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-sm-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-sm-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-sm-first{-ms-flex-order:-1;order:-1}.order-sm-last{-ms-flex-order:13;order:13}.order-sm-0{-ms-flex-order:0;order:0}.order-sm-1{-ms-flex-order:1;order:1}.order-sm-2{-ms-flex-order:2;order:2}.order-sm-3{-ms-flex-order:3;order:3}.order-sm-4{-ms-flex-order:4;order:4}.order-sm-5{-ms-flex-order:5;order:5}.order-sm-6{-ms-flex-order:6;order:6}.order-sm-7{-ms-flex-order:7;order:7}.order-sm-8{-ms-flex-order:8;order:8}.order-sm-9{-ms-flex-order:9;order:9}.order-sm-10{-ms-flex-order:10;order:10}.order-sm-11{-ms-flex-order:11;order:11}.order-sm-12{-ms-flex-order:12;order:12}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.333333%}.offset-sm-2{margin-left:16.666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.333333%}.offset-sm-5{margin-left:41.666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.333333%}.offset-sm-8{margin-left:66.666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.333333%}.offset-sm-11{margin-left:91.666667%}}@media (min-width:768px){.col-md{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-md-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-md-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-md-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-md-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-md-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-md-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-md-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-md-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-md-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-md-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-md-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-md-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-md-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-md-first{-ms-flex-order:-1;order:-1}.order-md-last{-ms-flex-order:13;order:13}.order-md-0{-ms-flex-order:0;order:0}.order-md-1{-ms-flex-order:1;order:1}.order-md-2{-ms-flex-order:2;order:2}.order-md-3{-ms-flex-order:3;order:3}.order-md-4{-ms-flex-order:4;order:4}.order-md-5{-ms-flex-order:5;order:5}.order-md-6{-ms-flex-order:6;order:6}.order-md-7{-ms-flex-order:7;order:7}.order-md-8{-ms-flex-order:8;order:8}.order-md-9{-ms-flex-order:9;order:9}.order-md-10{-ms-flex-order:10;order:10}.order-md-11{-ms-flex-order:11;order:11}.order-md-12{-ms-flex-order:12;order:12}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.333333%}.offset-md-2{margin-left:16.666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.333333%}.offset-md-5{margin-left:41.666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.333333%}.offset-md-8{margin-left:66.666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.333333%}.offset-md-11{margin-left:91.666667%}}@media (min-width:992px){.col-lg{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-lg-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-lg-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-lg-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-lg-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-lg-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-lg-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-lg-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-lg-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-lg-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-lg-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-lg-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-lg-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-lg-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-lg-first{-ms-flex-order:-1;order:-1}.order-lg-last{-ms-flex-order:13;order:13}.order-lg-0{-ms-flex-order:0;order:0}.order-lg-1{-ms-flex-order:1;order:1}.order-lg-2{-ms-flex-order:2;order:2}.order-lg-3{-ms-flex-order:3;order:3}.order-lg-4{-ms-flex-order:4;order:4}.order-lg-5{-ms-flex-order:5;order:5}.order-lg-6{-ms-flex-order:6;order:6}.order-lg-7{-ms-flex-order:7;order:7}.order-lg-8{-ms-flex-order:8;order:8}.order-lg-9{-ms-flex-order:9;order:9}.order-lg-10{-ms-flex-order:10;order:10}.order-lg-11{-ms-flex-order:11;order:11}.order-lg-12{-ms-flex-order:12;order:12}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.333333%}.offset-lg-2{margin-left:16.666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.333333%}.offset-lg-5{margin-left:41.666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.333333%}.offset-lg-8{margin-left:66.666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.333333%}.offset-lg-11{margin-left:91.666667%}}@media (min-width:1200px){.col-xl{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-xl-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-xl-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-xl-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-xl-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-xl-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-xl-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-xl-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-xl-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-xl-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-xl-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-xl-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-xl-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-xl-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-xl-first{-ms-flex-order:-1;order:-1}.order-xl-last{-ms-flex-order:13;order:13}.order-xl-0{-ms-flex-order:0;order:0}.order-xl-1{-ms-flex-order:1;order:1}.order-xl-2{-ms-flex-order:2;order:2}.order-xl-3{-ms-flex-order:3;order:3}.order-xl-4{-ms-flex-order:4;order:4}.order-xl-5{-ms-flex-order:5;order:5}.order-xl-6{-ms-flex-order:6;order:6}.order-xl-7{-ms-flex-order:7;order:7}.order-xl-8{-ms-flex-order:8;order:8}.order-xl-9{-ms-flex-order:9;order:9}.order-xl-10{-ms-flex-order:10;order:10}.order-xl-11{-ms-flex-order:11;order:11}.order-xl-12{-ms-flex-order:12;order:12}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.333333%}.offset-xl-2{margin-left:16.666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.333333%}.offset-xl-5{margin-left:41.666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.333333%}.offset-xl-8{margin-left:66.666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.333333%}.offset-xl-11{margin-left:91.666667%}}.table{width:100%;margin-bottom:1rem;color:#212529}.table td,.table th{padding:.75rem;vertical-align:top;border-top:1px solid #dee2e6}.table thead th{vertical-align:bottom;border-bottom:2px solid #dee2e6}.table tbody+tbody{border-top:2px solid #dee2e6}.table-sm td,.table-sm th{padding:.3rem}.table-bordered{border:1px solid #dee2e6}.table-bordered td,.table-bordered th{border:1px solid #dee2e6}.table-bordered thead td,.table-bordered thead th{border-bottom-width:2px}.table-borderless tbody+tbody,.table-borderless td,.table-borderless th,.table-borderless thead th{border:0}.table-striped tbody tr:nth-of-type(odd){background-color:rgba(0,0,0,.05)}.table-hover tbody tr:hover{color:#212529;background-color:rgba(0,0,0,.075)}.table-primary,.table-primary>td,.table-primary>th{background-color:#b8daff}.table-primary tbody+tbody,.table-primary td,.table-primary th,.table-primary thead th{border-color:#7abaff}.table-hover .table-primary:hover{background-color:#9fcdff}.table-hover .table-primary:hover>td,.table-hover .table-primary:hover>th{background-color:#9fcdff}.table-secondary,.table-secondary>td,.table-secondary>th{background-color:#d6d8db}.table-secondary tbody+tbody,.table-secondary td,.table-secondary th,.table-secondary thead th{border-color:#b3b7bb}.table-hover .table-secondary:hover{background-color:#c8cbcf}.table-hover .table-secondary:hover>td,.table-hover .table-secondary:hover>th{background-color:#c8cbcf}.table-success,.table-success>td,.table-success>th{background-color:#c3e6cb}.table-success tbody+tbody,.table-success td,.table-success th,.table-success thead th{border-color:#8fd19e}.table-hover .table-success:hover{background-color:#b1dfbb}.table-hover .table-success:hover>td,.table-hover .table-success:hover>th{background-color:#b1dfbb}.table-info,.table-info>td,.table-info>th{background-color:#bee5eb}.table-info tbody+tbody,.table-info td,.table-info th,.table-info thead th{border-color:#86cfda}.table-hover .table-info:hover{background-color:#abdde5}.table-hover .table-info:hover>td,.table-hover .table-info:hover>th{background-color:#abdde5}.table-warning,.table-warning>td,.table-warning>th{background-color:#ffeeba}.table-warning tbody+tbody,.table-warning td,.table-warning th,.table-warning thead th{border-color:#ffdf7e}.table-hover .table-warning:hover{background-color:#ffe8a1}.table-hover .table-warning:hover>td,.table-hover .table-warning:hover>th{background-color:#ffe8a1}.table-danger,.table-danger>td,.table-danger>th{background-color:#f5c6cb}.table-danger tbody+tbody,.table-danger td,.table-danger th,.table-danger thead th{border-color:#ed969e}.table-hover .table-danger:hover{background-color:#f1b0b7}.table-hover .table-danger:hover>td,.table-hover .table-danger:hover>th{background-color:#f1b0b7}.table-light,.table-light>td,.table-light>th{background-color:#fdfdfe}.table-light tbody+tbody,.table-light td,.table-light th,.table-light thead th{border-color:#fbfcfc}.table-hover .table-light:hover{background-color:#ececf6}.table-hover .table-light:hover>td,.table-hover .table-light:hover>th{background-color:#ececf6}.table-dark,.table-dark>td,.table-dark>th{background-color:#c6c8ca}.table-dark tbody+tbody,.table-dark td,.table-dark th,.table-dark thead th{border-color:#95999c}.table-hover .table-dark:hover{background-color:#b9bbbe}.table-hover .table-dark:hover>td,.table-hover .table-dark:hover>th{background-color:#b9bbbe}.table-active,.table-active>td,.table-active>th{background-color:rgba(0,0,0,.075)}.table-hover .table-active:hover{background-color:rgba(0,0,0,.075)}.table-hover .table-active:hover>td,.table-hover .table-active:hover>th{background-color:rgba(0,0,0,.075)}.table .thead-dark th{color:#fff;background-color:#343a40;border-color:#454d55}.table .thead-light th{color:#495057;background-color:#e9ecef;border-color:#dee2e6}.table-dark{color:#fff;background-color:#343a40}.table-dark td,.table-dark th,.table-dark thead th{border-color:#454d55}.table-dark.table-bordered{border:0}.table-dark.table-striped tbody tr:nth-of-type(odd){background-color:rgba(255,255,255,.05)}.table-dark.table-hover tbody tr:hover{color:#fff;background-color:rgba(255,255,255,.075)}@media (max-width:575.98px){.table-responsive-sm{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-sm>.table-bordered{border:0}}@media (max-width:767.98px){.table-responsive-md{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-md>.table-bordered{border:0}}@media (max-width:991.98px){.table-responsive-lg{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-lg>.table-bordered{border:0}}@media (max-width:1199.98px){.table-responsive-xl{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-xl>.table-bordered{border:0}}.table-responsive{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive>.table-bordered{border:0}.form-control{display:block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;border-radius:.25rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control{transition:none}}.form-control::-ms-expand{background-color:transparent;border:0}.form-control:focus{color:#495057;background-color:#fff;border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.form-control::-webkit-input-placeholder{color:#6c757d;opacity:1}.form-control::-moz-placeholder{color:#6c757d;opacity:1}.form-control:-ms-input-placeholder{color:#6c757d;opacity:1}.form-control::-ms-input-placeholder{color:#6c757d;opacity:1}.form-control::placeholder{color:#6c757d;opacity:1}.form-control:disabled,.form-control[readonly]{background-color:#e9ecef;opacity:1}select.form-control:focus::-ms-value{color:#495057;background-color:#fff}.form-control-file,.form-control-range{display:block;width:100%}.col-form-label{padding-top:calc(.375rem + 1px);padding-bottom:calc(.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(.5rem + 1px);padding-bottom:calc(.5rem + 1px);font-size:1.25rem;line-height:1.5}.col-form-label-sm{padding-top:calc(.25rem + 1px);padding-bottom:calc(.25rem + 1px);font-size:.875rem;line-height:1.5}.form-control-plaintext{display:block;width:100%;padding-top:.375rem;padding-bottom:.375rem;margin-bottom:0;line-height:1.5;color:#212529;background-color:transparent;border:solid transparent;border-width:1px 0}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}.form-control-sm{height:calc(1.5em + .5rem + 2px);padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.form-control-lg{height:calc(1.5em + 1rem + 2px);padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}select.form-control[multiple],select.form-control[size]{height:auto}textarea.form-control{height:auto}.form-group{margin-bottom:1rem}.form-text{display:block;margin-top:.25rem}.form-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-5px;margin-left:-5px}.form-row>.col,.form-row>[class*=col-]{padding-right:5px;padding-left:5px}.form-check{position:relative;display:block;padding-left:1.25rem}.form-check-input{position:absolute;margin-top:.3rem;margin-left:-1.25rem}.form-check-input:disabled~.form-check-label{color:#6c757d}.form-check-label{margin-bottom:0}.form-check-inline{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;padding-left:0;margin-right:.75rem}.form-check-inline .form-check-input{position:static;margin-top:0;margin-right:.3125rem;margin-left:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#28a745}.valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(40,167,69,.9);border-radius:.25rem}.form-control.is-valid,.was-validated .form-control:valid{border-color:#28a745;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:center right calc(.375em + .1875rem);background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-valid:focus,.was-validated .form-control:valid:focus{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.form-control.is-valid~.valid-feedback,.form-control.is-valid~.valid-tooltip,.was-validated .form-control:valid~.valid-feedback,.was-validated .form-control:valid~.valid-tooltip{display:block}.was-validated textarea.form-control:valid,textarea.form-control.is-valid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.custom-select.is-valid,.was-validated .custom-select:valid{border-color:#28a745;padding-right:calc((1em + .75rem) * 3 / 4 + 1.75rem);background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px,url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") #fff no-repeat center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem)}.custom-select.is-valid:focus,.was-validated .custom-select:valid:focus{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.custom-select.is-valid~.valid-feedback,.custom-select.is-valid~.valid-tooltip,.was-validated .custom-select:valid~.valid-feedback,.was-validated .custom-select:valid~.valid-tooltip{display:block}.form-control-file.is-valid~.valid-feedback,.form-control-file.is-valid~.valid-tooltip,.was-validated .form-control-file:valid~.valid-feedback,.was-validated .form-control-file:valid~.valid-tooltip{display:block}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:#28a745}.form-check-input.is-valid~.valid-feedback,.form-check-input.is-valid~.valid-tooltip,.was-validated .form-check-input:valid~.valid-feedback,.was-validated .form-check-input:valid~.valid-tooltip{display:block}.custom-control-input.is-valid~.custom-control-label,.was-validated .custom-control-input:valid~.custom-control-label{color:#28a745}.custom-control-input.is-valid~.custom-control-label::before,.was-validated .custom-control-input:valid~.custom-control-label::before{border-color:#28a745}.custom-control-input.is-valid~.valid-feedback,.custom-control-input.is-valid~.valid-tooltip,.was-validated .custom-control-input:valid~.valid-feedback,.was-validated .custom-control-input:valid~.valid-tooltip{display:block}.custom-control-input.is-valid:checked~.custom-control-label::before,.was-validated .custom-control-input:valid:checked~.custom-control-label::before{border-color:#34ce57;background-color:#34ce57}.custom-control-input.is-valid:focus~.custom-control-label::before,.was-validated .custom-control-input:valid:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.custom-control-input.is-valid:focus:not(:checked)~.custom-control-label::before,.was-validated .custom-control-input:valid:focus:not(:checked)~.custom-control-label::before{border-color:#28a745}.custom-file-input.is-valid~.custom-file-label,.was-validated .custom-file-input:valid~.custom-file-label{border-color:#28a745}.custom-file-input.is-valid~.valid-feedback,.custom-file-input.is-valid~.valid-tooltip,.was-validated .custom-file-input:valid~.valid-feedback,.was-validated .custom-file-input:valid~.valid-tooltip{display:block}.custom-file-input.is-valid:focus~.custom-file-label,.was-validated .custom-file-input:valid:focus~.custom-file-label{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#dc3545}.invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(220,53,69,.9);border-radius:.25rem}.form-control.is-invalid,.was-validated .form-control:invalid{border-color:#dc3545;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3e%3cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E");background-repeat:no-repeat;background-position:center right calc(.375em + .1875rem);background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-invalid:focus,.was-validated .form-control:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.form-control.is-invalid~.invalid-feedback,.form-control.is-invalid~.invalid-tooltip,.was-validated .form-control:invalid~.invalid-feedback,.was-validated .form-control:invalid~.invalid-tooltip{display:block}.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.custom-select.is-invalid,.was-validated .custom-select:invalid{border-color:#dc3545;padding-right:calc((1em + .75rem) * 3 / 4 + 1.75rem);background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px,url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3e%3cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E") #fff no-repeat center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem)}.custom-select.is-invalid:focus,.was-validated .custom-select:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.custom-select.is-invalid~.invalid-feedback,.custom-select.is-invalid~.invalid-tooltip,.was-validated .custom-select:invalid~.invalid-feedback,.was-validated .custom-select:invalid~.invalid-tooltip{display:block}.form-control-file.is-invalid~.invalid-feedback,.form-control-file.is-invalid~.invalid-tooltip,.was-validated .form-control-file:invalid~.invalid-feedback,.was-validated .form-control-file:invalid~.invalid-tooltip{display:block}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:#dc3545}.form-check-input.is-invalid~.invalid-feedback,.form-check-input.is-invalid~.invalid-tooltip,.was-validated .form-check-input:invalid~.invalid-feedback,.was-validated .form-check-input:invalid~.invalid-tooltip{display:block}.custom-control-input.is-invalid~.custom-control-label,.was-validated .custom-control-input:invalid~.custom-control-label{color:#dc3545}.custom-control-input.is-invalid~.custom-control-label::before,.was-validated .custom-control-input:invalid~.custom-control-label::before{border-color:#dc3545}.custom-control-input.is-invalid~.invalid-feedback,.custom-control-input.is-invalid~.invalid-tooltip,.was-validated .custom-control-input:invalid~.invalid-feedback,.was-validated .custom-control-input:invalid~.invalid-tooltip{display:block}.custom-control-input.is-invalid:checked~.custom-control-label::before,.was-validated .custom-control-input:invalid:checked~.custom-control-label::before{border-color:#e4606d;background-color:#e4606d}.custom-control-input.is-invalid:focus~.custom-control-label::before,.was-validated .custom-control-input:invalid:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.custom-control-input.is-invalid:focus:not(:checked)~.custom-control-label::before,.was-validated .custom-control-input:invalid:focus:not(:checked)~.custom-control-label::before{border-color:#dc3545}.custom-file-input.is-invalid~.custom-file-label,.was-validated .custom-file-input:invalid~.custom-file-label{border-color:#dc3545}.custom-file-input.is-invalid~.invalid-feedback,.custom-file-input.is-invalid~.invalid-tooltip,.was-validated .custom-file-input:invalid~.invalid-feedback,.was-validated .custom-file-input:invalid~.invalid-tooltip{display:block}.custom-file-input.is-invalid:focus~.custom-file-label,.was-validated .custom-file-input:invalid:focus~.custom-file-label{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.form-inline{display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-align:center;align-items:center}.form-inline .form-check{width:100%}@media (min-width:576px){.form-inline label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;margin-bottom:0}.form-inline .form-group{display:-ms-flexbox;display:flex;-ms-flex:0 0 auto;flex:0 0 auto;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-align:center;align-items:center;margin-bottom:0}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-plaintext{display:inline-block}.form-inline .custom-select,.form-inline .input-group{width:auto}.form-inline .form-check{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:auto;padding-left:0}.form-inline .form-check-input{position:relative;-ms-flex-negative:0;flex-shrink:0;margin-top:0;margin-right:.25rem;margin-left:0}.form-inline .custom-control{-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.form-inline .custom-control-label{margin-bottom:0}}.btn{display:inline-block;font-weight:400;color:#212529;text-align:center;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:transparent;border:1px solid transparent;padding:.375rem .75rem;font-size:1rem;line-height:1.5;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn:hover{color:#212529;text-decoration:none}.btn.focus,.btn:focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.btn.disabled,.btn:disabled{opacity:.65}a.btn.disabled,fieldset:disabled a.btn{pointer-events:none}.btn-primary{color:#fff;background-color:#007bff;border-color:#007bff}.btn-primary:hover{color:#fff;background-color:#0069d9;border-color:#0062cc}.btn-primary.focus,.btn-primary:focus{box-shadow:0 0 0 .2rem rgba(38,143,255,.5)}.btn-primary.disabled,.btn-primary:disabled{color:#fff;background-color:#007bff;border-color:#007bff}.btn-primary:not(:disabled):not(.disabled).active,.btn-primary:not(:disabled):not(.disabled):active,.show>.btn-primary.dropdown-toggle{color:#fff;background-color:#0062cc;border-color:#005cbf}.btn-primary:not(:disabled):not(.disabled).active:focus,.btn-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(38,143,255,.5)}.btn-secondary{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:hover{color:#fff;background-color:#5a6268;border-color:#545b62}.btn-secondary.focus,.btn-secondary:focus{box-shadow:0 0 0 .2rem rgba(130,138,145,.5)}.btn-secondary.disabled,.btn-secondary:disabled{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:not(:disabled):not(.disabled).active,.btn-secondary:not(:disabled):not(.disabled):active,.show>.btn-secondary.dropdown-toggle{color:#fff;background-color:#545b62;border-color:#4e555b}.btn-secondary:not(:disabled):not(.disabled).active:focus,.btn-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(130,138,145,.5)}.btn-success{color:#fff;background-color:#28a745;border-color:#28a745}.btn-success:hover{color:#fff;background-color:#218838;border-color:#1e7e34}.btn-success.focus,.btn-success:focus{box-shadow:0 0 0 .2rem rgba(72,180,97,.5)}.btn-success.disabled,.btn-success:disabled{color:#fff;background-color:#28a745;border-color:#28a745}.btn-success:not(:disabled):not(.disabled).active,.btn-success:not(:disabled):not(.disabled):active,.show>.btn-success.dropdown-toggle{color:#fff;background-color:#1e7e34;border-color:#1c7430}.btn-success:not(:disabled):not(.disabled).active:focus,.btn-success:not(:disabled):not(.disabled):active:focus,.show>.btn-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(72,180,97,.5)}.btn-info{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-info:hover{color:#fff;background-color:#138496;border-color:#117a8b}.btn-info.focus,.btn-info:focus{box-shadow:0 0 0 .2rem rgba(58,176,195,.5)}.btn-info.disabled,.btn-info:disabled{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-info:not(:disabled):not(.disabled).active,.btn-info:not(:disabled):not(.disabled):active,.show>.btn-info.dropdown-toggle{color:#fff;background-color:#117a8b;border-color:#10707f}.btn-info:not(:disabled):not(.disabled).active:focus,.btn-info:not(:disabled):not(.disabled):active:focus,.show>.btn-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(58,176,195,.5)}.btn-warning{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-warning:hover{color:#212529;background-color:#e0a800;border-color:#d39e00}.btn-warning.focus,.btn-warning:focus{box-shadow:0 0 0 .2rem rgba(222,170,12,.5)}.btn-warning.disabled,.btn-warning:disabled{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-warning:not(:disabled):not(.disabled).active,.btn-warning:not(:disabled):not(.disabled):active,.show>.btn-warning.dropdown-toggle{color:#212529;background-color:#d39e00;border-color:#c69500}.btn-warning:not(:disabled):not(.disabled).active:focus,.btn-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(222,170,12,.5)}.btn-danger{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:hover{color:#fff;background-color:#c82333;border-color:#bd2130}.btn-danger.focus,.btn-danger:focus{box-shadow:0 0 0 .2rem rgba(225,83,97,.5)}.btn-danger.disabled,.btn-danger:disabled{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:not(:disabled):not(.disabled).active,.btn-danger:not(:disabled):not(.disabled):active,.show>.btn-danger.dropdown-toggle{color:#fff;background-color:#bd2130;border-color:#b21f2d}.btn-danger:not(:disabled):not(.disabled).active:focus,.btn-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(225,83,97,.5)}.btn-light{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:hover{color:#212529;background-color:#e2e6ea;border-color:#dae0e5}.btn-light.focus,.btn-light:focus{box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}.btn-light.disabled,.btn-light:disabled{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:not(:disabled):not(.disabled).active,.btn-light:not(:disabled):not(.disabled):active,.show>.btn-light.dropdown-toggle{color:#212529;background-color:#dae0e5;border-color:#d3d9df}.btn-light:not(:disabled):not(.disabled).active:focus,.btn-light:not(:disabled):not(.disabled):active:focus,.show>.btn-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}.btn-dark{color:#fff;background-color:#343a40;border-color:#343a40}.btn-dark:hover{color:#fff;background-color:#23272b;border-color:#1d2124}.btn-dark.focus,.btn-dark:focus{box-shadow:0 0 0 .2rem rgba(82,88,93,.5)}.btn-dark.disabled,.btn-dark:disabled{color:#fff;background-color:#343a40;border-color:#343a40}.btn-dark:not(:disabled):not(.disabled).active,.btn-dark:not(:disabled):not(.disabled):active,.show>.btn-dark.dropdown-toggle{color:#fff;background-color:#1d2124;border-color:#171a1d}.btn-dark:not(:disabled):not(.disabled).active:focus,.btn-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(82,88,93,.5)}.btn-outline-primary{color:#007bff;border-color:#007bff}.btn-outline-primary:hover{color:#fff;background-color:#007bff;border-color:#007bff}.btn-outline-primary.focus,.btn-outline-primary:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.btn-outline-primary.disabled,.btn-outline-primary:disabled{color:#007bff;background-color:transparent}.btn-outline-primary:not(:disabled):not(.disabled).active,.btn-outline-primary:not(:disabled):not(.disabled):active,.show>.btn-outline-primary.dropdown-toggle{color:#fff;background-color:#007bff;border-color:#007bff}.btn-outline-primary:not(:disabled):not(.disabled).active:focus,.btn-outline-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.btn-outline-secondary{color:#6c757d;border-color:#6c757d}.btn-outline-secondary:hover{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-outline-secondary.focus,.btn-outline-secondary:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.btn-outline-secondary.disabled,.btn-outline-secondary:disabled{color:#6c757d;background-color:transparent}.btn-outline-secondary:not(:disabled):not(.disabled).active,.btn-outline-secondary:not(:disabled):not(.disabled):active,.show>.btn-outline-secondary.dropdown-toggle{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-outline-secondary:not(:disabled):not(.disabled).active:focus,.btn-outline-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.btn-outline-success{color:#28a745;border-color:#28a745}.btn-outline-success:hover{color:#fff;background-color:#28a745;border-color:#28a745}.btn-outline-success.focus,.btn-outline-success:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.btn-outline-success.disabled,.btn-outline-success:disabled{color:#28a745;background-color:transparent}.btn-outline-success:not(:disabled):not(.disabled).active,.btn-outline-success:not(:disabled):not(.disabled):active,.show>.btn-outline-success.dropdown-toggle{color:#fff;background-color:#28a745;border-color:#28a745}.btn-outline-success:not(:disabled):not(.disabled).active:focus,.btn-outline-success:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.btn-outline-info{color:#17a2b8;border-color:#17a2b8}.btn-outline-info:hover{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-outline-info.focus,.btn-outline-info:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.btn-outline-info.disabled,.btn-outline-info:disabled{color:#17a2b8;background-color:transparent}.btn-outline-info:not(:disabled):not(.disabled).active,.btn-outline-info:not(:disabled):not(.disabled):active,.show>.btn-outline-info.dropdown-toggle{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-outline-info:not(:disabled):not(.disabled).active:focus,.btn-outline-info:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.btn-outline-warning{color:#ffc107;border-color:#ffc107}.btn-outline-warning:hover{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-outline-warning.focus,.btn-outline-warning:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.btn-outline-warning.disabled,.btn-outline-warning:disabled{color:#ffc107;background-color:transparent}.btn-outline-warning:not(:disabled):not(.disabled).active,.btn-outline-warning:not(:disabled):not(.disabled):active,.show>.btn-outline-warning.dropdown-toggle{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-outline-warning:not(:disabled):not(.disabled).active:focus,.btn-outline-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.btn-outline-danger{color:#dc3545;border-color:#dc3545}.btn-outline-danger:hover{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-outline-danger.focus,.btn-outline-danger:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.btn-outline-danger.disabled,.btn-outline-danger:disabled{color:#dc3545;background-color:transparent}.btn-outline-danger:not(:disabled):not(.disabled).active,.btn-outline-danger:not(:disabled):not(.disabled):active,.show>.btn-outline-danger.dropdown-toggle{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-outline-danger:not(:disabled):not(.disabled).active:focus,.btn-outline-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.btn-outline-light{color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:hover{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light.focus,.btn-outline-light:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-light.disabled,.btn-outline-light:disabled{color:#f8f9fa;background-color:transparent}.btn-outline-light:not(:disabled):not(.disabled).active,.btn-outline-light:not(:disabled):not(.disabled):active,.show>.btn-outline-light.dropdown-toggle{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:not(:disabled):not(.disabled).active:focus,.btn-outline-light:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-dark{color:#343a40;border-color:#343a40}.btn-outline-dark:hover{color:#fff;background-color:#343a40;border-color:#343a40}.btn-outline-dark.focus,.btn-outline-dark:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.btn-outline-dark.disabled,.btn-outline-dark:disabled{color:#343a40;background-color:transparent}.btn-outline-dark:not(:disabled):not(.disabled).active,.btn-outline-dark:not(:disabled):not(.disabled):active,.show>.btn-outline-dark.dropdown-toggle{color:#fff;background-color:#343a40;border-color:#343a40}.btn-outline-dark:not(:disabled):not(.disabled).active:focus,.btn-outline-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.btn-link{font-weight:400;color:#007bff;text-decoration:none}.btn-link:hover{color:#0056b3;text-decoration:underline}.btn-link.focus,.btn-link:focus{text-decoration:underline;box-shadow:none}.btn-link.disabled,.btn-link:disabled{color:#6c757d;pointer-events:none}.btn-group-lg>.btn,.btn-lg{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.btn-group-sm>.btn,.btn-sm{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:.5rem}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{position:relative;height:0;overflow:hidden;transition:height .35s ease}@media (prefers-reduced-motion:reduce){.collapsing{transition:none}}.dropdown,.dropleft,.dropright,.dropup{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:10rem;padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.dropdown-menu-left{right:auto;left:0}.dropdown-menu-right{right:0;left:auto}@media (min-width:576px){.dropdown-menu-sm-left{right:auto;left:0}.dropdown-menu-sm-right{right:0;left:auto}}@media (min-width:768px){.dropdown-menu-md-left{right:auto;left:0}.dropdown-menu-md-right{right:0;left:auto}}@media (min-width:992px){.dropdown-menu-lg-left{right:auto;left:0}.dropdown-menu-lg-right{right:0;left:auto}}@media (min-width:1200px){.dropdown-menu-xl-left{right:auto;left:0}.dropdown-menu-xl-right{right:0;left:auto}}.dropup .dropdown-menu{top:auto;bottom:100%;margin-top:0;margin-bottom:.125rem}.dropup .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty::after{margin-left:0}.dropright .dropdown-menu{top:0;right:auto;left:100%;margin-top:0;margin-left:.125rem}.dropright .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropright .dropdown-toggle:empty::after{margin-left:0}.dropright .dropdown-toggle::after{vertical-align:0}.dropleft .dropdown-menu{top:0;right:100%;left:auto;margin-top:0;margin-right:.125rem}.dropleft .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:""}.dropleft .dropdown-toggle::after{display:none}.dropleft .dropdown-toggle::before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropleft .dropdown-toggle:empty::after{margin-left:0}.dropleft .dropdown-toggle::before{vertical-align:0}.dropdown-menu[x-placement^=bottom],.dropdown-menu[x-placement^=left],.dropdown-menu[x-placement^=right],.dropdown-menu[x-placement^=top]{right:auto;bottom:auto}.dropdown-divider{height:0;margin:.5rem 0;overflow:hidden;border-top:1px solid #e9ecef}.dropdown-item{display:block;width:100%;padding:.25rem 1.5rem;clear:both;font-weight:400;color:#212529;text-align:inherit;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:focus,.dropdown-item:hover{color:#16181b;text-decoration:none;background-color:#f8f9fa}.dropdown-item.active,.dropdown-item:active{color:#fff;text-decoration:none;background-color:#007bff}.dropdown-item.disabled,.dropdown-item:disabled{color:#6c757d;pointer-events:none;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:.5rem 1.5rem;margin-bottom:0;font-size:.875rem;color:#6c757d;white-space:nowrap}.dropdown-item-text{display:block;padding:.25rem 1.5rem;color:#212529}.btn-group,.btn-group-vertical{position:relative;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;-ms-flex:1 1 auto;flex:1 1 auto}.btn-group-vertical>.btn:hover,.btn-group>.btn:hover{z-index:1}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus{z-index:1}.btn-toolbar{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:start;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group>.btn-group:not(:first-child),.btn-group>.btn:not(:first-child){margin-left:-1px}.btn-group>.btn-group:not(:last-child)>.btn,.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:not(:first-child)>.btn,.btn-group>.btn:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split::after,.dropright .dropdown-toggle-split::after,.dropup .dropdown-toggle-split::after{margin-left:0}.dropleft .dropdown-toggle-split::before{margin-right:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:center;justify-content:center}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{width:100%}.btn-group-vertical>.btn-group:not(:first-child),.btn-group-vertical>.btn:not(:first-child){margin-top:-1px}.btn-group-vertical>.btn-group:not(:last-child)>.btn,.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child)>.btn,.btn-group-vertical>.btn:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.btn-group-toggle>.btn,.btn-group-toggle>.btn-group>.btn{margin-bottom:0}.btn-group-toggle>.btn input[type=checkbox],.btn-group-toggle>.btn input[type=radio],.btn-group-toggle>.btn-group>.btn input[type=checkbox],.btn-group-toggle>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:stretch;align-items:stretch;width:100%}.input-group>.custom-file,.input-group>.custom-select,.input-group>.form-control,.input-group>.form-control-plaintext{position:relative;-ms-flex:1 1 auto;flex:1 1 auto;width:1%;margin-bottom:0}.input-group>.custom-file+.custom-file,.input-group>.custom-file+.custom-select,.input-group>.custom-file+.form-control,.input-group>.custom-select+.custom-file,.input-group>.custom-select+.custom-select,.input-group>.custom-select+.form-control,.input-group>.form-control+.custom-file,.input-group>.form-control+.custom-select,.input-group>.form-control+.form-control,.input-group>.form-control-plaintext+.custom-file,.input-group>.form-control-plaintext+.custom-select,.input-group>.form-control-plaintext+.form-control{margin-left:-1px}.input-group>.custom-file .custom-file-input:focus~.custom-file-label,.input-group>.custom-select:focus,.input-group>.form-control:focus{z-index:3}.input-group>.custom-file .custom-file-input:focus{z-index:4}.input-group>.custom-select:not(:last-child),.input-group>.form-control:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.custom-select:not(:first-child),.input-group>.form-control:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.custom-file{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.input-group>.custom-file:not(:last-child) .custom-file-label,.input-group>.custom-file:not(:last-child) .custom-file-label::after{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.custom-file:not(:first-child) .custom-file-label{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-append,.input-group-prepend{display:-ms-flexbox;display:flex}.input-group-append .btn,.input-group-prepend .btn{position:relative;z-index:2}.input-group-append .btn:focus,.input-group-prepend .btn:focus{z-index:3}.input-group-append .btn+.btn,.input-group-append .btn+.input-group-text,.input-group-append .input-group-text+.btn,.input-group-append .input-group-text+.input-group-text,.input-group-prepend .btn+.btn,.input-group-prepend .btn+.input-group-text,.input-group-prepend .input-group-text+.btn,.input-group-prepend .input-group-text+.input-group-text{margin-left:-1px}.input-group-prepend{margin-right:-1px}.input-group-append{margin-left:-1px}.input-group-text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:.375rem .75rem;margin-bottom:0;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.25rem}.input-group-text input[type=checkbox],.input-group-text input[type=radio]{margin-top:0}.input-group-lg>.custom-select,.input-group-lg>.form-control:not(textarea){height:calc(1.5em + 1rem + 2px)}.input-group-lg>.custom-select,.input-group-lg>.form-control,.input-group-lg>.input-group-append>.btn,.input-group-lg>.input-group-append>.input-group-text,.input-group-lg>.input-group-prepend>.btn,.input-group-lg>.input-group-prepend>.input-group-text{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.input-group-sm>.custom-select,.input-group-sm>.form-control:not(textarea){height:calc(1.5em + .5rem + 2px)}.input-group-sm>.custom-select,.input-group-sm>.form-control,.input-group-sm>.input-group-append>.btn,.input-group-sm>.input-group-append>.input-group-text,.input-group-sm>.input-group-prepend>.btn,.input-group-sm>.input-group-prepend>.input-group-text{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.input-group-lg>.custom-select,.input-group-sm>.custom-select{padding-right:1.75rem}.input-group>.input-group-append:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group>.input-group-append:last-child>.input-group-text:not(:last-child),.input-group>.input-group-append:not(:last-child)>.btn,.input-group>.input-group-append:not(:last-child)>.input-group-text,.input-group>.input-group-prepend>.btn,.input-group>.input-group-prepend>.input-group-text{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.input-group-append>.btn,.input-group>.input-group-append>.input-group-text,.input-group>.input-group-prepend:first-child>.btn:not(:first-child),.input-group>.input-group-prepend:first-child>.input-group-text:not(:first-child),.input-group>.input-group-prepend:not(:first-child)>.btn,.input-group>.input-group-prepend:not(:first-child)>.input-group-text{border-top-left-radius:0;border-bottom-left-radius:0}.custom-control{position:relative;display:block;min-height:1.5rem;padding-left:1.5rem}.custom-control-inline{display:-ms-inline-flexbox;display:inline-flex;margin-right:1rem}.custom-control-input{position:absolute;z-index:-1;opacity:0}.custom-control-input:checked~.custom-control-label::before{color:#fff;border-color:#007bff;background-color:#007bff}.custom-control-input:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-control-input:focus:not(:checked)~.custom-control-label::before{border-color:#80bdff}.custom-control-input:not(:disabled):active~.custom-control-label::before{color:#fff;background-color:#b3d7ff;border-color:#b3d7ff}.custom-control-input:disabled~.custom-control-label{color:#6c757d}.custom-control-input:disabled~.custom-control-label::before{background-color:#e9ecef}.custom-control-label{position:relative;margin-bottom:0;vertical-align:top}.custom-control-label::before{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;pointer-events:none;content:"";background-color:#fff;border:#adb5bd solid 1px}.custom-control-label::after{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;content:"";background:no-repeat 50%/50% 50%}.custom-checkbox .custom-control-label::before{border-radius:.25rem}.custom-checkbox .custom-control-input:checked~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e")}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label::before{border-color:#007bff;background-color:#007bff}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3e%3cpath stroke='%23fff' d='M0 2h4'/%3e%3c/svg%3e")}.custom-checkbox .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-checkbox .custom-control-input:disabled:indeterminate~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-radio .custom-control-label::before{border-radius:50%}.custom-radio .custom-control-input:checked~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e")}.custom-radio .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-switch{padding-left:2.25rem}.custom-switch .custom-control-label::before{left:-2.25rem;width:1.75rem;pointer-events:all;border-radius:.5rem}.custom-switch .custom-control-label::after{top:calc(.25rem + 2px);left:calc(-2.25rem + 2px);width:calc(1rem - 4px);height:calc(1rem - 4px);background-color:#adb5bd;border-radius:.5rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-transform .15s ease-in-out;transition:transform .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:transform .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-transform .15s ease-in-out}@media (prefers-reduced-motion:reduce){.custom-switch .custom-control-label::after{transition:none}}.custom-switch .custom-control-input:checked~.custom-control-label::after{background-color:#fff;-webkit-transform:translateX(.75rem);transform:translateX(.75rem)}.custom-switch .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-select{display:inline-block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem 1.75rem .375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;vertical-align:middle;background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px;background-color:#fff;border:1px solid #ced4da;border-radius:.25rem;-webkit-appearance:none;-moz-appearance:none;appearance:none}.custom-select:focus{border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-select:focus::-ms-value{color:#495057;background-color:#fff}.custom-select[multiple],.custom-select[size]:not([size="1"]){height:auto;padding-right:.75rem;background-image:none}.custom-select:disabled{color:#6c757d;background-color:#e9ecef}.custom-select::-ms-expand{display:none}.custom-select-sm{height:calc(1.5em + .5rem + 2px);padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:.875rem}.custom-select-lg{height:calc(1.5em + 1rem + 2px);padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem}.custom-file{position:relative;display:inline-block;width:100%;height:calc(1.5em + .75rem + 2px);margin-bottom:0}.custom-file-input{position:relative;z-index:2;width:100%;height:calc(1.5em + .75rem + 2px);margin:0;opacity:0}.custom-file-input:focus~.custom-file-label{border-color:#80bdff;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-file-input:disabled~.custom-file-label{background-color:#e9ecef}.custom-file-input:lang(en)~.custom-file-label::after{content:"Browse"}.custom-file-input~.custom-file-label[data-browse]::after{content:attr(data-browse)}.custom-file-label{position:absolute;top:0;right:0;left:0;z-index:1;height:calc(1.5em + .75rem + 2px);padding:.375rem .75rem;font-weight:400;line-height:1.5;color:#495057;background-color:#fff;border:1px solid #ced4da;border-radius:.25rem}.custom-file-label::after{position:absolute;top:0;right:0;bottom:0;z-index:3;display:block;height:calc(1.5em + .75rem);padding:.375rem .75rem;line-height:1.5;color:#495057;content:"Browse";background-color:#e9ecef;border-left:inherit;border-radius:0 .25rem .25rem 0}.custom-range{width:100%;height:calc(1rem + .4rem);padding:0;background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.custom-range:focus{outline:0}.custom-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range:focus::-ms-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range::-moz-focus-outer{border:0}.custom-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;background-color:#007bff;border:0;border-radius:1rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-webkit-slider-thumb{transition:none}}.custom-range::-webkit-slider-thumb:active{background-color:#b3d7ff}.custom-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.custom-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#007bff;border:0;border-radius:1rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-moz-range-thumb{transition:none}}.custom-range::-moz-range-thumb:active{background-color:#b3d7ff}.custom-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.custom-range::-ms-thumb{width:1rem;height:1rem;margin-top:0;margin-right:.2rem;margin-left:.2rem;background-color:#007bff;border:0;border-radius:1rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-ms-thumb{transition:none}}.custom-range::-ms-thumb:active{background-color:#b3d7ff}.custom-range::-ms-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:transparent;border-color:transparent;border-width:.5rem}.custom-range::-ms-fill-lower{background-color:#dee2e6;border-radius:1rem}.custom-range::-ms-fill-upper{margin-right:15px;background-color:#dee2e6;border-radius:1rem}.custom-range:disabled::-webkit-slider-thumb{background-color:#adb5bd}.custom-range:disabled::-webkit-slider-runnable-track{cursor:default}.custom-range:disabled::-moz-range-thumb{background-color:#adb5bd}.custom-range:disabled::-moz-range-track{cursor:default}.custom-range:disabled::-ms-thumb{background-color:#adb5bd}.custom-control-label::before,.custom-file-label,.custom-select{transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.custom-control-label::before,.custom-file-label,.custom-select{transition:none}}.nav{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:.5rem 1rem}.nav-link:focus,.nav-link:hover{text-decoration:none}.nav-link.disabled{color:#6c757d;pointer-events:none;cursor:default}.nav-tabs{border-bottom:1px solid #dee2e6}.nav-tabs .nav-item{margin-bottom:-1px}.nav-tabs .nav-link{border:1px solid transparent;border-top-left-radius:.25rem;border-top-right-radius:.25rem}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{border-color:#e9ecef #e9ecef #dee2e6}.nav-tabs .nav-link.disabled{color:#6c757d;background-color:transparent;border-color:transparent}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:#495057;background-color:#fff;border-color:#dee2e6 #dee2e6 #fff}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.nav-pills .nav-link{border-radius:.25rem}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:#fff;background-color:#007bff}.nav-fill .nav-item{-ms-flex:1 1 auto;flex:1 1 auto;text-align:center}.nav-justified .nav-item{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;text-align:center}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{position:relative;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:.5rem 1rem}.navbar>.container,.navbar>.container-fluid{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.navbar-brand{display:inline-block;padding-top:.3125rem;padding-bottom:.3125rem;margin-right:1rem;font-size:1.25rem;line-height:inherit;white-space:nowrap}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-nav{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link{padding-right:0;padding-left:0}.navbar-nav .dropdown-menu{position:static;float:none}.navbar-text{display:inline-block;padding-top:.5rem;padding-bottom:.5rem}.navbar-collapse{-ms-flex-preferred-size:100%;flex-basis:100%;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center}.navbar-toggler{padding:.25rem .75rem;font-size:1.25rem;line-height:1;background-color:transparent;border:1px solid transparent;border-radius:.25rem}.navbar-toggler:focus,.navbar-toggler:hover{text-decoration:none}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;content:"";background:no-repeat center center;background-size:100% 100%}@media (max-width:575.98px){.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid{padding-right:0;padding-left:0}}@media (min-width:576px){.navbar-expand-sm{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-sm .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-sm .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}}@media (max-width:767.98px){.navbar-expand-md>.container,.navbar-expand-md>.container-fluid{padding-right:0;padding-left:0}}@media (min-width:768px){.navbar-expand-md{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-md .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-md>.container,.navbar-expand-md>.container-fluid{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-md .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}}@media (max-width:991.98px){.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid{padding-right:0;padding-left:0}}@media (min-width:992px){.navbar-expand-lg{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-lg .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-lg .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}}@media (max-width:1199.98px){.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid{padding-right:0;padding-left:0}}@media (min-width:1200px){.navbar-expand-xl{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-xl .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-xl .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}}.navbar-expand{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand>.container,.navbar-expand>.container-fluid{padding-right:0;padding-left:0}.navbar-expand .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand>.container,.navbar-expand>.container-fluid{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-light .navbar-brand{color:rgba(0,0,0,.9)}.navbar-light .navbar-brand:focus,.navbar-light .navbar-brand:hover{color:rgba(0,0,0,.9)}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,.5)}.navbar-light .navbar-nav .nav-link:focus,.navbar-light .navbar-nav .nav-link:hover{color:rgba(0,0,0,.7)}.navbar-light .navbar-nav .nav-link.disabled{color:rgba(0,0,0,.3)}.navbar-light .navbar-nav .active>.nav-link,.navbar-light .navbar-nav .nav-link.active,.navbar-light .navbar-nav .nav-link.show,.navbar-light .navbar-nav .show>.nav-link{color:rgba(0,0,0,.9)}.navbar-light .navbar-toggler{color:rgba(0,0,0,.5);border-color:rgba(0,0,0,.1)}.navbar-light .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(0, 0, 0, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-light .navbar-text{color:rgba(0,0,0,.5)}.navbar-light .navbar-text a{color:rgba(0,0,0,.9)}.navbar-light .navbar-text a:focus,.navbar-light .navbar-text a:hover{color:rgba(0,0,0,.9)}.navbar-dark .navbar-brand{color:#fff}.navbar-dark .navbar-brand:focus,.navbar-dark .navbar-brand:hover{color:#fff}.navbar-dark .navbar-nav .nav-link{color:rgba(255,255,255,.5)}.navbar-dark .navbar-nav .nav-link:focus,.navbar-dark .navbar-nav .nav-link:hover{color:rgba(255,255,255,.75)}.navbar-dark .navbar-nav .nav-link.disabled{color:rgba(255,255,255,.25)}.navbar-dark .navbar-nav .active>.nav-link,.navbar-dark .navbar-nav .nav-link.active,.navbar-dark .navbar-nav .nav-link.show,.navbar-dark .navbar-nav .show>.nav-link{color:#fff}.navbar-dark .navbar-toggler{color:rgba(255,255,255,.5);border-color:rgba(255,255,255,.1)}.navbar-dark .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(255, 255, 255, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-dark .navbar-text{color:rgba(255,255,255,.5)}.navbar-dark .navbar-text a{color:#fff}.navbar-dark .navbar-text a:focus,.navbar-dark .navbar-text a:hover{color:#fff}.card{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:1px solid rgba(0,0,0,.125);border-radius:.25rem}.card>hr{margin-right:0;margin-left:0}.card>.list-group:first-child .list-group-item:first-child{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.card>.list-group:last-child .list-group-item:last-child{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.card-body{-ms-flex:1 1 auto;flex:1 1 auto;padding:1.25rem}.card-title{margin-bottom:.75rem}.card-subtitle{margin-top:-.375rem;margin-bottom:0}.card-text:last-child{margin-bottom:0}.card-link:hover{text-decoration:none}.card-link+.card-link{margin-left:1.25rem}.card-header{padding:.75rem 1.25rem;margin-bottom:0;background-color:rgba(0,0,0,.03);border-bottom:1px solid rgba(0,0,0,.125)}.card-header:first-child{border-radius:calc(.25rem - 1px) calc(.25rem - 1px) 0 0}.card-header+.list-group .list-group-item:first-child{border-top:0}.card-footer{padding:.75rem 1.25rem;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.125)}.card-footer:last-child{border-radius:0 0 calc(.25rem - 1px) calc(.25rem - 1px)}.card-header-tabs{margin-right:-.625rem;margin-bottom:-.75rem;margin-left:-.625rem;border-bottom:0}.card-header-pills{margin-right:-.625rem;margin-left:-.625rem}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:1.25rem}.card-img{width:100%;border-radius:calc(.25rem - 1px)}.card-img-top{width:100%;border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card-img-bottom{width:100%;border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card-deck{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.card-deck .card{margin-bottom:15px}@media (min-width:576px){.card-deck{-ms-flex-flow:row wrap;flex-flow:row wrap;margin-right:-15px;margin-left:-15px}.card-deck .card{display:-ms-flexbox;display:flex;-ms-flex:1 0 0%;flex:1 0 0%;-ms-flex-direction:column;flex-direction:column;margin-right:15px;margin-bottom:0;margin-left:15px}}.card-group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.card-group>.card{margin-bottom:15px}@media (min-width:576px){.card-group{-ms-flex-flow:row wrap;flex-flow:row wrap}.card-group>.card{-ms-flex:1 0 0%;flex:1 0 0%;margin-bottom:0}.card-group>.card+.card{margin-left:0;border-left:0}.card-group>.card:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:not(:last-child) .card-header,.card-group>.card:not(:last-child) .card-img-top{border-top-right-radius:0}.card-group>.card:not(:last-child) .card-footer,.card-group>.card:not(:last-child) .card-img-bottom{border-bottom-right-radius:0}.card-group>.card:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:not(:first-child) .card-header,.card-group>.card:not(:first-child) .card-img-top{border-top-left-radius:0}.card-group>.card:not(:first-child) .card-footer,.card-group>.card:not(:first-child) .card-img-bottom{border-bottom-left-radius:0}}.card-columns .card{margin-bottom:.75rem}@media (min-width:576px){.card-columns{-webkit-column-count:3;-moz-column-count:3;column-count:3;-webkit-column-gap:1.25rem;-moz-column-gap:1.25rem;column-gap:1.25rem;orphans:1;widows:1}.card-columns .card{display:inline-block;width:100%}}.accordion>.card{overflow:hidden}.accordion>.card:not(:first-of-type) .card-header:first-child{border-radius:0}.accordion>.card:not(:first-of-type):not(:last-of-type){border-bottom:0;border-radius:0}.accordion>.card:first-of-type{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.accordion>.card:last-of-type{border-top-left-radius:0;border-top-right-radius:0}.accordion>.card .card-header{margin-bottom:-1px}.breadcrumb{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:.75rem 1rem;margin-bottom:1rem;list-style:none;background-color:#e9ecef;border-radius:.25rem}.breadcrumb-item+.breadcrumb-item{padding-left:.5rem}.breadcrumb-item+.breadcrumb-item::before{display:inline-block;padding-right:.5rem;color:#6c757d;content:"/"}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:underline}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:none}.breadcrumb-item.active{color:#6c757d}.pagination{display:-ms-flexbox;display:flex;padding-left:0;list-style:none;border-radius:.25rem}.page-link{position:relative;display:block;padding:.5rem .75rem;margin-left:-1px;line-height:1.25;color:#007bff;background-color:#fff;border:1px solid #dee2e6}.page-link:hover{z-index:2;color:#0056b3;text-decoration:none;background-color:#e9ecef;border-color:#dee2e6}.page-link:focus{z-index:2;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.page-item:first-child .page-link{margin-left:0;border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.page-item:last-child .page-link{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.page-item.active .page-link{z-index:1;color:#fff;background-color:#007bff;border-color:#007bff}.page-item.disabled .page-link{color:#6c757d;pointer-events:none;cursor:auto;background-color:#fff;border-color:#dee2e6}.pagination-lg .page-link{padding:.75rem 1.5rem;font-size:1.25rem;line-height:1.5}.pagination-lg .page-item:first-child .page-link{border-top-left-radius:.3rem;border-bottom-left-radius:.3rem}.pagination-lg .page-item:last-child .page-link{border-top-right-radius:.3rem;border-bottom-right-radius:.3rem}.pagination-sm .page-link{padding:.25rem .5rem;font-size:.875rem;line-height:1.5}.pagination-sm .page-item:first-child .page-link{border-top-left-radius:.2rem;border-bottom-left-radius:.2rem}.pagination-sm .page-item:last-child .page-link{border-top-right-radius:.2rem;border-bottom-right-radius:.2rem}.badge{display:inline-block;padding:.25em .4em;font-size:75%;font-weight:700;line-height:1;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.badge{transition:none}}a.badge:focus,a.badge:hover{text-decoration:none}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.badge-pill{padding-right:.6em;padding-left:.6em;border-radius:10rem}.badge-primary{color:#fff;background-color:#007bff}a.badge-primary:focus,a.badge-primary:hover{color:#fff;background-color:#0062cc}a.badge-primary.focus,a.badge-primary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.badge-secondary{color:#fff;background-color:#6c757d}a.badge-secondary:focus,a.badge-secondary:hover{color:#fff;background-color:#545b62}a.badge-secondary.focus,a.badge-secondary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.badge-success{color:#fff;background-color:#28a745}a.badge-success:focus,a.badge-success:hover{color:#fff;background-color:#1e7e34}a.badge-success.focus,a.badge-success:focus{outline:0;box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.badge-info{color:#fff;background-color:#17a2b8}a.badge-info:focus,a.badge-info:hover{color:#fff;background-color:#117a8b}a.badge-info.focus,a.badge-info:focus{outline:0;box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.badge-warning{color:#212529;background-color:#ffc107}a.badge-warning:focus,a.badge-warning:hover{color:#212529;background-color:#d39e00}a.badge-warning.focus,a.badge-warning:focus{outline:0;box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.badge-danger{color:#fff;background-color:#dc3545}a.badge-danger:focus,a.badge-danger:hover{color:#fff;background-color:#bd2130}a.badge-danger.focus,a.badge-danger:focus{outline:0;box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.badge-light{color:#212529;background-color:#f8f9fa}a.badge-light:focus,a.badge-light:hover{color:#212529;background-color:#dae0e5}a.badge-light.focus,a.badge-light:focus{outline:0;box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.badge-dark{color:#fff;background-color:#343a40}a.badge-dark:focus,a.badge-dark:hover{color:#fff;background-color:#1d2124}a.badge-dark.focus,a.badge-dark:focus{outline:0;box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.jumbotron{padding:2rem 1rem;margin-bottom:2rem;background-color:#e9ecef;border-radius:.3rem}@media (min-width:576px){.jumbotron{padding:4rem 2rem}}.jumbotron-fluid{padding-right:0;padding-left:0;border-radius:0}.alert{position:relative;padding:.75rem 1.25rem;margin-bottom:1rem;border:1px solid transparent;border-radius:.25rem}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:4rem}.alert-dismissible .close{position:absolute;top:0;right:0;padding:.75rem 1.25rem;color:inherit}.alert-primary{color:#004085;background-color:#cce5ff;border-color:#b8daff}.alert-primary hr{border-top-color:#9fcdff}.alert-primary .alert-link{color:#002752}.alert-secondary{color:#383d41;background-color:#e2e3e5;border-color:#d6d8db}.alert-secondary hr{border-top-color:#c8cbcf}.alert-secondary .alert-link{color:#202326}.alert-success{color:#155724;background-color:#d4edda;border-color:#c3e6cb}.alert-success hr{border-top-color:#b1dfbb}.alert-success .alert-link{color:#0b2e13}.alert-info{color:#0c5460;background-color:#d1ecf1;border-color:#bee5eb}.alert-info hr{border-top-color:#abdde5}.alert-info .alert-link{color:#062c33}.alert-warning{color:#856404;background-color:#fff3cd;border-color:#ffeeba}.alert-warning hr{border-top-color:#ffe8a1}.alert-warning .alert-link{color:#533f03}.alert-danger{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.alert-danger hr{border-top-color:#f1b0b7}.alert-danger .alert-link{color:#491217}.alert-light{color:#818182;background-color:#fefefe;border-color:#fdfdfe}.alert-light hr{border-top-color:#ececf6}.alert-light .alert-link{color:#686868}.alert-dark{color:#1b1e21;background-color:#d6d8d9;border-color:#c6c8ca}.alert-dark hr{border-top-color:#b9bbbe}.alert-dark .alert-link{color:#040505}@-webkit-keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}.progress{display:-ms-flexbox;display:flex;height:1rem;overflow:hidden;font-size:.75rem;background-color:#e9ecef;border-radius:.25rem}.progress-bar{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;color:#fff;text-align:center;white-space:nowrap;background-color:#007bff;transition:width .6s ease}@media (prefers-reduced-motion:reduce){.progress-bar{transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:1rem 1rem}.progress-bar-animated{-webkit-animation:progress-bar-stripes 1s linear infinite;animation:progress-bar-stripes 1s linear infinite}@media (prefers-reduced-motion:reduce){.progress-bar-animated{-webkit-animation:none;animation:none}}.media{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.media-body{-ms-flex:1;flex:1}.list-group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding-left:0;margin-bottom:0}.list-group-item-action{width:100%;color:#495057;text-align:inherit}.list-group-item-action:focus,.list-group-item-action:hover{z-index:1;color:#495057;text-decoration:none;background-color:#f8f9fa}.list-group-item-action:active{color:#212529;background-color:#e9ecef}.list-group-item{position:relative;display:block;padding:.75rem 1.25rem;margin-bottom:-1px;background-color:#fff;border:1px solid rgba(0,0,0,.125)}.list-group-item:first-child{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.list-group-item.disabled,.list-group-item:disabled{color:#6c757d;pointer-events:none;background-color:#fff}.list-group-item.active{z-index:2;color:#fff;background-color:#007bff;border-color:#007bff}.list-group-horizontal{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal .list-group-item{margin-right:-1px;margin-bottom:0}.list-group-horizontal .list-group-item:first-child{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal .list-group-item:last-child{margin-right:0;border-top-right-radius:.25rem;border-bottom-right-radius:.25rem;border-bottom-left-radius:0}@media (min-width:576px){.list-group-horizontal-sm{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-sm .list-group-item{margin-right:-1px;margin-bottom:0}.list-group-horizontal-sm .list-group-item:first-child{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-sm .list-group-item:last-child{margin-right:0;border-top-right-radius:.25rem;border-bottom-right-radius:.25rem;border-bottom-left-radius:0}}@media (min-width:768px){.list-group-horizontal-md{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-md .list-group-item{margin-right:-1px;margin-bottom:0}.list-group-horizontal-md .list-group-item:first-child{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-md .list-group-item:last-child{margin-right:0;border-top-right-radius:.25rem;border-bottom-right-radius:.25rem;border-bottom-left-radius:0}}@media (min-width:992px){.list-group-horizontal-lg{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-lg .list-group-item{margin-right:-1px;margin-bottom:0}.list-group-horizontal-lg .list-group-item:first-child{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-lg .list-group-item:last-child{margin-right:0;border-top-right-radius:.25rem;border-bottom-right-radius:.25rem;border-bottom-left-radius:0}}@media (min-width:1200px){.list-group-horizontal-xl{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-xl .list-group-item{margin-right:-1px;margin-bottom:0}.list-group-horizontal-xl .list-group-item:first-child{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-xl .list-group-item:last-child{margin-right:0;border-top-right-radius:.25rem;border-bottom-right-radius:.25rem;border-bottom-left-radius:0}}.list-group-flush .list-group-item{border-right:0;border-left:0;border-radius:0}.list-group-flush .list-group-item:last-child{margin-bottom:-1px}.list-group-flush:first-child .list-group-item:first-child{border-top:0}.list-group-flush:last-child .list-group-item:last-child{margin-bottom:0;border-bottom:0}.list-group-item-primary{color:#004085;background-color:#b8daff}.list-group-item-primary.list-group-item-action:focus,.list-group-item-primary.list-group-item-action:hover{color:#004085;background-color:#9fcdff}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#004085;border-color:#004085}.list-group-item-secondary{color:#383d41;background-color:#d6d8db}.list-group-item-secondary.list-group-item-action:focus,.list-group-item-secondary.list-group-item-action:hover{color:#383d41;background-color:#c8cbcf}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#383d41;border-color:#383d41}.list-group-item-success{color:#155724;background-color:#c3e6cb}.list-group-item-success.list-group-item-action:focus,.list-group-item-success.list-group-item-action:hover{color:#155724;background-color:#b1dfbb}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#155724;border-color:#155724}.list-group-item-info{color:#0c5460;background-color:#bee5eb}.list-group-item-info.list-group-item-action:focus,.list-group-item-info.list-group-item-action:hover{color:#0c5460;background-color:#abdde5}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#0c5460;border-color:#0c5460}.list-group-item-warning{color:#856404;background-color:#ffeeba}.list-group-item-warning.list-group-item-action:focus,.list-group-item-warning.list-group-item-action:hover{color:#856404;background-color:#ffe8a1}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#856404;border-color:#856404}.list-group-item-danger{color:#721c24;background-color:#f5c6cb}.list-group-item-danger.list-group-item-action:focus,.list-group-item-danger.list-group-item-action:hover{color:#721c24;background-color:#f1b0b7}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#721c24;border-color:#721c24}.list-group-item-light{color:#818182;background-color:#fdfdfe}.list-group-item-light.list-group-item-action:focus,.list-group-item-light.list-group-item-action:hover{color:#818182;background-color:#ececf6}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#818182;border-color:#818182}.list-group-item-dark{color:#1b1e21;background-color:#c6c8ca}.list-group-item-dark.list-group-item-action:focus,.list-group-item-dark.list-group-item-action:hover{color:#1b1e21;background-color:#b9bbbe}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#1b1e21;border-color:#1b1e21}.close{float:right;font-size:1.5rem;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.5}.close:hover{color:#000;text-decoration:none}.close:not(:disabled):not(.disabled):focus,.close:not(:disabled):not(.disabled):hover{opacity:.75}button.close{padding:0;background-color:transparent;border:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}a.close.disabled{pointer-events:none}.toast{max-width:350px;overflow:hidden;font-size:.875rem;background-color:rgba(255,255,255,.85);background-clip:padding-box;border:1px solid rgba(0,0,0,.1);box-shadow:0 .25rem .75rem rgba(0,0,0,.1);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);opacity:0;border-radius:.25rem}.toast:not(:last-child){margin-bottom:.75rem}.toast.showing{opacity:1}.toast.show{display:block;opacity:1}.toast.hide{display:none}.toast-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:.25rem .75rem;color:#6c757d;background-color:rgba(255,255,255,.85);background-clip:padding-box;border-bottom:1px solid rgba(0,0,0,.05)}.toast-body{padding:.75rem}.modal-open{overflow:hidden}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal{position:fixed;top:0;left:0;z-index:1050;display:none;width:100%;height:100%;overflow:hidden;outline:0}.modal-dialog{position:relative;width:auto;margin:.5rem;pointer-events:none}.modal.fade .modal-dialog{transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out;transition:transform .3s ease-out,-webkit-transform .3s ease-out;-webkit-transform:translate(0,-50px);transform:translate(0,-50px)}@media (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{transition:none}}.modal.show .modal-dialog{-webkit-transform:none;transform:none}.modal-dialog-scrollable{display:-ms-flexbox;display:flex;max-height:calc(100% - 1rem)}.modal-dialog-scrollable .modal-content{max-height:calc(100vh - 1rem);overflow:hidden}.modal-dialog-scrollable .modal-footer,.modal-dialog-scrollable .modal-header{-ms-flex-negative:0;flex-shrink:0}.modal-dialog-scrollable .modal-body{overflow-y:auto}.modal-dialog-centered{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:calc(100% - 1rem)}.modal-dialog-centered::before{display:block;height:calc(100vh - 1rem);content:""}.modal-dialog-centered.modal-dialog-scrollable{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;height:100%}.modal-dialog-centered.modal-dialog-scrollable .modal-content{max-height:none}.modal-dialog-centered.modal-dialog-scrollable::before{content:none}.modal-content{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem;outline:0}.modal-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:.5}.modal-header{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:justify;justify-content:space-between;padding:1rem 1rem;border-bottom:1px solid #dee2e6;border-top-left-radius:.3rem;border-top-right-radius:.3rem}.modal-header .close{padding:1rem 1rem;margin:-1rem -1rem -1rem auto}.modal-title{margin-bottom:0;line-height:1.5}.modal-body{position:relative;-ms-flex:1 1 auto;flex:1 1 auto;padding:1rem}.modal-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end;padding:1rem;border-top:1px solid #dee2e6;border-bottom-right-radius:.3rem;border-bottom-left-radius:.3rem}.modal-footer>:not(:first-child){margin-left:.25rem}.modal-footer>:not(:last-child){margin-right:.25rem}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:576px){.modal-dialog{max-width:500px;margin:1.75rem auto}.modal-dialog-scrollable{max-height:calc(100% - 3.5rem)}.modal-dialog-scrollable .modal-content{max-height:calc(100vh - 3.5rem)}.modal-dialog-centered{min-height:calc(100% - 3.5rem)}.modal-dialog-centered::before{height:calc(100vh - 3.5rem)}.modal-sm{max-width:300px}}@media (min-width:992px){.modal-lg,.modal-xl{max-width:800px}}@media (min-width:1200px){.modal-xl{max-width:1140px}}.tooltip{position:absolute;z-index:1070;display:block;margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;opacity:0}.tooltip.show{opacity:.9}.tooltip .arrow{position:absolute;display:block;width:.8rem;height:.4rem}.tooltip .arrow::before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-auto[x-placement^=top],.bs-tooltip-top{padding:.4rem 0}.bs-tooltip-auto[x-placement^=top] .arrow,.bs-tooltip-top .arrow{bottom:0}.bs-tooltip-auto[x-placement^=top] .arrow::before,.bs-tooltip-top .arrow::before{top:0;border-width:.4rem .4rem 0;border-top-color:#000}.bs-tooltip-auto[x-placement^=right],.bs-tooltip-right{padding:0 .4rem}.bs-tooltip-auto[x-placement^=right] .arrow,.bs-tooltip-right .arrow{left:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=right] .arrow::before,.bs-tooltip-right .arrow::before{right:0;border-width:.4rem .4rem .4rem 0;border-right-color:#000}.bs-tooltip-auto[x-placement^=bottom],.bs-tooltip-bottom{padding:.4rem 0}.bs-tooltip-auto[x-placement^=bottom] .arrow,.bs-tooltip-bottom .arrow{top:0}.bs-tooltip-auto[x-placement^=bottom] .arrow::before,.bs-tooltip-bottom .arrow::before{bottom:0;border-width:0 .4rem .4rem;border-bottom-color:#000}.bs-tooltip-auto[x-placement^=left],.bs-tooltip-left{padding:0 .4rem}.bs-tooltip-auto[x-placement^=left] .arrow,.bs-tooltip-left .arrow{right:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=left] .arrow::before,.bs-tooltip-left .arrow::before{left:0;border-width:.4rem 0 .4rem .4rem;border-left-color:#000}.tooltip-inner{max-width:200px;padding:.25rem .5rem;color:#fff;text-align:center;background-color:#000;border-radius:.25rem}.popover{position:absolute;top:0;left:0;z-index:1060;display:block;max-width:276px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem}.popover .arrow{position:absolute;display:block;width:1rem;height:.5rem;margin:0 .3rem}.popover .arrow::after,.popover .arrow::before{position:absolute;display:block;content:"";border-color:transparent;border-style:solid}.bs-popover-auto[x-placement^=top],.bs-popover-top{margin-bottom:.5rem}.bs-popover-auto[x-placement^=top]>.arrow,.bs-popover-top>.arrow{bottom:calc((.5rem + 1px) * -1)}.bs-popover-auto[x-placement^=top]>.arrow::before,.bs-popover-top>.arrow::before{bottom:0;border-width:.5rem .5rem 0;border-top-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=top]>.arrow::after,.bs-popover-top>.arrow::after{bottom:1px;border-width:.5rem .5rem 0;border-top-color:#fff}.bs-popover-auto[x-placement^=right],.bs-popover-right{margin-left:.5rem}.bs-popover-auto[x-placement^=right]>.arrow,.bs-popover-right>.arrow{left:calc((.5rem + 1px) * -1);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=right]>.arrow::before,.bs-popover-right>.arrow::before{left:0;border-width:.5rem .5rem .5rem 0;border-right-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=right]>.arrow::after,.bs-popover-right>.arrow::after{left:1px;border-width:.5rem .5rem .5rem 0;border-right-color:#fff}.bs-popover-auto[x-placement^=bottom],.bs-popover-bottom{margin-top:.5rem}.bs-popover-auto[x-placement^=bottom]>.arrow,.bs-popover-bottom>.arrow{top:calc((.5rem + 1px) * -1)}.bs-popover-auto[x-placement^=bottom]>.arrow::before,.bs-popover-bottom>.arrow::before{top:0;border-width:0 .5rem .5rem .5rem;border-bottom-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=bottom]>.arrow::after,.bs-popover-bottom>.arrow::after{top:1px;border-width:0 .5rem .5rem .5rem;border-bottom-color:#fff}.bs-popover-auto[x-placement^=bottom] .popover-header::before,.bs-popover-bottom .popover-header::before{position:absolute;top:0;left:50%;display:block;width:1rem;margin-left:-.5rem;content:"";border-bottom:1px solid #f7f7f7}.bs-popover-auto[x-placement^=left],.bs-popover-left{margin-right:.5rem}.bs-popover-auto[x-placement^=left]>.arrow,.bs-popover-left>.arrow{right:calc((.5rem + 1px) * -1);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=left]>.arrow::before,.bs-popover-left>.arrow::before{right:0;border-width:.5rem 0 .5rem .5rem;border-left-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=left]>.arrow::after,.bs-popover-left>.arrow::after{right:1px;border-width:.5rem 0 .5rem .5rem;border-left-color:#fff}.popover-header{padding:.5rem .75rem;margin-bottom:0;font-size:1rem;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.popover-header:empty{display:none}.popover-body{padding:.5rem .75rem;color:#212529}.carousel{position:relative}.carousel.pointer-event{-ms-touch-action:pan-y;touch-action:pan-y}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner::after{display:block;clear:both;content:""}.carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:-webkit-transform .6s ease-in-out;transition:transform .6s ease-in-out;transition:transform .6s ease-in-out,-webkit-transform .6s ease-in-out}@media (prefers-reduced-motion:reduce){.carousel-item{transition:none}}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:block}.active.carousel-item-right,.carousel-item-next:not(.carousel-item-left){-webkit-transform:translateX(100%);transform:translateX(100%)}.active.carousel-item-left,.carousel-item-prev:not(.carousel-item-right){-webkit-transform:translateX(-100%);transform:translateX(-100%)}.carousel-fade .carousel-item{opacity:0;transition-property:opacity;-webkit-transform:none;transform:none}.carousel-fade .carousel-item-next.carousel-item-left,.carousel-fade .carousel-item-prev.carousel-item-right,.carousel-fade .carousel-item.active{z-index:1;opacity:1}.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{z-index:0;opacity:0;transition:0s .6s opacity}@media (prefers-reduced-motion:reduce){.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{transition:none}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:15%;color:#fff;text-align:center;opacity:.5;transition:opacity .15s ease}@media (prefers-reduced-motion:reduce){.carousel-control-next,.carousel-control-prev{transition:none}}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:20px;height:20px;background:no-repeat 50%/100% 100%}.carousel-control-prev-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3e%3cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3e%3c/svg%3e")}.carousel-control-next-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3e%3c/svg%3e")}.carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:15;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding-left:0;margin-right:15%;margin-left:15%;list-style:none}.carousel-indicators li{box-sizing:content-box;-ms-flex:0 1 auto;flex:0 1 auto;width:30px;height:3px;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:#fff;background-clip:padding-box;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}@media (prefers-reduced-motion:reduce){.carousel-indicators li{transition:none}}.carousel-indicators .active{opacity:1}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center}@-webkit-keyframes spinner-border{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spinner-border{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.spinner-border{display:inline-block;width:2rem;height:2rem;vertical-align:text-bottom;border:.25em solid currentColor;border-right-color:transparent;border-radius:50%;-webkit-animation:spinner-border .75s linear infinite;animation:spinner-border .75s linear infinite}.spinner-border-sm{width:1rem;height:1rem;border-width:.2em}@-webkit-keyframes spinner-grow{0%{-webkit-transform:scale(0);transform:scale(0)}50%{opacity:1}}@keyframes spinner-grow{0%{-webkit-transform:scale(0);transform:scale(0)}50%{opacity:1}}.spinner-grow{display:inline-block;width:2rem;height:2rem;vertical-align:text-bottom;background-color:currentColor;border-radius:50%;opacity:0;-webkit-animation:spinner-grow .75s linear infinite;animation:spinner-grow .75s linear infinite}.spinner-grow-sm{width:1rem;height:1rem}.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.bg-primary{background-color:#007bff!important}a.bg-primary:focus,a.bg-primary:hover,button.bg-primary:focus,button.bg-primary:hover{background-color:#0062cc!important}.bg-secondary{background-color:#6c757d!important}a.bg-secondary:focus,a.bg-secondary:hover,button.bg-secondary:focus,button.bg-secondary:hover{background-color:#545b62!important}.bg-success{background-color:#28a745!important}a.bg-success:focus,a.bg-success:hover,button.bg-success:focus,button.bg-success:hover{background-color:#1e7e34!important}.bg-info{background-color:#17a2b8!important}a.bg-info:focus,a.bg-info:hover,button.bg-info:focus,button.bg-info:hover{background-color:#117a8b!important}.bg-warning{background-color:#ffc107!important}a.bg-warning:focus,a.bg-warning:hover,button.bg-warning:focus,button.bg-warning:hover{background-color:#d39e00!important}.bg-danger{background-color:#dc3545!important}a.bg-danger:focus,a.bg-danger:hover,button.bg-danger:focus,button.bg-danger:hover{background-color:#bd2130!important}.bg-light{background-color:#f8f9fa!important}a.bg-light:focus,a.bg-light:hover,button.bg-light:focus,button.bg-light:hover{background-color:#dae0e5!important}.bg-dark{background-color:#343a40!important}a.bg-dark:focus,a.bg-dark:hover,button.bg-dark:focus,button.bg-dark:hover{background-color:#1d2124!important}.bg-white{background-color:#fff!important}.bg-transparent{background-color:transparent!important}.border{border:1px solid #dee2e6!important}.border-top{border-top:1px solid #dee2e6!important}.border-right{border-right:1px solid #dee2e6!important}.border-bottom{border-bottom:1px solid #dee2e6!important}.border-left{border-left:1px solid #dee2e6!important}.border-0{border:0!important}.border-top-0{border-top:0!important}.border-right-0{border-right:0!important}.border-bottom-0{border-bottom:0!important}.border-left-0{border-left:0!important}.border-primary{border-color:#007bff!important}.border-secondary{border-color:#6c757d!important}.border-success{border-color:#28a745!important}.border-info{border-color:#17a2b8!important}.border-warning{border-color:#ffc107!important}.border-danger{border-color:#dc3545!important}.border-light{border-color:#f8f9fa!important}.border-dark{border-color:#343a40!important}.border-white{border-color:#fff!important}.rounded-sm{border-radius:.2rem!important}.rounded{border-radius:.25rem!important}.rounded-top{border-top-left-radius:.25rem!important;border-top-right-radius:.25rem!important}.rounded-right{border-top-right-radius:.25rem!important;border-bottom-right-radius:.25rem!important}.rounded-bottom{border-bottom-right-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.rounded-left{border-top-left-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.rounded-lg{border-radius:.3rem!important}.rounded-circle{border-radius:50%!important}.rounded-pill{border-radius:50rem!important}.rounded-0{border-radius:0!important}.clearfix::after{display:block;clear:both;content:""}.d-none{display:none!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:-ms-flexbox!important;display:flex!important}.d-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}@media (min-width:576px){.d-sm-none{display:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:-ms-flexbox!important;display:flex!important}.d-sm-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:768px){.d-md-none{display:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:-ms-flexbox!important;display:flex!important}.d-md-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:992px){.d-lg-none{display:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:-ms-flexbox!important;display:flex!important}.d-lg-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:1200px){.d-xl-none{display:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:-ms-flexbox!important;display:flex!important}.d-xl-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media print{.d-print-none{display:none!important}.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:-ms-flexbox!important;display:flex!important}.d-print-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}.embed-responsive{position:relative;display:block;width:100%;padding:0;overflow:hidden}.embed-responsive::before{display:block;content:""}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-21by9::before{padding-top:42.857143%}.embed-responsive-16by9::before{padding-top:56.25%}.embed-responsive-4by3::before{padding-top:75%}.embed-responsive-1by1::before{padding-top:100%}.flex-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-center{-ms-flex-align:center!important;align-items:center!important}.align-items-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}@media (min-width:576px){.flex-sm-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-sm-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-sm-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-sm-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-sm-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-sm-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-sm-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-sm-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-sm-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-sm-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-sm-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-sm-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-sm-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-sm-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-sm-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-sm-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-sm-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-sm-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-sm-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-sm-center{-ms-flex-align:center!important;align-items:center!important}.align-items-sm-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-sm-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-sm-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-sm-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-sm-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-sm-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-sm-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-sm-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-sm-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-sm-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-sm-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-sm-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-sm-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-sm-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:768px){.flex-md-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-md-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-md-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-md-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-md-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-md-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-md-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-md-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-md-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-md-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-md-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-md-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-md-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-md-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-md-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-md-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-md-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-md-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-md-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-md-center{-ms-flex-align:center!important;align-items:center!important}.align-items-md-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-md-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-md-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-md-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-md-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-md-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-md-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-md-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-md-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-md-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-md-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-md-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-md-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-md-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:992px){.flex-lg-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-lg-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-lg-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-lg-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-lg-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-lg-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-lg-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-lg-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-lg-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-lg-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-lg-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-lg-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-lg-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-lg-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-lg-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-lg-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-lg-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-lg-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-lg-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-lg-center{-ms-flex-align:center!important;align-items:center!important}.align-items-lg-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-lg-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-lg-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-lg-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-lg-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-lg-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-lg-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-lg-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-lg-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-lg-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-lg-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-lg-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-lg-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-lg-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:1200px){.flex-xl-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-xl-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-xl-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-xl-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-xl-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-xl-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-xl-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-xl-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-xl-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-xl-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-xl-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-xl-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-xl-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-xl-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-xl-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-xl-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-xl-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-xl-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-xl-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-xl-center{-ms-flex-align:center!important;align-items:center!important}.align-items-xl-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-xl-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-xl-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-xl-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-xl-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-xl-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-xl-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-xl-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-xl-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-xl-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-xl-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-xl-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-xl-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-xl-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}.float-left{float:left!important}.float-right{float:right!important}.float-none{float:none!important}@media (min-width:576px){.float-sm-left{float:left!important}.float-sm-right{float:right!important}.float-sm-none{float:none!important}}@media (min-width:768px){.float-md-left{float:left!important}.float-md-right{float:right!important}.float-md-none{float:none!important}}@media (min-width:992px){.float-lg-left{float:left!important}.float-lg-right{float:right!important}.float-lg-none{float:none!important}}@media (min-width:1200px){.float-xl-left{float:left!important}.float-xl-right{float:right!important}.float-xl-none{float:none!important}}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:-webkit-sticky!important;position:sticky!important}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}@supports ((position:-webkit-sticky) or (position:sticky)){.sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal}.shadow-sm{box-shadow:0 .125rem .25rem rgba(0,0,0,.075)!important}.shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important}.shadow-lg{box-shadow:0 1rem 3rem rgba(0,0,0,.175)!important}.shadow-none{box-shadow:none!important}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mw-100{max-width:100%!important}.mh-100{max-height:100%!important}.min-vw-100{min-width:100vw!important}.min-vh-100{min-height:100vh!important}.vw-100{width:100vw!important}.vh-100{height:100vh!important}.stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;pointer-events:auto;content:"";background-color:rgba(0,0,0,0)}.m-0{margin:0!important}.mt-0,.my-0{margin-top:0!important}.mr-0,.mx-0{margin-right:0!important}.mb-0,.my-0{margin-bottom:0!important}.ml-0,.mx-0{margin-left:0!important}.m-1{margin:.25rem!important}.mt-1,.my-1{margin-top:.25rem!important}.mr-1,.mx-1{margin-right:.25rem!important}.mb-1,.my-1{margin-bottom:.25rem!important}.ml-1,.mx-1{margin-left:.25rem!important}.m-2{margin:.5rem!important}.mt-2,.my-2{margin-top:.5rem!important}.mr-2,.mx-2{margin-right:.5rem!important}.mb-2,.my-2{margin-bottom:.5rem!important}.ml-2,.mx-2{margin-left:.5rem!important}.m-3{margin:1rem!important}.mt-3,.my-3{margin-top:1rem!important}.mr-3,.mx-3{margin-right:1rem!important}.mb-3,.my-3{margin-bottom:1rem!important}.ml-3,.mx-3{margin-left:1rem!important}.m-4{margin:1.5rem!important}.mt-4,.my-4{margin-top:1.5rem!important}.mr-4,.mx-4{margin-right:1.5rem!important}.mb-4,.my-4{margin-bottom:1.5rem!important}.ml-4,.mx-4{margin-left:1.5rem!important}.m-5{margin:3rem!important}.mt-5,.my-5{margin-top:3rem!important}.mr-5,.mx-5{margin-right:3rem!important}.mb-5,.my-5{margin-bottom:3rem!important}.ml-5,.mx-5{margin-left:3rem!important}.p-0{padding:0!important}.pt-0,.py-0{padding-top:0!important}.pr-0,.px-0{padding-right:0!important}.pb-0,.py-0{padding-bottom:0!important}.pl-0,.px-0{padding-left:0!important}.p-1{padding:.25rem!important}.pt-1,.py-1{padding-top:.25rem!important}.pr-1,.px-1{padding-right:.25rem!important}.pb-1,.py-1{padding-bottom:.25rem!important}.pl-1,.px-1{padding-left:.25rem!important}.p-2{padding:.5rem!important}.pt-2,.py-2{padding-top:.5rem!important}.pr-2,.px-2{padding-right:.5rem!important}.pb-2,.py-2{padding-bottom:.5rem!important}.pl-2,.px-2{padding-left:.5rem!important}.p-3{padding:1rem!important}.pt-3,.py-3{padding-top:1rem!important}.pr-3,.px-3{padding-right:1rem!important}.pb-3,.py-3{padding-bottom:1rem!important}.pl-3,.px-3{padding-left:1rem!important}.p-4{padding:1.5rem!important}.pt-4,.py-4{padding-top:1.5rem!important}.pr-4,.px-4{padding-right:1.5rem!important}.pb-4,.py-4{padding-bottom:1.5rem!important}.pl-4,.px-4{padding-left:1.5rem!important}.p-5{padding:3rem!important}.pt-5,.py-5{padding-top:3rem!important}.pr-5,.px-5{padding-right:3rem!important}.pb-5,.py-5{padding-bottom:3rem!important}.pl-5,.px-5{padding-left:3rem!important}.m-n1{margin:-.25rem!important}.mt-n1,.my-n1{margin-top:-.25rem!important}.mr-n1,.mx-n1{margin-right:-.25rem!important}.mb-n1,.my-n1{margin-bottom:-.25rem!important}.ml-n1,.mx-n1{margin-left:-.25rem!important}.m-n2{margin:-.5rem!important}.mt-n2,.my-n2{margin-top:-.5rem!important}.mr-n2,.mx-n2{margin-right:-.5rem!important}.mb-n2,.my-n2{margin-bottom:-.5rem!important}.ml-n2,.mx-n2{margin-left:-.5rem!important}.m-n3{margin:-1rem!important}.mt-n3,.my-n3{margin-top:-1rem!important}.mr-n3,.mx-n3{margin-right:-1rem!important}.mb-n3,.my-n3{margin-bottom:-1rem!important}.ml-n3,.mx-n3{margin-left:-1rem!important}.m-n4{margin:-1.5rem!important}.mt-n4,.my-n4{margin-top:-1.5rem!important}.mr-n4,.mx-n4{margin-right:-1.5rem!important}.mb-n4,.my-n4{margin-bottom:-1.5rem!important}.ml-n4,.mx-n4{margin-left:-1.5rem!important}.m-n5{margin:-3rem!important}.mt-n5,.my-n5{margin-top:-3rem!important}.mr-n5,.mx-n5{margin-right:-3rem!important}.mb-n5,.my-n5{margin-bottom:-3rem!important}.ml-n5,.mx-n5{margin-left:-3rem!important}.m-auto{margin:auto!important}.mt-auto,.my-auto{margin-top:auto!important}.mr-auto,.mx-auto{margin-right:auto!important}.mb-auto,.my-auto{margin-bottom:auto!important}.ml-auto,.mx-auto{margin-left:auto!important}@media (min-width:576px){.m-sm-0{margin:0!important}.mt-sm-0,.my-sm-0{margin-top:0!important}.mr-sm-0,.mx-sm-0{margin-right:0!important}.mb-sm-0,.my-sm-0{margin-bottom:0!important}.ml-sm-0,.mx-sm-0{margin-left:0!important}.m-sm-1{margin:.25rem!important}.mt-sm-1,.my-sm-1{margin-top:.25rem!important}.mr-sm-1,.mx-sm-1{margin-right:.25rem!important}.mb-sm-1,.my-sm-1{margin-bottom:.25rem!important}.ml-sm-1,.mx-sm-1{margin-left:.25rem!important}.m-sm-2{margin:.5rem!important}.mt-sm-2,.my-sm-2{margin-top:.5rem!important}.mr-sm-2,.mx-sm-2{margin-right:.5rem!important}.mb-sm-2,.my-sm-2{margin-bottom:.5rem!important}.ml-sm-2,.mx-sm-2{margin-left:.5rem!important}.m-sm-3{margin:1rem!important}.mt-sm-3,.my-sm-3{margin-top:1rem!important}.mr-sm-3,.mx-sm-3{margin-right:1rem!important}.mb-sm-3,.my-sm-3{margin-bottom:1rem!important}.ml-sm-3,.mx-sm-3{margin-left:1rem!important}.m-sm-4{margin:1.5rem!important}.mt-sm-4,.my-sm-4{margin-top:1.5rem!important}.mr-sm-4,.mx-sm-4{margin-right:1.5rem!important}.mb-sm-4,.my-sm-4{margin-bottom:1.5rem!important}.ml-sm-4,.mx-sm-4{margin-left:1.5rem!important}.m-sm-5{margin:3rem!important}.mt-sm-5,.my-sm-5{margin-top:3rem!important}.mr-sm-5,.mx-sm-5{margin-right:3rem!important}.mb-sm-5,.my-sm-5{margin-bottom:3rem!important}.ml-sm-5,.mx-sm-5{margin-left:3rem!important}.p-sm-0{padding:0!important}.pt-sm-0,.py-sm-0{padding-top:0!important}.pr-sm-0,.px-sm-0{padding-right:0!important}.pb-sm-0,.py-sm-0{padding-bottom:0!important}.pl-sm-0,.px-sm-0{padding-left:0!important}.p-sm-1{padding:.25rem!important}.pt-sm-1,.py-sm-1{padding-top:.25rem!important}.pr-sm-1,.px-sm-1{padding-right:.25rem!important}.pb-sm-1,.py-sm-1{padding-bottom:.25rem!important}.pl-sm-1,.px-sm-1{padding-left:.25rem!important}.p-sm-2{padding:.5rem!important}.pt-sm-2,.py-sm-2{padding-top:.5rem!important}.pr-sm-2,.px-sm-2{padding-right:.5rem!important}.pb-sm-2,.py-sm-2{padding-bottom:.5rem!important}.pl-sm-2,.px-sm-2{padding-left:.5rem!important}.p-sm-3{padding:1rem!important}.pt-sm-3,.py-sm-3{padding-top:1rem!important}.pr-sm-3,.px-sm-3{padding-right:1rem!important}.pb-sm-3,.py-sm-3{padding-bottom:1rem!important}.pl-sm-3,.px-sm-3{padding-left:1rem!important}.p-sm-4{padding:1.5rem!important}.pt-sm-4,.py-sm-4{padding-top:1.5rem!important}.pr-sm-4,.px-sm-4{padding-right:1.5rem!important}.pb-sm-4,.py-sm-4{padding-bottom:1.5rem!important}.pl-sm-4,.px-sm-4{padding-left:1.5rem!important}.p-sm-5{padding:3rem!important}.pt-sm-5,.py-sm-5{padding-top:3rem!important}.pr-sm-5,.px-sm-5{padding-right:3rem!important}.pb-sm-5,.py-sm-5{padding-bottom:3rem!important}.pl-sm-5,.px-sm-5{padding-left:3rem!important}.m-sm-n1{margin:-.25rem!important}.mt-sm-n1,.my-sm-n1{margin-top:-.25rem!important}.mr-sm-n1,.mx-sm-n1{margin-right:-.25rem!important}.mb-sm-n1,.my-sm-n1{margin-bottom:-.25rem!important}.ml-sm-n1,.mx-sm-n1{margin-left:-.25rem!important}.m-sm-n2{margin:-.5rem!important}.mt-sm-n2,.my-sm-n2{margin-top:-.5rem!important}.mr-sm-n2,.mx-sm-n2{margin-right:-.5rem!important}.mb-sm-n2,.my-sm-n2{margin-bottom:-.5rem!important}.ml-sm-n2,.mx-sm-n2{margin-left:-.5rem!important}.m-sm-n3{margin:-1rem!important}.mt-sm-n3,.my-sm-n3{margin-top:-1rem!important}.mr-sm-n3,.mx-sm-n3{margin-right:-1rem!important}.mb-sm-n3,.my-sm-n3{margin-bottom:-1rem!important}.ml-sm-n3,.mx-sm-n3{margin-left:-1rem!important}.m-sm-n4{margin:-1.5rem!important}.mt-sm-n4,.my-sm-n4{margin-top:-1.5rem!important}.mr-sm-n4,.mx-sm-n4{margin-right:-1.5rem!important}.mb-sm-n4,.my-sm-n4{margin-bottom:-1.5rem!important}.ml-sm-n4,.mx-sm-n4{margin-left:-1.5rem!important}.m-sm-n5{margin:-3rem!important}.mt-sm-n5,.my-sm-n5{margin-top:-3rem!important}.mr-sm-n5,.mx-sm-n5{margin-right:-3rem!important}.mb-sm-n5,.my-sm-n5{margin-bottom:-3rem!important}.ml-sm-n5,.mx-sm-n5{margin-left:-3rem!important}.m-sm-auto{margin:auto!important}.mt-sm-auto,.my-sm-auto{margin-top:auto!important}.mr-sm-auto,.mx-sm-auto{margin-right:auto!important}.mb-sm-auto,.my-sm-auto{margin-bottom:auto!important}.ml-sm-auto,.mx-sm-auto{margin-left:auto!important}}@media (min-width:768px){.m-md-0{margin:0!important}.mt-md-0,.my-md-0{margin-top:0!important}.mr-md-0,.mx-md-0{margin-right:0!important}.mb-md-0,.my-md-0{margin-bottom:0!important}.ml-md-0,.mx-md-0{margin-left:0!important}.m-md-1{margin:.25rem!important}.mt-md-1,.my-md-1{margin-top:.25rem!important}.mr-md-1,.mx-md-1{margin-right:.25rem!important}.mb-md-1,.my-md-1{margin-bottom:.25rem!important}.ml-md-1,.mx-md-1{margin-left:.25rem!important}.m-md-2{margin:.5rem!important}.mt-md-2,.my-md-2{margin-top:.5rem!important}.mr-md-2,.mx-md-2{margin-right:.5rem!important}.mb-md-2,.my-md-2{margin-bottom:.5rem!important}.ml-md-2,.mx-md-2{margin-left:.5rem!important}.m-md-3{margin:1rem!important}.mt-md-3,.my-md-3{margin-top:1rem!important}.mr-md-3,.mx-md-3{margin-right:1rem!important}.mb-md-3,.my-md-3{margin-bottom:1rem!important}.ml-md-3,.mx-md-3{margin-left:1rem!important}.m-md-4{margin:1.5rem!important}.mt-md-4,.my-md-4{margin-top:1.5rem!important}.mr-md-4,.mx-md-4{margin-right:1.5rem!important}.mb-md-4,.my-md-4{margin-bottom:1.5rem!important}.ml-md-4,.mx-md-4{margin-left:1.5rem!important}.m-md-5{margin:3rem!important}.mt-md-5,.my-md-5{margin-top:3rem!important}.mr-md-5,.mx-md-5{margin-right:3rem!important}.mb-md-5,.my-md-5{margin-bottom:3rem!important}.ml-md-5,.mx-md-5{margin-left:3rem!important}.p-md-0{padding:0!important}.pt-md-0,.py-md-0{padding-top:0!important}.pr-md-0,.px-md-0{padding-right:0!important}.pb-md-0,.py-md-0{padding-bottom:0!important}.pl-md-0,.px-md-0{padding-left:0!important}.p-md-1{padding:.25rem!important}.pt-md-1,.py-md-1{padding-top:.25rem!important}.pr-md-1,.px-md-1{padding-right:.25rem!important}.pb-md-1,.py-md-1{padding-bottom:.25rem!important}.pl-md-1,.px-md-1{padding-left:.25rem!important}.p-md-2{padding:.5rem!important}.pt-md-2,.py-md-2{padding-top:.5rem!important}.pr-md-2,.px-md-2{padding-right:.5rem!important}.pb-md-2,.py-md-2{padding-bottom:.5rem!important}.pl-md-2,.px-md-2{padding-left:.5rem!important}.p-md-3{padding:1rem!important}.pt-md-3,.py-md-3{padding-top:1rem!important}.pr-md-3,.px-md-3{padding-right:1rem!important}.pb-md-3,.py-md-3{padding-bottom:1rem!important}.pl-md-3,.px-md-3{padding-left:1rem!important}.p-md-4{padding:1.5rem!important}.pt-md-4,.py-md-4{padding-top:1.5rem!important}.pr-md-4,.px-md-4{padding-right:1.5rem!important}.pb-md-4,.py-md-4{padding-bottom:1.5rem!important}.pl-md-4,.px-md-4{padding-left:1.5rem!important}.p-md-5{padding:3rem!important}.pt-md-5,.py-md-5{padding-top:3rem!important}.pr-md-5,.px-md-5{padding-right:3rem!important}.pb-md-5,.py-md-5{padding-bottom:3rem!important}.pl-md-5,.px-md-5{padding-left:3rem!important}.m-md-n1{margin:-.25rem!important}.mt-md-n1,.my-md-n1{margin-top:-.25rem!important}.mr-md-n1,.mx-md-n1{margin-right:-.25rem!important}.mb-md-n1,.my-md-n1{margin-bottom:-.25rem!important}.ml-md-n1,.mx-md-n1{margin-left:-.25rem!important}.m-md-n2{margin:-.5rem!important}.mt-md-n2,.my-md-n2{margin-top:-.5rem!important}.mr-md-n2,.mx-md-n2{margin-right:-.5rem!important}.mb-md-n2,.my-md-n2{margin-bottom:-.5rem!important}.ml-md-n2,.mx-md-n2{margin-left:-.5rem!important}.m-md-n3{margin:-1rem!important}.mt-md-n3,.my-md-n3{margin-top:-1rem!important}.mr-md-n3,.mx-md-n3{margin-right:-1rem!important}.mb-md-n3,.my-md-n3{margin-bottom:-1rem!important}.ml-md-n3,.mx-md-n3{margin-left:-1rem!important}.m-md-n4{margin:-1.5rem!important}.mt-md-n4,.my-md-n4{margin-top:-1.5rem!important}.mr-md-n4,.mx-md-n4{margin-right:-1.5rem!important}.mb-md-n4,.my-md-n4{margin-bottom:-1.5rem!important}.ml-md-n4,.mx-md-n4{margin-left:-1.5rem!important}.m-md-n5{margin:-3rem!important}.mt-md-n5,.my-md-n5{margin-top:-3rem!important}.mr-md-n5,.mx-md-n5{margin-right:-3rem!important}.mb-md-n5,.my-md-n5{margin-bottom:-3rem!important}.ml-md-n5,.mx-md-n5{margin-left:-3rem!important}.m-md-auto{margin:auto!important}.mt-md-auto,.my-md-auto{margin-top:auto!important}.mr-md-auto,.mx-md-auto{margin-right:auto!important}.mb-md-auto,.my-md-auto{margin-bottom:auto!important}.ml-md-auto,.mx-md-auto{margin-left:auto!important}}@media (min-width:992px){.m-lg-0{margin:0!important}.mt-lg-0,.my-lg-0{margin-top:0!important}.mr-lg-0,.mx-lg-0{margin-right:0!important}.mb-lg-0,.my-lg-0{margin-bottom:0!important}.ml-lg-0,.mx-lg-0{margin-left:0!important}.m-lg-1{margin:.25rem!important}.mt-lg-1,.my-lg-1{margin-top:.25rem!important}.mr-lg-1,.mx-lg-1{margin-right:.25rem!important}.mb-lg-1,.my-lg-1{margin-bottom:.25rem!important}.ml-lg-1,.mx-lg-1{margin-left:.25rem!important}.m-lg-2{margin:.5rem!important}.mt-lg-2,.my-lg-2{margin-top:.5rem!important}.mr-lg-2,.mx-lg-2{margin-right:.5rem!important}.mb-lg-2,.my-lg-2{margin-bottom:.5rem!important}.ml-lg-2,.mx-lg-2{margin-left:.5rem!important}.m-lg-3{margin:1rem!important}.mt-lg-3,.my-lg-3{margin-top:1rem!important}.mr-lg-3,.mx-lg-3{margin-right:1rem!important}.mb-lg-3,.my-lg-3{margin-bottom:1rem!important}.ml-lg-3,.mx-lg-3{margin-left:1rem!important}.m-lg-4{margin:1.5rem!important}.mt-lg-4,.my-lg-4{margin-top:1.5rem!important}.mr-lg-4,.mx-lg-4{margin-right:1.5rem!important}.mb-lg-4,.my-lg-4{margin-bottom:1.5rem!important}.ml-lg-4,.mx-lg-4{margin-left:1.5rem!important}.m-lg-5{margin:3rem!important}.mt-lg-5,.my-lg-5{margin-top:3rem!important}.mr-lg-5,.mx-lg-5{margin-right:3rem!important}.mb-lg-5,.my-lg-5{margin-bottom:3rem!important}.ml-lg-5,.mx-lg-5{margin-left:3rem!important}.p-lg-0{padding:0!important}.pt-lg-0,.py-lg-0{padding-top:0!important}.pr-lg-0,.px-lg-0{padding-right:0!important}.pb-lg-0,.py-lg-0{padding-bottom:0!important}.pl-lg-0,.px-lg-0{padding-left:0!important}.p-lg-1{padding:.25rem!important}.pt-lg-1,.py-lg-1{padding-top:.25rem!important}.pr-lg-1,.px-lg-1{padding-right:.25rem!important}.pb-lg-1,.py-lg-1{padding-bottom:.25rem!important}.pl-lg-1,.px-lg-1{padding-left:.25rem!important}.p-lg-2{padding:.5rem!important}.pt-lg-2,.py-lg-2{padding-top:.5rem!important}.pr-lg-2,.px-lg-2{padding-right:.5rem!important}.pb-lg-2,.py-lg-2{padding-bottom:.5rem!important}.pl-lg-2,.px-lg-2{padding-left:.5rem!important}.p-lg-3{padding:1rem!important}.pt-lg-3,.py-lg-3{padding-top:1rem!important}.pr-lg-3,.px-lg-3{padding-right:1rem!important}.pb-lg-3,.py-lg-3{padding-bottom:1rem!important}.pl-lg-3,.px-lg-3{padding-left:1rem!important}.p-lg-4{padding:1.5rem!important}.pt-lg-4,.py-lg-4{padding-top:1.5rem!important}.pr-lg-4,.px-lg-4{padding-right:1.5rem!important}.pb-lg-4,.py-lg-4{padding-bottom:1.5rem!important}.pl-lg-4,.px-lg-4{padding-left:1.5rem!important}.p-lg-5{padding:3rem!important}.pt-lg-5,.py-lg-5{padding-top:3rem!important}.pr-lg-5,.px-lg-5{padding-right:3rem!important}.pb-lg-5,.py-lg-5{padding-bottom:3rem!important}.pl-lg-5,.px-lg-5{padding-left:3rem!important}.m-lg-n1{margin:-.25rem!important}.mt-lg-n1,.my-lg-n1{margin-top:-.25rem!important}.mr-lg-n1,.mx-lg-n1{margin-right:-.25rem!important}.mb-lg-n1,.my-lg-n1{margin-bottom:-.25rem!important}.ml-lg-n1,.mx-lg-n1{margin-left:-.25rem!important}.m-lg-n2{margin:-.5rem!important}.mt-lg-n2,.my-lg-n2{margin-top:-.5rem!important}.mr-lg-n2,.mx-lg-n2{margin-right:-.5rem!important}.mb-lg-n2,.my-lg-n2{margin-bottom:-.5rem!important}.ml-lg-n2,.mx-lg-n2{margin-left:-.5rem!important}.m-lg-n3{margin:-1rem!important}.mt-lg-n3,.my-lg-n3{margin-top:-1rem!important}.mr-lg-n3,.mx-lg-n3{margin-right:-1rem!important}.mb-lg-n3,.my-lg-n3{margin-bottom:-1rem!important}.ml-lg-n3,.mx-lg-n3{margin-left:-1rem!important}.m-lg-n4{margin:-1.5rem!important}.mt-lg-n4,.my-lg-n4{margin-top:-1.5rem!important}.mr-lg-n4,.mx-lg-n4{margin-right:-1.5rem!important}.mb-lg-n4,.my-lg-n4{margin-bottom:-1.5rem!important}.ml-lg-n4,.mx-lg-n4{margin-left:-1.5rem!important}.m-lg-n5{margin:-3rem!important}.mt-lg-n5,.my-lg-n5{margin-top:-3rem!important}.mr-lg-n5,.mx-lg-n5{margin-right:-3rem!important}.mb-lg-n5,.my-lg-n5{margin-bottom:-3rem!important}.ml-lg-n5,.mx-lg-n5{margin-left:-3rem!important}.m-lg-auto{margin:auto!important}.mt-lg-auto,.my-lg-auto{margin-top:auto!important}.mr-lg-auto,.mx-lg-auto{margin-right:auto!important}.mb-lg-auto,.my-lg-auto{margin-bottom:auto!important}.ml-lg-auto,.mx-lg-auto{margin-left:auto!important}}@media (min-width:1200px){.m-xl-0{margin:0!important}.mt-xl-0,.my-xl-0{margin-top:0!important}.mr-xl-0,.mx-xl-0{margin-right:0!important}.mb-xl-0,.my-xl-0{margin-bottom:0!important}.ml-xl-0,.mx-xl-0{margin-left:0!important}.m-xl-1{margin:.25rem!important}.mt-xl-1,.my-xl-1{margin-top:.25rem!important}.mr-xl-1,.mx-xl-1{margin-right:.25rem!important}.mb-xl-1,.my-xl-1{margin-bottom:.25rem!important}.ml-xl-1,.mx-xl-1{margin-left:.25rem!important}.m-xl-2{margin:.5rem!important}.mt-xl-2,.my-xl-2{margin-top:.5rem!important}.mr-xl-2,.mx-xl-2{margin-right:.5rem!important}.mb-xl-2,.my-xl-2{margin-bottom:.5rem!important}.ml-xl-2,.mx-xl-2{margin-left:.5rem!important}.m-xl-3{margin:1rem!important}.mt-xl-3,.my-xl-3{margin-top:1rem!important}.mr-xl-3,.mx-xl-3{margin-right:1rem!important}.mb-xl-3,.my-xl-3{margin-bottom:1rem!important}.ml-xl-3,.mx-xl-3{margin-left:1rem!important}.m-xl-4{margin:1.5rem!important}.mt-xl-4,.my-xl-4{margin-top:1.5rem!important}.mr-xl-4,.mx-xl-4{margin-right:1.5rem!important}.mb-xl-4,.my-xl-4{margin-bottom:1.5rem!important}.ml-xl-4,.mx-xl-4{margin-left:1.5rem!important}.m-xl-5{margin:3rem!important}.mt-xl-5,.my-xl-5{margin-top:3rem!important}.mr-xl-5,.mx-xl-5{margin-right:3rem!important}.mb-xl-5,.my-xl-5{margin-bottom:3rem!important}.ml-xl-5,.mx-xl-5{margin-left:3rem!important}.p-xl-0{padding:0!important}.pt-xl-0,.py-xl-0{padding-top:0!important}.pr-xl-0,.px-xl-0{padding-right:0!important}.pb-xl-0,.py-xl-0{padding-bottom:0!important}.pl-xl-0,.px-xl-0{padding-left:0!important}.p-xl-1{padding:.25rem!important}.pt-xl-1,.py-xl-1{padding-top:.25rem!important}.pr-xl-1,.px-xl-1{padding-right:.25rem!important}.pb-xl-1,.py-xl-1{padding-bottom:.25rem!important}.pl-xl-1,.px-xl-1{padding-left:.25rem!important}.p-xl-2{padding:.5rem!important}.pt-xl-2,.py-xl-2{padding-top:.5rem!important}.pr-xl-2,.px-xl-2{padding-right:.5rem!important}.pb-xl-2,.py-xl-2{padding-bottom:.5rem!important}.pl-xl-2,.px-xl-2{padding-left:.5rem!important}.p-xl-3{padding:1rem!important}.pt-xl-3,.py-xl-3{padding-top:1rem!important}.pr-xl-3,.px-xl-3{padding-right:1rem!important}.pb-xl-3,.py-xl-3{padding-bottom:1rem!important}.pl-xl-3,.px-xl-3{padding-left:1rem!important}.p-xl-4{padding:1.5rem!important}.pt-xl-4,.py-xl-4{padding-top:1.5rem!important}.pr-xl-4,.px-xl-4{padding-right:1.5rem!important}.pb-xl-4,.py-xl-4{padding-bottom:1.5rem!important}.pl-xl-4,.px-xl-4{padding-left:1.5rem!important}.p-xl-5{padding:3rem!important}.pt-xl-5,.py-xl-5{padding-top:3rem!important}.pr-xl-5,.px-xl-5{padding-right:3rem!important}.pb-xl-5,.py-xl-5{padding-bottom:3rem!important}.pl-xl-5,.px-xl-5{padding-left:3rem!important}.m-xl-n1{margin:-.25rem!important}.mt-xl-n1,.my-xl-n1{margin-top:-.25rem!important}.mr-xl-n1,.mx-xl-n1{margin-right:-.25rem!important}.mb-xl-n1,.my-xl-n1{margin-bottom:-.25rem!important}.ml-xl-n1,.mx-xl-n1{margin-left:-.25rem!important}.m-xl-n2{margin:-.5rem!important}.mt-xl-n2,.my-xl-n2{margin-top:-.5rem!important}.mr-xl-n2,.mx-xl-n2{margin-right:-.5rem!important}.mb-xl-n2,.my-xl-n2{margin-bottom:-.5rem!important}.ml-xl-n2,.mx-xl-n2{margin-left:-.5rem!important}.m-xl-n3{margin:-1rem!important}.mt-xl-n3,.my-xl-n3{margin-top:-1rem!important}.mr-xl-n3,.mx-xl-n3{margin-right:-1rem!important}.mb-xl-n3,.my-xl-n3{margin-bottom:-1rem!important}.ml-xl-n3,.mx-xl-n3{margin-left:-1rem!important}.m-xl-n4{margin:-1.5rem!important}.mt-xl-n4,.my-xl-n4{margin-top:-1.5rem!important}.mr-xl-n4,.mx-xl-n4{margin-right:-1.5rem!important}.mb-xl-n4,.my-xl-n4{margin-bottom:-1.5rem!important}.ml-xl-n4,.mx-xl-n4{margin-left:-1.5rem!important}.m-xl-n5{margin:-3rem!important}.mt-xl-n5,.my-xl-n5{margin-top:-3rem!important}.mr-xl-n5,.mx-xl-n5{margin-right:-3rem!important}.mb-xl-n5,.my-xl-n5{margin-bottom:-3rem!important}.ml-xl-n5,.mx-xl-n5{margin-left:-3rem!important}.m-xl-auto{margin:auto!important}.mt-xl-auto,.my-xl-auto{margin-top:auto!important}.mr-xl-auto,.mx-xl-auto{margin-right:auto!important}.mb-xl-auto,.my-xl-auto{margin-bottom:auto!important}.ml-xl-auto,.mx-xl-auto{margin-left:auto!important}}.text-monospace{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace!important}.text-justify{text-align:justify!important}.text-wrap{white-space:normal!important}.text-nowrap{white-space:nowrap!important}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-left{text-align:left!important}.text-right{text-align:right!important}.text-center{text-align:center!important}@media (min-width:576px){.text-sm-left{text-align:left!important}.text-sm-right{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.text-md-left{text-align:left!important}.text-md-right{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.text-lg-left{text-align:left!important}.text-lg-right{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.text-xl-left{text-align:left!important}.text-xl-right{text-align:right!important}.text-xl-center{text-align:center!important}}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.font-weight-light{font-weight:300!important}.font-weight-lighter{font-weight:lighter!important}.font-weight-normal{font-weight:400!important}.font-weight-bold{font-weight:700!important}.font-weight-bolder{font-weight:bolder!important}.font-italic{font-style:italic!important}.text-white{color:#fff!important}.text-primary{color:#007bff!important}a.text-primary:focus,a.text-primary:hover{color:#0056b3!important}.text-secondary{color:#6c757d!important}a.text-secondary:focus,a.text-secondary:hover{color:#494f54!important}.text-success{color:#28a745!important}a.text-success:focus,a.text-success:hover{color:#19692c!important}.text-info{color:#17a2b8!important}a.text-info:focus,a.text-info:hover{color:#0f6674!important}.text-warning{color:#ffc107!important}a.text-warning:focus,a.text-warning:hover{color:#ba8b00!important}.text-danger{color:#dc3545!important}a.text-danger:focus,a.text-danger:hover{color:#a71d2a!important}.text-light{color:#f8f9fa!important}a.text-light:focus,a.text-light:hover{color:#cbd3da!important}.text-dark{color:#343a40!important}a.text-dark:focus,a.text-dark:hover{color:#121416!important}.text-body{color:#212529!important}.text-muted{color:#6c757d!important}.text-black-50{color:rgba(0,0,0,.5)!important}.text-white-50{color:rgba(255,255,255,.5)!important}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.text-decoration-none{text-decoration:none!important}.text-break{word-break:break-word!important;overflow-wrap:break-word!important}.text-reset{color:inherit!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}@media print{*,::after,::before{text-shadow:none!important;box-shadow:none!important}a:not(.btn){text-decoration:underline}abbr[title]::after{content:" (" attr(title) ")"}pre{white-space:pre-wrap!important}blockquote,pre{border:1px solid #adb5bd;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}@page{size:a3}body{min-width:992px!important}.container{min-width:992px!important}.navbar{display:none}.badge{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #dee2e6!important}.table-dark{color:inherit}.table-dark tbody+tbody,.table-dark td,.table-dark th,.table-dark thead th{border-color:#dee2e6}.table .thead-dark th{color:inherit;border-color:#dee2e6}} +/*# sourceMappingURL=bootstrap.min.css.map */ \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/css/right-arrow.svg b/src/vitis/vas/doc/suivi_prod_immo/css/right-arrow.svg new file mode 100644 index 0000000000000000000000000000000000000000..3f4229f7fe52aaa2d92714716e55c89ea2ea6f0d --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/css/right-arrow.svg @@ -0,0 +1 @@ +<svg id="Capa_1" enable-background="new 0 0 546.55 546.55" height="512" viewBox="0 0 546.55 546.55" width="512" xmlns="http://www.w3.org/2000/svg"><path d="m256.195 478.239c-2.719 0-5.454-.651-7.956-1.968-5.604-2.952-9.124-8.773-9.124-15.112v-85.398h-222.035c-9.441 0-17.08-7.639-17.08-17.08v-170.797c0-9.441 7.639-17.08 17.08-17.08h222.036v-85.398c0-6.338 3.519-12.159 9.124-15.112 5.588-2.986 12.376-2.569 17.63 1.034l273.275 187.877c4.637 3.186 7.406 8.456 7.406 14.077s-2.769 10.892-7.406 14.077l-273.276 187.878c-2.902 1.984-6.288 3.002-9.674 3.002zm-222.036-136.638h222.036c9.441 0 17.08 7.639 17.08 17.08v70.004l226.056-155.402-226.056-155.402v70.003c0 9.441-7.639 17.08-17.08 17.08h-222.036z"/></svg> \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/css/signin.css b/src/vitis/vas/doc/suivi_prod_immo/css/signin.css new file mode 100644 index 0000000000000000000000000000000000000000..90cc93e5b97ba7cd9419492a48c4c6f95b052830 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/css/signin.css @@ -0,0 +1,44 @@ +html, +body { + height: 100%; +} + +body { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + padding-top: 40px; + padding-bottom: 40px; + background-color: #f5f5f5; +} + +.form-signin { + width: 100%; + max-width: 330px; + padding: 15px; + margin: auto; +} +.form-signin .checkbox { + font-weight: 400; +} +.form-signin .form-control { + position: relative; + box-sizing: border-box; + height: auto; + padding: 10px; + font-size: 16px; +} +.form-signin .form-control:focus { + z-index: 2; +} +.form-signin input[type="email"] { + margin-bottom: -1px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.form-signin input[type="password"] { + margin-bottom: 10px; + border-top-left-radius: 0; + border-top-right-radius: 0; +} diff --git a/src/vitis/vas/doc/suivi_prod_immo/css/style.css b/src/vitis/vas/doc/suivi_prod_immo/css/style.css new file mode 100644 index 0000000000000000000000000000000000000000..a88df22fcfb9878e1a0a28ef49cc1bcb81849879 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/css/style.css @@ -0,0 +1,111 @@ + +.navbar_analyse { + background-color: #ff8a55!important; +} + +body { + font-size: .875rem; +} + +.feather { + width: 16px; + height: 16px; + vertical-align: text-bottom; +} + +/* + * Sidebar + */ + +.sidebar { + position: fixed; + top: 0; + bottom: 0; + left: 0; + z-index: 100; /* Behind the navbar */ + padding: 48px 0 0; /* Height of navbar */ + box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1); +} + +.sidebar-sticky { + position: relative; + top: 0; + height: calc(100vh - 48px); + padding-top: .5rem; + overflow-x: hidden; + overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */ +} + +@supports ((position: -webkit-sticky) or (position: sticky)) { + .sidebar-sticky { + position: -webkit-sticky; + position: sticky; + } +} + +.sidebar .nav-link { + font-weight: 500; + color: #333; +} + +.sidebar .nav-link .feather { + margin-right: 4px; + color: #999; +} + +.sidebar .nav-link.active { + color: #007bff; +} + +.sidebar .nav-link:hover .feather, +.sidebar .nav-link.active .feather { + color: inherit; +} + +.sidebar-heading { + font-size: .75rem; + text-transform: uppercase; +} + +/* + * Content + */ + +[role="main"] { + padding-top: 48px; /* Space for fixed navbar */ +} + +/* + * Navbar + */ + +.navbar-brand { + padding-top: .75rem; + padding-bottom: .75rem; + font-size: 1.1rem; + background-color: rgba(0, 0, 0, .25); + box-shadow: inset -1px 0 0 rgba(0, 0, 0, .25); +} + +.navbar-text { + font-size: 1.5rem; + font-weight: bold; + color: white; +} + +.navbar .form-control { + padding: .75rem 1rem; + border-width: 0; + border-radius: 0; +} + +.form-control-dark { + color: #fff; + background-color: rgba(255, 255, 255, .1); + border-color: rgba(255, 255, 255, .1); +} + +.form-control-dark:focus { + border-color: transparent; + box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); +} diff --git a/src/vitis/vas/doc/suivi_prod_immo/css/style_dashboard.css b/src/vitis/vas/doc/suivi_prod_immo/css/style_dashboard.css new file mode 100644 index 0000000000000000000000000000000000000000..611f65d30f4c4159ac974dd6f4aacbb2a8b0e90e --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/css/style_dashboard.css @@ -0,0 +1,45 @@ +.feather { + width: 16px; + height: 16px; + vertical-align: text-bottom; +} + +.title { + background-color: #89b923!important; + font-size: 1.5rem; + font-weight: bold; + color: white; +} + +.subtitle { + background-color: #89b923!important; + font-size: 1.2rem; + color: white; +} +.line_table { + background-color: #f6ffe2!important; + font-size: 0.8rem; +} + +.line_table_2 { + background-color: #e4fbb2!important; + font-size: 0.8rem; +} + +.date_maj { + background-color: #bdd457!important; + font-size: 1.5rem; + color: grey; +} + +.arrow { + background-repeat:no-repeat; + background-position:center center; + background-size: contain; +} + +.hachure { + background-image: repeating-linear-gradient(-45deg, transparent, transparent 5px,gainsboro 5px,gainsboro 7px); + /* avec plusieurs longueurs pour les points d'arrêt */ + background-image: repeating-linear-gradient(-45deg, transparent 0 5px, gainsboro 5px 7px); +} \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/form_1_operation.html b/src/vitis/vas/doc/suivi_prod_immo/form_1_operation.html new file mode 100644 index 0000000000000000000000000000000000000000..cdffe1530b726c31ae9b64598ddd45edc6e38d83 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/form_1_operation.html @@ -0,0 +1,89 @@ +<!doctype html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <title>BD PROD IMMO - Analyse</title> + <link rel="stylesheet" href="css/bootstrap_4.3.1/bootstrap.min.css"> + <link rel="stylesheet" href="css/style.css"> +</head> +<body> + <nav class="navbar navbar-dark fixed-top navbar_analyse flex-md-nowrap p-0 shadow"> + <a class="navbar-brand col-sm-3 col-md-2 mr-0" href="#">BD Suivi de la production immobilière</a> + <a class="navbar-text col-sm-2 col-md-4 mr-0" href="#"> Module d'analyse</a> + <ul class="navbar-nav px-3"> + <li class="nav-item text-nowrap"> + <img src="images/grand_lyon_large.png" width="150px"> <img src="https://geo.urbalyon.org/images/logo_bandeau_urbalyon.png">Urbalyon + </li> + </ul> + </nav> + + <div class="container-fluid"> + <div class="row"> + <nav class="col-md-2 d-none d-md-block bg-light sidebar"> + <div class="sidebar-sticky"> + <ul class="nav flex-column"> + <li class="nav-item"> + <a class="nav-link active" href="https://geo.urbalyon.org/doc/suivi_prod_immo/form_1_operation.php?token=<?php echo $_SESSION['token_bd_prod_immo']; ?>"><span data-feather="file-text"></span>Fiche opération<span class="sr-only">(current)</span></a> + </li> + <li class="nav-item"> + <a class="nav-link" href="https://geo.urbalyon.org/doc/suivi_prod_immo/form_2_type.php?token=<?php echo $_SESSION['token_bd_prod_immo']; ?>"><span data-feather="file-text"></span>Type d'opération</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="https://geo.urbalyon.org/doc/suivi_prod_immo/form_3_porteur.php?token=<?php echo $_SESSION['token_bd_prod_immo']; ?>"><span data-feather="file-text"></span>Porteurs de programmes</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="https://geo.urbalyon.org/doc/suivi_prod_immo/form_4_logement.php?token=<?php echo $_SESSION['token_bd_prod_immo']; ?>"><span data-feather="file-text"></span>Les programmes de logements</a> + </li> + </ul> + </div> + </nav> + + <main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4"> + <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom"> + <div class="container"> + <div class="row"> + <h1 class="h2">Fiche opération</h1> + </div> + <div class="row"> + <?php if (isset($sError)): ?> + <div class="alert alert-danger" role="alert"> + <span data-feather="alert-triangle"></span> <?php echo $sError; ?> + </div> + <?php endif; ?> + </div> + <div class="row mt-5"> + <form> + <div class="form-group"> + <label for="l_operation">Opération</label> + <select class="form-control" id="l_operation"> + <option></option> + <?php foreach($aOperations as $iKey=>$aValue): ?> + <option value="<?php echo $aValue['id_operation']; ?>"><?php echo $aValue['nom_operation']; ?></option> + <?php endforeach; ?> + </select> + </div> + <div class="btn-group" role="group" aria-label="Basic example"> + <button id="get_operation" type="button" class="btn btn-outline-secondary">Afficher la fiche</button> + <button id="get_operation_excel" type="button" class="btn btn-outline-secondary"><span data-feather="download"></span> Export</button> + </div> + + </form> + </div> + </div> + </main> + + </div> + </div> + <!-- Icons --> + <script src="https://unpkg.com/feather-icons/dist/feather.min.js"></script> + <script> + var sToken='<?php echo $_SESSION['token_bd_prod_immo']; ?>'; + feather.replace(); + </script> + <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> + <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script> + <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script> + <script type="text/javascript" src="js/form.js"></script> +</body> +</html> \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/form_1_operation.php b/src/vitis/vas/doc/suivi_prod_immo/form_1_operation.php new file mode 100644 index 0000000000000000000000000000000000000000..5ce995b9c6b24ffca0f364a46df6a6cf4902ef47 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/form_1_operation.php @@ -0,0 +1,41 @@ +<?php +// https://geo.urbalyon.org/doc/suivi_prod_immo/form_1_operation.php +session_start(); +if (isset($_REQUEST['login'])) $_SESSION['login_bd_prod_immo']=$_REQUEST['login']; + +if(isset($_REQUEST['token']) && isset($_SESSION['token_bd_prod_immo'])){ + if($_REQUEST['token']==$_SESSION['token_bd_prod_immo']){ + require_once("../../rest/conf/properties.inc"); + require_once("properties_suivi_prod_immo.inc"); + + try{ + $oConn = new PDO('pgsql:host='.$properties['server'].';port='.$properties['port'].';dbname='.$properties['db_prod_immo'], $properties['db_user_prod_immo'], $properties['db_pass_prod_immo']); + $oConn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $oConn->setAttribute(PDO::ATTR_CASE, PDO::CASE_NATURAL); + + if($oConn){ + // get data Opérations + $oResult = $oConn->prepare('SELECT id_operation, nom_operation FROM '.$properties['schema_prod_immo'].'.operation ORDER BY nom_operation'); + $oResult->execute(); + + if ($oResult->rowCount()>0){ + $aOperations = $oResult->fetchAll(); + }else{ + $sError="Erreur : ".$oResult->rowCount()." opération(s) trouvée(s)."; + } + } + include ('form_1_operation.html'); + }catch (PDOException $e){ + $sError="ERROR : ".$e->getMessage(); + } + }else{ + header ('location: signin.php'); + exit(); + } +}else{ + header ('location: signin.php'); + exit(); +} + + +?> \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/form_2_type.html b/src/vitis/vas/doc/suivi_prod_immo/form_2_type.html new file mode 100644 index 0000000000000000000000000000000000000000..e5b4e049afcfaeab99c242af348c9ddfc85321a1 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/form_2_type.html @@ -0,0 +1,118 @@ +<!doctype html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <title>BD PROD IMMO - Analyse</title> + <link rel="stylesheet" href="css/bootstrap_4.3.1/bootstrap.min.css"> + <link rel="stylesheet" href="css/style.css"> +</head> +<body> + <nav class="navbar navbar-dark fixed-top navbar_analyse flex-md-nowrap p-0 shadow"> + <a class="navbar-brand col-sm-3 col-md-2 mr-0" href="#">BD Suivi de la production immobilière</a> + <a class="navbar-text col-sm-2 col-md-4 mr-0" href="#"> Module d'analyse</a> + <ul class="navbar-nav px-3"> + <li class="nav-item text-nowrap"> + <img src="images/grand_lyon_large.png" width="150px"> <img src="https://geo.urbalyon.org/images/logo_bandeau_urbalyon.png">Urbalyon + </li> + </ul> + </nav> + + <div class="container-fluid"> + <div class="row"> + <nav class="col-md-2 d-none d-md-block bg-light sidebar"> + <div class="sidebar-sticky"> + <ul class="nav flex-column"> + <li class="nav-item"> + <a class="nav-link" href="https://geo.urbalyon.org/doc/suivi_prod_immo/form_1_operation.php?token=<?php echo $_SESSION['token_bd_prod_immo']; ?>"><span data-feather="file-text"></span>Fiche opération</a> + </li> + <li class="nav-item"> + <a class="nav-link active" href="https://geo.urbalyon.org/doc/suivi_prod_immo/form_2_type.php?token=<?php echo $_SESSION['token_bd_prod_immo']; ?>"><span data-feather="file-text"></span>Type d'opération<span class="sr-only">(current)</span></a> + </li> + <li class="nav-item"> + <a class="nav-link" href="https://geo.urbalyon.org/doc/suivi_prod_immo/form_3_porteur.php?token=<?php echo $_SESSION['token_bd_prod_immo']; ?>"><span data-feather="file-text"></span>Porteurs de programmes</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="https://geo.urbalyon.org/doc/suivi_prod_immo/form_4_logement.php?token=<?php echo $_SESSION['token_bd_prod_immo']; ?>"><span data-feather="file-text"></span>Les programmes de logements</a> + </li> + </ul> + </div> + </nav> + + <main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4"> + <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom"> + <div class="container"> + <div class="row"> + <h1 class="h2">Type d'opération</h1> + </div> + <div class="row"> + <?php if (isset($sError)): ?> + <div class="alert alert-danger" role="alert"> + <span data-feather="alert-triangle"></span> <?php echo $sError; ?> + </div> + <?php endif; ?> + </div> + <div class="row mt-5"> + <form> + <div class="form-group"> + <label for="l_ctm">Conférence Territoriale des Maires</label> + <select class="form-control" id="l_ctm"> + <option></option> + <?php foreach($aCTMs as $iKey=>$aValue): ?> + <option value="<?php echo $aValue['id_ctm']; ?>"><?php echo $aValue['nom_ctm']; ?></option> + <?php endforeach; ?> + </select> + <label for="l_commune">Communes</label> + <select class="form-control" id="l_commune"> + <option></option> + <?php foreach($aCommunes as $iKey=>$aValue): ?> + <option value="<?php echo $aValue['id_commune']; ?>"><?php echo $aValue['nom_commune']; ?></option> + <?php endforeach; ?> + </select> + <label for="l_procedure_amenagement">Procédure d'aménagement</label> + <select class="form-control" id="l_procedure_amenagement"> + <option></option> + <?php foreach($aProcedureAmenagement as $iKey=>$aValue): ?> + <option value="<?php echo $aValue['code_procedure_amenagement']; ?>"><?php echo $aValue['procedure_amenagement']; ?></option> + <?php endforeach; ?> + </select> + <label for="l_financement">Mode de financement</label> + <select class="form-control" id="l_financement"> + <option></option> + <?php foreach($aFinancement as $iKey=>$aValue): ?> + <option value="<?php echo $aValue['code_financement_equ_public']; ?>"><?php echo $aValue['financement_equ_public']; ?></option> + <?php endforeach; ?> + </select> + <label for="l_suivi">Suivi de l'opération</label> + <select class="form-control" id="l_suivi"> + <option></option> + <?php foreach($aSuivi as $iKey=>$aValue): ?> + <option value="<?php echo $aValue['code_suivi']; ?>"><?php echo $aValue['suivi']; ?></option> + <?php endforeach; ?> + </select> + </div> + <div class="btn-group" role="group" aria-label="Basic example"> + <button id="get_type" type="button" class="btn btn-outline-secondary">Afficher la fiche</button> + <button id="get_type_excel" type="button" class="btn btn-outline-secondary"><span data-feather="download"></span> Export</button> + </div> + + </form> + + </div> + </div> + </main> + + </div> + </div> + <!-- Icons --> + <script src="https://unpkg.com/feather-icons/dist/feather.min.js"></script> + <script> + var sToken='<?php echo $_SESSION['token_bd_prod_immo']; ?>'; + feather.replace(); + </script> + <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> + <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script> + <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script> + <script type="text/javascript" src="js/form.js"></script> +</body> +</html> \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/form_2_type.php b/src/vitis/vas/doc/suivi_prod_immo/form_2_type.php new file mode 100644 index 0000000000000000000000000000000000000000..267173246baae88747bc719d66f19d44ead471da --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/form_2_type.php @@ -0,0 +1,72 @@ +<?php +// https://geo.urbalyon.org/doc/suivi_prod_immo/form_2_type.php +session_start(); +if (isset($_REQUEST['login'])) $_SESSION['login_bd_prod_immo']=$_REQUEST['login']; + +if(isset($_REQUEST['token']) && isset($_SESSION['token_bd_prod_immo'])){ + if($_REQUEST['token']==$_SESSION['token_bd_prod_immo']){ + require_once("../../rest/conf/properties.inc"); + require_once("properties_suivi_prod_immo.inc"); + + try{ + $oConn = new PDO('pgsql:host='.$properties['server'].';port='.$properties['port'].';dbname='.$properties['db_prod_immo'], $properties['db_user_prod_immo'], $properties['db_pass_prod_immo']); + $oConn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $oConn->setAttribute(PDO::ATTR_CASE, PDO::CASE_NATURAL); + + if($oConn){ + // get data Mode de financement + $oResult = $oConn->prepare('SELECT code_financement_equ_public, financement_equ_public FROM '.$properties['schema_prod_immo'].'.tr_financement_equ_public ORDER BY financement_equ_public'); + $oResult->execute(); + if ($oResult->rowCount()>0){ + $aFinancement = $oResult->fetchAll(); + }else{ + $sError="Erreur : ".$oResult->rowCount()." financement(s) trouvé(s)."; + } + // get data Procédure d'aménagement + $oResult = $oConn->prepare('SELECT code_procedure_amenagement, procedure_amenagement FROM '.$properties['schema_prod_immo'].'.tr_procedure_amenagement ORDER BY procedure_amenagement'); + $oResult->execute(); + if ($oResult->rowCount()>0){ + $aProcedureAmenagement = $oResult->fetchAll(); + }else{ + $sError="Erreur : ".$oResult->rowCount()." procédure(s) d'aménagement trouvé(s)."; + } + // get data CTM + $oResult2=$oConn->prepare('SELECT id_ctm, nom_ctm FROM '.$properties['schema_prod_immo'].'.conference_territoriale_maire ORDER BY nom_ctm'); + $oResult2->execute(); + if ($oResult2->rowCount()>0){ + $aCTMs = $oResult2->fetchAll(); + }else{ + $sError="Erreur : ".$oResult2->rowCount()." CTM(s) trouvé(s)."; + } + // get data Communes + $oResult4=$oConn->prepare('SELECT id_commune, nom_commune FROM '.$properties['schema_prod_immo'].'.commune ORDER BY nom_commune'); + $oResult4->execute(); + if ($oResult4->rowCount()>0){ + $aCommunes = $oResult4->fetchAll(); + }else{ + $sError="Erreur : ".$oResult4->rowCount()." commune(s) trouvé(s)."; + } + // get data Suivi de l'opération + $oResult3 = $oConn->prepare('SELECT code_suivi, suivi FROM '.$properties['schema_prod_immo'].'.tr_suivi ORDER BY suivi'); + $oResult3->execute(); + if ($oResult3->rowCount()>0){ + $aSuivi = $oResult3->fetchAll(); + }else{ + $sError="Erreur : ".$oResult3->rowCount()." suivi(s) trouvé(s)."; + } + } + include ('form_2_type.html'); + }catch (PDOException $e){ + $sError="ERROR : ".$e->getMessage(); + } + }else{ + header ('location: signin.php'); + exit(); + } +}else{ + header ('location: signin.php'); + exit(); +} + + +?> \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/form_3_porteur.html b/src/vitis/vas/doc/suivi_prod_immo/form_3_porteur.html new file mode 100644 index 0000000000000000000000000000000000000000..20f71caddee6edc22463a2855c6f25963f04a0be --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/form_3_porteur.html @@ -0,0 +1,89 @@ +<!doctype html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <title>BD PROD IMMO - Analyse</title> + <link rel="stylesheet" href="css/bootstrap_4.3.1/bootstrap.min.css"> + <link rel="stylesheet" href="css/style.css"> +</head> +<body> + <nav class="navbar navbar-dark fixed-top navbar_analyse flex-md-nowrap p-0 shadow"> + <a class="navbar-brand col-sm-3 col-md-2 mr-0" href="#">BD Suivi de la production immobilière</a> + <a class="navbar-text col-sm-2 col-md-4 mr-0" href="#"> Module d'analyse</a> + <ul class="navbar-nav px-3"> + <li class="nav-item text-nowrap"> + <img src="images/grand_lyon_large.png" width="150px"> <img src="https://geo.urbalyon.org/vmap/images/logo_bandeau_urbalyon.png">Urbalyon + </li> + </ul> + </nav> + + <div class="container-fluid"> + <div class="row"> + <nav class="col-md-2 d-none d-md-block bg-light sidebar"> + <div class="sidebar-sticky"> + <ul class="nav flex-column"> + <li class="nav-item"> + <a class="nav-link" href="https://geo.urbalyon.org/doc/suivi_prod_immo/form_1_operation.php?token=<?php echo $_SESSION['token_bd_prod_immo']; ?>"><span data-feather="file-text"></span>Fiche opération</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="https://geo.urbalyon.org/doc/suivi_prod_immo/form_2_type.php?token=<?php echo $_SESSION['token_bd_prod_immo']; ?>"><span data-feather="file-text"></span>Type d'opération</a> + </li> + <li class="nav-item"> + <a class="nav-link active" href="https://geo.urbalyon.org/doc/suivi_prod_immo/form_3_porteur.php?token=<?php echo $_SESSION['token_bd_prod_immo']; ?>"><span data-feather="file-text"></span>Porteurs de programmes<span class="sr-only">(current)</span></a> + </li> + <li class="nav-item"> + <a class="nav-link" href="https://geo.urbalyon.org/doc/suivi_prod_immo/form_4_logement.php?token=<?php echo $_SESSION['token_bd_prod_immo']; ?>"><span data-feather="file-text"></span>Les programmes de logements</a> + </li> + </ul> + </div> + </nav> + + <main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4"> + <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom"> + <div class="container"> + <div class="row"> + <h1 class="h2">Porteurs de programmes immobiliers</h1> + </div> + <div class="row"> + <?php if (isset($sError)): ?> + <div class="alert alert-danger" role="alert"> + <span data-feather="alert-triangle"></span> <?php echo $sError; ?> + </div> + <?php endif; ?> + </div> + <div class="row mt-5"> + <form> + <div class="form-group"> + <label for="l_amenageur">Opérateurs et partenaires</label> + <select class="form-control" id="l_amenageur"> + <option></option> + <?php foreach($aAmenageurs as $iKey=>$aValue): ?> + <option value="<?php echo urlencode($aValue['concessionnaire_amenagement']); ?>"><?php echo $aValue['concessionnaire_amenagement']." (".$aValue['count'].")"; ?></option> + <?php endforeach; ?> + </select> + <small class="form-text text-muted"><span data-feather="info" style="color:blue"></span> Le nombre d'opération de l'opérateur est affiché entre parenthèse.</small> + </div> + <div class="btn-group" role="group" aria-label="Basic example"> + <button id="get_porteur" type="button" class="btn btn-outline-secondary">Afficher la fiche</button> + <button id="get_porteur_excel" type="button" class="btn btn-outline-secondary"><span data-feather="download"></span> Export</button> + </div> + </form> + </div> + </div> + </main> + + </div> + </div> + <!-- Icons --> + <script src="https://unpkg.com/feather-icons/dist/feather.min.js"></script> + <script> + var sToken='<?php echo $_SESSION['token_bd_prod_immo']; ?>'; + feather.replace(); + </script> + <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> + <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script> + <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script> + <script type="text/javascript" src="js/form.js"></script> +</body> +</html> \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/form_3_porteur.php b/src/vitis/vas/doc/suivi_prod_immo/form_3_porteur.php new file mode 100644 index 0000000000000000000000000000000000000000..d4263ae50ea349b3d6fca4a35eb021e3372057f0 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/form_3_porteur.php @@ -0,0 +1,40 @@ +<?php +// https://geo.urbalyon.org/doc/suivi_prod_immo/form_3_porteur.php +session_start(); +if (isset($_REQUEST['login'])) $_SESSION['login_bd_prod_immo']=$_REQUEST['login']; + +if(isset($_REQUEST['token']) && isset($_SESSION['token_bd_prod_immo'])){ + if($_REQUEST['token']==$_SESSION['token_bd_prod_immo']){ + require_once("../../rest/conf/properties.inc"); + require_once("properties_suivi_prod_immo.inc"); + + try{ + $oConn = new PDO('pgsql:host='.$properties['server'].';port='.$properties['port'].';dbname='.$properties['db_prod_immo'], $properties['db_user_prod_immo'], $properties['db_pass_prod_immo']); + $oConn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $oConn->setAttribute(PDO::ATTR_CASE, PDO::CASE_NATURAL); + + if($oConn){ + // get data CTM + $oResult=$oConn->prepare('SELECT DISTINCT concessionnaire_amenagement, count(concessionnaire_amenagement) FROM '.$properties['schema_prod_immo'].'.operation WHERE concessionnaire_amenagement IS NOT NULL GROUP BY concessionnaire_amenagement ORDER BY count DESC, concessionnaire_amenagement'); + $oResult->execute(); + if ($oResult->rowCount()>0){ + $aAmenageurs = $oResult->fetchAll(); + }else{ + $sError="Erreur : ".$oResult->rowCount()." aménageur(s) trouvé(s)."; + } + } + include ('form_3_porteur.html'); + }catch (PDOException $e){ + $sError="ERROR : ".$e->getMessage(); + } + }else{ + header ('location: signin.php'); + exit(); + } +}else{ + header ('location: signin.php'); + exit(); +} + + +?> \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/form_4_logement.html b/src/vitis/vas/doc/suivi_prod_immo/form_4_logement.html new file mode 100644 index 0000000000000000000000000000000000000000..62bf50dbd59b39408dd17583b7f533abc9e7c968 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/form_4_logement.html @@ -0,0 +1,103 @@ +<!doctype html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <title>BD PROD IMMO - Analyse</title> + <link rel="stylesheet" href="css/bootstrap_4.3.1/bootstrap.min.css"> + <link rel="stylesheet" href="css/style.css"> +</head> +<body> + <nav class="navbar navbar-dark fixed-top navbar_analyse flex-md-nowrap p-0 shadow"> + <a class="navbar-brand col-sm-3 col-md-2 mr-0" href="#">BD Suivi de la production immobilière</a> + <a class="navbar-text col-sm-2 col-md-4 mr-0" href="#"> Module d'analyse</a> + <ul class="navbar-nav px-3"> + <li class="nav-item text-nowrap"> + <img src="images/grand_lyon_large.png" width="150px"> <img src="https://geo.urbalyon.org/images/logo_bandeau_urbalyon.png">Urbalyon + </li> + </ul> + </nav> + + <div class="container-fluid"> + <div class="row"> + <nav class="col-md-2 d-none d-md-block bg-light sidebar"> + <div class="sidebar-sticky"> + <ul class="nav flex-column"> + <li class="nav-item"> + <a class="nav-link" href="https://geo.urbalyon.org/doc/suivi_prod_immo/form_1_operation.php?token=<?php echo $_SESSION['token_bd_prod_immo']; ?>"><span data-feather="file-text"></span>Fiche opération</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="https://geo.urbalyon.org/doc/suivi_prod_immo/form_2_type.php?token=<?php echo $_SESSION['token_bd_prod_immo']; ?>"><span data-feather="file-text"></span>Type d'opération</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="https://geo.urbalyon.org/doc/suivi_prod_immo/form_3_porteur.php?token=<?php echo $_SESSION['token_bd_prod_immo']; ?>"><span data-feather="file-text"></span>Porteurs de programmes</a> + </li> + <li class="nav-item"> + <a class="nav-link active" href="https://geo.urbalyon.org/doc/suivi_prod_immo/form_4_logement.php?token=<?php echo $_SESSION['token_bd_prod_immo']; ?>"><span data-feather="file-text"></span>Les programmes de logements<span class="sr-only">(current)</span></a> + </li> + </ul> + </div> + </nav> + + <main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4"> + <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom"> + <div class="container"> + <div class="row"> + <h1 class="h2">Fiche des programmes immobiliers de logements</h1> + </div> + <div class="row"> + <?php if (isset($sError)): ?> + <div class="alert alert-danger" role="alert"> + <span data-feather="alert-triangle"></span> <?php echo $sError; ?> + </div> + <?php endif; ?> + </div> + <div class="row mt-5"> + <form> + <div class="form-group"> + <label for="l_financement">Mode de financement</label> + <select class="form-control" id="l_financement"> + <option></option> + <?php foreach($aFinancement as $iKey=>$aValue): ?> + <option value="<?php echo $aValue['code_financement_equ_public']; ?>"><?php echo $aValue['financement_equ_public']; ?></option> + <?php endforeach; ?> + </select> + <label for="l_ctm">Conférence Territoriale des Maires</label> + <select class="form-control" id="l_ctm"> + <option></option> + <?php foreach($aCTMs as $iKey=>$aValue): ?> + <option value="<?php echo $aValue['id_ctm']; ?>"><?php echo $aValue['nom_ctm']; ?></option> + <?php endforeach; ?> + </select> + <label for="l_commune">Communes</label> + <select class="form-control" id="l_commune"> + <option></option> + <?php foreach($aCommunes as $iKey=>$aValue): ?> + <option value="<?php echo $aValue['id_commune']; ?>"><?php echo $aValue['nom_commune']; ?></option> + <?php endforeach; ?> + </select> + </div> + <div class="btn-group" role="group" aria-label="Basic example"> + <button id="get_logement" type="button" class="btn btn-outline-secondary">Afficher la fiche</button> + <button id="get_logement_excel" type="button" class="btn btn-outline-secondary"><span data-feather="download"></span> Export</button> + </div> + + </form> + </div> + </div> + </main> + + </div> + </div> + <!-- Icons --> + <script src="https://unpkg.com/feather-icons/dist/feather.min.js"></script> + <script> + var sToken='<?php echo $_SESSION['token_bd_prod_immo']; ?>'; + feather.replace() + </script> + <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> + <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script> + <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script> + <script type="text/javascript" src="js/form.js"></script> +</body> +</html> \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/form_4_logement.php b/src/vitis/vas/doc/suivi_prod_immo/form_4_logement.php new file mode 100644 index 0000000000000000000000000000000000000000..c4f1273122181173105e1d2b18995b58dcce502f --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/form_4_logement.php @@ -0,0 +1,58 @@ +<?php +// https://geo.urbalyon.org/doc/suivi_prod_immo/form_4_logement.php +session_start(); +if (isset($_REQUEST['login'])) $_SESSION['login_bd_prod_immo']=$_REQUEST['login']; + +if(isset($_REQUEST['token']) && isset($_SESSION['token_bd_prod_immo'])){ + if($_REQUEST['token']==$_SESSION['token_bd_prod_immo']){ + require_once("../../rest/conf/properties.inc"); + require_once("properties_suivi_prod_immo.inc"); + + try{ + $oConn = new PDO('pgsql:host='.$properties['server'].';port='.$properties['port'].';dbname='.$properties['db_prod_immo'], $properties['db_user_prod_immo'], $properties['db_pass_prod_immo']); + $oConn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $oConn->setAttribute(PDO::ATTR_CASE, PDO::CASE_NATURAL); + + if($oConn){ + // get data Mode de financement + $oResult = $oConn->prepare('SELECT code_financement_equ_public, financement_equ_public FROM '.$properties['schema_prod_immo'].'.tr_financement_equ_public ORDER BY financement_equ_public'); + $oResult->execute(); + if ($oResult->rowCount()>0){ + $aFinancement = $oResult->fetchAll(); + }else{ + $sError="Erreur : ".$oResult->rowCount()." financement(s) trouvé(s)."; + } + // get data CTM + $oResult2=$oConn->prepare('SELECT id_ctm, nom_ctm FROM '.$properties['schema_prod_immo'].'.conference_territoriale_maire ORDER BY nom_ctm'); + $oResult2->execute(); + if ($oResult2->rowCount()>0){ + $aCTMs = $oResult2->fetchAll(); + }else{ + $sError="Erreur : ".$oResult2->rowCount()." CTM(s) trouvé(s)."; + } + // get data Communes + $oResult3=$oConn->prepare('SELECT id_commune, nom_commune FROM '.$properties['schema_prod_immo'].'.commune ORDER BY nom_commune'); + $oResult3->execute(); + if ($oResult3->rowCount()>0){ + $aCommunes = $oResult3->fetchAll(); + }else{ + $sError="Erreur : ".$oResult3->rowCount()." commune(s) trouvé(s)."; + } + + + }else{ + $sError="Pas de connexion à la base de données."; + } + include ('form_4_logement.html'); + }catch (PDOException $e){ + $sError="ERROR : ".$e->getMessage(); + } + }else{ + header ('location: signin.php'); + exit(); + } +}else{ + header ('location: signin.php'); + exit(); +} +?> \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/get_1_operation.html b/src/vitis/vas/doc/suivi_prod_immo/get_1_operation.html new file mode 100644 index 0000000000000000000000000000000000000000..f736348e2dc383f6611f187a75bbb0abab890d7f --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/get_1_operation.html @@ -0,0 +1,571 @@ +<!doctype html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <title>BD PROD IMMO - Analyse</title> + <link rel="stylesheet" href="css/bootstrap_4.3.1/bootstrap.min.css"> + <link rel="stylesheet" href="css/style_dashboard.css"> +</head> +<body> + <div class="container-fluid"> + <div class="row"> + <div class="col-sm-3 title"><?php echo $aOperation['nom_operation']; ?></div> + <div class="col-sm-7 "></div> + <div class="col-sm-2 date_maj">État au <?php echo $aOperation['date_mise_a_jour']; ?></div> + </div> + <!-- BLOC 1 --> + <div class="row mt-4"> + <div class="col-sm-4"> + <canvas id="chart_sdp"></canvas> + </div> + <div class="col-sm-1"></div> + <div class="col-sm-7"> + <div class="row"> + <div class="col-sm-5"> + <div class="container-fluid border"> + <div class="row"><div class="col-sm subtitle">Acteurs et mode opératoire</div></div> + <div class="row mt-3"><div class="col-sm-4 line_table" style="text-align: right;">Type d'opération :</div><div class="col-sm-8 pl-0 line_table"><b><?php echo $aOperation['procedure_amenagement']; ?></b></div></div> + <div class="row"><div class="col-sm-4 line_table" style="text-align: right;">Opérateur :</div><div class="col-sm-8 pl-0 line_table"><b><?php echo $aOperation['concessionnaire_amenagement']; ?></b></div></div> + <div class="row"><div class="col-sm-5 line_table" style="text-align: right;">Dates (prévisionnelles) :</div><div class="col-sm-7 pl-0 line_table"><b><?php echo $aOperation['annee_init']."-".$aOperation['annee_achevement']; ?></b></div></div> + <div class="row"><div class="col-sm-5 line_table" style="text-align: right;">Chef de projet DMOU :</div><div class="col-sm-7 pl-0 line_table"><b><?php echo $aOperation['cdp_mo']; ?></b></div></div> + </div> + </div> + <div class="col-sm-1"></div> + <div class="col-sm-6"> + <div class="container-fluid border"> + <div class="row"><div class="col-sm subtitle">Superficies et vocation</div></div> + <div class="row mt-3"><div class="col-sm-5 line_table" style="text-align: right;">Vocation dominante :</div><div class="col-sm-7 pl-0 line_table"><b><?php echo $aOperation['vocation']; ?></b></div></div> + <div class="row"><div class="col-sm-4 line_table" style="text-align: right;">Superficie totale :</div><div class="col-sm-8 pl-0 line_table"><b><?php echo $aOperation['surface']; ?> Ha</b></div></div> + <div class="row"><div class="col-sm-4 line_table" style="text-align: right;">SDP :</div><div class="col-sm-8 pl-0 line_table"><b><?php echo $aOperation['sdp']; ?> m²</b></div></div> + <?php if($aOperation['coef_emprise_sol_moyen']!=''): ?> + <div class="row"><div class="col-sm-4 line_table" style="text-align: right;">CES moyen <span style="color: red;">*</span> :</div><div class="col-sm-8 pl-0 line_table"><b><?php echo $aOperation['coef_emprise_sol_moyen'].' %'; ?></b></div></div> + <?php endif; ?> + <?php if($aOperation['densite_batie']!=''): ?> + <div class="row"><div class="col-sm-4 line_table" style="text-align: right;">COS moyen <span style="color: red;">*</span> :</div><div class="col-sm-8 pl-0 line_table"><b><?php echo $aOperation['densite_batie']; ?></b></div></div> + <?php endif; ?> + </div> + <span style="font-size: 0.7rem;"><span style="color: red;">*</span> valeurs calculées à l'ilôt hors voirie et espace publique</span> + </div> + </div> + <div class="row mt-4"> + <div class="col-sm-12"> + <div class="container-fluid"> + <div class="row" style="height: 80px;"> + <div class="col-sm-2"></div> + <div class="col-sm-2 h-100 d-inline-block arrow" style="background-image : url(images/arrow_right_<?php if($aOperation['avancement']=='initialisation de l\'opération (études préalables amont ...)') echo "border_" ?>1.png);"> + <p class="text-center mt-4 align-middle <?php if($aOperation['avancement']=='initialisation de l\'opération (études préalables amont ...)') echo "font-weight-bolder" ?>">Initialisation</p> + </div> + <div class="col-sm-2 h-100 d-inline-block arrow" style="background-image : url(images/arrow_right_<?php if($aOperation['avancement']=='structuration de l\'opération (études pré-opérationnelles ...)') echo "border_" ?>2.png);"> + <p class="text-center mt-4 align-middle <?php if($aOperation['avancement']=='structuration de l\'opération (études pré-opérationnelles ...)') echo "font-weight-bolder" ?>">Structuration</p> + </div> + <div class="col-sm-2 h-100 d-inline-block arrow" style="background-image : url(images/arrow_right_<?php if($aOperation['avancement']=='réalisation de l\'opération - chantier (autorisations - constructions en cours)') echo "border_" ?>3.png);"> + <p class="text-center mt-4 align-middle <?php if($aOperation['avancement']=='réalisation de l\'opération - chantier (autorisations - constructions en cours)') echo "font-weight-bolder" ?>">Réalisation</p> + </div> + <div class="col-sm-2 h-100 d-inline-block arrow" style="background-image : url(images/arrow_right_<?php if($aOperation['avancement']=='achèvement de l\'opération (chantier et livraisons terminés, opération cloturée)') echo "border_" ?>4.png);"> + <p class="text-center mt-4 align-middle <?php if($aOperation['avancement']=='achèvement de l\'opération (chantier et livraisons terminés, opération cloturée)') echo "font-weight-bolder" ?>">Achèvement</p> + </div> + <div class="col-sm-2"></div> + </div> + <div class="row"> + <div class="col-sm-12 text-center"><span style="font-size: 0.9rem;">Avancement : <b><?php echo $iIlotSansProgramme; ?></b> ilôt(s) sans programmes autorisés sur un total de <b><?php echo $aIlot['count']; ?></b> ilôts</span></div> + </div> + </div> + </div> + </div> + </div> + </div> + <!-- BLOC 2 MAP --> + <div class="row mt-3"> + <div class="col-sm-6 text-right"> + <img src="<?php echo $sUrlMapImage; ?>" class="img-fluid" alt="carte" /> + </div> + <div class="col-sm-6"> + <div class="row mt-3">CTM : <b><?php echo $aOperation['nom_ctm']; ?></b></div> + <div class="row">Commune : <b><?php echo $aOperation['nom_commune']; ?></b></div> + <div class="row mt-3"> + <div class="col-sm-1">Légende</div> + </div> + <div class="row"> + <div class="col-sm-1"></div> + <div class="col-sm-1"><img src="images/legende_get_1_operation.png" alt="légende" /></div> + </div> + </div> + </div> + <!-- BLOC 3 Avancement --> + <div class="row mt-3"> + <div class="col-sm-12"> + <div class="container-fluid border"> + <div class="row"><div class="col-sm subtitle">Etat d'avancement par destination</div></div> + <div class="row mt-2"> + <div class="col-sm-2"></div> + <div class="col-sm-6"><canvas id="barchart_avancement"></canvas></div> + <div class="col-sm-2"></div> + </div> + <div class="row mt-3"> + <div class="col-sm-2 border-top border-bottom"><b>Destination</b></div> + <div class="col-sm-4 border"> + <div class="row"> + <div class="col-sm-12 text-center border-bottom"><b>Logements</b></div> + </div> + <div class="row" style="height: 110px;"> + <div class="col-sm-3 h-100 d-inline-block text-center border-right" style="writing-mode: vertical-rl;text-orientation: mixed;">accession libre</div> + <div class="col-sm-2 h-100 d-inline-block text-center border-right" style="writing-mode: vertical-rl;text-orientation: mixed;">accession aidée <br>et sociale</div> + <div class="col-sm-3 h-100 d-inline-block text-center border-right" style="writing-mode: vertical-rl;text-orientation: mixed;">locatif social</div> + <div class="col-sm-2 h-100 d-inline-block text-center border-right" style="writing-mode: vertical-rl;text-orientation: mixed;">locatif<br>intermédiaire</div> + <div class="col-sm-2 h-100 d-inline-block text-center" style="writing-mode: vertical-rl;text-orientation: mixed;">habitat<br>spécifique</div> + </div> + </div> + <div class="col-sm-1 text-center border-top border-bottom"><b>Bureaux</b></div> + <div class="col-sm-2 text-center border"> + <div class="row"><div class="col-sm-12 text-center border-bottom"><b>Commerces - hôtellerie - services</b></div></div> + <div class="row" style="height: 110px;"> + <div class="col-sm-6 h-100 d-inline-block text-center border-right" style="writing-mode: vertical-rl;text-orientation: mixed;">Commerces</div> + <div class="col-sm-6 h-100 d-inline-block text-center" style="writing-mode: vertical-rl;text-orientation: mixed;">Hôtels</div> + </div> + </div> + <div class="col-sm-2 text-center border-top border-bottom"> + <div class="row"><div class="col-sm-12 text-center border-bottom"><b>Activités - Industrie</b></div></div> + <div class="row" style="height: 110px;"> + <div class="col-sm-4 h-100 d-inline-block text-center border-right" style="writing-mode: vertical-rl;text-orientation: mixed;">Production<br>Industrie</div> + <div class="col-sm-4 h-100 d-inline-block text-center border-right" style="writing-mode: vertical-rl;text-orientation: mixed;">Logistique</div> + <div class="col-sm-4 h-100 d-inline-block text-center" style="writing-mode: vertical-rl;text-orientation: mixed;">Autres<br>activités</div> + </div> + </div> + <div class="col-sm-1 text-center border-left border-top border-bottom"><b>Équipements publics de superstructure</b></div> + </div> + <div class="row border-bottom line_table"> + <div class="col-sm-2 border-right"><b>Répartition prévisionnelle en SDP</b></div> + <div class="col-sm-4 border-right text-center"><?php if (isset($aOperation['sdp_logement'])) echo $aOperation['sdp_logement'].' m²'; ?></div> + <div class="col-sm-1 border-right text-center"><?php if (isset($aOperation['sdp_bureau'])) echo $aOperation['sdp_bureau'].' m²'; ?></div> + <div class="col-sm-2 text-center"> + <div class="row"> + <div class="col-sm-6 border-right"><?php if (isset($aOperation['sdp_commerce_service'])) echo $aOperation['sdp_commerce_service'].' m²'; ?></div> + <div class="col-sm-6 border-right"><?php if (isset($aOperation['sdp_hotel'])) echo $aOperation['sdp_hotel'].' m²'; ?></div> + </div> + </div> + <div class="col-sm-2 text-center border-right"><?php if (isset($aOperation['sdp_locaux'])) echo $aOperation['sdp_locaux'].' m²'; ?></div> + <div class="col-sm-1 text-center"><?php if (isset($aOperation['sdp_equipement'])) echo $aOperation['sdp_equipement'].' m²'; ?></div> + </div> + <div class="row border-bottom line_table"> + <div class="col-sm-2 border-right"><b>Répartition prévisionnelle en nombre de logements</b></div> + <div class="col-sm-4 border-right text-center"><!--<?php echo $aOperation['nb_logement']; ?>--> + <div class="row"> + <div class="col-sm-10 border-right"><?php echo $aOperation['nb_lgt_fam']; ?></div> + <div class="col-sm-2 border-right"><?php echo $aOperation['nb_lgt_spe']; ?></div> + </div> + </div> + <div class="col-sm-1 border-right hachure"></div> + <div class="col-sm-2 border-right hachure"></div> + <div class="col-sm-2 border-right hachure"></div> + <div class="col-sm-1 hachure"></div> + </div> + <div class="row border-bottom line_table"> + <div class="col-sm-2 border-right"><b>SDP en m² des programmes autorisés</b></div> + <div class="col-sm-4 text-center"> + <div class="row"> + <div class="col-sm-3 border-right"><?php if (isset($iSdpAccessionLibre) && $iSdpAccessionLibre>0) echo $iSdpAccessionLibre.' m²'; ?></div> + <div class="col-sm-2 border-right"><?php if (isset($iSdpAccessionAide) && $iSdpAccessionAide>0) echo $iSdpAccessionAide.' m²'; ?></div> + <div class="col-sm-3 border-right"><?php if (isset($iSdpLocSocial) && $iSdpLocSocial>0) echo $iSdpLocSocial.' m²'; ?></div> + <div class="col-sm-2 border-right"><?php if (isset($iSdpLocIntermediaire) && $iSdpLocIntermediaire>0) echo $iSdpLocIntermediaire.' m²'; ?></div> + <div class="col-sm-2 border-right"><?php if (isset($iSdpHabitatSpe) && $iSdpHabitatSpe>0) echo $iSdpHabitatSpe.' m²'; ?></div> + </div> + </div> + <div class="col-sm-1 border-right text-center"><?php if (isset($iSdpBureau)) echo $iSdpBureau.' m²'; ?></div> + <div class="col-sm-2 text-center"> + <div class="row"> + <div class="col-sm-6 border-right"><?php if (isset($iSdpCommerce)) echo $iSdpCommerce.' m²'; ?></div> + <div class="col-sm-6 border-right"><?php if (isset($iSdpHotel)) echo $iSdpHotel.' m²'; ?></div> + </div> + </div> + <div class="col-sm-2 text-center"> + <div class="row"> + <div class="col-sm-4 border-right"><?php if (isset($iSdpProd)) echo $iSdpProd.' m²'; ?></div> + <div class="col-sm-4 border-right"><?php if (isset($iSdpLogistique)) echo $iSdpLogistique.' m²'; ?></div> + <div class="col-sm-4 border-right"><?php if (isset($iSdpActAutre)) echo $iSdpActAutre.' m²'; ?></div> + </div> + </div> + <div class="col-sm-1 text-center"><?php if (isset($iSdpEquipement)) echo $iSdpEquipement.' m²'; ?></div> + </div> + <div class="row border-bottom line_table"> + <div class="col-sm-2 border-right"><b>Nombre de logements restant à produire</b></div> + <div class="col-sm-4 text-center"> + <div class="row"> + <div class="col-sm-10 border-right"><?php if (isset($iNbLgtFam) && isset($aOperation['nb_lgt_fam']) && $iNbLgtFam>0) echo $aOperation['nb_lgt_fam']-$iNbLgtFam; ?></div> + <div class="col-sm-2 border-right"><?php if (isset($iNbHabitatSpe) && isset($aOperation['nb_lgt_spe'])) echo $aOperation['nb_lgt_spe']-$iNbHabitatSpe; ?></div> + </div> + </div> + <div class="col-sm-1 border-right hachure"></div> + <div class="col-sm-2 border-right hachure"></div> + <div class="col-sm-2 border-right hachure"></div> + <div class="col-sm-1 hachure"></div> + </div> + <div class="row border-bottom line_table"> + <div class="col-sm-2 border-right"><b>SDP autorisée/SDP prévisionnelle</b></div> + <div class="col-sm-4 border-right text-center"><?php if ((isset($iSdpAccessionLibre) or isset($iSdpAccessionAide) or isset($iSdpLocSocial) or isset($iSdpLocIntermediaire) or isset($iSdpHabitatSpe)) && isset($aOperation['sdp_logement'])) echo round((($iSdpAccessionLibre+$iSdpAccessionAide+$iSdpLocSocial+$iSdpLocIntermediaire+$iSdpHabitatSpe)*100) / $aOperation['sdp_logement']).' %'; ?></div> + <div class="col-sm-1 border-right text-center"><?php if (isset($iSdpBureau) && isset($aOperation['sdp_bureau'])) echo round(($iSdpBureau*100) / $aOperation['sdp_bureau']).' %'; ?></div> + <div class="col-sm-2 text-center"> + <div class="row"> + <div class="col-sm-6 border-right"><?php if (isset($iSdpCommerce) && isset($aOperation['sdp_commerce_service'])) echo round(($iSdpCommerce*100) / $aOperation['sdp_commerce_service']).' %'; ?></div> + <div class="col-sm-6 border-right"><?php if (isset($iSdpHotel) && isset($aOperation['sdp_hotel'])) echo round(($iSdpHotel*100) / $aOperation['sdp_hotel']).' %'; ?></div> + </div> + </div> + <div class="col-sm-2 border-right text-center"><?php if ((isset($iSdpProd) or isset($iSdpActAutre)) && isset($aOperation['sdp_locaux'])) echo round((($iSdpProd+$iSdpActAutre)*100) / $aOperation['sdp_locaux']).' %'; ?></div> + <div class="col-sm-1 text-center"><?php if (isset($iSdpEquipement) && isset($aOperation['sdp_equipement'])) echo round(($iSdpEquipement*100) / $aOperation['sdp_equipement']).' %'; ?></div> + </div> + <div class="row border-bottom line_table_2"> + <div class="col-sm-2 border-right"><b>Prix de vente moyen (HT hors stationnement)</b></div> + <div class="col-sm-4 border-right text-center"> + <div class="row"> + <div class="col-sm-3 border-right text-center"><?php if (isset($iPVAccessionLibre) && $iPVAccessionLibre>0) echo $iPVAccessionLibre.' €/m²'; ?></div> + <div class="col-sm-2 border-right text-center"><?php if (isset($iPVAccessionAidee) && $iPVAccessionAidee>0) echo $iPVAccessionAidee.' €/m²'; ?></div> + <div class="col-sm-3 border-right text-center"><?php if (isset($iPrixVenteSocial) && $iPrixVenteSocial>0) echo $iPrixVenteSocial.' €/m²'; ?></div> + <div class="col-sm-2 border-right text-center"><?php if (isset($iPrixVenteIntermediaire) && $iPrixVenteIntermediaire>0) echo $iPrixVenteIntermediaire.' €/m²'; ?></div> + <div class="col-sm-2 hachure"></div> + </div> + </div> + <div class="col-sm-1 border-right text-center"><?php if (isset($iPrixVenteBureau) && $iPrixVenteBureau>0) echo $iPrixVenteBureau.' €/m²'; ?></div> + <div class="col-sm-2 border-right text-center"> + <div class="row"> + <div class="col-sm-6 border-right"><?php if (isset($iPrixVenteCommerce)) echo $iPrixVenteCommerce.' €/m²'; ?></div> + <div class="col-sm-6 border-right"><?php if (isset($iPrixVenteHotel)) echo $iPrixVenteHotel.' €/m²'; ?></div> + </div> + </div> + <div class="col-sm-2 border-right text-center"> + <div class="row"> + <div class="col-sm-4 border-right"><?php if (isset($iPrixVenteProd)) echo $iPrixVenteProd.' €/m²'; ?></div> + <div class="col-sm-4 border-right"><?php if (isset($iPrixVenteLogistique)) echo $iPrixVenteLogistique.' €/m²'; ?></div> + <div class="col-sm-4 border-right"><?php if (isset($iPrixVenteActAutre)) echo $iPrixVenteActAutre.' €/m²'; ?></div> + </div> + </div> + <div class="col-sm-1 hachure"></div> + </div> + <div class="row border-bottom line_table_2"> + <div class="col-sm-2 border-right"><b>Charge foncière nette moyenne (HT hors stationnement)</b></div> + <div class="col-sm-4 border-right text-center"> + <div class="row"> + <div class="col-sm-3 border-right text-center"><?php if (isset($iCFAccessionLibre) && $iCFAccessionLibre>0) echo $iCFAccessionLibre.' €/m²'; ?></div> + <div class="col-sm-2 border-right text-center"><?php if (isset($iCFAccessionAidee) && $iCFAccessionAidee>0) echo $iCFAccessionAidee.' €/m²'; ?></div> + <div class="col-sm-3 border-right text-center"><?php if (isset($iCFSocial) && $iCFSocial>0) echo $iCFSocial.' €/m²'; ?></div> + <div class="col-sm-2 border-right text-center"><?php if (isset($iCFIntermediaire) && $iCFIntermediaire>0) echo $iCFIntermediaire.' €/m²'; ?></div> + <div class="col-sm-2 hachure"></div> + </div> + </div> + <div class="col-sm-1 border-right text-center"><?php if (isset($iCFBureau) && $iCFBureau>0) echo $iCFBureau.' €/m²'; ?></div> + <div class="col-sm-2 border-right text-center"> + <div class="row"> + <div class="col-sm-6 border-right"><?php if (isset($iCFCommerce) && $iCFCommerce>0) echo $iCFCommerce.' €/m²'; ?></div> + <div class="col-sm-6 border-right"><?php if (isset($iCFHotel) && $iCFHotel>0) echo $iCFHotel.' €/m²'; ?></div> + </div> + </div> + <div class="col-sm-2 border-right text-center"> + <div class="row"> + <div class="col-sm-4 border-right"><?php if (isset($iCFProd) && $iCFProd>0) echo $iCFProd.' €/m²'; ?></div> + <div class="col-sm-4 border-right"><?php if (isset($iCFLogistique) && $iCFLogistique>0) echo $iCFLogistique.' €/m²'; ?></div> + <div class="col-sm-4 border-right"><?php if (isset($iCFActAutre) && $iCFActAutre>0) echo $iCFActAutre.' €/m²'; ?></div> + </div> + </div> + <div class="col-sm-1 hachure"></div> + </div> + <div class="row border-bottom line_table_2"> + <div class="col-sm-2 border-right"><b>Charge foncière nette moyenne</b></div> + <div class="col-sm-10 text-center"><?php if (isset($aProgrammesStat['charge_fonciere_nette']) && $aProgrammesStat['charge_fonciere_nette']>0) echo $aProgrammesStat['charge_fonciere_nette'].' €/m² HT hors stationnement'; ?></div> + </div> + <div class="row line_table_2"> + <div class="col-sm-2 border-right"><b>Charge foncière brute moyenne</b></div> + <div class="col-sm-10 text-center"><?php if (isset($aProgrammesStat['cout_construction_moyen']) && $aProgrammesStat['cout_construction_moyen']>0) echo $aProgrammesStat['cout_construction_moyen'].' €/m² HT hors stationnement'; ?></div> + </div> + </div> + </div> + </div> + <!-- BLOC 4 taille --> + <?php if (count($aProgrammes)>0): ?> + <div class="row mt-3"> + <div class="col-sm-12"> + <div class="container-fluid border"> + <div class="row"><div class="col-sm subtitle">Taille des logements des programmes engagés</div></div> + <div class="row"> + <div class="col-sm-5"> + <canvas id="chart_granulometrie"></canvas> + </div> + <div class="col-sm-7"> + <canvas id="barchart_granulometrie"></canvas> + </div> + </div> + <div class="row"> + <div class="col-sm-5"> + <div class="row"><div class="col-sm subtitle">Répartition moyenne des acquéreurs des logements en accession libre</div></div> + <div class="row border-bottom line_table_2"> + <div class="col-sm-6 border-right"></div> + <div class="col-sm-3 border-right text-center"><b>Nombre de logements</b></div> + <div class="col-sm-3 border-right text-center"><b>Pourcentage<!-- de SDP--></b></div> + </div> + <div class="row border-bottom"> + <div class="col-sm-6 border-right line_table_2 text-right"><b>Propriétaire occupant</b></div> + <div class="col-sm-3 border-right line_table text-center"><?php if (isset($iNbProprioOcc) && $iNbProprioOcc>0) echo $iNbProprioOcc; ?></div> + <div class="col-sm-3 border-right line_table text-center"><?php if (isset($iPourcProprioOcc) && $iPourcProprioOcc>0) echo $iPourcProprioOcc.'%'; ?></div> + </div> + <div class="row border-bottom"> + <div class="col-sm-6 border-right line_table_2 text-right"><b>Investisseur</b></div> + <div class="col-sm-3 border-right line_table text-center"><?php if (isset($iNbInvest) && $iNbInvest>0) echo $iNbInvest; ?></div> + <div class="col-sm-3 border-right line_table text-center"><?php if (isset($iPourcInvest) && $iPourcInvest>0) echo $iPourcInvest.'%'; ?></div> + </div> + </div> + <div class="col-sm-7"> + <?php if(count($aGranulometrie)>0): ?> + <div class="row"> + <div class="col-sm-1"></div> + <div class="col-sm-1 border-bottom border-right"></div> + <div class="col-sm-2 border-bottom border-right line_table_2 text-center"><b>Accession</b></div> + <div class="col-sm-3 border-bottom border-right line_table_2 text-center"><b>Location (sociale ou intermédiaire)</b></div> + <div class="col-sm-3 border-bottom border-right line_table_2 text-center"><b>Habitat spécifique</b></div> + <div class="col-sm-2 border-bottom line_table_2 text-center"><b>Total</b></div> + </div> + <?php if(isset($aGranulometrie['T1'])): ?> + <div class="row"> + <div class="col-sm-1"></div> + <div class="col-sm-1 border-bottom border-right line_table_2 text-right"><b>T1</b></div> + <div class="col-sm-2 border-bottom border-right line_table text-center"><?php if (isset($aGranulometrie['T1']['LG_FAM_ACC']) && $aGranulometrie['T1']['LG_FAM_ACC']>0) echo $aGranulometrie['T1']['LG_FAM_ACC']; ?></div> + <div class="col-sm-3 border-bottom border-right line_table text-center"><?php if (isset($aGranulometrie['T1']['LG_FAM_LOC']) && $aGranulometrie['T1']['LG_FAM_LOC']>0) echo $aGranulometrie['T1']['LG_FAM_LOC']; ?></div> + <div class="col-sm-3 border-bottom border-right line_table text-center"><?php if (isset($aGranulometrie['T1']['TOT_LG_SPE']) && $aGranulometrie['T1']['TOT_LG_SPE']>0) echo $aGranulometrie['T1']['TOT_LG_SPE']; ?></div> + <div class="col-sm-2 border-bottom line_table text-center"><?php echo array_sum($aGranulometrie['T1']); ?></div> + </div> + <?php endif; ?> + <?php if(isset($aGranulometrie['T2'])): ?> + <div class="row"> + <div class="col-sm-1"></div> + <div class="col-sm-1 border-bottom border-right line_table_2 text-right"><b>T2</b></div> + <div class="col-sm-2 border-bottom border-right line_table text-center"><?php if (isset($aGranulometrie['T2']['LG_FAM_ACC']) && $aGranulometrie['T2']['LG_FAM_ACC']>0) echo $aGranulometrie['T2']['LG_FAM_ACC']; ?></div> + <div class="col-sm-3 border-bottom border-right line_table text-center"><?php if (isset($aGranulometrie['T2']['LG_FAM_LOC']) && $aGranulometrie['T2']['LG_FAM_LOC']>0) echo $aGranulometrie['T2']['LG_FAM_LOC']; ?></div> + <div class="col-sm-3 border-bottom border-right line_table text-center"><?php if (isset($aGranulometrie['T2']['TOT_LG_SPE']) && $aGranulometrie['T2']['TOT_LG_SPE']>0) echo $aGranulometrie['T2']['TOT_LG_SPE']; ?></div> + <div class="col-sm-2 border-bottom line_table text-center"><?php echo array_sum($aGranulometrie['T2']); ?></div> + </div> + <?php endif; ?> + <?php if(isset($aGranulometrie['T3'])): ?> + <div class="row"> + <div class="col-sm-1"></div> + <div class="col-sm-1 border-bottom border-right line_table_2 text-right"><b>T3</b></div> + <div class="col-sm-2 border-bottom border-right line_table text-center"><?php if (isset($aGranulometrie['T3']['LG_FAM_ACC']) && $aGranulometrie['T3']['LG_FAM_ACC']>0) echo $aGranulometrie['T3']['LG_FAM_ACC']; ?></div> + <div class="col-sm-3 border-bottom border-right line_table text-center"><?php if (isset($aGranulometrie['T3']['LG_FAM_LOC']) && $aGranulometrie['T3']['LG_FAM_LOC']>0) echo $aGranulometrie['T3']['LG_FAM_LOC']; ?></div> + <div class="col-sm-3 border-bottom border-right line_table text-center"><?php if (isset($aGranulometrie['T3']['TOT_LG_SPE']) && $aGranulometrie['T3']['TOT_LG_SPE']>0) echo $aGranulometrie['T3']['TOT_LG_SPE']; ?></div> + <div class="col-sm-2 border-bottom line_table text-center"><?php echo array_sum($aGranulometrie['T3']); ?></div> + </div> + <?php endif; ?> + <?php if(isset($aGranulometrie['T4'])): ?> + <div class="row"> + <div class="col-sm-1"></div> + <div class="col-sm-1 border-bottom border-right line_table_2 text-right"><b>T4</b></div> + <div class="col-sm-2 border-bottom border-right line_table text-center"><?php if (isset($aGranulometrie['T4']['LG_FAM_ACC']) && $aGranulometrie['T4']['LG_FAM_ACC']>0) echo $aGranulometrie['T4']['LG_FAM_ACC']; ?></div> + <div class="col-sm-3 border-bottom border-right line_table text-center"><?php if (isset($aGranulometrie['T4']['LG_FAM_LOC']) && $aGranulometrie['T4']['LG_FAM_LOC']>0) echo $aGranulometrie['T4']['LG_FAM_LOC']; ?></div> + <div class="col-sm-3 border-bottom border-right line_table text-center"><?php if (isset($aGranulometrie['T4']['TOT_LG_SPE']) && $aGranulometrie['T4']['TOT_LG_SPE']>0) echo $aGranulometrie['T4']['TOT_LG_SPE']; ?></div> + <div class="col-sm-2 border-bottom line_table text-center"><?php echo array_sum($aGranulometrie['T4']); ?></div> + </div> + <?php endif; ?> + <?php if(isset($aGranulometrie['T5'])): ?> + <div class="row"> + <div class="col-sm-1"></div> + <div class="col-sm-1 border-bottom border-right line_table_2 text-right"><b>T5</b></div> + <div class="col-sm-2 border-bottom border-right line_table text-center"><?php if (isset($aGranulometrie['T5']['LG_FAM_ACC']) && $aGranulometrie['T5']['LG_FAM_ACC']>0) echo $aGranulometrie['T5']['LG_FAM_ACC']; ?></div> + <div class="col-sm-3 border-bottom border-right line_table text-center"><?php if (isset($aGranulometrie['T5']['LG_FAM_LOC']) && $aGranulometrie['T5']['LG_FAM_LOC']>0) echo $aGranulometrie['T5']['LG_FAM_LOC']; ?></div> + <div class="col-sm-3 border-bottom border-right line_table text-center"><?php if (isset($aGranulometrie['T5']['TOT_LG_SPE']) && $aGranulometrie['T5']['TOT_LG_SPE']>0) echo $aGranulometrie['T5']['TOT_LG_SPE']; ?></div> + <div class="col-sm-2 border-bottom line_table text-center"><?php echo array_sum($aGranulometrie['T5']); ?></div> + </div> + <?php endif; ?> + <?php if(isset($aGranulometrie['T6'])): ?> + <div class="row"> + <div class="col-sm-1"></div> + <div class="col-sm-1 border-bottom border-right line_table_2 text-right"><b>T6 et +</b></div> + <div class="col-sm-2 border-bottom border-right line_table text-center"><?php if (isset($aGranulometrie['T6']['LG_FAM_ACC']) && $aGranulometrie['T6']['LG_FAM_ACC']>0) echo $aGranulometrie['T6']['LG_FAM_ACC']; ?></div> + <div class="col-sm-3 border-bottom border-right line_table text-center"><?php if (isset($aGranulometrie['T6']['LG_FAM_LOC']) && $aGranulometrie['T6']['LG_FAM_LOC']>0) echo $aGranulometrie['T6']['LG_FAM_LOC']; ?></div> + <div class="col-sm-3 border-bottom border-right line_table text-center"><?php if (isset($aGranulometrie['T6']['TOT_LG_SPE']) && $aGranulometrie['T6']['TOT_LG_SPE']>0) echo $aGranulometrie['T6']['TOT_LG_SPE']; ?></div> + <div class="col-sm-2 border-bottom line_table text-center"><?php echo array_sum($aGranulometrie['T6']); ?></div> + </div> + <?php endif; ?> + <?php if(isset($aGranulometrie['NB'])): ?> + <div class="row"> + <div class="col-sm-1"></div> + <div class="col-sm-1 border-right line_table_2 text-right"><b>Total</b></div> + <div class="col-sm-2 border-right line_table text-center"><?php if (isset($aGranulometrie['NB']['LG_FAM_ACC']) && $aGranulometrie['NB']['LG_FAM_ACC']>0) echo $aGranulometrie['NB']['LG_FAM_ACC']; ?></div> + <div class="col-sm-3 border-right line_table text-center"><?php if (isset($aGranulometrie['NB']['LG_FAM_LOC']) && $aGranulometrie['NB']['LG_FAM_LOC']>0) echo $aGranulometrie['NB']['LG_FAM_LOC']; ?></div> + <div class="col-sm-3 border-right line_table text-center"><?php if (isset($aGranulometrie['NB']['TOT_LG_SPE']) && $aGranulometrie['NB']['TOT_LG_SPE']>0) echo $aGranulometrie['NB']['TOT_LG_SPE']; ?></div> + <div class="col-sm-2 line_table text-center"><?php echo $aGranulometrie['NB']['TOT']; ?></div> + </div> + <?php endif; ?> + <?php endif; ?> + </div> + </div> + </div> + </div> + </div> + <!-- BLOC 5 Programmes --> + <div class="row mt-3"> + <div class="col-sm-12"> + <div class="container-fluid border"> + <div class="row"><div class="col-sm subtitle"><?php echo count($aProgrammes); ?> programme<?php if(count($aProgrammes)>1) echo 's'; ?> avec PC autorisé<?php if(count($aProgrammes)>1) echo 's'; ?></div></div> + <div class="row border-bottom line_table_2"> + <div class="col-sm-1 border-right"><b>Nom de l'ilôt</b></div> + <div class="col-sm-2 border-right"><b>Nom du programme</b></div> + <div class="col-sm-1 border-right"><b>Numéro du PC</b></div> + <div class="col-sm-3 border-right"><b>Nom du demandeur</b></div> + <div class="col-sm-1 border-right"><b>Période</b></div> + <div class="col-sm-1 border-right"><b>Type opérateur</b></div> + <div class="col-sm-3 border-right"> + <div class="row"> + <div class="col-sm-8 border-right"><b>Éléments principaux</b></div> + <div class="col-sm-2 border-right"><b>SDP m²</b></div> + <div class="col-sm-2"><b>NB</b></div> + </div> + </div> + </div> + <?php foreach($aProgrammes as $aProgramme): ?> + <div class="row border-bottom line_table"> + <div class="col-sm-1 border-right"><?php echo $aProgramme['nom_ilot']; ?></div> + <div class="col-sm-2 border-right"><?php echo $aProgramme['nom_programme']; ?></div> + <div class="col-sm-1 border-right"><?php echo $aProgramme['numero_pc']; ?></div> + <div class="col-sm-3 border-right"><?php echo $aProgramme['nom_demandeur']; ?></div> + <div class="col-sm-1 border-right"><?php echo $aProgramme['annee_debut']." - ".$aProgramme['annee_fin']; ?></div> + <div class="col-sm-1 border-right"><?php echo $aProgramme['code_type_operateur']; ?></div> + <div class="col-sm-3"> + <!--<div class="row border-bottom line_table_2"> + <div class="col-sm-8 border-right"></div> + <div class="col-sm-2 border-right">SDP m²</div> + <div class="col-sm-2">NB</div> + <div class="col-sm-1 border-right">T1</div> + <div class="col-sm-1 border-right">T2</div> + <div class="col-sm-1 border-right">T3</div> + <div class="col-sm-1 border-right">T4</div> + <div class="col-sm-1 border-right">T5</div> + <div class="col-sm-1">T6</div> + </div>--> + <?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_FAM'])): ?> + <div class="row border-bottom line_table"> + <div class="col-sm-8 border-right">Totaux logements familiaux</div> + <div class="col-sm-2 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_FAM']['SDP'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_FAM']['SDP']; ?></div> + <div class="col-sm-2"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_FAM']['NB'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_FAM']['NB']; ?></div> + <!--<div class="col-sm-1 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_FAM']['T1'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_FAM']['T1']; ?></div> + <div class="col-sm-1 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_FAM']['T2'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_FAM']['T2']; ?></div> + <div class="col-sm-1 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_FAM']['T3'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_FAM']['T3']; ?></div> + <div class="col-sm-1 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_FAM']['T4'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_FAM']['T4']; ?></div> + <div class="col-sm-1 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_FAM']['T5'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_FAM']['T5']; ?></div> + <div class="col-sm-1"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_FAM']['T6'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_FAM']['T6']; ?></div>--> + </div> + <?php endif; ?> + <?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_ACC'])): ?> + <div class="row border-bottom line_table"> + <div class="col-sm-8 border-right"> dont logements familiaux en accession</div> + <div class="col-sm-2 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_ACC']['SDP'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_ACC']['SDP']; ?></div> + <div class="col-sm-2"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_ACC']['NB'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_ACC']['NB']; ?></div> + <!--<div class="col-sm-1 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_ACC']['T1'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_ACC']['T1']; ?></div> + <div class="col-sm-1 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_ACC']['T2'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_ACC']['T2']; ?></div> + <div class="col-sm-1 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_ACC']['T3'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_ACC']['T3']; ?></div> + <div class="col-sm-1 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_ACC']['T4'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_ACC']['T4']; ?></div> + <div class="col-sm-1 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_ACC']['T5'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_ACC']['T5']; ?></div> + <div class="col-sm-1"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_ACC']['T6'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_ACC']['T6']; ?></div>--> + </div> + <?php endif; ?> + <?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_LOC'])): ?> + <div class="row border-bottom line_table"> + <div class="col-sm-8 border-right"> dont logements familiaux en location</div> + <div class="col-sm-2 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_LOC']['SDP'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_LOC']['SDP']; ?></div> + <div class="col-sm-2"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_LOC']['NB'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_LOC']['NB']; ?></div> + <!--<div class="col-sm-1 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_LOC']['T1'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_LOC']['T1']; ?></div> + <div class="col-sm-1 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_LOC']['T2'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_LOC']['T2']; ?></div> + <div class="col-sm-1 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_LOC']['T3'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_LOC']['T3']; ?></div> + <div class="col-sm-1 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_LOC']['T4'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_LOC']['T4']; ?></div> + <div class="col-sm-1 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_LOC']['T5'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_LOC']['T5']; ?></div> + <div class="col-sm-1"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_LOC']['T6'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['LG_FAM_LOC']['T6']; ?></div>--> + </div> + <?php endif; ?> + <?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_SPE'])): ?> + <div class="row border-bottom line_table"> + <div class="col-sm-8 border-right">Totaux logements habitat spécifique</div> + <div class="col-sm-2 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_SPE']['SDP'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_SPE']['SDP']; ?></div> + <div class="col-sm-2"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_SPE']['NB'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_SPE']['NB']; ?></div> + <!--<div class="col-sm-1 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_SPE']['T1'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_SPE']['T1']; ?></div> + <div class="col-sm-1 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_SPE']['T2'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_SPE']['T2']; ?></div> + <div class="col-sm-1 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_SPE']['T3'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_SPE']['T3']; ?></div> + <div class="col-sm-1 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_SPE']['T4'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_SPE']['T4']; ?></div> + <div class="col-sm-1 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_SPE']['T5'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_SPE']['T5']; ?></div> + <div class="col-sm-1"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_SPE']['T6'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['TOT_LG_SPE']['T6']; ?></div>--> + </div> + <?php endif; ?> + + <?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['BUREAU'])): ?> + <div class="row border-bottom line_table"> + <div class="col-sm-8 border-right">Bureaux</div> + <div class="col-sm-2 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['BUREAU']['SDP'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['BUREAU']['SDP']; ?></div> + <div class="col-sm-2"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['BUREAU']['NB'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['BUREAU']['NB']; ?></div> + </div> + <?php endif; ?> + <?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['ACT'])): ?> + <div class="row border-bottom line_table"> + <div class="col-sm-8 border-right">Activités</div> + <div class="col-sm-2 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['ACT']['SDP'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['ACT']['SDP']; ?></div> + <div class="col-sm-2"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['ACT']['NB'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['ACT']['NB']; ?></div> + </div> + <?php endif; ?> + <?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['HOT'])): ?> + <div class="row border-bottom line_table"> + <div class="col-sm-8 border-right">Hotels</div> + <div class="col-sm-2 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['HOT']['SDP'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['HOT']['SDP']; ?></div> + <div class="col-sm-2"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['HOT']['NB'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['HOT']['NB']; ?></div> + </div> + <?php endif; ?> + <?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['COMM'])): ?> + <div class="row border-bottom line_table"> + <div class="col-sm-8 border-right">Commerces/services</div> + <div class="col-sm-2 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['COMM']['SDP'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['COMM']['SDP']; ?></div> + <div class="col-sm-2"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['COMM']['NB'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['COMM']['NB']; ?></div> + </div> + <?php endif; ?> + <?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['LOISIR'])): ?> + <div class="row border-bottom line_table"> + <div class="col-sm-8 border-right">Loisirs</div> + <div class="col-sm-2 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['LOISIR']['SDP'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['LOISIR']['SDP']; ?></div> + <div class="col-sm-2"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['LOISIR']['NB'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['LOISIR']['NB']; ?></div> + </div> + <?php endif; ?> + <?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['EQUIP'])): ?> + <div class="row border-bottom line_table"> + <div class="col-sm-8 border-right">Équipements</div> + <div class="col-sm-2 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['EQUIP']['SDP'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['EQUIP']['SDP']; ?></div> + <div class="col-sm-2"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['EQUIP']['NB'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['EQUIP']['NB']; ?></div> + </div> + <?php endif; ?> + <?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['PARKING'])): ?> + <div class="row border-bottom line_table"> + <div class="col-sm-4 border-right">Parkings</div> + <div class="col-sm-1 border-right"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['PARKING']['SDP'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['PARKING']['SDP']; ?></div> + <div class="col-sm-1"><?php if(isset($aSyntheseProgrammes[$aProgramme['id_programme']]['PARKING']['NB'])) echo $aSyntheseProgrammes[$aProgramme['id_programme']]['PARKING']['NB']; ?></div> + </div> + <?php endif; ?> + </div> + </div> + <?php endforeach; ?> + </div> + </div> + </div> + <?php endif; ?> + + <div class="row mt-3"> + </div> + </div> + <!-- Icons --> + <script src="https://unpkg.com/feather-icons/dist/feather.min.js"></script> + <script> + feather.replace() + </script> + <!-- Chart.js --> + <script src="js/chart.js_2.8.0/Chart.min.js"></script> + <script> + var aDataSdpPrev=[<?php echo $sDataSdpPrev; ?>]; + var aDataAvancementPrev=[<?php echo (isset($aOperation['sdp_logement'])) ? $aOperation['sdp_logement'] : 0; ?>,<?php echo (isset($aOperation['sdp_bureau'])) ? $aOperation['sdp_bureau'] : 0; ?>,<?php echo (isset($aOperation['sdp_commerce_service'])) ? $aOperation['sdp_commerce_service'] : 0; ?>,<?php echo (isset($aOperation['sdp_locaux'])) ? $aOperation['sdp_locaux'] : 0; ?>,<?php echo (isset($aOperation['sdp_equipement'])) ? $aOperation['sdp_equipement'] : 0; ?>]; + var aDataAvancementEngag=[<?php echo (isset($iSdpAccessionLibre) or isset($iSdpAccessionAide) or isset($iSdpLocSocial) or isset($iSdpLocIntermediaire) or isset($iSdpHabitatSpe)) ? $iSdpAccessionLibre+$iSdpAccessionAide+$iSdpLocSocial+$iSdpLocIntermediaire+$iSdpHabitatSpe : 0; ?>,<?php echo (isset($iSdpBureau)) ? $iSdpBureau : 0; ?>,<?php echo (isset($iSdpCommerce)) ? $iSdpCommerce : 0; ?>,<?php echo (isset($iSdpProd) or isset($iSdpActAutre)) ? $iSdpProd+$iSdpActAutre : 0; ?>,<?php echo (isset($iSdpEquipement)) ? $iSdpEquipement : 0; ?>]; + var aDataGanulometrie=[<?php echo $sDataGranulometrie; ?>]; + var aDataGanulometrieAccession=[<?php if(isset($aGranulometrie2['LG_FAM_ACC'])) echo $aGranulometrie2['LG_FAM_ACC']; ?>]; + var aDataGanulometrieLoc=[<?php if(isset($aGranulometrie2['LG_FAM_LOC'])) echo $aGranulometrie2['LG_FAM_LOC']; ?>]; + var aDataGanulometrieHabSpe=[<?php if(isset($aGranulometrie2['TOT_LG_SPE'])) echo $aGranulometrie2['TOT_LG_SPE']; ?>]; + </script> + <script type="text/javascript" src="js/dashboard_1_operation.js"></script> +</body> +</html> \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/get_1_operation.old.php b/src/vitis/vas/doc/suivi_prod_immo/get_1_operation.old.php new file mode 100644 index 0000000000000000000000000000000000000000..80cd62e827c0cbf8f3d79e3e32450a4786214364 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/get_1_operation.old.php @@ -0,0 +1,268 @@ +<?php +// https://geo.urbalyon.org/doc/suivi_prod_immo/get_1_operation.php?id_operation=1041 +session_start(); +if (isset($_REQUEST['login'])) $_SESSION['login_bd_prod_immo']=$_REQUEST['login']; + +if(isset($_REQUEST['token']) && isset($_SESSION['token_bd_prod_immo'])){ + if($_REQUEST['token']==$_SESSION['token_bd_prod_immo']){ + + if (isset($_REQUEST['id_operation']) && !is_null($_REQUEST['id_operation'])){ + require_once("../../rest/conf/properties.inc"); + require_once("properties_suivi_prod_immo.inc"); + $sSchema=$properties['schema_prod_immo']; + + try{ + $oConn = new PDO('pgsql:host='.$properties['server'].';port='.$properties['port'].';dbname='.$properties['db_prod_immo'], $properties['db_user_prod_immo'], $properties['db_pass_prod_immo']); + $oConn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $oConn->setAttribute(PDO::ATTR_CASE, PDO::CASE_NATURAL); + + if($oConn){ + // get data Opérations + $sWhereIdOperation=" WHERE id_operation=".$_REQUEST['id_operation']; + $oResult = $oConn->prepare("SELECT *, ST_XMin(ST_Buffer(geom,50)) AS xmin, ST_YMin(ST_Buffer(geom,50)) AS ymin, ST_XMax(ST_Buffer(geom,50)) AS xmax, ST_YMax(ST_Buffer(geom,50)) AS ymax FROM ".$sSchema.".v_operation_layer".$sWhereIdOperation); + $oResult->execute(); + + if ($oResult->rowCount()>0){ + $aOperations = $oResult->fetchAll(); + $oResult->closeCursor(); + $aOperation =$aOperations[0]; + $aOperation['date_mise_a_jour'] = date("d/m/Y", strtotime($aOperation['date_mise_a_jour'])); + $sDataSdpPrev= $aOperation['sdp_logement'].",".$aOperation['sdp_bureau'].",".$aOperation['sdp_commerce_service'].",".$aOperation['sdp_locaux'].",".$aOperation['sdp_equipement']; + // get map image + $sNameMapImage=$_REQUEST['id_operation']."_operation.png"; + $sCommand = escapeshellcmd('python get_map_image_1_operation.py '.$aOperation['xmin'].' '.$aOperation['ymin'].' '.$aOperation['xmax'].' '.$aOperation['ymax'].' '.$sNameMapImage.' '.$_REQUEST['id_operation']); + $output = shell_exec($sCommand); + $sUrlMapImage=$properties['web_server_name']."/ws_data/vm4ms/map/tmp/".$sNameMapImage; + + // get data ilot + $oResult1 = $oConn->prepare("SELECT count(id_ilot) FROM ".$sSchema.".ilot".$sWhereIdOperation); + $oResult1->execute(); + $aIlot = $oResult1->fetch(PDO::FETCH_ASSOC); + $oResult1->closeCursor(); + $oResult2 = $oConn->prepare("SELECT count(DISTINCT programme_immobilier.id_ilot) FROM ".$sSchema.".programme_immobilier INNER JOIN ".$sSchema.".ilot ON programme_immobilier.id_ilot=ilot.id_ilot".$sWhereIdOperation); + $oResult2->execute(); + $aIlotProgramme = $oResult2->fetch(PDO::FETCH_ASSOC); + $iIlotSansProgramme = $aIlot['count']-$aIlotProgramme['count']; + $oResult2->closeCursor(); + // get data programme + $oResult3 = $oConn->prepare("SELECT array_to_string(array_agg(id_programme), ',') AS id_programme, round(avg(cout_construction_moyen)) AS cout_construction_moyen,round( avg(charge_fonciere_nette)) AS charge_fonciere_nette FROM ".$sSchema.".programme_immobilier INNER JOIN ".$sSchema.".ilot ON ilot.id_ilot=programme_immobilier.id_ilot ".$sWhereIdOperation." GROUP BY id_operation"); + $oResult3->execute(); + if ($oResult3->rowCount()>0){ + $aProgrammesStat=$oResult3->fetch(PDO::FETCH_ASSOC); + $sIdsProgramme = $aProgrammesStat['id_programme']; + $sWhereIdProgramme = " WHERE id_programme IN (".$sIdsProgramme.")"; + //echo $sWhereIdProgramme; + $oResult3->closeCursor(); + $oResult11=$oConn->prepare("SELECT nom_ilot, numero_pc, surface, id_programme, nom_programme, code_type_operateur, nom_demandeur, annee_debut, annee_fin FROM ".$sSchema.".programme_immobilier INNER JOIN ".$sSchema.".ilot ON ilot.id_ilot=programme_immobilier.id_ilot ".$sWhereIdOperation); + $oResult11->execute(); + $aProgrammes = $oResult11->fetchAll(); + $aSyntheseProgrammes=array(); + foreach ($aProgrammes as $iKey => $aProgramme){ + $aSyntheseProgrammes[$aProgramme['id_programme']]=array(); + $sSql12="SELECT code_composition_programme, code_type_granulometrie, valeur FROM ".$sSchema.".granulometrie WHERE id_programme IN (".$aProgramme['id_programme'].") ORDER BY code_composition_programme, code_type_granulometrie"; + foreach ($oConn->query($sSql12) as $aRow){ + if (!isset($aSyntheseProgrammes[$aProgramme['id_programme']][$aRow['code_composition_programme']])) $aSyntheseProgrammes[$aProgramme['id_programme']][$aRow['code_composition_programme']]=array(); + $aSyntheseProgrammes[$aProgramme['id_programme']][$aRow['code_composition_programme']][$aRow['code_type_granulometrie']]=$aRow['valeur']; + } + } + $oResult11->closeCursor(); + + + // get accession libre aidee + $sSql8="SELECT id_indicateur_logement_familliaux_accession, round(sum(accession_libre)::numeric) AS sum_accession_libre, round(coalesce(sum(accession_abordable),0)+coalesce(sum(accesion_sociale_securise),0)+coalesce(sum(psla),0)) AS sum_accession_aide, round(avg(accession_libre)::numeric) AS avg_accession_libre, round(avg(accession_abordable)) AS avg_accession_abordable, round(avg(accesion_sociale_securise)) AS avg_accesion_sociale_securise, round(avg(psla)) AS avg_psla FROM ".$sSchema.".logement_familliaux_accession".$sWhereIdProgramme." AND id_indicateur_logement_familliaux_accession IN (1,2,4,5,8,9) GROUP BY id_indicateur_logement_familliaux_accession"; + foreach ($oConn->query($sSql8) as $aRow){ + if ($aRow['id_indicateur_logement_familliaux_accession']==1){ + isset($iNbLgtFam) ? $iNbLgtFam=$iNbLgtFam+$aRow['sum_accession_libre'] : $iNbLgtFam=$aRow['sum_accession_libre']; + isset($iNbLgtFam) ? $iNbLgtFam=$iNbLgtFam+$aRow['sum_accession_aide'] : $iNbLgtFam=$aRow['sum_accession_aide']; + } + if ($aRow['id_indicateur_logement_familliaux_accession']==2){ + $iSdpAccessionLibre=$aRow['sum_accession_libre']; + $iSdpAccessionAide=$aRow['sum_accession_aide']; + } + if ($aRow['id_indicateur_logement_familliaux_accession']==4 or $aRow['id_indicateur_logement_familliaux_accession']==5){ + if(!isset($aCFAccessionLibre)) $aCFAccessionLibre=array(); + if(!is_null($aRow['avg_accession_libre'])) array_push($aCFAccessionLibre,$aRow['avg_accession_libre']); + if(!isset($aCFAccessionAidee)) $aCFAccessionAidee=array(); + if(!is_null($aRow['avg_accession_abordable'])) array_push($aCFAccessionAidee,$aRow['avg_accession_abordable']); + if(!is_null($aRow['avg_accesion_sociale_securise'])) array_push($aCFAccessionAidee,$aRow['avg_accesion_sociale_securise']); + if(!is_null($aRow['avg_psla'])) array_push($aCFAccessionAidee,$aRow['avg_psla']); + } + if ($aRow['id_indicateur_logement_familliaux_accession']==8 or $aRow['id_indicateur_logement_familliaux_accession']==9){ + if(!isset($aPVAccessionLibre)) $aPVAccessionLibre=array(); + if(!is_null($aRow['avg_accession_libre'])) array_push($aPVAccessionLibre,$aRow['avg_accession_libre']); + if(!isset($aPVAccessionAidee)) $aPVAccessionAidee=array(); + if(!is_null($aRow['avg_accession_abordable'])) array_push($aPVAccessionAidee,$aRow['avg_accession_abordable']); + if(!is_null($aRow['avg_accesion_sociale_securise'])) array_push($aPVAccessionAidee,$aRow['avg_accesion_sociale_securise']); + if(!is_null($aRow['avg_psla'])) array_push($aPVAccessionAidee,$aRow['avg_psla']); + } + } + if(isset($aPVAccessionLibre) and count($aPVAccessionLibre)>0) $iPVAccessionLibre = round(array_sum($aPVAccessionLibre)/count($aPVAccessionLibre)); + if(isset($aPVAccessionAidee) and count($aPVAccessionAidee)>0) $iPVAccessionAidee = round(array_sum($aPVAccessionAidee)/count($aPVAccessionAidee)); + if(isset($aCFAccessionLibre) and count($aCFAccessionLibre)>0) $iCFAccessionLibre = round(array_sum($aCFAccessionLibre)/count($aCFAccessionLibre)); + if(isset($aCFAccessionAidee) and count($aCFAccessionAidee)>0) $iCFAccessionAidee = round(array_sum($aCFAccessionAidee)/count($aCFAccessionAidee)); + // get locatif social + $sSql9="SELECT id_indicateur_logement_familliaux_location, round(coalesce(sum(social_pls),0)+coalesce(sum(social_plus_plai),0)) AS sum_social, round(coalesce(sum(intermediaire_pli),0)+coalesce(sum(intermediaire_afl),0)) AS sum_intermediaire, round(avg(social_pls)) AS avg_social_pls, round(avg(social_plus_plai)) AS avg_social_plus_plai, round(avg(intermediaire_pli)) AS avg_intermediaire_pli, round(avg(intermediaire_afl)) AS avg_intermediaire_afl FROM ".$sSchema.".composition_logement_familliaux_location_cp INNER JOIN ".$sSchema.".logement_familliaux_location ON logement_familliaux_location.id_logement_familliaux_location=composition_logement_familliaux_location_cp.id_logement_familliaux_location".$sWhereIdProgramme." AND id_indicateur_logement_familliaux_location IN (1,2,4,5,8) GROUP BY id_indicateur_logement_familliaux_location"; + foreach ($oConn->query($sSql9) as $aRow){ + if ($aRow['id_indicateur_logement_familliaux_location']==1){ + isset($iNbLgtFam) ? $iNbLgtFam=$iNbLgtFam+$aRow['sum_social'] : $iNbLgtFam=$aRow['sum_social']; + isset($iNbLgtFam) ? $iNbLgtFam=$iNbLgtFam+$aRow['sum_intermediaire'] : $iNbLgtFam=$aRow['sum_intermediaire']; + } + if ($aRow['id_indicateur_logement_familliaux_location']==2){ + $iSdpLocSocial=$aRow['sum_social']; + $iSdpLocIntermediaire=$aRow['sum_intermediaire']; + } + if ($aRow['id_indicateur_logement_familliaux_location']==4 or $aRow['id_indicateur_logement_familliaux_location']==5){ + if(!isset($aCFSocial)) $aCFSocial=array(); + if(!is_null($aRow['avg_social_pls'])) array_push($aCFSocial,$aRow['avg_social_pls']); + if(!is_null($aRow['avg_social_plus_plai'])) array_push($aCFSocial,$aRow['avg_social_plus_plai']); + if(!isset($aCFIntermediaire)) $aCFIntermediaire=array(); + if(!is_null($aRow['avg_intermediaire_pli'])) array_push($aCFIntermediaire,$aRow['avg_intermediaire_pli']); + if(!is_null($aRow['avg_intermediaire_afl'])) array_push($aCFIntermediaire,$aRow['avg_intermediaire_afl']); + } + if ($aRow['id_indicateur_logement_familliaux_location']==8){ + $aPrixVenteSocial=array(); + if(!is_null($aRow['avg_social_pls'])) array_push($aPrixVenteSocial,$aRow['avg_social_pls']); + if(!is_null($aRow['avg_social_plus_plai'])) array_push($aPrixVenteSocial,$aRow['avg_social_plus_plai']); + if(count($aPrixVenteSocial)>0) $iPrixVenteSocial = round(array_sum($aPrixVenteSocial)/count($aPrixVenteSocial)); + $aPrixVenteIntermediaire=array(); + if(!is_null($aRow['avg_intermediaire_pli'])) array_push($aPrixVenteIntermediaire,$aRow['avg_intermediaire_pli']); + if(!is_null($aRow['avg_intermediaire_afl'])) array_push($aPrixVenteIntermediaire,$aRow['avg_intermediaire_afl']); + if(count($aPrixVenteIntermediaire)>0) $iPrixVenteIntermediaire = round(array_sum($aPrixVenteIntermediaire)/count($aPrixVenteIntermediaire)); + } + } + if(isset($aCFSocial) and count($aCFSocial)>0) $iCFSocial = round(array_sum($aCFSocial)/count($aCFSocial)); + if(isset($aCFIntermediaire)and count($aCFIntermediaire)>0) $iCFIntermediaire = round(array_sum($aCFIntermediaire)/count($aCFIntermediaire)); + // get habitat spe + $oResult10=$oConn->prepare("SELECT id_indicateur_habitat_specifique, round(coalesce(sum(residence_etudiant),0)+coalesce(sum(residence_personne_agee),0)+coalesce(sum(autre),0)) AS total FROM ".$sSchema.".composition_habitat_specifique_cp INNER JOIN ".$sSchema.".habitat_specifique ON composition_habitat_specifique_cp.id_habitat_specifique=habitat_specifique.id_habitat_specifique".$sWhereIdProgramme." AND id_indicateur_habitat_specifique IN (1,2) GROUP BY id_indicateur_habitat_specifique ORDER BY id_indicateur_habitat_specifique"); + $oResult10->execute(); + $iNbHabitatSpe=$oResult10->fetch(PDO::FETCH_ASSOC)['total']; + $iSdpHabitatSpe=$oResult10->fetch(PDO::FETCH_ASSOC)['total']; + $oResult10->closeCursor(); + // get bureau + $sSql6="SELECT id_indicateur_bureau, round(sum(total)::numeric) AS sum, round(avg(total)::numeric) AS avg FROM ".$sSchema.".bureau".$sWhereIdProgramme." AND id_indicateur_bureau IN (1,2,3,6) GROUP BY id_indicateur_bureau"; + foreach ($oConn->query($sSql6) as $aRow) { + if ($aRow['id_indicateur_bureau']==1) $iSdpBureau = $aRow['sum']; + if ($aRow['id_indicateur_bureau']==2 or $aRow['id_indicateur_bureau']==3) + isset($iCFBureau) ? array_push($iCFBureau,$aRow['avg']) : $iCFBureau=array($aRow['avg']); + if ($aRow['id_indicateur_bureau']==6) $iPrixVenteBureau = $aRow['avg']; + } + //echo print_r($iCFBureau,true); + if (isset($iCFBureau)) $iCFBureau = round(array_sum($iCFBureau)/count($iCFBureau)); + //get commerce/hotel + $sSql4="SELECT id_indicateur_hotel_commerce_service, round(coalesce(sum(commerce),0)+coalesce(sum(loisir_marchand),0)+coalesce(sum(service_act_artisanale),0)) AS sum_commerce, round(sum(hotel)) AS sum_hotel, round(avg(commerce)) AS avg_commerce, round(avg(loisir_marchand)) AS avg_loisir_marchand, round(avg(service_act_artisanale)) AS avg_service_act_artisanale, round(avg(hotel)) AS avg_hotel FROM ".$sSchema.".hotel_commerce_service".$sWhereIdProgramme." AND id_indicateur_hotel_commerce_service IN (2,3,4,8) GROUP BY id_indicateur_hotel_commerce_service"; + foreach ($oConn->query($sSql4) as $aRow) { + if ($aRow['id_indicateur_hotel_commerce_service']==2){ + $iSdpCommerce=$aRow['sum_commerce']; + $iSdpHotel=$aRow['sum_hotel']; + } + if ($aRow['id_indicateur_hotel_commerce_service']==3 or $aRow['id_indicateur_hotel_commerce_service']==4){ + if(!isset($aCFCommerce)) $aCFCommerce=array(); + if(!is_null($aRow['avg_commerce'])) array_push($aCFCommerce,$aRow['avg_commerce']); + if(!is_null($aRow['avg_loisir_marchand'])) array_push($aCFCommerce,$aRow['avg_loisir_marchand']); + if(!is_null($aRow['avg_service_act_artisanale'])) array_push($aCFCommerce,$aRow['avg_service_act_artisanale']); + if(!isset($aCFHotel)) $aCFHotel=array(); + if(!is_null($aRow['avg_hotel'])) array_push($aCFHotel,$aRow['avg_hotel']); + } + if ($aRow['id_indicateur_hotel_commerce_service']==8){ + $aPrixVenteCommerce=array(); + if(!is_null($aRow['avg_commerce'])) array_push($aPrixVenteCommerce,$aRow['avg_commerce']); + if(!is_null($aRow['avg_loisir_marchand'])) array_push($aPrixVenteCommerce,$aRow['avg_loisir_marchand']); + if(!is_null($aRow['avg_service_act_artisanale'])) array_push($aPrixVenteCommerce,$aRow['avg_service_act_artisanale']); + if(count($aPrixVenteCommerce)>0) $iPrixVenteCommerce = round(array_sum($aPrixVenteCommerce)/count($aPrixVenteCommerce)); + $iPrixVenteHotel = $aRow['avg_hotel']; + } + } + if (isset($aCFCommerce)) $iCFCommerce = round(array_sum($aCFCommerce)/count($aCFCommerce)); + if (isset($aCFHotel)) $iCFHotel = round(array_sum($aCFHotel)/count($aCFHotel)); + //get prod/activite + $sSql7="SELECT id_indicateur_activite_industrie, round(sum(production_industrie_logistique)) AS sum_production_industrie_logistique, round(sum(autre)) AS sum_autre, round(avg(production_industrie_logistique)) AS avg_production_industrie_logistique, round(avg(autre)) AS avg_autre FROM ".$sSchema.".activite_industrie".$sWhereIdProgramme." AND id_indicateur_activite_industrie IN (2,3,4,7) GROUP BY id_indicateur_activite_industrie"; + foreach ($oConn->query($sSql7) as $aRow){ + if ($aRow['id_indicateur_activite_industrie']==2){ + $iSdpProd=$aRow['sum_production_industrie_logistique']; + $iSdpActAutre=$aRow['avg_autre']; + } + if ($aRow['id_indicateur_activite_industrie']==3 or $aRow['id_indicateur_activite_industrie']==4){ + isset($iCFProd) ? array_push($iCFProd,$aRow['avg_production_industrie_logistique']) : $iCFProd=array($aRow['avg_production_industrie_logistique']); + isset($iCFActAutre) ? array_push($iCFActAutre,$aRow['avg_autre']) : $iCFActAutre=array($aRow['avg_autre']); + } + if ($aRow['id_indicateur_activite_industrie']==7){ + $iPrixVenteProd = $aRow['avg_production_industrie_logistique']; + $iPrixVenteActAutre = $aRow['avg_autre']; + } + } + if (isset($iCFProd)) $iCFProd = round(array_sum($iCFProd)/count($iCFProd)); + if (isset($iCFActAutre)) $iCFActAutre = round(array_sum($iCFActAutre)/count($iCFActAutre)); + // get equipement + $oResult5 = $oConn->prepare("SELECT round(sum(sdp)::numeric) AS sdp FROM ".$sSchema.".equipement_structure".$sWhereIdProgramme); + $oResult5->execute(); + $iSdpEquipement = $oResult5->fetch(PDO::FETCH_ASSOC)['sdp']; + $oResult5->closeCursor(); + //get profil + $sSql12="SELECT id_type_acheteur_accession_libre, round(sum(nb)) AS nb, round(avg(pourc)) AS pourc FROM ".$sSchema.".profil_acheteur_accession_libre".$sWhereIdProgramme." AND id_type_acheteur_accession_libre IN (1,2) GROUP BY id_type_acheteur_accession_libre"; + foreach ($oConn->query($sSql12) as $aRow){ + if ($aRow['id_type_acheteur_accession_libre']==1){ + $iNbProprioOcc=$aRow['nb']; + $iPourcProprioOcc=$aRow['pourc']; + } + if ($aRow['id_type_acheteur_accession_libre']==2){ + $iNbInvest=$aRow['nb']; + $iPourcInvest=$aRow['pourc']; + } + } + // get granulometrie + $aGranulometrie=array(); + $aGranulometrie2=array('LG_FAM_ACC'=>array('T1'=>0,'T2'=>0,'T3'=>0,'T4'=>0,'T5'=>0,'T6'=>0), 'LG_FAM_LOC'=>array('T1'=>0,'T2'=>0,'T3'=>0,'T4'=>0,'T5'=>0,'T6'=>0), 'TOT_LG_SPE'=>array('T1'=>0,'T2'=>0,'T3'=>0,'T4'=>0,'T5'=>0,'T6'=>0)); + $aTypeGranulometrie=array('T1','T2','T3','T4','T5','T6','NB'); + foreach ($aTypeGranulometrie as $sTypeGranulometrie){ + $aTmp=array(); + $sSql13="SELECT code_composition_programme, sum(valeur) AS valeur FROM ".$sSchema.".granulometrie".$sWhereIdProgramme." AND code_type_granulometrie ='".$sTypeGranulometrie."' AND code_composition_programme IN ('TOT_LG_SPE','LG_FAM_ACC','LG_FAM_LOC','TOT_LG_FAM') GROUP BY code_composition_programme"; + foreach ($oConn->query($sSql13) as $aRow){ + if ($sTypeGranulometrie=='NB' && ($aRow['code_composition_programme']=='TOT_LG_FAM' || $aRow['code_composition_programme']=='TOT_LG_SPE')) $aTmp['TOT'] = $aTmp['TOT'] + $aRow['valeur']; + $aTmp[$aRow['code_composition_programme']]=$aRow['valeur']; + } + if (count($aTmp)>0) $aGranulometrie[$sTypeGranulometrie]=$aTmp; + if ($sTypeGranulometrie!='NB') + if (isset($sDataGranulometrie)) + $sDataGranulometrie=$sDataGranulometrie.','.array_sum($aTmp); + else + $sDataGranulometrie=array_sum($aTmp); + } + foreach ($aGranulometrie as $sTypeGranulometrie=>$aValues){ + if ($sTypeGranulometrie!='NB') + foreach ($aValues as $sCodeCompo=>$iValue){ + if (isset($aGranulometrie2[$sCodeCompo])) + $aGranulometrie2[$sCodeCompo][$sTypeGranulometrie]=$aGranulometrie2[$sCodeCompo][$sTypeGranulometrie]+$iValue; + } + + } + foreach ($aGranulometrie2 as $sCodeCompo=>$aValues) + $aGranulometrie2[$sCodeCompo] = implode(",", $aValues); + //echo '<br>'.print_r($aGranulometrie2,true); + } + + + include ('get_1_operation.html'); + }else{ + $sError="Erreur : ".$oResult->rowCount()." opération(s) trouvée(s)."; + $oResult->closeCursor(); + include ('get_error.html'); + } + } + }catch (PDOException $e){ + $sError="ERROR : ".$e->getMessage(); + include ('get_error.html'); + } + + }else{ + $sError="ERREUR : Pas d'opération passée en paramètre !"; + include ('get_error.html'); + } + }else{ + header ('location: signin.php'); + exit(); + } +}else{ + header ('location: signin.php'); + exit(); +} +?> \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/get_1_operation.php b/src/vitis/vas/doc/suivi_prod_immo/get_1_operation.php new file mode 100644 index 0000000000000000000000000000000000000000..a6a560b82740a5327e69c969602f3b367c6328f1 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/get_1_operation.php @@ -0,0 +1,275 @@ +<?php +// https://geo.urbalyon.org/doc/suivi_prod_immo/get_1_operation.php?id_operation=1041 + +if (isset($_REQUEST['token']) && !is_null($_REQUEST['token'])){ + session_id($_REQUEST['token']); + if (session_status() == PHP_SESSION_NONE) + session_start(); + + if (empty($_SESSION)) { + $sError="ERREUR : token invalide."; + include ('get_error.html'); + }else{ + if (isset($_REQUEST['id_operation']) && !is_null($_REQUEST['id_operation'])){ + require_once("../../rest/conf/properties.inc"); + require_once("properties_suivi_prod_immo.inc"); + $sSchema=$properties['schema_prod_immo']; + + try{ + $oConn = new PDO('pgsql:host='.$properties['server'].';port='.$properties['port'].';dbname='.$properties['db_prod_immo'], $properties['db_user_prod_immo'], $properties['db_pass_prod_immo']); + $oConn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $oConn->setAttribute(PDO::ATTR_CASE, PDO::CASE_NATURAL); + + if($oConn){ + // get data Opérations + $sWhereIdOperation=" WHERE id_operation=".$_REQUEST['id_operation']; + $oResult = $oConn->prepare("SELECT *, ST_XMin(ST_Buffer(geom,50)) AS xmin, ST_YMin(ST_Buffer(geom,50)) AS ymin, ST_XMax(ST_Buffer(geom,50)) AS xmax, ST_YMax(ST_Buffer(geom,50)) AS ymax FROM ".$sSchema.".v_operation_layer".$sWhereIdOperation); + $oResult->execute(); + + if ($oResult->rowCount()>0){ + $aOperations = $oResult->fetchAll(); + $oResult->closeCursor(); + $aOperation =$aOperations[0]; + $aOperation['date_mise_a_jour'] = date("d/m/Y", strtotime($aOperation['date_mise_a_jour'])); + $sDataSdpPrev= $aOperation['sdp_logement'].",".$aOperation['sdp_bureau'].",".$aOperation['sdp_commerce_service'].",".$aOperation['sdp_locaux'].",".$aOperation['sdp_equipement']; + // get map image + $sNameMapImage=$_REQUEST['id_operation']."_operation.png"; + $sCommand = escapeshellcmd('python get_map_image_1_operation.py '.$aOperation['xmin'].' '.$aOperation['ymin'].' '.$aOperation['xmax'].' '.$aOperation['ymax'].' '.$sNameMapImage.' '.$_REQUEST['id_operation']); + $output = shell_exec($sCommand); + $sUrlMapImage=$properties['web_server_name']."/ws_data/vm4ms/map/tmp/".$sNameMapImage; + + // get data ilot + $oResult1 = $oConn->prepare("SELECT count(id_ilot) FROM ".$sSchema.".ilot".$sWhereIdOperation); + $oResult1->execute(); + $aIlot = $oResult1->fetch(PDO::FETCH_ASSOC); + $oResult1->closeCursor(); + $oResult2 = $oConn->prepare("SELECT count(DISTINCT programme_immobilier.id_ilot) FROM ".$sSchema.".programme_immobilier INNER JOIN ".$sSchema.".ilot ON programme_immobilier.id_ilot=ilot.id_ilot".$sWhereIdOperation); + $oResult2->execute(); + $aIlotProgramme = $oResult2->fetch(PDO::FETCH_ASSOC); + $iIlotSansProgramme = $aIlot['count']-$aIlotProgramme['count']; + $oResult2->closeCursor(); + // get data programme + $oResult3 = $oConn->prepare("SELECT array_to_string(array_agg(id_programme), ',') AS id_programme, round(avg(cout_construction_moyen)) AS cout_construction_moyen,round( avg(charge_fonciere_nette)) AS charge_fonciere_nette FROM ".$sSchema.".programme_immobilier INNER JOIN ".$sSchema.".ilot ON ilot.id_ilot=programme_immobilier.id_ilot ".$sWhereIdOperation." GROUP BY id_operation"); + $oResult3->execute(); + if ($oResult3->rowCount()>0){ + $aProgrammesStat=$oResult3->fetch(PDO::FETCH_ASSOC); + $sIdsProgramme = $aProgrammesStat['id_programme']; + $sWhereIdProgramme = " WHERE id_programme IN (".$sIdsProgramme.")"; + //echo $sWhereIdProgramme; + $oResult3->closeCursor(); + $oResult11=$oConn->prepare("SELECT nom_ilot, numero_pc, surface, id_programme, nom_programme, code_type_operateur, nom_demandeur, annee_debut, annee_fin FROM ".$sSchema.".programme_immobilier INNER JOIN ".$sSchema.".ilot ON ilot.id_ilot=programme_immobilier.id_ilot ".$sWhereIdOperation); + $oResult11->execute(); + $aProgrammes = $oResult11->fetchAll(); + $aSyntheseProgrammes=array(); + foreach ($aProgrammes as $iKey => $aProgramme){ + $aSyntheseProgrammes[$aProgramme['id_programme']]=array(); + $sSql12="SELECT code_composition_programme, code_type_granulometrie, valeur FROM ".$sSchema.".granulometrie WHERE id_programme IN (".$aProgramme['id_programme'].") ORDER BY code_composition_programme, code_type_granulometrie"; + foreach ($oConn->query($sSql12) as $aRow){ + if (!isset($aSyntheseProgrammes[$aProgramme['id_programme']][$aRow['code_composition_programme']])) $aSyntheseProgrammes[$aProgramme['id_programme']][$aRow['code_composition_programme']]=array(); + $aSyntheseProgrammes[$aProgramme['id_programme']][$aRow['code_composition_programme']][$aRow['code_type_granulometrie']]=$aRow['valeur']; + } + } + $oResult11->closeCursor(); + + + // get accession libre aidee + $sSql8="SELECT id_indicateur_logement_familliaux_accession, round(sum(accession_libre::numeric)) AS sum_accession_libre, round(coalesce(sum(accession_abordable::numeric),0)+coalesce(sum(accession_sociale_securise ::numeric),0)+coalesce(sum(psla::numeric),0)) AS sum_accession_aide, round(avg(accession_libre::numeric)) AS avg_accession_libre, round(avg(accession_abordable::numeric)) AS avg_accession_abordable, round(avg(accession_sociale_securise ::numeric)) AS avg_accession_sociale_securise , round(avg(psla::numeric)) AS avg_psla FROM ".$sSchema.".logement_familliaux_accession".$sWhereIdProgramme." AND id_indicateur_logement_familliaux_accession IN (1,2,4,5,8,9) GROUP BY id_indicateur_logement_familliaux_accession"; + foreach ($oConn->query($sSql8) as $aRow){ + if ($aRow['id_indicateur_logement_familliaux_accession']==1){ + isset($iNbLgtFam) ? $iNbLgtFam=$iNbLgtFam+$aRow['sum_accession_libre'] : $iNbLgtFam=$aRow['sum_accession_libre']; + isset($iNbLgtFam) ? $iNbLgtFam=$iNbLgtFam+$aRow['sum_accession_aide'] : $iNbLgtFam=$aRow['sum_accession_aide']; + } + if ($aRow['id_indicateur_logement_familliaux_accession']==2){ + $iSdpAccessionLibre=$aRow['sum_accession_libre']; + $iSdpAccessionAide=$aRow['sum_accession_aide']; + } + if ($aRow['id_indicateur_logement_familliaux_accession']==4 or $aRow['id_indicateur_logement_familliaux_accession']==5){ + if(!isset($aCFAccessionLibre)) $aCFAccessionLibre=array(); + if(!is_null($aRow['avg_accession_libre'])) array_push($aCFAccessionLibre,$aRow['avg_accession_libre']); + if(!isset($aCFAccessionAidee)) $aCFAccessionAidee=array(); + if(!is_null($aRow['avg_accession_abordable'])) array_push($aCFAccessionAidee,$aRow['avg_accession_abordable']); + if(!is_null($aRow['avg_accession_sociale_securise '])) array_push($aCFAccessionAidee,$aRow['avg_accession_sociale_securise ']); + if(!is_null($aRow['avg_psla'])) array_push($aCFAccessionAidee,$aRow['avg_psla']); + } + if ($aRow['id_indicateur_logement_familliaux_accession']==8 or $aRow['id_indicateur_logement_familliaux_accession']==9){ + if(!isset($aPVAccessionLibre)) $aPVAccessionLibre=array(); + if(!is_null($aRow['avg_accession_libre'])) array_push($aPVAccessionLibre,$aRow['avg_accession_libre']); + if(!isset($aPVAccessionAidee)) $aPVAccessionAidee=array(); + if(!is_null($aRow['avg_accession_abordable'])) array_push($aPVAccessionAidee,$aRow['avg_accession_abordable']); + if(!is_null($aRow['avg_accession_sociale_securise '])) array_push($aPVAccessionAidee,$aRow['avg_accession_sociale_securise ']); + if(!is_null($aRow['avg_psla'])) array_push($aPVAccessionAidee,$aRow['avg_psla']); + } + } + if(isset($aPVAccessionLibre) and count($aPVAccessionLibre)>0) $iPVAccessionLibre = round(array_sum($aPVAccessionLibre)/count($aPVAccessionLibre)); + if(isset($aPVAccessionAidee) and count($aPVAccessionAidee)>0) $iPVAccessionAidee = round(array_sum($aPVAccessionAidee)/count($aPVAccessionAidee)); + if(isset($aCFAccessionLibre) and count($aCFAccessionLibre)>0) $iCFAccessionLibre = round(array_sum($aCFAccessionLibre)/count($aCFAccessionLibre)); + if(isset($aCFAccessionAidee) and count($aCFAccessionAidee)>0) $iCFAccessionAidee = round(array_sum($aCFAccessionAidee)/count($aCFAccessionAidee)); + // get locatif social + $sSql9="SELECT id_indicateur_logement_familliaux_location, round(coalesce(sum(social_pls),0)+coalesce(sum(social_plus_plai),0)) AS sum_social, round(coalesce(sum(intermediaire_pli),0)+coalesce(sum(intermediaire_afl),0)) AS sum_intermediaire, round(avg(social_pls)) AS avg_social_pls, round(avg(social_plus_plai)) AS avg_social_plus_plai, round(avg(intermediaire_pli)) AS avg_intermediaire_pli, round(avg(intermediaire_afl)) AS avg_intermediaire_afl FROM ".$sSchema.".composition_logement_familliaux_location_cp INNER JOIN ".$sSchema.".logement_familliaux_location ON logement_familliaux_location.id_logement_familliaux_location=composition_logement_familliaux_location_cp.id_logement_familliaux_location".$sWhereIdProgramme." AND id_indicateur_logement_familliaux_location IN (1,2,4,5,8) GROUP BY id_indicateur_logement_familliaux_location"; + foreach ($oConn->query($sSql9) as $aRow){ + if ($aRow['id_indicateur_logement_familliaux_location']==1){ + isset($iNbLgtFam) ? $iNbLgtFam=$iNbLgtFam+$aRow['sum_social'] : $iNbLgtFam=$aRow['sum_social']; + isset($iNbLgtFam) ? $iNbLgtFam=$iNbLgtFam+$aRow['sum_intermediaire'] : $iNbLgtFam=$aRow['sum_intermediaire']; + } + if ($aRow['id_indicateur_logement_familliaux_location']==2){ + $iSdpLocSocial=$aRow['sum_social']; + $iSdpLocIntermediaire=$aRow['sum_intermediaire']; + } + if ($aRow['id_indicateur_logement_familliaux_location']==4 or $aRow['id_indicateur_logement_familliaux_location']==5){ + if(!isset($aCFSocial)) $aCFSocial=array(); + if(!is_null($aRow['avg_social_pls'])) array_push($aCFSocial,$aRow['avg_social_pls']); + if(!is_null($aRow['avg_social_plus_plai'])) array_push($aCFSocial,$aRow['avg_social_plus_plai']); + if(!isset($aCFIntermediaire)) $aCFIntermediaire=array(); + if(!is_null($aRow['avg_intermediaire_pli'])) array_push($aCFIntermediaire,$aRow['avg_intermediaire_pli']); + if(!is_null($aRow['avg_intermediaire_afl'])) array_push($aCFIntermediaire,$aRow['avg_intermediaire_afl']); + } + if ($aRow['id_indicateur_logement_familliaux_location']==8){ + $aPrixVenteSocial=array(); + if(!is_null($aRow['avg_social_pls'])) array_push($aPrixVenteSocial,$aRow['avg_social_pls']); + if(!is_null($aRow['avg_social_plus_plai'])) array_push($aPrixVenteSocial,$aRow['avg_social_plus_plai']); + if(count($aPrixVenteSocial)>0) $iPrixVenteSocial = round(array_sum($aPrixVenteSocial)/count($aPrixVenteSocial)); + $aPrixVenteIntermediaire=array(); + if(!is_null($aRow['avg_intermediaire_pli'])) array_push($aPrixVenteIntermediaire,$aRow['avg_intermediaire_pli']); + if(!is_null($aRow['avg_intermediaire_afl'])) array_push($aPrixVenteIntermediaire,$aRow['avg_intermediaire_afl']); + if(count($aPrixVenteIntermediaire)>0) $iPrixVenteIntermediaire = round(array_sum($aPrixVenteIntermediaire)/count($aPrixVenteIntermediaire)); + } + } + if(isset($aCFSocial) and count($aCFSocial)>0) $iCFSocial = round(array_sum($aCFSocial)/count($aCFSocial)); + if(isset($aCFIntermediaire)and count($aCFIntermediaire)>0) $iCFIntermediaire = round(array_sum($aCFIntermediaire)/count($aCFIntermediaire)); + // get habitat spe + $oResult10=$oConn->prepare("SELECT id_indicateur_habitat_specifique, round(coalesce(sum(residence_etudiant),0)+coalesce(sum(residence_personne_agee),0)+coalesce(sum(autre),0)) AS total FROM ".$sSchema.".composition_habitat_specifique_cp INNER JOIN ".$sSchema.".habitat_specifique ON composition_habitat_specifique_cp.id_habitat_specifique=habitat_specifique.id_habitat_specifique".$sWhereIdProgramme." AND id_indicateur_habitat_specifique IN (1,2) GROUP BY id_indicateur_habitat_specifique ORDER BY id_indicateur_habitat_specifique"); + $oResult10->execute(); + $iNbHabitatSpe=$oResult10->fetch(PDO::FETCH_ASSOC)['total']; + $iSdpHabitatSpe=$oResult10->fetch(PDO::FETCH_ASSOC)['total']; + $oResult10->closeCursor(); + // get bureau + $sSql6="SELECT id_indicateur_bureau, round(sum(total)::numeric) AS sum, round(avg(total)::numeric) AS avg FROM ".$sSchema.".bureau".$sWhereIdProgramme." AND id_indicateur_bureau IN (1,2,3,6) GROUP BY id_indicateur_bureau"; + foreach ($oConn->query($sSql6) as $aRow) { + if ($aRow['id_indicateur_bureau']==1) $iSdpBureau = $aRow['sum']; + if ($aRow['id_indicateur_bureau']==2 or $aRow['id_indicateur_bureau']==3) + isset($iCFBureau) ? array_push($iCFBureau,$aRow['avg']) : $iCFBureau=array($aRow['avg']); + if ($aRow['id_indicateur_bureau']==6) $iPrixVenteBureau = $aRow['avg']; + } + //echo print_r($iCFBureau,true); + if (isset($iCFBureau)) $iCFBureau = round(array_sum($iCFBureau)/count($iCFBureau)); + //get commerce/hotel + $sSql4="SELECT id_indicateur_hotel_commerce_service, round(coalesce(sum(commerce),0)+coalesce(sum(loisir_marchand),0)+coalesce(sum(service_act_artisanale),0)) AS sum_commerce, round(sum(hotel)) AS sum_hotel, round(avg(commerce)) AS avg_commerce, round(avg(loisir_marchand)) AS avg_loisir_marchand, round(avg(service_act_artisanale)) AS avg_service_act_artisanale, round(avg(hotel)) AS avg_hotel FROM ".$sSchema.".hotel_commerce_service".$sWhereIdProgramme." AND id_indicateur_hotel_commerce_service IN (2,3,4,8) GROUP BY id_indicateur_hotel_commerce_service"; + foreach ($oConn->query($sSql4) as $aRow) { + if ($aRow['id_indicateur_hotel_commerce_service']==2){ + $iSdpCommerce=$aRow['sum_commerce']; + $iSdpHotel=$aRow['sum_hotel']; + } + if ($aRow['id_indicateur_hotel_commerce_service']==3 or $aRow['id_indicateur_hotel_commerce_service']==4){ + if(!isset($aCFCommerce)) $aCFCommerce=array(); + if(!is_null($aRow['avg_commerce'])) array_push($aCFCommerce,$aRow['avg_commerce']); + if(!is_null($aRow['avg_loisir_marchand'])) array_push($aCFCommerce,$aRow['avg_loisir_marchand']); + if(!is_null($aRow['avg_service_act_artisanale'])) array_push($aCFCommerce,$aRow['avg_service_act_artisanale']); + if(!isset($aCFHotel)) $aCFHotel=array(); + if(!is_null($aRow['avg_hotel'])) array_push($aCFHotel,$aRow['avg_hotel']); + } + if ($aRow['id_indicateur_hotel_commerce_service']==8){ + $aPrixVenteCommerce=array(); + if(!is_null($aRow['avg_commerce'])) array_push($aPrixVenteCommerce,$aRow['avg_commerce']); + if(!is_null($aRow['avg_loisir_marchand'])) array_push($aPrixVenteCommerce,$aRow['avg_loisir_marchand']); + if(!is_null($aRow['avg_service_act_artisanale'])) array_push($aPrixVenteCommerce,$aRow['avg_service_act_artisanale']); + if(count($aPrixVenteCommerce)>0) $iPrixVenteCommerce = round(array_sum($aPrixVenteCommerce)/count($aPrixVenteCommerce)); + $iPrixVenteHotel = $aRow['avg_hotel']; + } + } + if (isset($aCFCommerce)) $iCFCommerce = round(array_sum($aCFCommerce)/count($aCFCommerce)); + if (isset($aCFHotel)) $iCFHotel = round(array_sum($aCFHotel)/count($aCFHotel)); + //get prod/activite + $sSql7="SELECT id_indicateur_activite_industrie, round(sum(production_industrie)) AS sum_production_industrie, round(sum(logistique)) AS sum_logistique, round(sum(autre)) AS sum_autre, round(avg(production_industrie)) AS avg_production_industrie, round(avg(logistique)) AS avg_logistique, round(avg(autre)) AS avg_autre FROM ".$sSchema.".activite_industrie".$sWhereIdProgramme." AND id_indicateur_activite_industrie IN (2,3,4,7) GROUP BY id_indicateur_activite_industrie"; + foreach ($oConn->query($sSql7) as $aRow){ + if ($aRow['id_indicateur_activite_industrie']==2){ + $iSdpProd=$aRow['sum_production_industrie']; + $iSdpLogistique=$aRow['sum_logistique']; + $iSdpActAutre=$aRow['avg_autre']; + } + if ($aRow['id_indicateur_activite_industrie']==3 or $aRow['id_indicateur_activite_industrie']==4){ + isset($iCFProd) ? array_push($iCFProd,$aRow['avg_production_industrie']) : $iCFProd=array($aRow['avg_production_industrie']); + isset($iCFLogistique) ? array_push($iCFProd,$aRow['avg_logistique']) : $iCFProd=array($aRow['avg_logistique']); + isset($iCFActAutre) ? array_push($iCFActAutre,$aRow['avg_autre']) : $iCFActAutre=array($aRow['avg_autre']); + } + if ($aRow['id_indicateur_activite_industrie']==7){ + $iPrixVenteProd = $aRow['avg_production_industrie']; + $iPrixVenteLogistique = $aRow['avg_logistique']; + $iPrixVenteActAutre = $aRow['avg_autre']; + } + } + if (isset($iCFProd)) $iCFProd = round(array_sum($iCFProd)/count($iCFProd)); + if (isset($iCFLogistique)) $iCFLogistique = round(array_sum($iCFLogistique)/count($iCFLogistique)); + if (isset($iCFActAutre)) $iCFActAutre = round(array_sum($iCFActAutre)/count($iCFActAutre)); + // get equipement + $oResult5 = $oConn->prepare("SELECT round(sum(sdp)::numeric) AS sdp FROM ".$sSchema.".equipement_structure".$sWhereIdProgramme); + $oResult5->execute(); + $iSdpEquipement = $oResult5->fetch(PDO::FETCH_ASSOC)['sdp']; + $oResult5->closeCursor(); + //get profil + $sSql12="SELECT id_type_acheteur_accession_libre, round(sum(nb)) AS nb, round(avg(pourc)) AS pourc FROM ".$sSchema.".profil_acheteur_accession_libre".$sWhereIdProgramme." AND id_type_acheteur_accession_libre IN (1,2) GROUP BY id_type_acheteur_accession_libre"; + foreach ($oConn->query($sSql12) as $aRow){ + if ($aRow['id_type_acheteur_accession_libre']==1){ + $iNbProprioOcc=$aRow['nb']; + $iPourcProprioOcc=$aRow['pourc']; + } + if ($aRow['id_type_acheteur_accession_libre']==2){ + $iNbInvest=$aRow['nb']; + $iPourcInvest=$aRow['pourc']; + } + } + // get granulometrie + $aGranulometrie=array(); + $aGranulometrie2=array('LG_FAM_ACC'=>array('T1'=>0,'T2'=>0,'T3'=>0,'T4'=>0,'T5'=>0,'T6'=>0), 'LG_FAM_LOC'=>array('T1'=>0,'T2'=>0,'T3'=>0,'T4'=>0,'T5'=>0,'T6'=>0), 'TOT_LG_SPE'=>array('T1'=>0,'T2'=>0,'T3'=>0,'T4'=>0,'T5'=>0,'T6'=>0)); + $aTypeGranulometrie=array('T1','T2','T3','T4','T5','T6','NB'); + foreach ($aTypeGranulometrie as $sTypeGranulometrie){ + $aTmp=array(); + $sSql13="SELECT code_composition_programme, sum(valeur) AS valeur FROM ".$sSchema.".granulometrie".$sWhereIdProgramme." AND code_type_granulometrie ='".$sTypeGranulometrie."' AND code_composition_programme IN ('TOT_LG_SPE','LG_FAM_ACC','LG_FAM_LOC','TOT_LG_FAM') GROUP BY code_composition_programme"; + foreach ($oConn->query($sSql13) as $aRow){ + if ($sTypeGranulometrie=='NB' && ($aRow['code_composition_programme']=='TOT_LG_FAM' || $aRow['code_composition_programme']=='TOT_LG_SPE')) $aTmp['TOT'] = $aTmp['TOT'] + $aRow['valeur']; + $aTmp[$aRow['code_composition_programme']]=$aRow['valeur']; + } + if (count($aTmp)>0) $aGranulometrie[$sTypeGranulometrie]=$aTmp; + if ($sTypeGranulometrie!='NB') + if (isset($sDataGranulometrie)) + $sDataGranulometrie=$sDataGranulometrie.','.array_sum($aTmp); + else + $sDataGranulometrie=array_sum($aTmp); + } + foreach ($aGranulometrie as $sTypeGranulometrie=>$aValues){ + if ($sTypeGranulometrie!='NB') + foreach ($aValues as $sCodeCompo=>$iValue){ + if (isset($aGranulometrie2[$sCodeCompo])) + $aGranulometrie2[$sCodeCompo][$sTypeGranulometrie]=$aGranulometrie2[$sCodeCompo][$sTypeGranulometrie]+$iValue; + } + + } + foreach ($aGranulometrie2 as $sCodeCompo=>$aValues) + $aGranulometrie2[$sCodeCompo] = implode(",", $aValues); + //echo '<br>'.print_r($aGranulometrie2,true); + } + + + include ('get_1_operation.html'); + }else{ + $sError="Erreur : ".$oResult->rowCount()." opération(s) trouvée(s)."; + $oResult->closeCursor(); + include ('get_error.html'); + } + } + }catch (PDOException $e){ + $sError="ERROR : ".$e->getMessage(); + include ('get_error.html'); + } + + }else{ + $sError="ERREUR : Pas d'opération passée en paramètre !"; + include ('get_error.html'); + } + } + +}else{ + $sError="ERREUR : Pas de token passé."; + include ('get_error.html'); +} + +?> \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/get_2_type.html b/src/vitis/vas/doc/suivi_prod_immo/get_2_type.html new file mode 100644 index 0000000000000000000000000000000000000000..f85478522e6e2952522d6321ddca0c28f4e13e6e --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/get_2_type.html @@ -0,0 +1,148 @@ +<!doctype html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <title>BD PROD IMMO - Analyse</title> + <link rel="stylesheet" href="css/bootstrap_4.3.1/bootstrap.min.css"> + <link rel="stylesheet" href="css/style_dashboard.css"> +</head> +<body> + <div class="container-fluid"> + <div class="row"> + <div class="col-sm-4 title">Les types d'opérations</div> + <div class="col-sm-8 "></div> + </div> + <div class="row mt-4"> + <div class="col-sm-4 date_maj" style="color:black"><?php echo $aCTM['nom_ctm']; ?></div> + <div class="col-sm-8 "></div> + </div> + + <?php if (!isset($sUrlMapImage)): ?> + <div class="row mt-3">Pas d'opérations dans la base de données avec les filtres sélectionnées.</div> + <?php endif; ?> + + <?php if (isset($sUrlMapImage)): ?> + <?php if ($sFiltre!=''): ?> + <div class="row mt-1"> + <div class="col-sm-1"><b>Filtre(s) :</b></div> + <div class="col-sm-11"><?php echo $sFiltre; ?></div> + </div> + <?php endif; ?> + <div class="row mt-3"> + <div class="col-sm-2"><img src="images/legende_get_2_type.png" /></div> + <div class="col-sm-10"> + <img src="<?php echo $sUrlMapImage; ?>" class="img-fluid" alt="carte" /> + </div> + </div> + + <div class="row mt-3"> + <div class="col-sm-2 border-bottom border-right line_table_2"><b>Type de financement</b></div> + <?php if (isset($aNb['PUP']) && $aNb['PUP']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table_2 text-center"><b>Projet urbain partenarial</b></div> + <?php endif; ?> + <?php if (isset($aNb['FINZAC']) && $aNb['FINZAC']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table_2 text-center"><b>Financements en ZAC</b></div> + <?php endif; ?> + <?php if (isset($aNb['TA']) && $aNb['TA']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table_2 text-center"><b>Taxe d'aménagement</b></div> + <?php endif; ?> + <?php if (isset($aNb['TAM']) && $aNb['TAM']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table_2 text-center"><b>Taxe d'aménagement majorée</b></div> + <?php endif; ?> + <?php if (isset($aNb['PEPE']) && $aNb['PEPE']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table_2 text-center"><b>Participation équipement exceptionnel</b></div> + <?php endif; ?> + <?php if (isset($aNb['AUT']) && $aNb['AUT']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table_2 text-center"><b>Autre</b></div> + <?php endif; ?> + <?php if (isset($aNb['ND']) && $aNb['ND']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table_2 text-center"><b>Non défini</b></div> + <?php endif; ?> + </div> + <div class="row"> + <div class="col-sm-2 border-bottom border-right line_table_2">Charge foncière moyenne</div> + <?php if (isset($aNb['PUP']) && $aNb['PUP']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aCF['PUP']) && $aCF['PUP']>0) echo $aCF['PUP'].' €'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['FINZAC']) && $aNb['FINZAC']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aCF['FINZAC']) && $aCF['FINZAC']>0) echo $aCF['FINZAC'].' €'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['TA']) && $aNb['TA']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aCF['TA']) && $aCF['TA']>0) echo $aCF['TA'].' €'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['TAM']) && $aNb['TAM']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aCF['TAM']) && $aCF['TAM']>0) echo $aCF['TAM'].' €'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['PEPE']) && $aNb['PEPE']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aCF['PEPE']) && $aCF['PEPE']>0) echo $aCF['PEPE'].' €'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['AUT']) && $aNb['AUT']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aCF['AUT']) && $aCF['AUT']>0) echo $aCF['AUT'].' €'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['ND']) && $aNb['ND']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aCF['ND']) && $aCF['ND']>0) echo $aCF['ND'].' €'; ?></div> + <?php endif; ?> + </div> + <div class="row"> + <div class="col-sm-2 border-bottom border-right line_table_2">Prix de vente moyen</div> + <?php if (isset($aNb['PUP']) && $aNb['PUP']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPV['PUP']) && $aPV['PUP']>0) echo $aPV['PUP'].' €'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['FINZAC']) && $aNb['FINZAC']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPV['FINZAC']) && $aPV['FINZAC']>0) echo $aPV['FINZAC'].' €'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['TA']) && $aNb['TA']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPV['TA']) && $aPV['TA']>0) echo $aPV['TA'].' €'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['TAM']) && $aNb['TAM']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPV['TAM']) && $aPV['TAM']>0) echo $aPV['TAM'].' €'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['PEPE']) && $aNb['PEPE']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPV['PEPE']) && $aPV['PEPE']>0) echo $aPV['PEPE'].' €'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['AUT']) && $aNb['AUT']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPV['AUT']) && $aPV['AUT']>0) echo $aPV['AUT'].' €'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['ND']) && $aNb['ND']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPV['ND']) && $aPV['ND']>0) echo $aPV['ND'].' €'; ?></div> + <?php endif; ?> + </div> + <div class="row"> + <div class="col-sm-2 line_table_2">CF par rapport au prix</div> + <?php if (isset($aNb['PUP']) && $aNb['PUP']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPourcCFPV['PUP']) && $aPourcCFPV['PUP']>0) echo $aPourcCFPV['PUP'].' %'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['FINZAC']) && $aNb['FINZAC']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPourcCFPV['FINZAC']) && $aPourcCFPV['FINZAC']>0) echo $aPourcCFPV['FINZAC'].' %'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['TA']) && $aNb['TA']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPourcCFPV['TA']) && $aPourcCFPV['TA']>0) echo $aPourcCFPV['TA'].' %'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['TAM']) && $aNb['TAM']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPourcCFPV['TAM']) && $aPourcCFPV['TAM']>0) echo $aPourcCFPV['TAM'].' %'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['PEPE']) && $aNb['PEPE']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPourcCFPV['PEPE']) && $aPourcCFPV['PEPE']>0) echo $aPourcCFPV['PEPE'].' %'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['AUT']) && $aNb['AUT']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPourcCFPV['AUT']) && $aPourcCFPV['AUT']>0) echo $aPourcCFPV['AUT'].' %'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['ND']) && $aNb['ND']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPourcCFPV['ND']) && $aPourcCFPV['ND']>0) echo $aPourcCFPV['ND'].' %'; ?></div> + <?php endif; ?> + </div> + <?php endif; ?> + + <div class="row mt-3"> + </div> + </div> + <!-- Icons --> + <script src="https://unpkg.com/feather-icons/dist/feather.min.js"></script> + <script> + feather.replace() + </script> + <!-- + <script type="text/javascript" src="js/dashboard_1_operation.js"></script>--> +</body> +</html> \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/get_2_type.old.php b/src/vitis/vas/doc/suivi_prod_immo/get_2_type.old.php new file mode 100644 index 0000000000000000000000000000000000000000..188fd2306bb8b10573d4f5acab049ce4200babdf --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/get_2_type.old.php @@ -0,0 +1,123 @@ +<?php +// https://geo.urbalyon.org/doc/suivi_prod_immo/get_2_type.php?id_ctm=5 +session_start(); +if (isset($_REQUEST['login'])) $_SESSION['login_bd_prod_immo']=$_REQUEST['login']; + +if(isset($_REQUEST['token']) && isset($_SESSION['token_bd_prod_immo'])){ + if($_REQUEST['token']==$_SESSION['token_bd_prod_immo']){ + + if ((isset($_REQUEST['id_ctm']) && !is_null($_REQUEST['id_ctm'])) or (isset($_REQUEST['id_commune']) && !is_null($_REQUEST['id_commune']))){ + require_once("../../rest/conf/properties.inc"); + require_once("properties_suivi_prod_immo.inc"); + $sSchema=$properties['schema_prod_immo']; + + try{ + $oConn = new PDO('pgsql:host='.$properties['server'].';port='.$properties['port'].';dbname='.$properties['db_prod_immo'], $properties['db_user_prod_immo'], $properties['db_pass_prod_immo']); + $oConn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $oConn->setAttribute(PDO::ATTR_CASE, PDO::CASE_NATURAL); + + if($oConn){ + $sFiltre=""; + // get data Opérations + if (isset($_REQUEST['id_ctm'])) $sWhereClause=" WHERE id_ctm=".$_REQUEST['id_ctm']; + if (isset($_REQUEST['id_commune'])) $sWhereClause=" WHERE operation.id_commune=".$_REQUEST['id_commune']; + $sWhereClause2=$sWhereClause; + if (isset($_REQUEST['code_procedure_amenagement']) && !is_null($_REQUEST['code_procedure_amenagement'])){ + if($sFiltre!='') $sFiltre.="<br>"; + $sFiltre.="Procédure d'aménagement : ".$_REQUEST['code_procedure_amenagement']; + if($_REQUEST['code_procedure_amenagement']=='ND') + $sWhereClause2=$sWhereClause2." AND (code_procedure_amenagement='ND' OR code_procedure_amenagement IS NULL)"; + else + $sWhereClause2=$sWhereClause2." AND code_procedure_amenagement='".$_REQUEST['code_procedure_amenagement']."'"; + } + if (isset($_REQUEST['code_financement_equ_public']) && !is_null($_REQUEST['code_financement_equ_public'])){ + if($sFiltre!='') $sFiltre.="<br>"; + $sFiltre.="Type de financement : ".$_REQUEST['code_financement_equ_public']; + if($_REQUEST['code_financement_equ_public']=='ND') + $sWhereClause2=$sWhereClause2." AND (operation_tr_financement_equ_public.code_financement_equ_public='ND' OR operation_tr_financement_equ_public.code_financement_equ_public IS NULL) "; + else + $sWhereClause2=$sWhereClause2." AND operation_tr_financement_equ_public.code_financement_equ_public='".$_REQUEST['code_financement_equ_public']."'"; + } + if (isset($_REQUEST['code_suivi']) && !is_null($_REQUEST['code_suivi'])){ + if($sFiltre!='') $sFiltre.="<br>"; + $sFiltre.="Suivi de l'opération : ".$_REQUEST['code_suivi']; + if($_REQUEST['code_suivi']=='ND') + $sWhereClause2=$sWhereClause2." AND (code_suivi='ND' OR code_suivi IS NULL) "; + else + $sWhereClause2=$sWhereClause2." AND code_suivi='".$_REQUEST['code_suivi']."'"; + } + + if (isset($_REQUEST['id_ctm'])){ + $oResult = $oConn->prepare("SELECT nom_ctm, ST_XMin(ST_Buffer(geom,150)) AS xmin, ST_YMin(ST_Buffer(geom,150)) AS ymin, ST_XMax(ST_Buffer(geom,150)) AS xmax, ST_YMax(ST_Buffer(geom,150)) AS ymax FROM ".$sSchema.".conference_territoriale_maire ".$sWhereClause); + $sNameMapImage="ctm_".$_REQUEST['id_ctm']."_porteur.png"; + } + if (isset($_REQUEST['id_commune'])){ + $oResult = $oConn->prepare("SELECT nom_commune, ST_XMin(ST_Buffer(geom,150)) AS xmin, ST_YMin(ST_Buffer(geom,150)) AS ymin, ST_XMax(ST_Buffer(geom,150)) AS xmax, ST_YMax(ST_Buffer(geom,150)) AS ymax FROM ".$sSchema.".commune WHERE id_commune=".$_REQUEST['id_commune']); + $sNameMapImage="commune_".$_REQUEST['id_commune']."_porteur.png"; + } + $oResult->execute(); + + if ($oResult->rowCount()>0){ + $aCTM = $oResult->fetchAll(); + $aCTM = $aCTM[0]; + $oResult->closeCursor(); + // get map image + $aIdOperation=array(); + // echo "SELECT id_ctm, array_to_string(array_agg(operation.id_operation), ',') AS id_operation FROM (".$sSchema.".operation INNER JOIN ".$sSchema.".operation_ctm ON operation.id_operation=operation_ctm.id_operation) INNER JOIN ".$sSchema.".operation_tr_financement_equ_public ON operation.id_operation=operation_tr_financement_equ_public.id_operation ".$sWhereClause2." GROUP BY id_ctm"; + $oResult2 = $oConn->prepare("SELECT id_ctm, array_to_string(array_agg(operation.id_operation), ',') AS id_operation FROM (".$sSchema.".operation INNER JOIN ".$sSchema.".operation_ctm ON operation.id_operation=operation_ctm.id_operation) INNER JOIN ".$sSchema.".operation_tr_financement_equ_public ON operation.id_operation=operation_tr_financement_equ_public.id_operation ".$sWhereClause2." GROUP BY id_ctm"); + $oResult2->execute(); + $aOperations = $oResult2->fetchAll(); + $oResult2->closeCursor(); + if(count($aOperations[0])>0){ + $aOperations = $aOperations[0]; + $sCommand = escapeshellcmd('python get_map_image_2_type.py '.$aCTM['xmin'].' '.$aCTM['ymin'].' '.$aCTM['xmax'].' '.$aCTM['ymax'].' '.$sNameMapImage.' '.$aOperations['id_operation']); + // echo $sCommand; + $output = shell_exec($sCommand);/**/ + $sUrlMapImage=$properties['web_server_name']."/ws_data/vm4ms/map/tmp/".$sNameMapImage; + $sSql="SELECT code_financement_equ_public, count(DISTINCT id_programme), array_to_string(array_agg(id_programme), ',') AS id_programme, round(avg(charge_fonciere_moy)) AS charge_fonciere_moy FROM (SELECT id_programme, CASE WHEN operation_tr_financement_equ_public.code_financement_equ_public='PUP' THEN operation_tr_financement_equ_public.code_financement_equ_public WHEN operation_tr_financement_equ_public.code_financement_equ_public='FINZAC' THEN operation_tr_financement_equ_public.code_financement_equ_public WHEN operation_tr_financement_equ_public.code_financement_equ_public='TA' THEN operation_tr_financement_equ_public.code_financement_equ_public WHEN operation_tr_financement_equ_public.code_financement_equ_public='TAM' THEN operation_tr_financement_equ_public.code_financement_equ_public WHEN operation_tr_financement_equ_public.code_financement_equ_public='AUT' THEN operation_tr_financement_equ_public.code_financement_equ_public WHEN operation_tr_financement_equ_public.code_financement_equ_public='PEPE' THEN operation_tr_financement_equ_public.code_financement_equ_public ELSE 'ND' END AS code_financement_equ_public, charge_fonciere_moy FROM (((".$sSchema.".operation LEFT JOIN ".$sSchema.".operation_tr_financement_equ_public ON operation.id_operation=operation_tr_financement_equ_public.id_operation) INNER JOIN ".$sSchema.".ilot ON ilot.id_operation=operation.id_operation) INNER JOIN ".$sSchema.".programme_immobilier ON programme_immobilier.id_ilot=ilot.id_ilot) INNER JOIN ".$sSchema.".operation_ctm ON operation_ctm.id_operation=operation.id_operation ".$sWhereClause2.") AS t GROUP BY code_financement_equ_public"; + // echo $sSql; + $aPourcCFPV=$aPV=$aCF=$aNb=array(); + foreach ($oConn->query($sSql) as $aRow){ + if(!is_null($aRow['count'])) $aNb[$aRow['code_financement_equ_public']]=$aRow['count']; + if(!is_null($aRow['charge_fonciere_moy'])) $aCF[$aRow['code_financement_equ_public']]=$aRow['charge_fonciere_moy']; + $oResult3 = $oConn->prepare("SELECT round((COALESCE(avg1, 0) + COALESCE(avg2, 0) + COALESCE(avg3, 0) + COALESCE(avg4)) / ( CASE WHEN avg1 IS NULL THEN 0 ELSE 1 END + CASE WHEN avg2 IS NULL THEN 0 ELSE 1 END + CASE WHEN avg3 IS NULL THEN 0 ELSE 1 END + CASE WHEN avg4 IS NULL THEN 0 ELSE 1 END)) AS pv_moy FROM (SELECT round(avg(accession_libre)) AS avg1, round(avg(accession_abordable)) AS avg2, round(avg(accesion_sociale_securise)) AS avg3, round(avg(psla)) AS avg4 FROM ".$sSchema.".logement_familliaux_accession WHERE id_programme IN (".$aRow['id_programme'].") AND id_indicateur_logement_familliaux_accession IN (8,9)) AS t"); + $oResult3->execute(); + $aPrixVenteMoy = $oResult3->fetchAll(); + if (isset($aPrixVenteMoy[0])) $aPV[$aRow['code_financement_equ_public']]=$aPrixVenteMoy[0]['pv_moy']; + $oResult3->closeCursor(); + } + if(isset($aCF['PUP']) && isset($aPV['PUP'])) $aPourcCFPV['PUP']=round(($aCF['PUP']/$aPV['PUP'])*100,1); + if(isset($aCF['FINZAC']) && isset($aPV['FINZAC'])) $aPourcCFPV['FINZAC']=round(($aCF['FINZAC']/$aPV['FINZAC'])*100,1); + if(isset($aCF['TA']) && isset($aPV['TA'])) $aPourcCFPV['TA']=round(($aCF['TA']/$aPV['TA'])*100,1); + if(isset($aCF['TAM']) && isset($aPV['TAM'])) $aPourcCFPV['TAM']=round(($aCF['TAM']/$aPV['TAM'])*100,1); + if(isset($aCF['PEPE']) && isset($aPV['PEPE'])) $aPourcCFPV['PEPE']=round(($aCF['PEPE']/$aPV['PEPE'])*100,1); + if(isset($aCF['AUT']) && isset($aPV['AUT'])) $aPourcCFPV['AUT']=round(($aCF['AUT']/$aPV['AUT'])*100,1); + if(isset($aCF['ND']) && isset($aPV['ND'])) $aPourcCFPV['ND']=round(($aCF['ND']/$aPV['ND'])*100,1); + // Moyenne pondérée au nombre d'opération total + // TODO pondérer au nombre d'opération ayant une valeur + } + include ('get_2_type.html'); + }else{ + $sError="Erreur : ".$oResult->rowCount()." conférence des maires trouvée."; + $oResult->closeCursor(); + include ('get_error.html'); + } + } + }catch (PDOException $e){ + $sError="ERROR : ".$e->getMessage(); + include ('get_error.html'); + } + + }else{ + $sError="ERREUR : Pas de CTM ou de communes passé en paramètre !"; + include ('get_error.html'); + } + }else{ + header ('location: signin.php'); + exit(); + } +}else{ + header ('location: signin.php'); + exit(); +} +?> \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/get_2_type.php b/src/vitis/vas/doc/suivi_prod_immo/get_2_type.php new file mode 100644 index 0000000000000000000000000000000000000000..258036413949ad9aff3474f75537391dae5de6cc --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/get_2_type.php @@ -0,0 +1,125 @@ +<?php +// https://geo.urbalyon.org/doc/suivi_prod_immo/get_2_type.php?id_ctm=5 +if (isset($_REQUEST['token']) && !is_null($_REQUEST['token'])){ + session_id($_REQUEST['token']); + if (session_status() == PHP_SESSION_NONE) + session_start(); + + if (empty($_SESSION)) { + $sError="ERREUR : token invalide."; + include ('get_error.html'); + }else{ + + if ((isset($_REQUEST['id_ctm']) && !is_null($_REQUEST['id_ctm'])) or (isset($_REQUEST['id_commune']) && !is_null($_REQUEST['id_commune']))){ + require_once("../../rest/conf/properties.inc"); + require_once("properties_suivi_prod_immo.inc"); + $sSchema=$properties['schema_prod_immo']; + + try{ + $oConn = new PDO('pgsql:host='.$properties['server'].';port='.$properties['port'].';dbname='.$properties['db_prod_immo'], $properties['db_user_prod_immo'], $properties['db_pass_prod_immo']); + $oConn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $oConn->setAttribute(PDO::ATTR_CASE, PDO::CASE_NATURAL); + + if($oConn){ + $sFiltre=""; + // get data Opérations + if (isset($_REQUEST['id_ctm'])) $sWhereClause=" WHERE id_ctm=".$_REQUEST['id_ctm']; + if (isset($_REQUEST['id_commune'])) $sWhereClause=" WHERE operation.id_commune=".$_REQUEST['id_commune']; + $sWhereClause2=$sWhereClause; + if (isset($_REQUEST['code_procedure_amenagement']) && !is_null($_REQUEST['code_procedure_amenagement'])){ + if($sFiltre!='') $sFiltre.="<br>"; + $sFiltre.="Procédure d'aménagement : ".$_REQUEST['code_procedure_amenagement']; + if($_REQUEST['code_procedure_amenagement']=='ND') + $sWhereClause2=$sWhereClause2." AND (code_procedure_amenagement='ND' OR code_procedure_amenagement IS NULL)"; + else + $sWhereClause2=$sWhereClause2." AND code_procedure_amenagement='".$_REQUEST['code_procedure_amenagement']."'"; + } + if (isset($_REQUEST['code_financement_equ_public']) && !is_null($_REQUEST['code_financement_equ_public'])){ + if($sFiltre!='') $sFiltre.="<br>"; + $sFiltre.="Type de financement : ".$_REQUEST['code_financement_equ_public']; + if($_REQUEST['code_financement_equ_public']=='ND') + $sWhereClause2=$sWhereClause2." AND (operation_tr_financement_equ_public.code_financement_equ_public='ND' OR operation_tr_financement_equ_public.code_financement_equ_public IS NULL) "; + else + $sWhereClause2=$sWhereClause2." AND operation_tr_financement_equ_public.code_financement_equ_public='".$_REQUEST['code_financement_equ_public']."'"; + } + if (isset($_REQUEST['code_suivi']) && !is_null($_REQUEST['code_suivi'])){ + if($sFiltre!='') $sFiltre.="<br>"; + $sFiltre.="Suivi de l'opération : ".$_REQUEST['code_suivi']; + if($_REQUEST['code_suivi']=='ND') + $sWhereClause2=$sWhereClause2." AND (code_suivi='ND' OR code_suivi IS NULL) "; + else + $sWhereClause2=$sWhereClause2." AND code_suivi='".$_REQUEST['code_suivi']."'"; + } + + if (isset($_REQUEST['id_ctm'])){ + $oResult = $oConn->prepare("SELECT nom_ctm, ST_XMin(ST_Buffer(geom,150)) AS xmin, ST_YMin(ST_Buffer(geom,150)) AS ymin, ST_XMax(ST_Buffer(geom,150)) AS xmax, ST_YMax(ST_Buffer(geom,150)) AS ymax FROM ".$sSchema.".conference_territoriale_maire ".$sWhereClause); + $sNameMapImage="ctm_".$_REQUEST['id_ctm']."_porteur.png"; + } + if (isset($_REQUEST['id_commune'])){ + $oResult = $oConn->prepare("SELECT nom_commune, ST_XMin(ST_Buffer(geom,150)) AS xmin, ST_YMin(ST_Buffer(geom,150)) AS ymin, ST_XMax(ST_Buffer(geom,150)) AS xmax, ST_YMax(ST_Buffer(geom,150)) AS ymax FROM ".$sSchema.".commune WHERE id_commune=".$_REQUEST['id_commune']); + $sNameMapImage="commune_".$_REQUEST['id_commune']."_porteur.png"; + } + $oResult->execute(); + + if ($oResult->rowCount()>0){ + $aCTM = $oResult->fetchAll(); + $aCTM = $aCTM[0]; + $oResult->closeCursor(); + // get map image + $aIdOperation=array(); + // echo "SELECT id_ctm, array_to_string(array_agg(operation.id_operation), ',') AS id_operation FROM (".$sSchema.".operation INNER JOIN ".$sSchema.".operation_ctm ON operation.id_operation=operation_ctm.id_operation) INNER JOIN ".$sSchema.".operation_tr_financement_equ_public ON operation.id_operation=operation_tr_financement_equ_public.id_operation ".$sWhereClause2." GROUP BY id_ctm"; + $oResult2 = $oConn->prepare("SELECT id_ctm, array_to_string(array_agg(operation.id_operation), ',') AS id_operation FROM (".$sSchema.".operation INNER JOIN ".$sSchema.".operation_ctm ON operation.id_operation=operation_ctm.id_operation) INNER JOIN ".$sSchema.".operation_tr_financement_equ_public ON operation.id_operation=operation_tr_financement_equ_public.id_operation ".$sWhereClause2." GROUP BY id_ctm"); + $oResult2->execute(); + $aOperations = $oResult2->fetchAll(); + $oResult2->closeCursor(); + if(count($aOperations[0])>0){ + $aOperations = $aOperations[0]; + $sCommand = escapeshellcmd('python get_map_image_2_type.py '.$aCTM['xmin'].' '.$aCTM['ymin'].' '.$aCTM['xmax'].' '.$aCTM['ymax'].' '.$sNameMapImage.' '.$aOperations['id_operation']); + // echo $sCommand; + $output = shell_exec($sCommand);/**/ + $sUrlMapImage=$properties['web_server_name']."/ws_data/vm4ms/map/tmp/".$sNameMapImage; + $sSql="SELECT code_financement_equ_public, count(DISTINCT id_programme), array_to_string(array_agg(id_programme), ',') AS id_programme, round(avg(charge_fonciere_moy::numeric)) AS charge_fonciere_moy FROM (SELECT id_programme, CASE WHEN operation_tr_financement_equ_public.code_financement_equ_public='PUP' THEN operation_tr_financement_equ_public.code_financement_equ_public WHEN operation_tr_financement_equ_public.code_financement_equ_public='FINZAC' THEN operation_tr_financement_equ_public.code_financement_equ_public WHEN operation_tr_financement_equ_public.code_financement_equ_public='TA' THEN operation_tr_financement_equ_public.code_financement_equ_public WHEN operation_tr_financement_equ_public.code_financement_equ_public='TAM' THEN operation_tr_financement_equ_public.code_financement_equ_public WHEN operation_tr_financement_equ_public.code_financement_equ_public='AUT' THEN operation_tr_financement_equ_public.code_financement_equ_public WHEN operation_tr_financement_equ_public.code_financement_equ_public='PEPE' THEN operation_tr_financement_equ_public.code_financement_equ_public ELSE 'ND' END AS code_financement_equ_public, charge_fonciere_moy FROM (((".$sSchema.".operation LEFT JOIN ".$sSchema.".operation_tr_financement_equ_public ON operation.id_operation=operation_tr_financement_equ_public.id_operation) INNER JOIN ".$sSchema.".ilot ON ilot.id_operation=operation.id_operation) INNER JOIN ".$sSchema.".programme_immobilier ON programme_immobilier.id_ilot=ilot.id_ilot) INNER JOIN ".$sSchema.".operation_ctm ON operation_ctm.id_operation=operation.id_operation ".$sWhereClause2.") AS t GROUP BY code_financement_equ_public"; + // echo $sSql; + $aPourcCFPV=$aPV=$aCF=$aNb=array(); + foreach ($oConn->query($sSql) as $aRow){ + if(!is_null($aRow['count'])) $aNb[$aRow['code_financement_equ_public']]=$aRow['count']; + if(!is_null($aRow['charge_fonciere_moy'])) $aCF[$aRow['code_financement_equ_public']]=$aRow['charge_fonciere_moy']; + $oResult3 = $oConn->prepare("SELECT round((COALESCE(avg1, 0) + COALESCE(avg2, 0) + COALESCE(avg3, 0) + COALESCE(avg4)) / ( CASE WHEN avg1 IS NULL THEN 0 ELSE 1 END + CASE WHEN avg2 IS NULL THEN 0 ELSE 1 END + CASE WHEN avg3 IS NULL THEN 0 ELSE 1 END + CASE WHEN avg4 IS NULL THEN 0 ELSE 1 END)) AS pv_moy FROM (SELECT round(avg(accession_libre::numeric)) AS avg1, round(avg(accession_abordable::numeric)) AS avg2, round(avg(accession_sociale_securise::numeric)) AS avg3, round(avg(psla::numeric)) AS avg4 FROM ".$sSchema.".logement_familliaux_accession WHERE id_programme IN (".$aRow['id_programme'].") AND id_indicateur_logement_familliaux_accession IN (8,9)) AS t"); + $oResult3->execute(); + $aPrixVenteMoy = $oResult3->fetchAll(); + if (isset($aPrixVenteMoy[0])) $aPV[$aRow['code_financement_equ_public']]=$aPrixVenteMoy[0]['pv_moy']; + $oResult3->closeCursor(); + } + if(isset($aCF['PUP']) && isset($aPV['PUP'])) $aPourcCFPV['PUP']=round(($aCF['PUP']/$aPV['PUP'])*100,1); + if(isset($aCF['FINZAC']) && isset($aPV['FINZAC'])) $aPourcCFPV['FINZAC']=round(($aCF['FINZAC']/$aPV['FINZAC'])*100,1); + if(isset($aCF['TA']) && isset($aPV['TA'])) $aPourcCFPV['TA']=round(($aCF['TA']/$aPV['TA'])*100,1); + if(isset($aCF['TAM']) && isset($aPV['TAM'])) $aPourcCFPV['TAM']=round(($aCF['TAM']/$aPV['TAM'])*100,1); + if(isset($aCF['PEPE']) && isset($aPV['PEPE'])) $aPourcCFPV['PEPE']=round(($aCF['PEPE']/$aPV['PEPE'])*100,1); + if(isset($aCF['AUT']) && isset($aPV['AUT'])) $aPourcCFPV['AUT']=round(($aCF['AUT']/$aPV['AUT'])*100,1); + if(isset($aCF['ND']) && isset($aPV['ND'])) $aPourcCFPV['ND']=round(($aCF['ND']/$aPV['ND'])*100,1); + // Moyenne pondérée au nombre d'opération total + // TODO pondérer au nombre d'opération ayant une valeur + } + include ('get_2_type.html'); + }else{ + $sError="Erreur : ".$oResult->rowCount()." conférence des maires trouvée."; + $oResult->closeCursor(); + include ('get_error.html'); + } + } + }catch (PDOException $e){ + $sError="ERROR : ".$e->getMessage(); + include ('get_error.html'); + } + + }else{ + $sError="ERREUR : Pas de CTM ou de communes passé en paramètre !"; + include ('get_error.html'); + } + } + +}else{ + $sError="ERREUR : Pas de token passé."; + include ('get_error.html'); +} +?> \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/get_3_porteur.html b/src/vitis/vas/doc/suivi_prod_immo/get_3_porteur.html new file mode 100644 index 0000000000000000000000000000000000000000..a5369873a24bfb5d1f6e252a931afb45df755256 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/get_3_porteur.html @@ -0,0 +1,165 @@ +<!doctype html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <title>BD PROD IMMO - Analyse</title> + <link rel="stylesheet" href="css/bootstrap_4.3.1/bootstrap.min.css"> + <link rel="stylesheet" href="css/style_dashboard.css"> +</head> +<body> + <div class="container-fluid"> + <div class="row"> + <div class="col-sm-4 title">Les porteurs de programmes immobiliers *</div> + <div class="col-sm-8 "></div> + </div> + <div class="row mt-4"> + <div class="col-sm-4 date_maj" style="color:black"><?php echo $sTitle; ?> : <b><?php echo $_REQUEST['concessionnaire_amenagement']; ?></b></div> + <div class="col-sm-8 "></div> + </div> + <div class="row"><div class="col-sm-12 ">nombre d'opération : <?php echo $iNbOperation; ?></div></div> + + <div class="row mt-3"> + <div class="col-sm-2"><img src="images/legende_get_3_porteur.png" /></div> + <div class="col-sm-10"><img src="<?php echo $sUrlMapImage; ?>" class="img-fluid" alt="carte" /></div> + </div> + + <div class="row mt-3"> + <div class="col-sm-2 border-bottom border-right line_table_2"><b>Type de financement</b></div> + <?php if (isset($aNb['PUP']) && $aNb['PUP']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table_2 text-center"><b>Projet urbain partenarial</b></div> + <?php endif; ?> + <?php if (isset($aNb['FINZAC']) && $aNb['FINZAC']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table_2 text-center"><b>Financements en ZAC</b></div> + <?php endif; ?> + <?php if (isset($aNb['TA']) && $aNb['TA']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table_2 text-center"><b>Taxe d'aménagement</b></div> + <?php endif; ?> + <?php if (isset($aNb['TAM']) && $aNb['TAM']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table_2 text-center"><b>Taxe d'aménagement majorée</b></div> + <?php endif; ?> + <?php if (isset($aNb['PEPE']) && $aNb['PEPE']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table_2 text-center"><b>Participation équipement exceptionnel</b></div> + <?php endif; ?> + <?php if (isset($aNb['AUT']) && $aNb['AUT']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table_2 text-center"><b>Autre</b></div> + <?php endif; ?> + <?php if (isset($aNb['ND']) && $aNb['ND']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table_2 text-center"><b>Non défini</b></div> + <?php endif; ?> + <div class="col-sm-1 border-bottom border-right line_table_2 text-center"><b>Total / Moyenne</b></div> + </div> + <div class="row"> + <div class="col-sm-2 border-bottom border-right line_table_2">Nombre de programmes</div> + <?php if (isset($aNb['PUP']) && $aNb['PUP']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php echo $aNb['PUP']; ?></div> + <?php endif; ?> + <?php if (isset($aNb['FINZAC']) && $aNb['FINZAC']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php echo $aNb['FINZAC']; ?></div> + <?php endif; ?> + <?php if (isset($aNb['TA']) && $aNb['TA']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php echo $aNb['TA']; ?></div> + <?php endif; ?> + <?php if (isset($aNb['TAM']) && $aNb['TAM']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php echo $aNb['TAM']; ?></div> + <?php endif; ?> + <?php if (isset($aNb['PEPE']) && $aNb['PEPE']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php echo $aNb['PEPE']; ?></div> + <?php endif; ?> + <?php if (isset($aNb['AUT']) && $aNb['AUT']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php echo $aNb['AUT']; ?></div> + <?php endif; ?> + <?php if (isset($aNb['ND']) && $aNb['ND']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php echo $aNb['ND']; ?></div> + <?php endif; ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aNb['TOTAL']) && $aNb['TOTAL']>0) echo $aNb['TOTAL']; ?></div> + </div> + <div class="row"> + <div class="col-sm-2 border-bottom border-right line_table_2">Charge foncière moyenne</div> + <?php if (isset($aNb['PUP']) && $aNb['PUP']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aCF['PUP']) && $aCF['PUP']>0) echo $aCF['PUP'].' €'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['FINZAC']) && $aNb['FINZAC']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aCF['FINZAC']) && $aCF['FINZAC']>0) echo $aCF['FINZAC'].' €'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['TA']) && $aNb['TA']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aCF['TA']) && $aCF['TA']>0) echo $aCF['TA'].' €'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['TAM']) && $aNb['TAM']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aCF['TAM']) && $aCF['TAM']>0) echo $aCF['TAM'].' €'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['PEPE']) && $aNb['PEPE']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aCF['PEPE']) && $aCF['PEPE']>0) echo $aCF['PEPE'].' €'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['AUT']) && $aNb['AUT']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aCF['AUT']) && $aCF['AUT']>0) echo $aCF['AUT'].' €'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['ND']) && $aNb['ND']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aCF['ND']) && $aCF['ND']>0) echo $aCF['ND'].' €'; ?></div> + <?php endif; ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aCF['MOY']) && $aCF['MOY']>0) echo $aCF['MOY'].' €'; ?></div> + </div> + <div class="row"> + <div class="col-sm-2 border-bottom border-right line_table_2">Prix de vente moyen</div> + <?php if (isset($aNb['PUP']) && $aNb['PUP']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPV['PUP']) && $aPV['PUP']>0) echo $aPV['PUP'].' €'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['FINZAC']) && $aNb['FINZAC']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPV['FINZAC']) && $aPV['FINZAC']>0) echo $aPV['FINZAC'].' €'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['TA']) && $aNb['TA']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPV['TA']) && $aPV['TA']>0) echo $aPV['TA'].' €'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['TAM']) && $aNb['TAM']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPV['TAM']) && $aPV['TAM']>0) echo $aPV['TAM'].' €'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['PEPE']) && $aNb['PEPE']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPV['PEPE']) && $aPV['PEPE']>0) echo $aPV['PEPE'].' €'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['AUT']) && $aNb['AUT']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPV['AUT']) && $aPV['AUT']>0) echo $aPV['AUT'].' €'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['ND']) && $aNb['ND']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPV['ND']) && $aPV['ND']>0) echo $aPV['ND'].' €'; ?></div> + <?php endif; ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPV['MOY']) && $aPV['MOY']>0) echo $aPV['MOY'].' €'; ?></div> + </div> + <div class="row"> + <div class="col-sm-2 border-right line_table_2">CF par rapport au prix</div> + <?php if (isset($aNb['PUP']) && $aNb['PUP']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPourcCFPV['PUP']) && $aPourcCFPV['PUP']>0) echo $aPourcCFPV['PUP'].' %'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['FINZAC']) && $aNb['FINZAC']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPourcCFPV['FINZAC']) && $aPourcCFPV['FINZAC']>0) echo $aPourcCFPV['FINZAC'].' %'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['TA']) && $aNb['TA']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPourcCFPV['TA']) && $aPourcCFPV['TA']>0) echo $aPourcCFPV['TA'].' %'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['TAM']) && $aNb['TAM']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPourcCFPV['TAM']) && $aPourcCFPV['TAM']>0) echo $aPourcCFPV['TAM'].' %'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['PEPE']) && $aNb['PEPE']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPourcCFPV['PEPE']) && $aPourcCFPV['PEPE']>0) echo $aPourcCFPV['PEPE'].' %'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['AUT']) && $aNb['AUT']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPourcCFPV['AUT']) && $aPourcCFPV['AUT']>0) echo $aPourcCFPV['AUT'].' %'; ?></div> + <?php endif; ?> + <?php if (isset($aNb['ND']) && $aNb['ND']>0): ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPourcCFPV['ND']) && $aPourcCFPV['ND']>0) echo $aPourcCFPV['ND'].' %'; ?></div> + <?php endif; ?> + <div class="col-sm-1 border-bottom border-right line_table text-center"><?php if (isset($aPourcCFPV['MOY']) && $aPourcCFPV['MOY']>0) echo $aPourcCFPV['MOY'].' %'; ?></div> + </div> + <div class="row"><div class="col-sm-12 ">* au niveau des programmes : promoteur/ bailleur</div></div> + + <div class="row mt-3"> + </div> + </div> + <!-- Icons --> + <script src="https://unpkg.com/feather-icons/dist/feather.min.js"></script> + <script> + feather.replace() + </script> + <!-- + <script type="text/javascript" src="js/dashboard_1_operation.js"></script>--> +</body> +</html> \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/get_3_porteur.old.php b/src/vitis/vas/doc/suivi_prod_immo/get_3_porteur.old.php new file mode 100644 index 0000000000000000000000000000000000000000..eaa4aa375b480f6b96b1cf371baa5796c6cf454b --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/get_3_porteur.old.php @@ -0,0 +1,109 @@ +<?php +// https://geo.urbalyon.org/doc/suivi_prod_immo/get_1_operation.php?id_operation=1041 +session_start(); +if (isset($_REQUEST['login'])) $_SESSION['login_bd_prod_immo']=$_REQUEST['login']; + +if(isset($_REQUEST['token']) && isset($_SESSION['token_bd_prod_immo'])){ + if($_REQUEST['token']==$_SESSION['token_bd_prod_immo']){ + + if (isset($_REQUEST['nom_amenageur']) && !is_null($_REQUEST['nom_amenageur'])){ + require_once("../../rest/conf/properties.inc"); + require_once("properties_suivi_prod_immo.inc"); + $sSchema=$properties['schema_prod_immo']; + + try{ + $oConn = new PDO('pgsql:host='.$properties['server'].';port='.$properties['port'].';dbname='.$properties['db_prod_immo'], $properties['db_user_prod_immo'], $properties['db_pass_prod_immo']); + $oConn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $oConn->setAttribute(PDO::ATTR_CASE, PDO::CASE_NATURAL); + + if($oConn){ + // get data Opérations + $sWhereAmenageur=" WHERE nom_amenageur='".$_REQUEST['nom_amenageur']."'"; + $oResult = $oConn->prepare("SELECT * FROM ".$sSchema.".v_operation_layer".$sWhereAmenageur); + $oResult->execute(); + + if ($oResult->rowCount()>0){ + $iNbOperation=$oResult->rowCount(); + $aOperations = $oResult->fetchAll(); + $oResult->closeCursor(); + // get map image + $aIdOperation=array(); + foreach ($aOperations as $aOperation) + array_push($aIdOperation, $aOperation["id_operation"]); + $sNameMapImage=strtolower(preg_replace("#[^a-zA-Z]#", "", str_replace(' ', '_', $_REQUEST['nom_amenageur'])))."_porteur.png"; + $oResult2 = $oConn->prepare("SELECT round(st_xmin(st_buffer(st_envelope(st_union(geom)),150))) AS xmin, round(st_ymin(st_buffer(st_envelope(st_union(geom)),150))) AS ymin, round(st_ymax(st_buffer(st_envelope(st_union(geom)),150))) AS ymax, round(st_xmax(st_buffer(st_envelope(st_union(geom)),150))) AS xmax FROM ".$sSchema.".operation".$sWhereAmenageur); + $oResult2->execute(); + $aOperations2 = $oResult2->fetchAll(); + $oResult2->closeCursor(); + $aOperations2 = $aOperations2[0]; + $sCommand = escapeshellcmd('python get_map_image_3_porteur.py '.$aOperations2['xmin'].' '.$aOperations2['ymin'].' '.$aOperations2['xmax'].' '.$aOperations2['ymax'].' '.$sNameMapImage.' '.implode(",", $aIdOperation)); + // echo $sCommand; + $output = shell_exec($sCommand);/**/ + $sUrlMapImage=$properties['web_server_name']."/ws_data/vm4ms/map/tmp/".$sNameMapImage; + + $sSql="SELECT code_financement_equ_public, count(DISTINCT id_programme), array_to_string(array_agg(id_programme), ',') AS id_programme, round(avg(charge_fonciere_moy)) AS charge_fonciere_moy FROM (SELECT id_programme, CASE WHEN operation_tr_financement_equ_public.code_financement_equ_public='PUP' THEN operation_tr_financement_equ_public.code_financement_equ_public WHEN operation_tr_financement_equ_public.code_financement_equ_public='FINZAC' THEN operation_tr_financement_equ_public.code_financement_equ_public WHEN operation_tr_financement_equ_public.code_financement_equ_public='TA' THEN operation_tr_financement_equ_public.code_financement_equ_public WHEN operation_tr_financement_equ_public.code_financement_equ_public='TAM' THEN operation_tr_financement_equ_public.code_financement_equ_public WHEN operation_tr_financement_equ_public.code_financement_equ_public='AUT' THEN operation_tr_financement_equ_public.code_financement_equ_public WHEN operation_tr_financement_equ_public.code_financement_equ_public='PEPE' THEN operation_tr_financement_equ_public.code_financement_equ_public ELSE 'ND' END AS code_financement_equ_public, charge_fonciere_moy FROM ((".$sSchema.".operation LEFT JOIN ".$sSchema.".operation_tr_financement_equ_public ON operation.id_operation=operation_tr_financement_equ_public.id_operation) INNER JOIN ".$sSchema.".ilot ON ilot.id_operation=operation.id_operation) INNER JOIN ".$sSchema.".programme_immobilier ON programme_immobilier.id_ilot=ilot.id_ilot ".$sWhereAmenageur.") AS t GROUP BY code_financement_equ_public"; + $aPourcCFPV=$aPV=$aCF=$aNb=array(); + foreach ($oConn->query($sSql) as $aRow){ + if(!is_null($aRow['count'])) $aNb[$aRow['code_financement_equ_public']]=$aRow['count']; + if(!is_null($aRow['charge_fonciere_moy'])) $aCF[$aRow['code_financement_equ_public']]=$aRow['charge_fonciere_moy']; + $oResult3 = $oConn->prepare("SELECT round((COALESCE(avg1, 0) + COALESCE(avg2, 0) + COALESCE(avg3, 0) + COALESCE(avg4)) / ( CASE WHEN avg1 IS NULL THEN 0 ELSE 1 END + CASE WHEN avg2 IS NULL THEN 0 ELSE 1 END + CASE WHEN avg3 IS NULL THEN 0 ELSE 1 END + CASE WHEN avg4 IS NULL THEN 0 ELSE 1 END)) AS pv_moy FROM (SELECT round(avg(accession_libre)) AS avg1, round(avg(accession_abordable)) AS avg2, round(avg(accesion_sociale_securise)) AS avg3, round(avg(psla)) AS avg4 FROM ".$sSchema.".logement_familliaux_accession WHERE id_programme IN (".$aRow['id_programme'].") AND id_indicateur_logement_familliaux_accession IN (8,9)) AS t"); + $oResult3->execute(); + $aPrixVenteMoy = $oResult3->fetchAll(); + if (isset($aPrixVenteMoy[0])) $aPV[$aRow['code_financement_equ_public']]=$aPrixVenteMoy[0]['pv_moy']; + $oResult3->closeCursor(); + } + if(isset($aCF['PUP']) && isset($aPV['PUP'])) $aPourcCFPV['PUP']=round(($aCF['PUP']/$aPV['PUP'])*100,1); + if(isset($aCF['FINZAC']) && isset($aPV['FINZAC'])) $aPourcCFPV['FINZAC']=round(($aCF['FINZAC']/$aPV['FINZAC'])*100,1); + if(isset($aCF['TA']) && isset($aPV['TA'])) $aPourcCFPV['TA']=round(($aCF['TA']/$aPV['TA'])*100,1); + if(isset($aCF['TAM']) && isset($aPV['TAM'])) $aPourcCFPV['TAM']=round(($aCF['TAM']/$aPV['TAM'])*100,1); + if(isset($aCF['PEPE']) && isset($aPV['PEPE'])) $aPourcCFPV['PEPE']=round(($aCF['PEPE']/$aPV['PEPE'])*100,1); + if(isset($aCF['AUT']) && isset($aPV['AUT'])) $aPourcCFPV['AUT']=round(($aCF['AUT']/$aPV['AUT'])*100,1); + if(isset($aCF['ND']) && isset($aPV['ND'])) $aPourcCFPV['ND']=round(($aCF['ND']/$aPV['ND'])*100,1); + $aNb['TOTAL']=array_sum($aNb); + // Moyenne pondérée au nombre d'opération total + // TODO pondérer au nombre d'opération ayant une valeur + $iCFTotal=$iPVTotal=$iCFPVTotal=0; + foreach ($aNb as $sFinancement=>$iNB){ + $iCFTotal=$iCFTotal+($aCF[$sFinancement]*$iNB); + $iPVTotal=$iPVTotal+($aPV[$sFinancement]*$iNB); + $iCFPVTotal=$iCFPVTotal+($aPourcCFPV[$sFinancement]*$iNB); + } + $aCF['MOY']=round($iCFTotal/$aNb['TOTAL']); + $aPV['MOY']=round($iPVTotal/$aNb['TOTAL']); + $aPourcCFPV['MOY']=round($iCFPVTotal/$aNb['TOTAL'],1); + // label title + $sTitle="Opérateur immobilier"; + $aPromoteurs=array("Cogedim", "Vinci Immobilier"); + $aAmenageurs=array("SERL", "LMH"); + $aRegies=array("Métropole de Lyon"); + if (in_array($_REQUEST['nom_amenageur'], $aPromoteurs)) $sTitle="Promoteur immobilier"; + if (in_array($_REQUEST['nom_amenageur'], $aAmenageurs)) $sTitle="Aménageur"; + if (in_array($_REQUEST['nom_amenageur'], $aRegies)) $sTitle="Opération(s) suivi en régie"; + + + + include ('get_3_porteur.html'); + }else{ + $sError="Erreur : ".$oResult->rowCount()." opération(s) trouvée(s) pour l'aménageur ".$_REQUEST['nom_amenageur']."."; + $oResult->closeCursor(); + include ('get_error.html'); + } + } + }catch (PDOException $e){ + $sError="ERROR : ".$e->getMessage(); + include ('get_error.html'); + } + + }else{ + $sError="ERREUR : Pas de nom d'aménageur passé en paramètre !"; + include ('get_error.html'); + } + }else{ + header ('location: signin.php'); + exit(); + } +}else{ + header ('location: signin.php'); + exit(); +} +?> \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/get_3_porteur.php b/src/vitis/vas/doc/suivi_prod_immo/get_3_porteur.php new file mode 100644 index 0000000000000000000000000000000000000000..b2d7db463b93500bc8afb2e217d879c2d8d30b41 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/get_3_porteur.php @@ -0,0 +1,111 @@ +<?php +// https://geo.urbalyon.org/doc/suivi_prod_immo/get_3_porteur.php?concessionnaire_amenagement=1041 +if (isset($_REQUEST['token']) && !is_null($_REQUEST['token'])){ + session_id($_REQUEST['token']); + if (session_status() == PHP_SESSION_NONE) + session_start(); + + if (empty($_SESSION)) { + $sError="ERREUR : token invalide."; + include ('get_error.html'); + }else{ + + if (isset($_REQUEST['concessionnaire_amenagement']) && !is_null($_REQUEST['concessionnaire_amenagement'])){ + require_once("../../rest/conf/properties.inc"); + require_once("properties_suivi_prod_immo.inc"); + $sSchema=$properties['schema_prod_immo']; + + try{ + $oConn = new PDO('pgsql:host='.$properties['server'].';port='.$properties['port'].';dbname='.$properties['db_prod_immo'], $properties['db_user_prod_immo'], $properties['db_pass_prod_immo']); + $oConn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $oConn->setAttribute(PDO::ATTR_CASE, PDO::CASE_NATURAL); + + if($oConn){ + // get data Opérations + $sWhereAmenageur=" WHERE concessionnaire_amenagement='".$_REQUEST['concessionnaire_amenagement']."'"; + $oResult = $oConn->prepare("SELECT * FROM ".$sSchema.".v_operation_layer".$sWhereAmenageur); + $oResult->execute(); + + if ($oResult->rowCount()>0){ + $iNbOperation=$oResult->rowCount(); + $aOperations = $oResult->fetchAll(); + $oResult->closeCursor(); + // get map image + $aIdOperation=array(); + foreach ($aOperations as $aOperation) + array_push($aIdOperation, $aOperation["id_operation"]); + $sNameMapImage=strtolower(preg_replace("#[^a-zA-Z]#", "", str_replace(' ', '_', $_REQUEST['concessionnaire_amenagement'])))."_porteur.png"; + $oResult2 = $oConn->prepare("SELECT round(st_xmin(st_buffer(st_envelope(st_union(geom)),150))) AS xmin, round(st_ymin(st_buffer(st_envelope(st_union(geom)),150))) AS ymin, round(st_ymax(st_buffer(st_envelope(st_union(geom)),150))) AS ymax, round(st_xmax(st_buffer(st_envelope(st_union(geom)),150))) AS xmax FROM ".$sSchema.".operation".$sWhereAmenageur); + $oResult2->execute(); + $aOperations2 = $oResult2->fetchAll(); + $oResult2->closeCursor(); + $aOperations2 = $aOperations2[0]; + $sCommand = escapeshellcmd('python get_map_image_3_porteur.py '.$aOperations2['xmin'].' '.$aOperations2['ymin'].' '.$aOperations2['xmax'].' '.$aOperations2['ymax'].' '.$sNameMapImage.' '.implode(",", $aIdOperation)); + // echo $sCommand; + $output = shell_exec($sCommand);/**/ + $sUrlMapImage=$properties['web_server_name']."/ws_data/vm4ms/map/tmp/".$sNameMapImage; + + $sSql="SELECT code_financement_equ_public, count(DISTINCT id_programme), array_to_string(array_agg(id_programme), ',') AS id_programme, round(avg(charge_fonciere_moy)) AS charge_fonciere_moy FROM (SELECT id_programme, CASE WHEN operation_tr_financement_equ_public.code_financement_equ_public='PUP' THEN operation_tr_financement_equ_public.code_financement_equ_public WHEN operation_tr_financement_equ_public.code_financement_equ_public='FINZAC' THEN operation_tr_financement_equ_public.code_financement_equ_public WHEN operation_tr_financement_equ_public.code_financement_equ_public='TA' THEN operation_tr_financement_equ_public.code_financement_equ_public WHEN operation_tr_financement_equ_public.code_financement_equ_public='TAM' THEN operation_tr_financement_equ_public.code_financement_equ_public WHEN operation_tr_financement_equ_public.code_financement_equ_public='AUT' THEN operation_tr_financement_equ_public.code_financement_equ_public WHEN operation_tr_financement_equ_public.code_financement_equ_public='PEPE' THEN operation_tr_financement_equ_public.code_financement_equ_public ELSE 'ND' END AS code_financement_equ_public, charge_fonciere_moy FROM ((".$sSchema.".operation LEFT JOIN ".$sSchema.".operation_tr_financement_equ_public ON operation.id_operation=operation_tr_financement_equ_public.id_operation) INNER JOIN ".$sSchema.".ilot ON ilot.id_operation=operation.id_operation) INNER JOIN ".$sSchema.".programme_immobilier ON programme_immobilier.id_ilot=ilot.id_ilot ".$sWhereAmenageur.") AS t GROUP BY code_financement_equ_public"; + $aPourcCFPV=$aPV=$aCF=$aNb=array(); + foreach ($oConn->query($sSql) as $aRow){ + if(!is_null($aRow['count'])) $aNb[$aRow['code_financement_equ_public']]=$aRow['count']; + if(!is_null($aRow['charge_fonciere_moy'])) $aCF[$aRow['code_financement_equ_public']]=$aRow['charge_fonciere_moy']; + $oResult3 = $oConn->prepare("SELECT round((COALESCE(avg1, 0) + COALESCE(avg2, 0) + COALESCE(avg3, 0) + COALESCE(avg4)) / ( CASE WHEN avg1 IS NULL THEN 0 ELSE 1 END + CASE WHEN avg2 IS NULL THEN 0 ELSE 1 END + CASE WHEN avg3 IS NULL THEN 0 ELSE 1 END + CASE WHEN avg4 IS NULL THEN 0 ELSE 1 END)) AS pv_moy FROM (SELECT round(avg(accession_libre::numeric)) AS avg1, round(avg(accession_abordable::numeric)) AS avg2, round(avg(accession_sociale_securise::numeric)) AS avg3, round(avg(psla::numeric)) AS avg4 FROM ".$sSchema.".logement_familliaux_accession WHERE id_programme IN (".$aRow['id_programme'].") AND id_indicateur_logement_familliaux_accession IN (8,9)) AS t"); + $oResult3->execute(); + $aPrixVenteMoy = $oResult3->fetchAll(); + if (isset($aPrixVenteMoy[0])) $aPV[$aRow['code_financement_equ_public']]=$aPrixVenteMoy[0]['pv_moy']; + $oResult3->closeCursor(); + } + if(isset($aCF['PUP']) && isset($aPV['PUP'])) $aPourcCFPV['PUP']=round(($aCF['PUP']/$aPV['PUP'])*100,1); + if(isset($aCF['FINZAC']) && isset($aPV['FINZAC'])) $aPourcCFPV['FINZAC']=round(($aCF['FINZAC']/$aPV['FINZAC'])*100,1); + if(isset($aCF['TA']) && isset($aPV['TA'])) $aPourcCFPV['TA']=round(($aCF['TA']/$aPV['TA'])*100,1); + if(isset($aCF['TAM']) && isset($aPV['TAM'])) $aPourcCFPV['TAM']=round(($aCF['TAM']/$aPV['TAM'])*100,1); + if(isset($aCF['PEPE']) && isset($aPV['PEPE'])) $aPourcCFPV['PEPE']=round(($aCF['PEPE']/$aPV['PEPE'])*100,1); + if(isset($aCF['AUT']) && isset($aPV['AUT'])) $aPourcCFPV['AUT']=round(($aCF['AUT']/$aPV['AUT'])*100,1); + if(isset($aCF['ND']) && isset($aPV['ND'])) $aPourcCFPV['ND']=round(($aCF['ND']/$aPV['ND'])*100,1); + $aNb['TOTAL']=array_sum($aNb); + // Moyenne pondérée au nombre d'opération total + // TODO pondérer au nombre d'opération ayant une valeur + $iCFTotal=$iPVTotal=$iCFPVTotal=0; + foreach ($aNb as $sFinancement=>$iNB){ + $iCFTotal=$iCFTotal+($aCF[$sFinancement]*$iNB); + $iPVTotal=$iPVTotal+($aPV[$sFinancement]*$iNB); + $iCFPVTotal=$iCFPVTotal+($aPourcCFPV[$sFinancement]*$iNB); + } + $aCF['MOY']=round($iCFTotal/$aNb['TOTAL']); + $aPV['MOY']=round($iPVTotal/$aNb['TOTAL']); + $aPourcCFPV['MOY']=round($iCFPVTotal/$aNb['TOTAL'],1); + // label title + $sTitle="Opérateur immobilier"; + $aPromoteurs=array("Cogedim", "Vinci Immobilier"); + $aAmenageurs=array("SERL", "LMH"); + $aRegies=array("Métropole de Lyon"); + if (in_array($_REQUEST['concessionnaire_amenagement'], $aPromoteurs)) $sTitle="Promoteur immobilier"; + if (in_array($_REQUEST['concessionnaire_amenagement'], $aAmenageurs)) $sTitle="Aménageur"; + if (in_array($_REQUEST['concessionnaire_amenagement'], $aRegies)) $sTitle="Opération(s) suivi en régie"; + + + + include ('get_3_porteur.html'); + }else{ + $sError="Erreur : ".$oResult->rowCount()." opération(s) trouvée(s) pour l'aménageur ".$_REQUEST['concessionnaire_amenagement']."."; + $oResult->closeCursor(); + include ('get_error.html'); + } + } + }catch (PDOException $e){ + $sError="ERROR : ".$e->getMessage(); + include ('get_error.html'); + } + + }else{ + $sError="ERREUR : Pas de nom d'aménageur passé en paramètre !"; + include ('get_error.html'); + } + } + +}else{ + $sError="ERREUR : Pas de token passé."; + include ('get_error.html'); +} +?> \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/get_3_porteur_excel.php b/src/vitis/vas/doc/suivi_prod_immo/get_3_porteur_excel.php new file mode 100644 index 0000000000000000000000000000000000000000..493b862f929fb4dc1382d26cdaef9f355c7c30b8 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/get_3_porteur_excel.php @@ -0,0 +1,129 @@ +<?php +// https://geo.urbalyon.org/doc/suivi_prod_immo/get_1_operation.php?id_operation=1041 +session_start(); +if (isset($_REQUEST['login'])) $_SESSION['login_bd_prod_immo']=$_REQUEST['login']; + +if(isset($_REQUEST['token']) && isset($_SESSION['token_bd_prod_immo'])){ + if($_REQUEST['token']==$_SESSION['token_bd_prod_immo']){ + + if (isset($_REQUEST['concessionnaire_amenagement']) && !is_null($_REQUEST['concessionnaire_amenagement'])){ + require_once("../../rest/conf/properties.inc"); + require_once("properties_suivi_prod_immo.inc"); + $sSchema=$properties['schema_prod_immo']; + + try{ + $oConn = new PDO('pgsql:host='.$properties['server'].';port='.$properties['port'].';dbname='.$properties['db_prod_immo'], $properties['db_user_prod_immo'], $properties['db_pass_prod_immo']); + $oConn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $oConn->setAttribute(PDO::ATTR_CASE, PDO::CASE_NATURAL); + + if($oConn){ + // get data Opérations + $sWhereAmenageur=" WHERE concessionnaire_amenagement='".$_REQUEST['concessionnaire_amenagement']."'"; + $oResult = $oConn->prepare("SELECT * FROM ".$sSchema.".v_operation_layer".$sWhereAmenageur); + $oResult->execute(); + + if ($oResult->rowCount()>0){ + $iNbOperation=$oResult->rowCount(); + $aOperations = $oResult->fetchAll(); + $oResult->closeCursor(); + // get map image + $aIdOperation=array(); + foreach ($aOperations as $aOperation) + array_push($aIdOperation, $aOperation["id_operation"]); + $sNameMapImage=strtolower(preg_replace("#[^a-zA-Z]#", "", str_replace(' ', '_', $_REQUEST['concessionnaire_amenagement'])))."_porteur.png"; + $oResult2 = $oConn->prepare("SELECT round(st_xmin(st_buffer(st_envelope(st_union(geom)),150))) AS xmin, round(st_ymin(st_buffer(st_envelope(st_union(geom)),150))) AS ymin, round(st_ymax(st_buffer(st_envelope(st_union(geom)),150))) AS ymax, round(st_xmax(st_buffer(st_envelope(st_union(geom)),150))) AS xmax FROM ".$sSchema.".operation".$sWhereAmenageur); + $oResult2->execute(); + $aOperations2 = $oResult2->fetchAll(); + $oResult2->closeCursor(); + $aOperations2 = $aOperations2[0]; + + $sSql="SELECT code_financement_equ_public, count(DISTINCT id_programme), array_to_string(array_agg(id_programme), ',') AS id_programme, round(avg(charge_fonciere_moy)) AS charge_fonciere_moy FROM (SELECT id_programme, CASE WHEN operation_tr_financement_equ_public.code_financement_equ_public='PUP' THEN operation_tr_financement_equ_public.code_financement_equ_public WHEN operation_tr_financement_equ_public.code_financement_equ_public='FINZAC' THEN operation_tr_financement_equ_public.code_financement_equ_public WHEN operation_tr_financement_equ_public.code_financement_equ_public='TA' THEN operation_tr_financement_equ_public.code_financement_equ_public WHEN operation_tr_financement_equ_public.code_financement_equ_public='TAM' THEN operation_tr_financement_equ_public.code_financement_equ_public WHEN operation_tr_financement_equ_public.code_financement_equ_public='AUT' THEN operation_tr_financement_equ_public.code_financement_equ_public WHEN operation_tr_financement_equ_public.code_financement_equ_public='PEPE' THEN operation_tr_financement_equ_public.code_financement_equ_public ELSE 'ND' END AS code_financement_equ_public, charge_fonciere_moy FROM ((".$sSchema.".operation LEFT JOIN ".$sSchema.".operation_tr_financement_equ_public ON operation.id_operation=operation_tr_financement_equ_public.id_operation) INNER JOIN ".$sSchema.".ilot ON ilot.id_operation=operation.id_operation) INNER JOIN ".$sSchema.".programme_immobilier ON programme_immobilier.id_ilot=ilot.id_ilot ".$sWhereAmenageur.") AS t GROUP BY code_financement_equ_public"; + $aPourcCFPV=$aPV=$aCF=$aNb=array(); + foreach ($oConn->query($sSql) as $aRow){ + if(!is_null($aRow['count'])) $aNb[$aRow['code_financement_equ_public']]=intval($aRow['count']); + if(!is_null($aRow['charge_fonciere_moy'])) $aCF[$aRow['code_financement_equ_public']]=intval($aRow['charge_fonciere_moy']); + $oResult3 = $oConn->prepare("SELECT round((COALESCE(avg1, 0) + COALESCE(avg2, 0) + COALESCE(avg3, 0) + COALESCE(avg4)) / ( CASE WHEN avg1 IS NULL THEN 0 ELSE 1 END + CASE WHEN avg2 IS NULL THEN 0 ELSE 1 END + CASE WHEN avg3 IS NULL THEN 0 ELSE 1 END + CASE WHEN avg4 IS NULL THEN 0 ELSE 1 END)) AS pv_moy FROM (SELECT round(avg(accession_libre)) AS avg1, round(avg(accession_abordable)) AS avg2, round(avg(accesion_sociale_securise)) AS avg3, round(avg(psla)) AS avg4 FROM ".$sSchema.".logement_familliaux_accession WHERE id_programme IN (".$aRow['id_programme'].") AND id_indicateur_logement_familliaux_accession IN (8,9)) AS t"); + $oResult3->execute(); + $aPrixVenteMoy = $oResult3->fetchAll(); + if (isset($aPrixVenteMoy[0]) && $aPrixVenteMoy[0]['pv_moy']>0) $aPV[$aRow['code_financement_equ_public']]=intval($aPrixVenteMoy[0]['pv_moy']); + $oResult3->closeCursor(); + } + if(isset($aCF['PUP']) && isset($aPV['PUP'])) $aPourcCFPV['PUP']=round(($aCF['PUP']/$aPV['PUP']),3); + if(isset($aCF['FINZAC']) && isset($aPV['FINZAC'])) $aPourcCFPV['FINZAC']=round(($aCF['FINZAC']/$aPV['FINZAC']),3); + if(isset($aCF['TA']) && isset($aPV['TA'])) $aPourcCFPV['TA']=round(($aCF['TA']/$aPV['TA']),3); + if(isset($aCF['TAM']) && isset($aPV['TAM'])) $aPourcCFPV['TAM']=round(($aCF['TAM']/$aPV['TAM']),3); + if(isset($aCF['PEPE']) && isset($aPV['PEPE'])) $aPourcCFPV['PEPE']=round(($aCF['PEPE']/$aPV['PEPE']),3); + if(isset($aCF['AUT']) && isset($aPV['AUT'])) $aPourcCFPV['AUT']=round(($aCF['AUT']/$aPV['AUT']),3); + if(isset($aCF['ND']) && isset($aPV['ND'])) $aPourcCFPV['ND']=round(($aCF['ND']/$aPV['ND']),3); + if (count($aNb)>0) $aNb['TOTAL']=array_sum($aNb); + // Moyenne pondérée au nombre d'opération total + // TODO pondérer au nombre d'opération ayant une valeur + $iCFTotal=$iPVTotal=$iCFPVTotal=0; + foreach ($aNb as $sFinancement=>$iNB){ + if (count($aCF)>0) $iCFTotal=$iCFTotal+($aCF[$sFinancement]*$iNB); + if (count($aPV)>0) $iPVTotal=$iPVTotal+($aPV[$sFinancement]*$iNB); + if (count($aPourcCFPV)>0) $iCFPVTotal=$iCFPVTotal+($aPourcCFPV[$sFinancement]*$iNB); + } + if (count($aCF)>0) $aCF['MOY']=round($iCFTotal/$aNb['TOTAL']); + if (count($aPV)>0) $aPV['MOY']=round($iPVTotal/$aNb['TOTAL']); + if (count($aPourcCFPV)>0) $aPourcCFPV['MOY']=round($iCFPVTotal/$aNb['TOTAL'],3); + + // Python + $data = array('concessionnaire_amenagement'=>$_REQUEST['concessionnaire_amenagement'], + 'nom_amenageur_file'=>strtolower(preg_replace("#[^a-zA-Z]#", "", str_replace(' ', '_', $_REQUEST['concessionnaire_amenagement']))), + 'map'=>array('xmin'=>$aOperations2['xmin'], 'ymin'=>$aOperations2['ymin'], 'xmax'=>$aOperations2['xmax'], 'ymax'=>$aOperations2['ymax'], 'filter'=>implode(",", $aIdOperation)), + 'NB'=>$aNb, 'CF'=>$aCF, 'PV'=>$aPV, 'PourcCFPV'=>$aPourcCFPV, + 'nb_operation'=>$iNbOperation); + // var_dump(json_encode($data)); + // echo mb_detect_encoding($_REQUEST['concessionnaire_amenagement']); + echo 'python get_excel_3_porteur.py '.escapeshellarg(json_encode($data)); + $sResult = shell_exec('python get_excel_3_porteur.py '.escapeshellarg(json_encode($data))); + $aResultData = json_decode($sResult, true); + + if (isset($aResultData['status'])){ + if ($aResultData['status']=='succes'){ + ob_clean(); + flush(); + $sXslxFile = $aResultData['file']; + // redirect output to client browser + header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); + header('Content-Disposition: attachment;filename="'.basename($sXslxFile).'"'); + header('Cache-Control: max-age=0'); + readfile($sXslxFile); + }elseif ($aResultData['status']=='error'){ + $sError="ERROR : ".$aResultData['error']; + include ('get_error.html'); + exit; + }else{ + echo 'ERROR: unknow result :<br>'; + var_dump($aResultData); + } + }else{ + echo 'ERROR: unknow result :<br>'; + var_dump($sResult); + } + + }else{ + $sError="Erreur : ".$oResult->rowCount()." opération(s) trouvée(s) pour l'aménageur ".$_REQUEST['concessionnaire_amenagement']."."; + $oResult->closeCursor(); + include ('get_error.html'); + } + } + }catch (PDOException $e){ + $sError="ERROR : ".$e->getMessage(); + include ('get_error.html'); + } + + }else{ + $sError="ERREUR : Pas de nom d'aménageur passé en paramètre !"; + include ('get_error.html'); + } + }else{ + header ('location: signin.php'); + exit(); + } +}else{ + header ('location: signin.php'); + exit(); +} +?> \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/get_4_logement.html b/src/vitis/vas/doc/suivi_prod_immo/get_4_logement.html new file mode 100644 index 0000000000000000000000000000000000000000..9a6ebb7a305ccce2dede3f4a96cf5d38a167bb6b --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/get_4_logement.html @@ -0,0 +1,217 @@ +<!doctype html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <title>BD PROD IMMO - Analyse</title> + <link rel="stylesheet" href="css/bootstrap_4.3.1/bootstrap.min.css"> + <link rel="stylesheet" href="css/style_dashboard.css"> + <style type="text/css"> + .title_blue { + background-color:#b3d9ff; + } + .title_green { + background-color:#A5D6A7; + } + .subtitle_blue { + background-color:#cce6ff; + } + .subtitle_green { + background-color:#C8E6C9; + } + .border_right_black{ + border-right: 1px solid rgb(110,110,110); + } + .border_right_grey{ + border-right: 1px solid rgb(190,190,190); + } + </style> +</head> +<body> + <div class="container-fluid"> + <div class="row"> + <div class="col-sm-4 title">Les programmes immobiliers engagés de logements</div> + <div class="col-sm-8 "></div> + </div> + </div> + <br> + <table> + <thead> + <tr style="text-align: center;border-bottom: 1px solid rgb(190,190,190);border-top: 1px solid rgb(110,110,110);"> + <th scope="col" colspan="7" class='title_blue border_right_black'>Contexte</th> + <th scope="col" colspan="2" class='title_green border_right_black'>Synthèse</th> + <?php if ($bSetAccessionLibre): ?> + <th scope="col" colspan="3" class='title_<?php echo $sCssColor; ?> border_right_black'>Accession libre</th> + <?php $sCssColor = ($sCssColor=='blue') ? 'green' : 'blue'; ?> + <?php endif; ?> + <?php if ($bSetAccessionAbordable): ?> + <th scope="col" colspan="3" class='title_<?php echo $sCssColor; ?> border_right_black'>Accession abordable</th> + <?php $sCssColor = ($sCssColor=='blue') ? 'green' : 'blue'; ?> + <?php endif; ?> + <?php if ($bSetAccessionSecurisee): ?> + <th scope="col" colspan="3" class='title_<?php echo $sCssColor; ?> border_right_black'>Accession sécurisée</th> + <?php $sCssColor = ($sCssColor=='blue') ? 'green' : 'blue'; ?> + <?php endif; ?> + <?php if ($bSetBRS): ?> + <th scope="col" colspan="4" class='title_<?php echo $sCssColor; ?> border_right_black'>Bail Réel Solidaire</th> + <?php $sCssColor = ($sCssColor=='blue') ? 'green' : 'blue'; ?> + <?php endif; ?> + <?php if ($bSetLogementSocial): ?> + <th scope="col" colspan="3" class='title_<?php echo $sCssColor; ?> border_right_black'>Location sociale</th> + <?php $sCssColor = ($sCssColor=='blue') ? 'green' : 'blue'; ?> + <?php endif; ?> + <?php if ($bSetLogementIntermediaire): ?> + <th scope="col" colspan="2" class='title_<?php echo $sCssColor; ?> border_right_black'>Location intermédiaire</th> + <?php $sCssColor = ($sCssColor=='blue') ? 'green' : 'blue'; ?> + <?php endif; ?> + </tr> + </thead> + <tbody> + <tr style='font-size: 14px;text-align: center;border-bottom: 1px solid rgb(190,190,190)'> + <th scope="row" class='subtitle_blue border_right_grey'>Commune</th> + <th scope="row" class='subtitle_blue border_right_grey'>Nom de l'opération</th> + <th scope="row" class='subtitle_blue border_right_grey'>Procédure d'aménagement</th> + <th scope="row" class='subtitle_blue border_right_grey'>Lot</th> + <th scope="row" class='subtitle_blue border_right_grey'>Maître d'ouvrage du prog immobilier</th> + <th scope="row" class='subtitle_blue border_right_grey'>Bailleur</th> + <th scope="row" width='20px' class='subtitle_blue border_right_black'>Part des investisseurs</th> + <th scope="row" width='20px' class='subtitle_green border_right_grey'>SDP d'habitat (en m²)</th> + <th scope="row" width='20px' class='subtitle_green border_right_black'>Nombre global de logements</th> + <?php $sCssColor='blue'; ?> + <?php if ($bSetAccessionLibre): ?> + <th scope="row" width='20px' class='subtitle_<?php echo $sCssColor; ?> border_right_grey'>Nombre de logements</th> + <th scope="row" width='20px' class='subtitle_<?php echo $sCssColor; ?> border_right_grey'>Charge foncière</th> + <th scope="row" width='20px' class='subtitle_<?php echo $sCssColor; ?> border_right_black'>Prix de vente</th> + <?php $sCssColor = ($sCssColor=='blue') ? 'green' : 'blue'; ?> + <?php endif; ?> + <?php if ($bSetAccessionAbordable): ?> + <th scope="row" width='20px' class='subtitle_<?php echo $sCssColor; ?> border_right_grey'>Nombre de logements</th> + <th scope="row" width='20px' class='subtitle_<?php echo $sCssColor; ?> border_right_grey'>Charge foncière</th> + <th scope="row" width='20px' class='subtitle_<?php echo $sCssColor; ?> border_right_black'>Prix de vente</th> + <?php $sCssColor = ($sCssColor=='blue') ? 'green' : 'blue'; ?> + <?php endif; ?> + <?php if ($bSetAccessionSecurisee): ?> + <th scope="row" width='20px' class='subtitle_<?php echo $sCssColor; ?> border_right_grey'>Nombre de logements</th> + <th scope="row" width='20px' class='subtitle_<?php echo $sCssColor; ?> border_right_grey'>Charge foncière</th> + <th scope="row" width='20px' class='subtitle_<?php echo $sCssColor; ?> border_right_black'>Prix de vente</th> + <?php $sCssColor = ($sCssColor=='blue') ? 'green' : 'blue'; ?> + <?php endif; ?> + <?php if ($bSetBRS): ?> + <th scope="row" width='20px' class='subtitle_<?php echo $sCssColor; ?> border_right_grey'>Nombre de logements</th> + <th scope="row" width='20px' class='subtitle_<?php echo $sCssColor; ?> border_right_grey'>Charge foncière</th> + <th scope="row" width='20px' class='subtitle_<?php echo $sCssColor; ?> border_right_grey'>Prix de vente</th> + <th scope="row" width='20px' class='subtitle_<?php echo $sCssColor; ?> border_right_black'>Redevance (en € / m²)</th> + <?php $sCssColor = ($sCssColor=='blue') ? 'green' : 'blue'; ?> + <?php endif; ?> + <?php if ($bSetLogementSocial): ?> + <th scope="row" width='20px' class='subtitle_<?php echo $sCssColor; ?> border_right_grey'>Nombre de logements</th> + <th scope="row" width='20px' class='subtitle_<?php echo $sCssColor; ?> border_right_grey'>Charge foncière</th> + <th scope="row" width='20px' class='subtitle_<?php echo $sCssColor; ?> border_right_black'>Prix de vente</th> + <?php $sCssColor = ($sCssColor=='blue') ? 'green' : 'blue'; ?> + <?php endif; ?> + <?php if ($bSetLogementIntermediaire): ?> + <th scope="row" width='20px' class='subtitle_<?php echo $sCssColor; ?> border_right_grey'>Nombre de logements</th> + <th scope="row" width='20px' class='subtitle_<?php echo $sCssColor; ?> border_right_black'>Charge foncière</th> + <?php $sCssColor = ($sCssColor=='blue') ? 'green' : 'blue'; ?> + <?php endif; ?> + </tr> + <?php foreach($aProgrammes as $aOperation): ?> + <tr style='border: 1px solid rgb(190,190,190);'> + <?php if ($sPrevNomCommune!=$aOperation['nom_commune']): ?> + <td <?php if ($aCptCommunes[$aOperation['nom_commune']]>1) echo 'rowspan='.$aCptCommunes[$aOperation['nom_commune']]; ?> class='border_right_grey'><?php echo $aOperation['nom_commune']; ?></td> + <?php endif; ?> + <?php if ($sPrevIdOperation!=$aOperation['id_operation']): ?> + <td <?php if ($aCptOperations[$aOperation['id_operation']]>1) echo 'rowspan='.$aCptOperations[$aOperation['id_operation']]; ?> class='border_right_grey'><?php echo $aOperation['nom_operation']; ?></td> + <td <?php if ($aCptOperations[$aOperation['id_operation']]>1) echo 'rowspan='.$aCptOperations[$aOperation['id_operation']]; ?> class='border_right_grey'><?php echo $aOperation['code_financement_equ_public']; ?></td> + <?php endif; ?> + <?php if ($sPrevIdIlot!=$aOperation['id_ilot']): ?> + <td <?php if ($aCptIlots[$aOperation['id_ilot']]>1) echo 'rowspan='.$aCptIlots[$aOperation['id_ilot']]; ?> class='border_right_grey'><?php echo $aOperation['nom_ilot']; ?></td> + <?php endif; ?> + <td class='border_right_grey'><?php echo $aOperation['nom_demandeur']; ?></td> + <td class='border_right_grey'><?php echo $aProgrammes2[$aOperation['id_programme']]['nom_bailleur']; ?></td> + <td class='border_right_black' style='text-align: center;'><?php echo $aProgrammes2[$aOperation['id_programme']]['profil']; ?></td> + <td class='border_right_grey' style='text-align: center;'><?php echo $aProgrammes2[$aOperation['id_programme']]['sdp']; ?></td> + <td class='border_right_black' style='text-align: center;'><?php echo $aProgrammes2[$aOperation['id_programme']]['nb']; ?></td> + <?php if ($bSetAccessionLibre): ?> + <td class='border_right_grey' style='text-align: center;'><?php echo $aProgrammes2[$aOperation['id_programme']]['nb_accession_libre']; ?></td> + <td class='border_right_grey' style='text-align: center;'><?php echo $aProgrammes2[$aOperation['id_programme']]['cfi_accession_libre']; ?></td></td> + <td class='border_right_black' style='text-align: center;'><?php echo $aProgrammes2[$aOperation['id_programme']]['pv_accession_libre']; ?></td></td> + <?php endif; ?> + <?php if ($bSetAccessionAbordable): ?> + <td class='border_right_grey' style='text-align: center;'><?php echo $aProgrammes2[$aOperation['id_programme']]['nb_accession_abordable']; ?></td> + <td class='border_right_grey' style='text-align: center;'><?php echo $aProgrammes2[$aOperation['id_programme']]['cfi_accession_abordable']; ?></td></td> + <td class='border_right_black' style='text-align: center;'><?php echo $aProgrammes2[$aOperation['id_programme']]['pv_accession_abordable']; ?></td> + <?php endif; ?> + <?php if ($bSetAccessionSecurisee): ?> + <td class='border_right_grey' style='text-align: center;'><?php echo $aProgrammes2[$aOperation['id_programme']]['nb_accession_sociale_securise']; ?></td> + <td class='border_right_grey' style='text-align: center;'><?php echo $aProgrammes2[$aOperation['id_programme']]['cfi_accession_sociale_securise']; ?></td></td> + <td class='border_right_black' style='text-align: center;'><?php echo $aProgrammes2[$aOperation['id_programme']]['pv_accession_sociale_securise']; ?></td> + <?php endif; ?> + <?php if ($bSetBRS): ?> + <td class='border_right_grey' style='text-align: center;'></td> + <td class='border_right_grey' style='text-align: center;'></td> + <td class='border_right_grey' style='text-align: center;'></td> + <td class='border_right_black' style='text-align: center;'></td> + <?php endif; ?> + <?php if ($bSetLogementSocial): ?> + <td class='border_right_grey' style='text-align: center;'><?php echo $aProgrammes2[$aOperation['id_programme']]['nb_lls']; ?></td> + <td class='border_right_grey' style='text-align: center;'><?php echo $aProgrammes2[$aOperation['id_programme']]['cfi_lls']; ?></td> + <td class='border_right_black' style='text-align: center;'><?php echo $aProgrammes2[$aOperation['id_programme']]['pv_lls']; ?></td> + <?php endif; ?> + <?php if ($bSetLogementIntermediaire): ?> + <td class='border_right_grey' style='text-align: center;'><?php echo $aProgrammes2[$aOperation['id_programme']]['nb_lli']; ?></td> + <td class='border_right_black' style='text-align: center;'><?php echo $aProgrammes2[$aOperation['id_programme']]['cfi_lli']; ?></td> + <?php endif; ?> + </tr> + <?php $sPrevNomCommune=$aOperation['nom_commune']; ?> + <?php $sPrevIdOperation=$aOperation['id_operation']; ?> + <?php $sPrevIdIlot=$aOperation['id_ilot']; ?> + <?php endforeach; ?> + </tbody> + <tfoot> + <tr style="text-align: center;border-top: 1px solid rgb(110,110,110);"> + <th scope="col" colspan="7" class='border_right_black' style='text-align: right;'>Totaux / Moyennes </th> + <th scope="col" class='border_right_grey' style='border-bottom: 1px solid rgb(110,110,110);'><?php if($aTotaux['sdp']>0) echo round($aTotaux['sdp']); ?></th> + <th scope="col" class='border_right_black' style='border-bottom: 1px solid rgb(110,110,110);'><?php if($aTotaux['nb']>0) echo $aTotaux['nb']; ?></th> + <?php if ($bSetAccessionLibre): ?> + <th scope="col" class='border_right_grey' style='border-bottom: 1px solid rgb(110,110,110);'><?php if($aTotaux['nb_accession_libre']>0) echo $aTotaux['nb_accession_libre']; ?></th> + <th scope="col" class='border_right_grey' style='border-bottom: 1px solid rgb(110,110,110);'><?php if($aTotaux['cfi_accession_libre']>0) echo $aTotaux['cfi_accession_libre']; ?></th> + <th scope="col" class='border_right_black' style='border-bottom: 1px solid rgb(110,110,110);'><?php if($aTotaux['pv_accession_libre']>0) echo $aTotaux['pv_accession_libre']; ?></th> + <?php endif; ?> + <?php if ($bSetAccessionAbordable): ?> + <th scope="col" class='border_right_grey' style='border-bottom: 1px solid rgb(110,110,110);'><?php if($aTotaux['nb_accession_abordable']>0) echo $aTotaux['nb_accession_abordable']; ?></th> + <th scope="col" class='border_right_grey' style='border-bottom: 1px solid rgb(110,110,110);'><?php if($aTotaux['cfi_accession_abordable']>0) echo $aTotaux['cfi_accession_abordable']; ?></th> + <th scope="col" class='border_right_black' style='border-bottom: 1px solid rgb(110,110,110);'><?php if($aTotaux['pv_accession_abordable']>0) echo $aTotaux['pv_accession_abordable']; ?></th> + <?php endif; ?> + <?php if ($bSetAccessionSecurisee): ?> + <th scope="col" class='border_right_grey' style='border-bottom: 1px solid rgb(110,110,110);'><?php if($aTotaux['nb_accession_sociale_securise']>0) echo $aTotaux['nb_accession_sociale_securise']; ?></th> + <th scope="col" class='border_right_grey' style='border-bottom: 1px solid rgb(110,110,110);'><?php if($aTotaux['cfi_accession_sociale_securise']>0) echo $aTotaux['cfi_accession_sociale_securise']; ?></th> + <th scope="col" class='border_right_black' style='border-bottom: 1px solid rgb(110,110,110);'><?php if($aTotaux['pv_accession_sociale_securise']>0) echo $aTotaux['pv_accession_sociale_securise']; ?></th> + <?php endif; ?> + <?php if ($bSetBRS): ?> + <th scope="col" class='border_right_grey' style='border-bottom: 1px solid rgb(110,110,110);'></th> + <th scope="col" class='border_right_grey' style='border-bottom: 1px solid rgb(110,110,110);'></th> + <th scope="col" class='border_right_grey' style='border-bottom: 1px solid rgb(110,110,110);'></th> + <th scope="col" class='border_right_black' style='border-bottom: 1px solid rgb(110,110,110);'></th> + <?php endif; ?> + <?php if ($bSetLogementSocial): ?> + <th scope="col" class='border_right_grey' style='border-bottom: 1px solid rgb(110,110,110);'><?php if($aTotaux['nb_lls']>0) echo $aTotaux['nb_lls']; ?></th> + <th scope="col" class='border_right_grey' style='border-bottom: 1px solid rgb(110,110,110);'><?php if($aTotaux['cfi_lls']>0) echo $aTotaux['cfi_lls']; ?></th> + <th scope="col" class='border_right_black' style='border-bottom: 1px solid rgb(110,110,110);'><?php if($aTotaux['pv_lls']>0) echo $aTotaux['pv_lls']; ?></th> + <?php endif; ?> + <?php if ($bSetLogementIntermediaire): ?> + <th scope="col" class='border_right_grey' style='border-bottom: 1px solid rgb(110,110,110);'><?php if($aTotaux['nb_lli']>0) echo $aTotaux['nb_lli']; ?></th> + <th scope="col" class='border_right_black' style='border-bottom: 1px solid rgb(110,110,110);'><?php if($aTotaux['cfi_lli']>0) echo $aTotaux['cfi_lli']; ?></th> + <?php endif; ?> + </tr> + </tfoot> + </table> + + <!-- Icons --> + <script src="https://unpkg.com/feather-icons/dist/feather.min.js"></script> + <script> + feather.replace() + </script> + <script type="text/javascript" src="js/dashboard_4_logement.js"></script> +</body> +</html> \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/get_4_logement.old.php b/src/vitis/vas/doc/suivi_prod_immo/get_4_logement.old.php new file mode 100644 index 0000000000000000000000000000000000000000..7b39e3a03293ce4cabbb3c219fcc4c0e7d023d12 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/get_4_logement.old.php @@ -0,0 +1,265 @@ +<?php +// https://geo.urbalyon.org/doc/suivi_prod_immo/get_4_logement.php?code_finanacment=TA +session_start(); +if (isset($_REQUEST['login'])) $_SESSION['login_bd_prod_immo']=$_REQUEST['login']; + +if(isset($_REQUEST['token']) && isset($_SESSION['token_bd_prod_immo'])){ + if($_REQUEST['token']==$_SESSION['token_bd_prod_immo']){ + + require_once("../../rest/conf/properties.inc"); + require_once("properties_suivi_prod_immo.inc"); + $sSchema=$properties['schema_prod_immo']; + + function avg($sum=0,$count=0){ + return ($count)? round($sum / $count): null; + } + + try{ + $oConn = new PDO('pgsql:host='.$properties['server'].';port='.$properties['port'].';dbname='.$properties['db_prod_immo'], $properties['db_user_prod_immo'], $properties['db_pass_prod_immo']); + $oConn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $oConn->setAttribute(PDO::ATTR_CASE, PDO::CASE_NATURAL); + + $bSetAccessionLibre=$bSetAccessionAbordable=$bSetAccessionSecurisee=$bSetBRS=$bSetLogementSocial=$bSetLogementIntermediaire=false; + + if($oConn){ + $sWhereOperation=''; + $aOperations=array(); + if (isset($_REQUEST['code_financement']) && !is_null($_REQUEST['code_financement'])){ + $sWhereOperation="WHERE operation_tr_financement_equ_public.code_financement_equ_public='".$_REQUEST['code_financement']."'"; + } + + if (isset($_REQUEST['id_commune']) && !is_null($_REQUEST['id_commune'])){ + if ($sWhereOperation=='') + $sWhereOperation="WHERE operation_commune.id_commune=".$_REQUEST['id_commune']; + else + $sWhereOperation=$sWhereOperation." AND operation_commune.id_commune=".$_REQUEST['id_commune']; + }else{ + if (isset($_REQUEST['id_ctm']) && !is_null($_REQUEST['id_ctm'])){ + $oResult2 = $oConn->prepare("SELECT array_to_string(array_agg(id_commune),', ') AS id_commune FROM ".$sSchema.".commune WHERE id_ctm=".$_REQUEST['id_ctm']." GROUP BY id_ctm"); + $oResult2->execute(); + if ($oResult2->rowCount()>0){ + $aCTMs=$oResult2->fetchAll(); + if ($sWhereOperation=='') + $sWhereOperation="WHERE operation_commune.id_commune IN (".$aCTMs[0]['id_commune'].")"; + else + $sWhereOperation=$sWhereOperation." AND operation_commune.id_commune IN (".$aCTMs[0]['id_commune'].")";/**/ + } + $oResult2->closeCursor(); + } + } + $sSql='SELECT DISTINCT operation.id_operation, nom_operation, array_to_string(array_agg(DISTINCT operation_tr_financement_equ_public.code_financement_equ_public),\', \') AS code_financement_equ_public, array_to_string(array_agg(DISTINCT nom_commune),\', \') AS nom_commune, nom_ilot, ilot.id_ilot, id_programme, nom_demandeur FROM (((('.$sSchema.'.operation INNER JOIN '.$sSchema.'.operation_tr_financement_equ_public ON operation_tr_financement_equ_public.id_operation=operation.id_operation) INNER JOIN '.$sSchema.'.operation_commune ON operation_commune.id_operation=operation.id_operation) INNER JOIN '.$sSchema.'.commune ON operation_commune.id_commune=commune.id_commune) INNER JOIN '.$sSchema.'.ilot ON ilot.id_operation=operation.id_operation) INNER JOIN '.$sSchema.'.programme_immobilier ON ilot.id_ilot=programme_immobilier.id_ilot '.$sWhereOperation.' GROUP BY id_programme, ilot.id_ilot, operation.id_operation ORDER BY nom_commune, nom_operation, nom_ilot'; + $oResult = $oConn->prepare($sSql); + $oResult->execute(); + if($oResult->rowCount()>0){ + $aProgrammes=$oResult->fetchAll(); + $aCptCommunes=array(); + $aCptOperations=array(); + $aCptIlots=array(); + $aTotaux=array('sdp'=>0,'nb'=>0,'nb_accession_libre'=>0,'cfi_accession_libre'=>array(),'pv_accession_libre'=>array(),'nb_accession_abordable'=>0,'cfi_accession_abordable'=>array(),'pv_accession_abordable'=>array(),'nb_accession_sociale_securise'=>0,'cfi_accession_sociale_securise'=>array(),'pv_accession_sociale_securise'=>array(),'nb_lls'=>0,'cfi_lls'=>array(),'pv_lls'=>array(),'nb_lli'=>0,'cfi_lli'=>array()); + $aProgrammes2=array(); + foreach ($aProgrammes as $aProgramme){ + // **** Compteurs pour fusion des cellules du tableau + if(isset($aCptCommunes[$aProgramme['nom_commune']])) + $aCptCommunes[$aProgramme['nom_commune']]=$aCptCommunes[$aProgramme['nom_commune']]+1; + else + $aCptCommunes[$aProgramme['nom_commune']]=1; + if(isset($aCptOperations[$aProgramme['id_operation']])) + $aCptOperations[$aProgramme['id_operation']]=$aCptOperations[$aProgramme['id_operation']]+1; + else + $aCptOperations[$aProgramme['id_operation']]=1; + if(isset($aCptIlots[$aProgramme['id_ilot']])) + $aCptIlots[$aProgramme['id_ilot']]=$aCptIlots[$aProgramme['id_ilot']]+1; + else + $aCptIlots[$aProgramme['id_ilot']]=1; + // **** Récupération des données tables associées + $iIdProgramme=$aProgramme['id_programme']; + $aProgramme2=array(); + // Granulométrie + $oResult3=$oConn->prepare("SELECT id_programme, code_type_granulometrie, sum(valeur) AS valeur FROM ".$sSchema.".granulometrie WHERE id_programme=".$iIdProgramme." AND code_type_granulometrie IN ('NB','SDP') AND code_composition_programme='TOT_LG_FAM' GROUP BY id_programme, code_composition_programme, code_type_granulometrie"); + $oResult3->execute(); + if($oResult3->rowCount()>0){ + $aGranulometries=$oResult3->fetchAll(); + foreach ($aGranulometries as $aGranulometrie){ + $aProgramme2[strtolower($aGranulometrie['code_type_granulometrie'])]=$aGranulometrie['valeur']; + $aTotaux[strtolower($aGranulometrie['code_type_granulometrie'])]=$aTotaux[strtolower($aGranulometrie['code_type_granulometrie'])]+$aGranulometrie['valeur']; + } + } + $oResult3->closeCursor(); + // profil + $oResult6=$oConn->prepare("SELECT pourc FROM prod_immo.profil_acheteur_accession_libre WHERE id_type_acheteur_accession_libre=2 AND pourc IS NOT NULL AND id_programme=".$iIdProgramme); + $oResult6->execute(); + if($oResult6->rowCount()>0){ + $aProfil=$oResult6->fetchAll(); + $aProgramme2['profil']=$aProfil[0]['pourc'].'%'; + } + $oResult6->closeCursor(); + // logement social + $oResult4=$oConn->prepare("SELECT id_programme, array_to_string(array_agg(DISTINCT nom_bailleur),',') AS nom_bailleur, id_indicateur_logement_familliaux_location, CASE WHEN id_indicateur_logement_familliaux_location=1 THEN sum(COALESCE(social_pls,0)) ELSE avg(COALESCE(social_pls,0)) END AS social_pls, CASE WHEN id_indicateur_logement_familliaux_location=1 THEN sum(COALESCE(social_plus_plai,0)) ELSE avg(COALESCE(social_plus_plai,0)) END AS social_plus_plai, CASE WHEN id_indicateur_logement_familliaux_location=1 THEN sum(COALESCE(intermediaire_pli,0)) ELSE avg(COALESCE(intermediaire_pli,0)) END AS intermediaire_pli, CASE WHEN id_indicateur_logement_familliaux_location=1 THEN sum(COALESCE(intermediaire_afl,0)) ELSE avg(COALESCE(intermediaire_afl,0)) END AS intermediaire_afl FROM ".$sSchema.".logement_familliaux_location INNER JOIN ".$sSchema.".composition_logement_familliaux_location_cp ON logement_familliaux_location.id_logement_familliaux_location=composition_logement_familliaux_location_cp.id_logement_familliaux_location WHERE id_programme=".$iIdProgramme." AND id_indicateur_logement_familliaux_location IN (1,4,5,8) GROUP BY id_programme, composition_logement_familliaux_location_cp.id_logement_familliaux_location, id_indicateur_logement_familliaux_location"); + $oResult4->execute(); + if($oResult4->rowCount()>0){ + $aLogSocials=$oResult4->fetchAll(); + $aProgramme2['nom_bailleur']=$aLogSocials[0]['nom_bailleur']; + $aCFIlls=array(); + $aCFIlli=array(); + foreach ($aLogSocials as $aLogSocial){ + switch ($aLogSocial['id_indicateur_logement_familliaux_location']) { + case 1: + if($aLogSocial['social_pls']>0 or $aLogSocial['social_plus_plai']>0){ + $bSetLogementSocial=true; + $aProgramme2['nb_lls']=$aLogSocial['social_pls']+$aLogSocial['social_plus_plai']; + $aTotaux['nb_lls']=$aTotaux['nb_lls']+$aLogSocial['social_pls']+$aLogSocial['social_plus_plai']; + } + if($aLogSocial['intermediaire_pli']>0 or $aLogSocial['intermediaire_afl']>0){ + $bSetLogementIntermediaire=true; + $aProgramme2['nb_lli']=$aLogSocial['intermediaire_pli']+$aLogSocial['intermediaire_afl']; + $aTotaux['nb_lli']=$aTotaux['nb_lli']+$aLogSocial['intermediaire_pli']+$aLogSocial['intermediaire_afl']; + } + break; + case 4: + case 5: + if(!is_null($aLogSocial['social_pls']) and $aLogSocial['social_pls']>0){ + $bSetLogementSocial=true; + $aCFIlls[count($aCFIlls)]=$aLogSocial['social_pls']; + $aTotaux['cfi_lls'][count($aTotaux['cfi_lls'])]=$aLogSocial['social_pls']; + } + if(!is_null($aLogSocial['social_plus_plai']) and $aLogSocial['social_plus_plai']>0){ + $bSetLogementSocial=true; + $aCFIlls[count($aCFIlls)]=$aLogSocial['social_plus_plai']; + $aTotaux['cfi_lls'][count($aTotaux['cfi_lls'])]=$aLogSocial['social_plus_plai']; + } + if(!is_null($aLogSocial['intermediaire_pli']) and $aLogSocial['intermediaire_pli']>0){ + $bSetLogementIntermediaire=true; + $aCFIlli[count($aCFIlli)]=$aLogSocial['intermediaire_pli']; + $aTotaux['cfi_lli'][count($aTotaux['cfi_lli'])]=$aLogSocial['intermediaire_pli']; + } + if(!is_null($aLogSocial['intermediaire_afl']) and $aLogSocial['intermediaire_afl']>0){ + $bSetLogementIntermediaire=true; + $aCFIlli[count($aCFIlli)]=$aLogSocial['intermediaire_afl']; + $aTotaux['cfi_lli'][count($aTotaux['cfi_lli'])]=$aLogSocial['intermediaire_afl']; + } + break; + case 8: + $aPVlls=array(); + if(!is_null($aLogSocial['social_pls']) and $aLogSocial['social_pls']>0){ + $bSetLogementSocial=true; + $aPVlls[count($aPVlls)]=$aLogSocial['social_pls']; + $aTotaux['pv_lls'][count($aTotaux['pv_lls'])]=$aLogSocial['social_pls']; + } + if(!is_null($aLogSocial['social_plus_plai']) and $aLogSocial['social_plus_plai']>0){ + $bSetLogementSocial=true; + $aPVlls[count($aPVlls)]=$aLogSocial['social_plus_plai']; + $aTotaux['pv_lls'][count($aTotaux['pv_lls'])]=$aLogSocial['social_plus_plai']; + } + $aProgramme2['pv_lls']=avg(array_sum($aPVlls),count($aPVlls)); + // pas de prix de vente en lli + break; + } + } + $aProgramme2['cfi_lls']=avg(array_sum($aCFIlls),count($aCFIlls)); + $aProgramme2['cfi_lli']=avg(array_sum($aCFIlli),count($aCFIlli)); + } + + $oResult4->closeCursor(); + // logement accession + $oResult5=$oConn->prepare("SELECT id_programme, id_indicateur_logement_familliaux_accession, CASE WHEN id_indicateur_logement_familliaux_accession=1 THEN sum(COALESCE(accession_libre,0)) ELSE avg(COALESCE(accession_libre,0)) END AS accession_libre, CASE WHEN id_indicateur_logement_familliaux_accession=1 THEN sum(COALESCE(accession_abordable,0)) ELSE avg(COALESCE(accession_abordable,0)) END AS accession_abordable, CASE WHEN id_indicateur_logement_familliaux_accession=1 THEN sum(COALESCE(accesion_sociale_securise,0)) ELSE avg(COALESCE(accesion_sociale_securise,0)) END AS accesion_sociale_securise, CASE WHEN id_indicateur_logement_familliaux_accession=1 THEN sum(COALESCE(psla,0)) ELSE avg(COALESCE(psla,0)) END AS psla FROM ".$sSchema.".logement_familliaux_accession WHERE id_programme=".$iIdProgramme." AND id_indicateur_logement_familliaux_accession IN (1,4,5,8,9) GROUP BY id_programme, id_indicateur_logement_familliaux_accession"); + $oResult5->execute(); + if($oResult5->rowCount()>0){ + $aLogAccessions=$oResult5->fetchAll(); + $aCFIAccessionLibre=$aCFIAccessionAbordable=$aCFIAccessionSocialeSecurise=array(); + $aPVAccessionLibre=$aPVAccessionAbordable=$aPVAccessionSocialeSecurise=array(); + foreach ($aLogAccessions as $aLogAccession){ + switch ($aLogAccession['id_indicateur_logement_familliaux_accession']){ + case 1: + if($aLogAccession['accession_libre']>0){ + $bSetAccessionLibre=true; + $aProgramme2['nb_accession_libre']=$aLogAccession['accession_libre']; + $aTotaux['nb_accession_libre']=$aTotaux['nb_accession_libre']+$aLogAccession['accession_libre']; + } + if($aLogAccession['accession_abordable']>0){ + $bSetAccessionAbordable=true; + $aProgramme2['nb_accession_abordable']=$aLogAccession['accession_abordable']; + $aTotaux['nb_accession_abordable']=$aTotaux['nb_accession_abordable']+$aLogAccession['accession_abordable']; + } + if($aLogAccession['accesion_sociale_securise']>0){ + $bSetAccessionSecurisee=true; + $aProgramme2['nb_accession_sociale_securise']=$aLogAccession['accesion_sociale_securise']; + $aTotaux['nb_accession_sociale_securise']=$aTotaux['nb_accession_sociale_securise']+$aLogAccession['accesion_sociale_securise']; + } + if($aLogAccession['psla']>0) $aProgramme2['nb_psla']=$aLogAccession['psla']; + break; + case 4: + case 5: + if(!is_null($aLogAccession['accession_libre']) and $aLogAccession['accession_libre']>0){ + $bSetAccessionLibre=true; + $aCFIAccessionLibre[count($aCFIAccessionLibre)]=$aLogAccession['accession_libre']; + $aTotaux['cfi_accession_libre'][count($aTotaux['cfi_accession_libre'])]=$aLogAccession['accession_libre']; + } + if(!is_null($aLogAccession['accession_abordable']) and $aLogAccession['accession_abordable']>0){ + $bSetAccessionAbordable=true; + $aCFIAccessionAbordable[count($aCFIAccessionAbordable)]=$aLogAccession['accession_abordable']; + $aTotaux['cfi_accession_abordable'][count($aTotaux['cfi_accession_abordable'])]=$aLogAccession['accession_abordable']; + } + if(!is_null($aLogAccession['accesion_sociale_securise']) and $aLogAccession['accesion_sociale_securise']>0){ + $bSetAccessionSecurisee=true; + $aCFIAccessionSocialeSecurise[count($aCFIAccessionSocialeSecurise)]=$aLogAccession['accesion_sociale_securise']; + $aTotaux['cfi_accession_sociale_securise'][count($aTotaux['cfi_accession_sociale_securise'])]=$aLogAccession['accesion_sociale_securise']; + } + break; + case 8: + case 9: + if(!is_null($aLogAccession['accession_libre']) and $aLogAccession['accession_libre']>0){ + $bSetAccessionLibre=true; + $aPVAccessionLibre[count($aPVAccessionLibre)]=$aLogAccession['accession_libre']; + $aTotaux['pv_accession_libre'][count($aTotaux['pv_accession_libre'])]=$aLogAccession['accession_libre']; + } + if(!is_null($aLogAccession['accession_abordable']) and $aLogAccession['accession_abordable']>0){ + $bSetAccessionAbordable=true; + $aPVAccessionAbordable[count($aPVAccessionAbordable)]=$aLogAccession['accession_abordable']; + $aTotaux['pv_accession_abordable'][count($aTotaux['pv_accession_abordable'])]=$aLogAccession['accession_abordable']; + } + if(!is_null($aLogAccession['accesion_sociale_securise']) and $aLogAccession['accesion_sociale_securise']>0){ + $bSetAccessionSecurisee=true; + $aPVAccessionSocialeSecurise[count($aPVAccessionSocialeSecurise)]=$aLogAccession['accesion_sociale_securise']; + $aTotaux['pv_accession_sociale_securise'][count($aTotaux['pv_accession_sociale_securise'])]=$aLogAccession['accesion_sociale_securise']; + } + break; + } + } + $aProgramme2['cfi_accession_libre']=avg(array_sum($aCFIAccessionLibre),count($aCFIAccessionLibre)); + $aProgramme2['cfi_accession_abordable']=avg(array_sum($aCFIAccessionAbordable),count($aCFIAccessionAbordable)); + $aProgramme2['cfi_accession_sociale_securise']=avg(array_sum($aCFIAccessionSocialeSecurise),count($aCFIAccessionSocialeSecurise)); + $aProgramme2['pv_accession_libre']=avg(array_sum($aPVAccessionLibre),count($aPVAccessionLibre)); + $aProgramme2['pv_accession_abordable']=avg(array_sum($aPVAccessionAbordable),count($aPVAccessionAbordable)); + $aProgramme2['pv_accession_sociale_securise']=avg(array_sum($aPVAccessionSocialeSecurise),count($aPVAccessionSocialeSecurise)); + } + $oResult5->closeCursor(); + $aProgrammes2[$aProgramme['id_programme']]=$aProgramme2; + } + $oResult->closeCursor(); + $aTotaux['cfi_accession_libre']=avg(array_sum($aTotaux['cfi_accession_libre']),count($aTotaux['cfi_accession_libre'])); + $aTotaux['pv_accession_libre']=avg(array_sum($aTotaux['pv_accession_libre']),count($aTotaux['pv_accession_libre'])); + $aTotaux['cfi_accession_abordable']=avg(array_sum($aTotaux['cfi_accession_abordable']),count($aTotaux['cfi_accession_abordable'])); + $aTotaux['pv_accession_abordable']=avg(array_sum($aTotaux['pv_accession_abordable']),count($aTotaux['pv_accession_abordable'])); + $aTotaux['cfi_accession_sociale_securise']=avg(array_sum($aTotaux['cfi_accession_sociale_securise']),count($aTotaux['cfi_accession_sociale_securise'])); + $aTotaux['pv_accession_sociale_securise']=avg(array_sum($aTotaux['pv_accession_sociale_securise']),count($aTotaux['pv_accession_sociale_securise'])); + $aTotaux['cfi_lls']=avg(array_sum($aTotaux['cfi_lls']),count($aTotaux['cfi_lls'])); + $aTotaux['pv_lls']=avg(array_sum($aTotaux['pv_lls']),count($aTotaux['pv_lls'])); + $aTotaux['cfi_lli']=avg(array_sum($aTotaux['cfi_lli']),count($aTotaux['cfi_lli'])); + } + $sCssColor='blue'; + include ('get_4_logement.html'); + } + }catch (PDOException $e){ + $sError="ERROR : ".$e->getMessage(); + include ('get_error.html'); + } + }else{ + header ('location: signin.php'); + exit(); + } +}else{ + header ('location: signin.php'); + exit(); +} + +?> \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/get_4_logement.php b/src/vitis/vas/doc/suivi_prod_immo/get_4_logement.php new file mode 100644 index 0000000000000000000000000000000000000000..a4679d5cb80a9281fc9dc6bef35dc4b58eaf5463 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/get_4_logement.php @@ -0,0 +1,267 @@ +<?php +// https://geo.urbalyon.org/doc/suivi_prod_immo/get_4_logement.php?code_finanacment=TA +if (isset($_REQUEST['token']) && !is_null($_REQUEST['token'])){ + session_id($_REQUEST['token']); + if (session_status() == PHP_SESSION_NONE) + session_start(); + + if (empty($_SESSION)) { + $sError="ERREUR : token invalide."; + include ('get_error.html'); + }else{ + + require_once("../../rest/conf/properties.inc"); + require_once("properties_suivi_prod_immo.inc"); + $sSchema=$properties['schema_prod_immo']; + + function avg($sum=0,$count=0){ + return ($count)? round($sum / $count): null; + } + + try{ + $oConn = new PDO('pgsql:host='.$properties['server'].';port='.$properties['port'].';dbname='.$properties['db_prod_immo'], $properties['db_user_prod_immo'], $properties['db_pass_prod_immo']); + $oConn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $oConn->setAttribute(PDO::ATTR_CASE, PDO::CASE_NATURAL); + + $bSetAccessionLibre=$bSetAccessionAbordable=$bSetAccessionSecurisee=$bSetBRS=$bSetLogementSocial=$bSetLogementIntermediaire=false; + + if($oConn){ + $sWhereOperation=''; + $aOperations=array(); + if (isset($_REQUEST['code_financement']) && !is_null($_REQUEST['code_financement'])){ + $sWhereOperation="WHERE operation_tr_financement_equ_public.code_financement_equ_public='".$_REQUEST['code_financement']."'"; + } + + if (isset($_REQUEST['id_commune']) && !is_null($_REQUEST['id_commune'])){ + if ($sWhereOperation=='') + $sWhereOperation="WHERE operation_commune.id_commune=".$_REQUEST['id_commune']; + else + $sWhereOperation=$sWhereOperation." AND operation_commune.id_commune=".$_REQUEST['id_commune']; + }else{ + if (isset($_REQUEST['id_ctm']) && !is_null($_REQUEST['id_ctm'])){ + $oResult2 = $oConn->prepare("SELECT array_to_string(array_agg(id_commune),', ') AS id_commune FROM ".$sSchema.".commune WHERE id_ctm=".$_REQUEST['id_ctm']." GROUP BY id_ctm"); + $oResult2->execute(); + if ($oResult2->rowCount()>0){ + $aCTMs=$oResult2->fetchAll(); + if ($sWhereOperation=='') + $sWhereOperation="WHERE operation_commune.id_commune IN (".$aCTMs[0]['id_commune'].")"; + else + $sWhereOperation=$sWhereOperation." AND operation_commune.id_commune IN (".$aCTMs[0]['id_commune'].")";/**/ + } + $oResult2->closeCursor(); + } + } + $sSql='SELECT DISTINCT operation.id_operation, nom_operation, array_to_string(array_agg(DISTINCT operation_tr_financement_equ_public.code_financement_equ_public),\', \') AS code_financement_equ_public, array_to_string(array_agg(DISTINCT nom_commune),\', \') AS nom_commune, nom_ilot, ilot.id_ilot, id_programme, nom_demandeur FROM (((('.$sSchema.'.operation INNER JOIN '.$sSchema.'.operation_tr_financement_equ_public ON operation_tr_financement_equ_public.id_operation=operation.id_operation) INNER JOIN '.$sSchema.'.operation_commune ON operation_commune.id_operation=operation.id_operation) INNER JOIN '.$sSchema.'.commune ON operation_commune.id_commune=commune.id_commune) INNER JOIN '.$sSchema.'.ilot ON ilot.id_operation=operation.id_operation) INNER JOIN '.$sSchema.'.programme_immobilier ON ilot.id_ilot=programme_immobilier.id_ilot '.$sWhereOperation.' GROUP BY id_programme, ilot.id_ilot, operation.id_operation ORDER BY nom_commune, nom_operation, nom_ilot'; + $oResult = $oConn->prepare($sSql); + $oResult->execute(); + if($oResult->rowCount()>0){ + $aProgrammes=$oResult->fetchAll(); + $aCptCommunes=array(); + $aCptOperations=array(); + $aCptIlots=array(); + $aTotaux=array('sdp'=>0,'nb'=>0,'nb_accession_libre'=>0,'cfi_accession_libre'=>array(),'pv_accession_libre'=>array(),'nb_accession_abordable'=>0,'cfi_accession_abordable'=>array(),'pv_accession_abordable'=>array(),'nb_accession_sociale_securise'=>0,'cfi_accession_sociale_securise'=>array(),'pv_accession_sociale_securise'=>array(),'nb_lls'=>0,'cfi_lls'=>array(),'pv_lls'=>array(),'nb_lli'=>0,'cfi_lli'=>array()); + $aProgrammes2=array(); + foreach ($aProgrammes as $aProgramme){ + // **** Compteurs pour fusion des cellules du tableau + if(isset($aCptCommunes[$aProgramme['nom_commune']])) + $aCptCommunes[$aProgramme['nom_commune']]=$aCptCommunes[$aProgramme['nom_commune']]+1; + else + $aCptCommunes[$aProgramme['nom_commune']]=1; + if(isset($aCptOperations[$aProgramme['id_operation']])) + $aCptOperations[$aProgramme['id_operation']]=$aCptOperations[$aProgramme['id_operation']]+1; + else + $aCptOperations[$aProgramme['id_operation']]=1; + if(isset($aCptIlots[$aProgramme['id_ilot']])) + $aCptIlots[$aProgramme['id_ilot']]=$aCptIlots[$aProgramme['id_ilot']]+1; + else + $aCptIlots[$aProgramme['id_ilot']]=1; + // **** Récupération des données tables associées + $iIdProgramme=$aProgramme['id_programme']; + $aProgramme2=array(); + // Granulométrie + $oResult3=$oConn->prepare("SELECT id_programme, code_type_granulometrie, sum(valeur) AS valeur FROM ".$sSchema.".granulometrie WHERE id_programme=".$iIdProgramme." AND code_type_granulometrie IN ('NB','SDP') AND code_composition_programme='TOT_LG_FAM' GROUP BY id_programme, code_composition_programme, code_type_granulometrie"); + $oResult3->execute(); + if($oResult3->rowCount()>0){ + $aGranulometries=$oResult3->fetchAll(); + foreach ($aGranulometries as $aGranulometrie){ + $aProgramme2[strtolower($aGranulometrie['code_type_granulometrie'])]=$aGranulometrie['valeur']; + $aTotaux[strtolower($aGranulometrie['code_type_granulometrie'])]=$aTotaux[strtolower($aGranulometrie['code_type_granulometrie'])]+$aGranulometrie['valeur']; + } + } + $oResult3->closeCursor(); + // profil + $oResult6=$oConn->prepare("SELECT pourc FROM prod_immo.profil_acheteur_accession_libre WHERE id_type_acheteur_accession_libre=2 AND pourc IS NOT NULL AND id_programme=".$iIdProgramme); + $oResult6->execute(); + if($oResult6->rowCount()>0){ + $aProfil=$oResult6->fetchAll(); + $aProgramme2['profil']=$aProfil[0]['pourc'].'%'; + } + $oResult6->closeCursor(); + // logement social + $oResult4=$oConn->prepare("SELECT id_programme, array_to_string(array_agg(DISTINCT nom_bailleur),',') AS nom_bailleur, id_indicateur_logement_familliaux_location, CASE WHEN id_indicateur_logement_familliaux_location=1 THEN sum(COALESCE(social_pls,0)) ELSE avg(COALESCE(social_pls,0)) END AS social_pls, CASE WHEN id_indicateur_logement_familliaux_location=1 THEN sum(COALESCE(social_plus_plai,0)) ELSE avg(COALESCE(social_plus_plai,0)) END AS social_plus_plai, CASE WHEN id_indicateur_logement_familliaux_location=1 THEN sum(COALESCE(intermediaire_pli,0)) ELSE avg(COALESCE(intermediaire_pli,0)) END AS intermediaire_pli, CASE WHEN id_indicateur_logement_familliaux_location=1 THEN sum(COALESCE(intermediaire_afl,0)) ELSE avg(COALESCE(intermediaire_afl,0)) END AS intermediaire_afl FROM ".$sSchema.".logement_familliaux_location INNER JOIN ".$sSchema.".composition_logement_familliaux_location_cp ON logement_familliaux_location.id_logement_familliaux_location=composition_logement_familliaux_location_cp.id_logement_familliaux_location WHERE id_programme=".$iIdProgramme." AND id_indicateur_logement_familliaux_location IN (1,4,5,8) GROUP BY id_programme, composition_logement_familliaux_location_cp.id_logement_familliaux_location, id_indicateur_logement_familliaux_location"); + $oResult4->execute(); + if($oResult4->rowCount()>0){ + $aLogSocials=$oResult4->fetchAll(); + $aProgramme2['nom_bailleur']=$aLogSocials[0]['nom_bailleur']; + $aCFIlls=array(); + $aCFIlli=array(); + foreach ($aLogSocials as $aLogSocial){ + switch ($aLogSocial['id_indicateur_logement_familliaux_location']) { + case 1: + if($aLogSocial['social_pls']>0 or $aLogSocial['social_plus_plai']>0){ + $bSetLogementSocial=true; + $aProgramme2['nb_lls']=$aLogSocial['social_pls']+$aLogSocial['social_plus_plai']; + $aTotaux['nb_lls']=$aTotaux['nb_lls']+$aLogSocial['social_pls']+$aLogSocial['social_plus_plai']; + } + if($aLogSocial['intermediaire_pli']>0 or $aLogSocial['intermediaire_afl']>0){ + $bSetLogementIntermediaire=true; + $aProgramme2['nb_lli']=$aLogSocial['intermediaire_pli']+$aLogSocial['intermediaire_afl']; + $aTotaux['nb_lli']=$aTotaux['nb_lli']+$aLogSocial['intermediaire_pli']+$aLogSocial['intermediaire_afl']; + } + break; + case 4: + case 5: + if(!is_null($aLogSocial['social_pls']) and $aLogSocial['social_pls']>0){ + $bSetLogementSocial=true; + $aCFIlls[count($aCFIlls)]=$aLogSocial['social_pls']; + $aTotaux['cfi_lls'][count($aTotaux['cfi_lls'])]=$aLogSocial['social_pls']; + } + if(!is_null($aLogSocial['social_plus_plai']) and $aLogSocial['social_plus_plai']>0){ + $bSetLogementSocial=true; + $aCFIlls[count($aCFIlls)]=$aLogSocial['social_plus_plai']; + $aTotaux['cfi_lls'][count($aTotaux['cfi_lls'])]=$aLogSocial['social_plus_plai']; + } + if(!is_null($aLogSocial['intermediaire_pli']) and $aLogSocial['intermediaire_pli']>0){ + $bSetLogementIntermediaire=true; + $aCFIlli[count($aCFIlli)]=$aLogSocial['intermediaire_pli']; + $aTotaux['cfi_lli'][count($aTotaux['cfi_lli'])]=$aLogSocial['intermediaire_pli']; + } + if(!is_null($aLogSocial['intermediaire_afl']) and $aLogSocial['intermediaire_afl']>0){ + $bSetLogementIntermediaire=true; + $aCFIlli[count($aCFIlli)]=$aLogSocial['intermediaire_afl']; + $aTotaux['cfi_lli'][count($aTotaux['cfi_lli'])]=$aLogSocial['intermediaire_afl']; + } + break; + case 8: + $aPVlls=array(); + if(!is_null($aLogSocial['social_pls']) and $aLogSocial['social_pls']>0){ + $bSetLogementSocial=true; + $aPVlls[count($aPVlls)]=$aLogSocial['social_pls']; + $aTotaux['pv_lls'][count($aTotaux['pv_lls'])]=$aLogSocial['social_pls']; + } + if(!is_null($aLogSocial['social_plus_plai']) and $aLogSocial['social_plus_plai']>0){ + $bSetLogementSocial=true; + $aPVlls[count($aPVlls)]=$aLogSocial['social_plus_plai']; + $aTotaux['pv_lls'][count($aTotaux['pv_lls'])]=$aLogSocial['social_plus_plai']; + } + $aProgramme2['pv_lls']=avg(array_sum($aPVlls),count($aPVlls)); + // pas de prix de vente en lli + break; + } + } + $aProgramme2['cfi_lls']=avg(array_sum($aCFIlls),count($aCFIlls)); + $aProgramme2['cfi_lli']=avg(array_sum($aCFIlli),count($aCFIlli)); + } + + $oResult4->closeCursor(); + // logement accession + $oResult5=$oConn->prepare("SELECT id_programme, id_indicateur_logement_familliaux_accession, CASE WHEN id_indicateur_logement_familliaux_accession=1 THEN sum(COALESCE(accession_libre::numeric,0)) ELSE avg(COALESCE(accession_libre::numeric,0)) END AS accession_libre, CASE WHEN id_indicateur_logement_familliaux_accession=1 THEN sum(COALESCE(accession_abordable::numeric,0)) ELSE avg(COALESCE(accession_abordable::numeric,0)) END AS accession_abordable, CASE WHEN id_indicateur_logement_familliaux_accession=1 THEN sum(COALESCE(accession_sociale_securise::numeric,0)) ELSE avg(COALESCE(accession_sociale_securise::numeric,0)) END AS accession_sociale_securise, CASE WHEN id_indicateur_logement_familliaux_accession=1 THEN sum(COALESCE(psla::numeric,0)) ELSE avg(COALESCE(psla::numeric,0)) END AS psla FROM ".$sSchema.".logement_familliaux_accession WHERE id_programme=".$iIdProgramme." AND id_indicateur_logement_familliaux_accession IN (1,4,5,8,9) GROUP BY id_programme, id_indicateur_logement_familliaux_accession"); + $oResult5->execute(); + if($oResult5->rowCount()>0){ + $aLogAccessions=$oResult5->fetchAll(); + $aCFIAccessionLibre=$aCFIAccessionAbordable=$aCFIAccessionSocialeSecurise=array(); + $aPVAccessionLibre=$aPVAccessionAbordable=$aPVAccessionSocialeSecurise=array(); + foreach ($aLogAccessions as $aLogAccession){ + switch ($aLogAccession['id_indicateur_logement_familliaux_accession']){ + case 1: + if($aLogAccession['accession_libre']>0){ + $bSetAccessionLibre=true; + $aProgramme2['nb_accession_libre']=$aLogAccession['accession_libre']; + $aTotaux['nb_accession_libre']=$aTotaux['nb_accession_libre']+$aLogAccession['accession_libre']; + } + if($aLogAccession['accession_abordable']>0){ + $bSetAccessionAbordable=true; + $aProgramme2['nb_accession_abordable']=$aLogAccession['accession_abordable']; + $aTotaux['nb_accession_abordable']=$aTotaux['nb_accession_abordable']+$aLogAccession['accession_abordable']; + } + if($aLogAccession['accession_sociale_securise']>0){ + $bSetAccessionSecurisee=true; + $aProgramme2['nb_accession_sociale_securise']=$aLogAccession['accession_sociale_securise']; + $aTotaux['nb_accession_sociale_securise']=$aTotaux['nb_accession_sociale_securise']+$aLogAccession['accession_sociale_securise']; + } + if($aLogAccession['psla']>0) $aProgramme2['nb_psla']=$aLogAccession['psla']; + break; + case 4: + case 5: + if(!is_null($aLogAccession['accession_libre']) and $aLogAccession['accession_libre']>0){ + $bSetAccessionLibre=true; + $aCFIAccessionLibre[count($aCFIAccessionLibre)]=$aLogAccession['accession_libre']; + $aTotaux['cfi_accession_libre'][count($aTotaux['cfi_accession_libre'])]=$aLogAccession['accession_libre']; + } + if(!is_null($aLogAccession['accession_abordable']) and $aLogAccession['accession_abordable']>0){ + $bSetAccessionAbordable=true; + $aCFIAccessionAbordable[count($aCFIAccessionAbordable)]=$aLogAccession['accession_abordable']; + $aTotaux['cfi_accession_abordable'][count($aTotaux['cfi_accession_abordable'])]=$aLogAccession['accession_abordable']; + } + if(!is_null($aLogAccession['accession_sociale_securise']) and $aLogAccession['accession_sociale_securise']>0){ + $bSetAccessionSecurisee=true; + $aCFIAccessionSocialeSecurise[count($aCFIAccessionSocialeSecurise)]=$aLogAccession['accession_sociale_securise']; + $aTotaux['cfi_accession_sociale_securise'][count($aTotaux['cfi_accession_sociale_securise'])]=$aLogAccession['accession_sociale_securise']; + } + break; + case 8: + case 9: + if(!is_null($aLogAccession['accession_libre']) and $aLogAccession['accession_libre']>0){ + $bSetAccessionLibre=true; + $aPVAccessionLibre[count($aPVAccessionLibre)]=$aLogAccession['accession_libre']; + $aTotaux['pv_accession_libre'][count($aTotaux['pv_accession_libre'])]=$aLogAccession['accession_libre']; + } + if(!is_null($aLogAccession['accession_abordable']) and $aLogAccession['accession_abordable']>0){ + $bSetAccessionAbordable=true; + $aPVAccessionAbordable[count($aPVAccessionAbordable)]=$aLogAccession['accession_abordable']; + $aTotaux['pv_accession_abordable'][count($aTotaux['pv_accession_abordable'])]=$aLogAccession['accession_abordable']; + } + if(!is_null($aLogAccession['accession_sociale_securise']) and $aLogAccession['accession_sociale_securise']>0){ + $bSetAccessionSecurisee=true; + $aPVAccessionSocialeSecurise[count($aPVAccessionSocialeSecurise)]=$aLogAccession['accession_sociale_securise']; + $aTotaux['pv_accession_sociale_securise'][count($aTotaux['pv_accession_sociale_securise'])]=$aLogAccession['accession_sociale_securise']; + } + break; + } + } + $aProgramme2['cfi_accession_libre']=avg(array_sum($aCFIAccessionLibre),count($aCFIAccessionLibre)); + $aProgramme2['cfi_accession_abordable']=avg(array_sum($aCFIAccessionAbordable),count($aCFIAccessionAbordable)); + $aProgramme2['cfi_accession_sociale_securise']=avg(array_sum($aCFIAccessionSocialeSecurise),count($aCFIAccessionSocialeSecurise)); + $aProgramme2['pv_accession_libre']=avg(array_sum($aPVAccessionLibre),count($aPVAccessionLibre)); + $aProgramme2['pv_accession_abordable']=avg(array_sum($aPVAccessionAbordable),count($aPVAccessionAbordable)); + $aProgramme2['pv_accession_sociale_securise']=avg(array_sum($aPVAccessionSocialeSecurise),count($aPVAccessionSocialeSecurise)); + } + $oResult5->closeCursor(); + $aProgrammes2[$aProgramme['id_programme']]=$aProgramme2; + } + $oResult->closeCursor(); + $aTotaux['cfi_accession_libre']=avg(array_sum($aTotaux['cfi_accession_libre']),count($aTotaux['cfi_accession_libre'])); + $aTotaux['pv_accession_libre']=avg(array_sum($aTotaux['pv_accession_libre']),count($aTotaux['pv_accession_libre'])); + $aTotaux['cfi_accession_abordable']=avg(array_sum($aTotaux['cfi_accession_abordable']),count($aTotaux['cfi_accession_abordable'])); + $aTotaux['pv_accession_abordable']=avg(array_sum($aTotaux['pv_accession_abordable']),count($aTotaux['pv_accession_abordable'])); + $aTotaux['cfi_accession_sociale_securise']=avg(array_sum($aTotaux['cfi_accession_sociale_securise']),count($aTotaux['cfi_accession_sociale_securise'])); + $aTotaux['pv_accession_sociale_securise']=avg(array_sum($aTotaux['pv_accession_sociale_securise']),count($aTotaux['pv_accession_sociale_securise'])); + $aTotaux['cfi_lls']=avg(array_sum($aTotaux['cfi_lls']),count($aTotaux['cfi_lls'])); + $aTotaux['pv_lls']=avg(array_sum($aTotaux['pv_lls']),count($aTotaux['pv_lls'])); + $aTotaux['cfi_lli']=avg(array_sum($aTotaux['cfi_lli']),count($aTotaux['cfi_lli'])); + } + $sCssColor='blue'; + include ('get_4_logement.html'); + } + }catch (PDOException $e){ + $sError="ERROR : ".$e->getMessage(); + include ('get_error.html'); + } + } + +}else{ + $sError="ERREUR : Pas de token passé."; + include ('get_error.html'); +} + +?> \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/get_error.html b/src/vitis/vas/doc/suivi_prod_immo/get_error.html new file mode 100644 index 0000000000000000000000000000000000000000..3e670599200dc6bb7ade5ab14efcfc962fc07c34 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/get_error.html @@ -0,0 +1,27 @@ +<!doctype html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <title>BD PROD IMMO - Analyse</title> + <link rel="stylesheet" href="css/bootstrap_4.3.1/bootstrap.min.css"> +</head> +<body> + <div class="container-fluid"> + <div class="row mt-5"> + <div class="col-sm-2"></div> + <div class="col-sm-8"> + <div class="alert alert-danger" role="alert"> + <span data-feather="alert-triangle"></span> <?php echo $sError; ?> + </div> + </div> + <div class="col-sm-2"></div> + </div> + </div> + <!-- Icons --> + <script src="https://unpkg.com/feather-icons/dist/feather.min.js"></script> + <script> + feather.replace() + </script> +</body> +</html> \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/get_excel_3_porteur.py b/src/vitis/vas/doc/suivi_prod_immo/get_excel_3_porteur.py new file mode 100644 index 0000000000000000000000000000000000000000..6b78a1737074413b4a790fc6a126a3971b877fd4 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/get_excel_3_porteur.py @@ -0,0 +1,106 @@ +# coding: utf-8 +import sys, json +import mapscript +from openpyxl import load_workbook +from openpyxl import Workbook +from openpyxl import drawing +from openpyxl.utils import * + +# HOW TO USE : +# python /var/www/vmap/vas/doc/suivi_prod_immo/get_excel_3_porteur.py '{"nom_amenageur":"SERL","nom_amenageur_file":"serl","map":{"xmin":"838581","ymin":"6512122","xmax":"858716","ymax":"6533951","filter":"888,907,1032,891,1041,882,909,936,865,962,889,881,1042,654"},"NB":{"FINZAC":156,"PUP":14,"TOTAL":170},"CF":{"FINZAC":"440","PUP":"420","MOY":438},"PV":{"FINZAC":"2780","PUP":"2926","MOY":2792},"PourcCFPV":{"PUP":14.4,"FINZAC":15.8,"MOY":15.7},"nb_operation":14}' + +mapfile = '/var/www/vmap/vas/doc/suivi_prod_immo/get_map_image_3_porteur.map' +tmpdir = '/var/www/vmap/vas/ws_data/vm4ms/map/tmp/' +template_file = r'template/template_3_porteur.xlsx' + +# Load the data that PHP sent us +try: + data = json.loads(sys.argv[1]) +except: + result = {'status': 'error', 'error': 'JSON invalid : '+sys.argv[1]} + print result + sys.exit(1) + +# map +map = mapscript.mapObj(mapfile) +map.setExtent(int(data['map']['xmin']), int(data['map']['ymin']), int(data['map']['xmax']), int(data['map']['ymax'])) +# layers +a_id_operation=data['map']['filter'].split(',') +operation='' +for id_operation in a_id_operation: + if operation=='': + operation="[id_operation]='"+id_operation+"'" + else: + operation+=" or [id_operation]='"+id_operation+"'" +layer_op = map.getLayerByName("prod_immo_operation"); +result = layer_op.setFilter("("+operation+")") +# image +map_image_file=tmpdir+data['nom_amenageur_file'].lower()+"_porteur.png" +img = map.draw() +img.save(map_image_file) + +filename=data['nom_amenageur_file'].lower() +destination = tmpdir+'3_porteur_'+filename+'.xlsx' +template = load_workbook(template_file) +sheet = template.active +# nom_amenageur +nom_amenageur=data['nom_amenageur'] +#nom_amenageur=nom_amenageur.decode('utf8') +nom_amenageur=nom_amenageur.encode('utf-8') +sheet.cell(row=3, column=1).value = 'Opérateur immobilier : '+nom_amenageur +# nb_operation +sheet.cell(row=4, column=1).value = 'nombre d''opération : '+str(data['nb_operation']) +# type de financement +if 'NB' in data: + if 'PUP' in data['NB']: sheet.cell(row=34, column=2).value = data['NB']['PUP'] + if 'FINZAC' in data['NB']: sheet.cell(row=34, column=3).value = data['NB']['FINZAC'] + if 'TA' in data['NB']: sheet.cell(row=34, column=4).value = data['NB']['TA'] + if 'TAM' in data['NB']: sheet.cell(row=34, column=5).value = data['NB']['TAM'] + if 'PEPE' in data['NB']: sheet.cell(row=34, column=6).value = data['NB']['PEPE'] + if 'AUT' in data['NB']: sheet.cell(row=34, column=7).value = data['NB']['AUT'] + if 'ND' in data['NB']: sheet.cell(row=34, column=8).value = data['NB']['ND'] + if 'TOTAL' in data['NB']: sheet.cell(row=34, column=9).value = data['NB']['TOTAL'] +if 'CF' in data: + if 'PUP' in data['CF']: sheet.cell(row=35, column=2).value = data['CF']['PUP'] + if 'FINZAC' in data['CF']: sheet.cell(row=35, column=3).value = data['CF']['FINZAC'] + if 'TA' in data['CF']: sheet.cell(row=35, column=4).value = data['CF']['TA'] + if 'TAM' in data['CF']: sheet.cell(row=35, column=5).value = data['CF']['TAM'] + if 'PEPE' in data['CF']: sheet.cell(row=35, column=6).value = data['CF']['PEPE'] + if 'AUT' in data['CF']: sheet.cell(row=35, column=7).value = data['CF']['AUT'] + if 'ND' in data['CF']: sheet.cell(row=35, column=8).value = data['CF']['ND'] + if 'MOY' in data['CF']: sheet.cell(row=35, column=9).value = data['CF']['MOY'] +if 'PV' in data: + if 'PUP' in data['PV']: sheet.cell(row=36, column=2).value = data['PV']['PUP'] + if 'FINZAC' in data['PV']: sheet.cell(row=36, column=3).value = data['PV']['FINZAC'] + if 'TA' in data['PV']: sheet.cell(row=36, column=4).value = data['PV']['TA'] + if 'TAM' in data['PV']: sheet.cell(row=36, column=5).value = data['PV']['TAM'] + if 'PEPE' in data['PV']: sheet.cell(row=36, column=6).value = data['PV']['PEPE'] + if 'AUT' in data['PV']: sheet.cell(row=36, column=7).value = data['PV']['AUT'] + if 'ND' in data['PV']: sheet.cell(row=36, column=8).value = data['PV']['ND'] + if 'MOY' in data['PV']: sheet.cell(row=36, column=9).value = data['PV']['MOY'] +if 'PourcCFPV' in data: + if 'PUP' in data['PourcCFPV']: sheet.cell(row=37, column=2).value = data['PourcCFPV']['PUP'] + if 'FINZAC' in data['PourcCFPV']: sheet.cell(row=37, column=3).value = data['PourcCFPV']['FINZAC'] + if 'TA' in data['PourcCFPV']: sheet.cell(row=37, column=4).value = data['PourcCFPV']['TA'] + if 'TAM' in data['PourcCFPV']: sheet.cell(row=37, column=5).value = data['PourcCFPV']['TAM'] + if 'PEPE' in data['PourcCFPV']: sheet.cell(row=37, column=6).value = data['PourcCFPV']['PEPE'] + if 'AUT' in data['PourcCFPV']: sheet.cell(row=37, column=7).value = data['PourcCFPV']['AUT'] + if 'ND' in data['PourcCFPV']: sheet.cell(row=37, column=8).value = data['PourcCFPV']['ND'] + if 'MOY' in data['PourcCFPV']: sheet.cell(row=37, column=9).value = data['PourcCFPV']['MOY'] + +# legend image +legend = drawing.image.Image('images/legende_get_3_porteur.png') +legend.anchor = 'A6' +sheet.add_image(legend) +# map image +map_image = drawing.image.Image(map_image_file) +map_image.anchor = 'C6' +sheet.add_image(map_image) + +template.save(destination) + +# Generate some data to send to PHP +result = {'status': 'succes', 'file': destination} + +# Send it to stdout (to PHP) +print json.dumps(result) \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/get_map_image_1_operation.map b/src/vitis/vas/doc/suivi_prod_immo/get_map_image_1_operation.map new file mode 100644 index 0000000000000000000000000000000000000000..f2cc65bcff1e0df57236a967a3db890379264af1 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/get_map_image_1_operation.map @@ -0,0 +1,600 @@ +MAP + NAME bd_prod_immo + STATUS ON + # Étentue de la carte + EXTENT 842299 6516833 843076 6517501 + # Taille de l'image générée + SIZE 800 500 + # Couleur de fond de l'image générée + IMAGECOLOR 255 255 255 + + # Format de sortie de l'image générée + OUTPUTFORMAT + NAME "png" + DRIVER AGG/PNG + MIMETYPE "image/png" + IMAGEMODE RGB + EXTENSION "png" + FORMATOPTION "GAMMA=0.75" + END + IMAGETYPE "png" + + # Type de légende générée (HTML) + LEGEND + STATUS ON + IMAGECOLOR 244 244 244 + KEYSIZE 15 15 + KEYSPACING 5 5 + LABEL + TYPE TRUETYPE + FONT "arial" + SIZE 8 + COLOR 0 0 0 + PARTIALS TRUE + END + TEMPLATE "/var/www/vmap/vas/ws_data/vm4ms/map/template/legend.html" + END + + MAXSIZE 4096 + SYMBOLSET "/var/www/vmap/vas/ws_data/vm4ms/map/symbols/symbols.sym" + FONTSET "/var/www/vmap/vas/ws_data/vm4ms/map/fonts/fonts.list" + + #CONFIG "MS_ERRORFILE" "/var/www/vmap/vas/log/mapserver/test/cb973e656aa3c2e416beff082ac7b2c165c152f4c2e14c679b2652476cabcb9d_prod_immo_programme_immobilier_vocation.log" + CONFIG "PROJ_LIB" "/var/www/vmap/vas/ws_data/vm4ms/map/proj" + DEBUG 2 + + PROJECTION + #EPSG:2154 / RGF93 + "+init=epsg:2154" + END + + WEB + #METADATA + # "wms_title" "Test" + # "wms_onlineresource" "https://geo.urbalyon.org//wms/public/Test" + # "wms_srs" "EPSG:2154" + # "wms_enable_request" "*" + #END + # Les attributs TEMPLATE, IMAGEPATH et IMAGEURL sont ajoutés dynamiquement lors des tests. Ils sont inutiles en production + #TEMPLATE "../template/template.html" + IMAGEPATH "/var/www/vmap/vas/ws_data/vm4ms/map/tmp/" + IMAGEURL "https://geo.urbalyon.org//ws_data/vm4ms/map/tmp/" + END + + LAYER + NAME "Ortho" + TYPE RASTER + STATUS ON + CONNECTION "https://download.data.grandlyon.com/wms/grandlyon?" + CONNECTIONTYPE WMS + METADATA + "wms_srs" "EPSG:3946" + "wms_name" "Ortho2018_Dalle_unique_8cm_CC46" + "wms_server_version" "1.1.0" + "wms_format" "image/png" + END + END + + LAYER + NAME "Limite_france" + TYPE RASTER + STATUS ON + CONNECTION "https://geo.urbalyon.org/wms/public/FluxPublic?" + CONNECTIONTYPE WMS + METADATA + "wms_srs" "EPSG:2154" + "wms_name" "Limite_france" + "wms_server_version" "1.1.0" + "wms_format" "image/png" + END + END + + LAYER + NAME "prod_immo_operation" + TYPE POLYGON + STATUS ON + CONNECTIONTYPE postgis + CONNECTION "user='fabien' password='Cov6Cov6' dbname='suivi_prod_immo' host='srv-postgres' port='5432'" + DATA "geom from \"prod_immo\".\"operation\" USING SRID=2154 USING UNIQUE id_operation" + OPACITY 100 + PROJECTION + "+init=epsg:2154" + END + #CLASSITEM "geom_approximative" + LABELITEM "nom_operation" + FILTERITEM "id_operation" + #SIZEUNITS METERS + + CLASS + NAME "Vocation résidentielle" + EXPRESSION (('[code_vocation]' = 'L') AND ('[geom_approximative]' = 'f')) + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + #MAXSCALEDENOM 60000 + COLOR "#d1d1d1" + OUTLINECOLOR 255 145 0 + WIDTH 1 + END + STYLE + #MAXSCALEDENOM 60000 + OUTLINECOLOR 255 145 0 + WIDTH 3 + END + LABEL + #MAXSCALEDENOM 60000 + OUTLINECOLOR 255 255 255 + TYPE TRUETYPE + FONT "verdana" + SIZE 10 + MINSIZE 10 + MAXSIZE 10 + POSITION AUTO + COLOR "#000000" + ANTIALIAS TRUE + PARTIALS FALSE + FORCE FALSE + END + END + CLASS + #NAME "Vocation résidentielle (périmètre approximatif)" + EXPRESSION (('[code_vocation]' = 'L') AND ('[geom_approximative]' = 't')) + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + MAXSCALEDENOM 60000 + COLOR "#d1d1d1" + WIDTH 1 + END + STYLE + MAXSCALEDENOM 60000 + OUTLINECOLOR 255 145 0 + WIDTH 3 + LINECAP butt + PATTERN 10 10 10 10 END + END + LABEL + MAXSCALEDENOM 60000 + OUTLINECOLOR 255 255 255 + TYPE TRUETYPE + FONT "verdana" + SIZE 10 + MINSIZE 10 + MAXSIZE 10 + POSITION AUTO + COLOR "#000000" + ANTIALIAS TRUE + PARTIALS FALSE + FORCE FALSE + END + END + CLASS + NAME "Vocation économique" + EXPRESSION (('[code_vocation]' = 'ECO') AND ('[geom_approximative]' = 'f')) + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + MAXSCALEDENOM 60000 + COLOR "#d1d1d1" + WIDTH 1 + END + STYLE + MAXSCALEDENOM 60000 + OUTLINECOLOR 106 163 227 + WIDTH 3 + END + LABEL + MAXSCALEDENOM 60000 + OUTLINECOLOR 255 255 255 + TYPE TRUETYPE + FONT "verdana" + SIZE 10 + MINSIZE 10 + MAXSIZE 10 + POSITION AUTO + COLOR "#000000" + ANTIALIAS TRUE + PARTIALS FALSE + FORCE FALSE + END + END + CLASS + #NAME "Vocation économique (périmètre approximatif)" + EXPRESSION (('[code_vocation]' = 'ECO') AND ('[geom_approximative]' = 't')) + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + MAXSCALEDENOM 60000 + COLOR "#d1d1d1" + WIDTH 1 + END + STYLE + MAXSCALEDENOM 60000 + OUTLINECOLOR 106 163 227 + WIDTH 3 + LINECAP butt + PATTERN 10 10 10 10 END + END + LABEL + MAXSCALEDENOM 60000 + OUTLINECOLOR 255 255 255 + TYPE TRUETYPE + FONT "verdana" + SIZE 10 + MINSIZE 10 + MAXSIZE 10 + POSITION AUTO + COLOR "#000000" + ANTIALIAS TRUE + PARTIALS FALSE + FORCE FALSE + END + END + CLASS + NAME "Vocation d'équipements publics" + EXPRESSION (('[code_vocation]' = 'E') AND ('[geom_approximative]' = 'f')) + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + MAXSCALEDENOM 60000 + COLOR "#d1d1d1" + WIDTH 1 + END + STYLE + MAXSCALEDENOM 60000 + OUTLINECOLOR 161 101 196 + WIDTH 3 + END + LABEL + MAXSCALEDENOM 60000 + OUTLINECOLOR 255 255 255 + TYPE TRUETYPE + FONT "verdana" + SIZE 10 + MINSIZE 10 + MAXSIZE 10 + POSITION AUTO + COLOR "#000000" + ANTIALIAS TRUE + PARTIALS FALSE + FORCE FALSE + END + END + CLASS + #NAME "Vocation d'équipements publics (périmètre approximatif)" + EXPRESSION (('[code_vocation]' = 'E') AND ('[geom_approximative]' = 't')) + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + MAXSCALEDENOM 60000 + COLOR "#d1d1d1" + WIDTH 1 + END + STYLE + MAXSCALEDENOM 60000 + OUTLINECOLOR 161 101 196 + WIDTH 3 + LINECAP butt + PATTERN 10 10 10 10 END + END + LABEL + MAXSCALEDENOM 60000 + OUTLINECOLOR 255 255 255 + TYPE TRUETYPE + FONT "verdana" + SIZE 10 + MINSIZE 10 + MAXSIZE 10 + POSITION AUTO + COLOR "#000000" + ANTIALIAS TRUE + PARTIALS FALSE + FORCE FALSE + END + END + CLASS + NAME "Parcs et espaces publics" + EXPRESSION (('[code_vocation]' = 'P') AND ('[geom_approximative]' = 'f')) + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + MAXSCALEDENOM 60000 + COLOR "#d1d1d1" + WIDTH 1 + END + STYLE + MAXSCALEDENOM 60000 + OUTLINECOLOR 160 211 93 + WIDTH 3 + END + LABEL + MAXSCALEDENOM 60000 + OUTLINECOLOR 255 255 255 + TYPE TRUETYPE + FONT "verdana" + SIZE 10 + MINSIZE 10 + MAXSIZE 10 + POSITION AUTO + COLOR "#000000" + ANTIALIAS TRUE + PARTIALS FALSE + FORCE FALSE + END + END + CLASS + #NAME "Vocation d'équipements publics (périmètre approximatif)" + EXPRESSION (('[code_vocation]' = 'P') AND ('[geom_approximative]' = 't')) + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + MAXSCALEDENOM 60000 + COLOR "#d1d1d1" + WIDTH 1 + END + STYLE + MAXSCALEDENOM 60000 + OUTLINECOLOR 160 211 93 + WIDTH 3 + LINECAP butt + PATTERN 10 10 10 10 END + END + LABEL + MAXSCALEDENOM 60000 + OUTLINECOLOR 255 255 255 + TYPE TRUETYPE + FONT "verdana" + SIZE 10 + MINSIZE 10 + MAXSIZE 10 + POSITION AUTO + COLOR "#000000" + ANTIALIAS TRUE + PARTIALS FALSE + FORCE FALSE + END + END + CLASS + NAME "Vocation mixte" + EXPRESSION (('[code_vocation]' = 'M') AND ('[geom_approximative]' = 'f')) + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + MAXSCALEDENOM 60000 + COLOR "#d1d1d1" + WIDTH 1 + END + STYLE + MAXSCALEDENOM 60000 + OUTLINECOLOR "#c2101a" + WIDTH 3 + END + LABEL + MAXSCALEDENOM 60000 + OUTLINECOLOR 255 255 255 + TYPE TRUETYPE + FONT "verdana" + SIZE 10 + MINSIZE 10 + MAXSIZE 10 + POSITION AUTO + COLOR "#000000" + ANTIALIAS TRUE + PARTIALS FALSE + FORCE FALSE + END + END + CLASS + NAME "Vocation indéfinie" + EXPRESSION (('[code_vocation]' = '') AND ('[geom_approximative]' = 'f')) + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + MAXSCALEDENOM 60000 + COLOR "#d1d1d1" + WIDTH 1 + END + STYLE + MAXSCALEDENOM 60000 + OUTLINECOLOR "#919899" + WIDTH 3 + END + LABEL + MAXSCALEDENOM 60000 + OUTLINECOLOR 255 255 255 + TYPE TRUETYPE + FONT "verdana" + SIZE 10 + MINSIZE 10 + MAXSIZE 10 + POSITION AUTO + COLOR "#000000" + ANTIALIAS TRUE + PARTIALS FALSE + FORCE FALSE + END + END + CLASS + NAME "Périmètre validé" + EXPRESSION (('[code_vocation]' = 'M') AND ('[geom_approximative]' = 't')) + KEYIMAGE "../symbols/legend_prod_immo/rectangle.png" + STYLE + MAXSCALEDENOM 60000 + COLOR "#d1d1d1" + WIDTH 1 + END + STYLE + MAXSCALEDENOM 60000 + OUTLINECOLOR 221 81 112 + WIDTH 3 + LINECAP butt + PATTERN 10 10 10 10 END + END + LABEL + MAXSCALEDENOM 60000 + OUTLINECOLOR 255 255 255 + TYPE TRUETYPE + FONT "verdana" + SIZE 10 + MINSIZE 10 + MAXSIZE 10 + POSITION AUTO + COLOR "#000000" + ANTIALIAS TRUE + PARTIALS FALSE + FORCE FALSE + END + END + CLASS + NAME "Périmètre approximatif" + EXPRESSION (('[code_vocation]' = '') AND ('[geom_approximative]' = 't')) + KEYIMAGE "../symbols/legend_prod_immo/rectangle_point.png" + STYLE + MAXSCALEDENOM 60000 + COLOR "#d1d1d1" + WIDTH 1 + END + STYLE + MAXSCALEDENOM 60000 + OUTLINECOLOR "#919899" + WIDTH 3 + LINECAP butt + PATTERN 10 10 10 10 END + END + LABEL + MAXSCALEDENOM 60000 + OUTLINECOLOR 255 255 255 + TYPE TRUETYPE + FONT "verdana" + SIZE 10 + MINSIZE 10 + MAXSIZE 10 + POSITION AUTO + COLOR "#000000" + ANTIALIAS TRUE + PARTIALS FALSE + FORCE FALSE + END + END + END + + LAYER + NAME "prod_immo_ilot" + TYPE POLYGON + STATUS ON + CONNECTIONTYPE postgis + CONNECTION "user='fabien' password='Cov6Cov6' dbname='suivi_prod_immo' host='srv-postgres' port='5432'" + DATA "geom from \"prod_immo\".\"ilot\" USING SRID=2154 USING UNIQUE id_ilot" + OPACITY 100 + PROJECTION + "+init=epsg:2154" + END + FILTERITEM "id_operation" + LABELITEM "nom_ilot" + #SIZEUNITS METERS + CLASS + NAME "Îlots" + STYLE + MAXSCALEDENOM 20000 + COLOR "#f2f2a5" + WIDTH 1 + END + STYLE + MAXSCALEDENOM 10000 + OUTLINECOLOR "#e3e320" + WIDTH 1 + END + LABEL + MAXSCALEDENOM 5000 + OUTLINECOLOR 255 255 255 + TYPE TRUETYPE + FONT "verdana" + SIZE 10 + MINSIZE 10 + MAXSIZE 10 + POSITION AUTO + COLOR "#27450f" + ANTIALIAS TRUE + PARTIALS FALSE + FORCE FALSE + END + END + END + + LAYER + NAME "prod_immo_programme_immobilier_vocation" + TYPE POLYGON + STATUS ON + CONNECTIONTYPE postgis + CONNECTION "user='fabien' password='Cov6Cov6' dbname='suivi_prod_immo' host='srv-postgres' port='5432'" + DATA "geom from \"prod_immo\".\"v_programme_immobilier_vocation_layer\" USING SRID=2154 USING UNIQUE id_programme" + OPACITY 100 + PROJECTION + "+init=epsg:2154" + END + #LABELITEM "nom_ilot" + #SIZEUNITS METERS + + CLASS + NAME "Logements" + EXPRESSION ('[vocation]' = 'logement') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_programme_legend.png" + #STYLE + # MAXSCALEDENOM 20000 + # COLOR "#f5bac1" + # WIDTH 1 + #END + STYLE + MAXSCALEDENOM 10000 + OUTLINECOLOR "#3d3d3d" + COLOR 255 145 0 + WIDTH 1 + END + #LABEL + # MAXSCALEDENOM 10000 + # OUTLINECOLOR 255 255 255 + # TYPE TRUETYPE + # FONT "verdana" + # SIZE 10 + # MINSIZE 10 + # MAXSIZE 10 + # POSITION AUTO + # COLOR 255 0 0 + # ANTIALIAS TRUE + # PARTIALS FALSE + # FORCE FALSE + #END + END + CLASS + NAME "Activités économiques" + EXPRESSION ('[vocation]' = 'eco') + STYLE + MAXSCALEDENOM 10000 + OUTLINECOLOR "#3d3d3d" + COLOR 106 163 227 + WIDTH 1 + END + END + CLASS + NAME "Equipements de superstructure" + EXPRESSION ('[vocation]' = 'equipement') + STYLE + MAXSCALEDENOM 10000 + OUTLINECOLOR "#3d3d3d" + COLOR 161 101 196 + WIDTH 1 + END + END + CLASS + NAME "Mixte" + EXPRESSION ('[vocation]' = 'mixte') + STYLE + MAXSCALEDENOM 10000 + OUTLINECOLOR "#3d3d3d" + COLOR "#c2101a" + WIDTH 1 + END + END + CLASS + NAME "Indéfini" + EXPRESSION ('[vocation]' = '') + STYLE + MAXSCALEDENOM 10000 + OUTLINECOLOR "#3d3d3d" + COLOR "#a8a8a8" + WIDTH 1 + END + END + END + +END diff --git a/src/vitis/vas/doc/suivi_prod_immo/get_map_image_1_operation.py b/src/vitis/vas/doc/suivi_prod_immo/get_map_image_1_operation.py new file mode 100644 index 0000000000000000000000000000000000000000..250a1d5c84b787f5ed85178d93d422173ed27c9d --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/get_map_image_1_operation.py @@ -0,0 +1,27 @@ +import sys +import mapscript + +# HOW TO USE : +# python get_map_image_1_operation.py 848827 6519546 849279 6520166 operation_1058.png 1058 + +mapfile = '/var/www/vmap/vas/doc/suivi_prod_immo/get_map_image_1_operation.map' +tmpdir = '/var/www/vmap/vas/ws_data/vm4ms/map/tmp/' + +xmin=float(sys.argv[1]) +ymin=float(sys.argv[2]) +xmax=float(sys.argv[3]) +ymax=float(sys.argv[4]) +image=str(sys.argv[5]) +filter=str(sys.argv[6]) + +# map +map = mapscript.mapObj(mapfile) +map.setExtent(xmin, ymin, xmax, ymax) +# layers +layer_op = map.getLayerByName("prod_immo_operation"); +result = layer_op.setFilter(filter) +layer_ilot = map.getLayerByName("prod_immo_ilot"); +result = layer_ilot.setFilter(filter) +# image +img = map.draw() +img.save(tmpdir+image) \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/get_map_image_2_type.map b/src/vitis/vas/doc/suivi_prod_immo/get_map_image_2_type.map new file mode 100644 index 0000000000000000000000000000000000000000..8d25dd4c814d13b8f0f72a95005b751da201ab6c --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/get_map_image_2_type.map @@ -0,0 +1,983 @@ +MAP + NAME bd_prod_immo + STATUS ON + # Étentue de la carte + EXTENT 842299 6516833 843076 6517501 + # Taille de l'image générée + SIZE 700 500 + # Couleur de fond de l'image générée + IMAGECOLOR 255 255 255 + + # Format de sortie de l'image générée + OUTPUTFORMAT + NAME "png" + DRIVER AGG/PNG + MIMETYPE "image/png" + IMAGEMODE RGB + EXTENSION "png" + FORMATOPTION "GAMMA=0.75" + END + IMAGETYPE "png" + + # Type de légende générée (HTML) + LEGEND + STATUS ON + IMAGECOLOR 244 244 244 + KEYSIZE 15 15 + KEYSPACING 5 5 + LABEL + TYPE TRUETYPE + FONT "arial" + SIZE 8 + COLOR 0 0 0 + PARTIALS TRUE + END + TEMPLATE "/var/www/vmap/vas/ws_data/vm4ms/map/template/legend.html" + END + + MAXSIZE 4096 + SYMBOLSET "/var/www/vmap/vas/ws_data/vm4ms/map/symbols/symbols.sym" + FONTSET "/var/www/vmap/vas/ws_data/vm4ms/map/fonts/fonts.list" + + #CONFIG "MS_ERRORFILE" "/var/www/vmap/vas/log/mapserver/test/cb973e656aa3c2e416beff082ac7b2c165c152f4c2e14c679b2652476cabcb9d_prod_immo_programme_immobilier_vocation.log" + CONFIG "PROJ_LIB" "/var/www/vmap/vas/ws_data/vm4ms/map/proj" + DEBUG 2 + + PROJECTION + #EPSG:2154 / RGF93 + "+init=epsg:2154" + END + + WEB + IMAGEPATH "/var/www/vmap/vas/ws_data/vm4ms/map/tmp/" + IMAGEURL "https://geo.urbalyon.org//ws_data/vm4ms/map/tmp/" + END + + LAYER + NAME "Ortho" + TYPE RASTER + STATUS ON + CONNECTION "https://download.data.grandlyon.com/wms/grandlyon?" + CONNECTIONTYPE WMS + METADATA + "wms_srs" "EPSG:3946" + "wms_name" "Ortho2018_Dalle_unique_8cm_CC46" + "wms_server_version" "1.1.0" + "wms_format" "image/png" + END + END + + LAYER + NAME "Conférence Territoriale des Maires" + TYPE POLYGON + STATUS ON + CONNECTIONTYPE postgis + CONNECTION "user='fabien' password='Cov6Cov6' dbname='suivi_prod_immo' host='srv-postgres' port='5432'" + DATA "geom from \"prod_immo\".\"conference_territoriale_maire\" USING SRID=2154 USING UNIQUE id_ctm" + DEBUG 0 + LABELITEM nom_ctm + PROJECTION + "+init=epsg:2154" + END + + + CLASS + #NAME "Limites communales" + STYLE + OUTLINECOLOR 255 255 255 + WIDTH 3 + END + #LABEL + # COLOR 0 0 0 + # OUTLINECOLOR 255 255 255 + # FONT "arial" + # TYPE truetype + # SIZE 6 + # #ANGLE [MYANGLE] + # POSITION AUTO + # PARTIALS FALSE + #END + END + END + + LAYER + NAME "prod_immo_operation" + TYPE POINT + STATUS ON + CONNECTIONTYPE postgis + CONNECTION "user='fabien' password='Cov6Cov6' dbname='suivi_prod_immo' host='srv-postgres' port='5432'" + DATA "geom from \"prod_immo\".\"v_operation_financement_layer\" USING SRID=2154 USING UNIQUE id_operation" + OPACITY 100 + PROJECTION + "+init=epsg:2154" + END + #CLASSITEM "geom_approximative" + LABELITEM "code_financement_equ_public" + #FILTERITEM "id_operation" + #FILTER ([id_operation]='1037' or [id_operation]='941' or [id_operation]='628') + #SIZEUNITS METERS + + CLASS + #NAME "PUP" + EXPRESSION ('[code_financement_equ_public]' = 'PUP' and '[code_procedure_amenagement]' = 'PA') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 145 0 + OUTLINECOLOR 0 0 0 + SYMBOL "circle" + SIZE 20 + WIDTH 2 + END + END + CLASS + #NAME "PUP" + EXPRESSION ('[code_financement_equ_public]' = 'PUP' and '[code_procedure_amenagement]' = 'PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 145 0 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + #NAME "PUP" + EXPRESSION ('[code_financement_equ_public]' = 'PUP' and '[code_procedure_amenagement]' = 'ZAC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + #MINSCALEDENOM 60000 + COLOR 255 145 0 + OUTLINECOLOR 0 0 0 + SYMBOL "square" + SIZE 20 + WIDTH 2 + END + END + CLASS + #NAME "PUP" + EXPRESSION ('[code_financement_equ_public]' = 'PUP' and '[code_procedure_amenagement]' = 'PA/PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 145 0 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + #NAME "PUP" + EXPRESSION ('[code_financement_equ_public]' = 'PUP' and '[code_procedure_amenagement]' = 'AUT') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 145 0 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + #NAME "PUP" + EXPRESSION ('[code_financement_equ_public]' = 'PUP' and '[code_procedure_amenagement]' = 'ND') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 145 0 + OUTLINECOLOR 0 0 0 + SYMBOL "triangle" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "FINZAC" + EXPRESSION ('[code_financement_equ_public]' = 'FINZAC' and '[code_procedure_amenagement]' = 'PA') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 106 163 227 + OUTLINECOLOR 0 0 0 + SYMBOL "circle" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "FINZAC" + EXPRESSION ('[code_financement_equ_public]' = 'FINZAC' and '[code_procedure_amenagement]' = 'PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 106 163 227 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "FINZAC" + EXPRESSION ('[code_financement_equ_public]' = 'FINZAC' and '[code_procedure_amenagement]' = 'ZAC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 106 163 227 + OUTLINECOLOR 0 0 0 + SYMBOL "square" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "FINZAC" + EXPRESSION ('[code_financement_equ_public]' = 'FINZAC' and '[code_procedure_amenagement]' = 'PA/PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 106 163 227 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "FINZAC" + EXPRESSION ('[code_financement_equ_public]' = 'FINZAC' and '[code_procedure_amenagement]' = 'AUT') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 106 163 227 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "FINZAC" + EXPRESSION ('[code_financement_equ_public]' = 'FINZAC' and '[code_procedure_amenagement]' = 'ND') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 106 163 227 + OUTLINECOLOR 0 0 0 + SYMBOL "triangle" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "TA" + EXPRESSION ('[code_financement_equ_public]' = 'TA' and '[code_procedure_amenagement]' = 'PA') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 161 101 196 + OUTLINECOLOR 0 0 0 + SYMBOL "circle" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "TA" + EXPRESSION ('[code_financement_equ_public]' = 'TA' and '[code_procedure_amenagement]' = 'PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 161 101 196 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "TA" + EXPRESSION ('[code_financement_equ_public]' = 'TA' and '[code_procedure_amenagement]' = 'ZAC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 161 101 196 + OUTLINECOLOR 0 0 0 + SYMBOL "square" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "TA" + EXPRESSION ('[code_financement_equ_public]' = 'TA' and '[code_procedure_amenagement]' = 'PA/PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 161 101 196 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "TA" + EXPRESSION ('[code_financement_equ_public]' = 'TA' and '[code_procedure_amenagement]' = 'AUT') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 161 101 196 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "TA" + EXPRESSION ('[code_financement_equ_public]' = 'TA' and '[code_procedure_amenagement]' = 'ND') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 161 101 196 + OUTLINECOLOR 0 0 0 + SYMBOL "triangle" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "TAM" + EXPRESSION ('[code_financement_equ_public]' = 'TAM' and '[code_procedure_amenagement]' = 'PA') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 253 105 + OUTLINECOLOR 0 0 0 + SYMBOL "circle" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "TAM" + EXPRESSION ('[code_financement_equ_public]' = 'TAM' and '[code_procedure_amenagement]' = 'PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 253 105 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "TAM" + EXPRESSION ('[code_financement_equ_public]' = 'TAM' and '[code_procedure_amenagement]' = 'ZAC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 253 105 + OUTLINECOLOR 0 0 0 + SYMBOL "square" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "TAM" + EXPRESSION ('[code_financement_equ_public]' = 'TAM' and '[code_procedure_amenagement]' = 'PA/PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 253 105 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "TAM" + EXPRESSION ('[code_financement_equ_public]' = 'TAM' and '[code_procedure_amenagement]' = 'AUT') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 253 105 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "TAM" + EXPRESSION ('[code_financement_equ_public]' = 'TAM' and '[code_procedure_amenagement]' = 'ND') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 253 105 + OUTLINECOLOR 0 0 0 + SYMBOL "triangle" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "PEPE" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE' and '[code_procedure_amenagement]' = 'PA') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 223 223 223 + OUTLINECOLOR 0 0 0 + SYMBOL "circle" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "PEPE" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE' and '[code_procedure_amenagement]' = 'PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 223 223 223 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "PEPE" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE' and '[code_procedure_amenagement]' = 'ZAC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 223 223 223 + OUTLINECOLOR 0 0 0 + SYMBOL "square" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "PEPE" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE' and '[code_procedure_amenagement]' = 'PA/PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 223 223 223 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "PEPE" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE' and '[code_procedure_amenagement]' = 'AUT') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 223 223 223 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "PEPE" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE' and '[code_procedure_amenagement]' = 'ND') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 223 223 223 + OUTLINECOLOR 0 0 0 + SYMBOL "triangle" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "AUT" + EXPRESSION ('[code_financement_equ_public]' = 'AUT' and '[code_procedure_amenagement]' = 'PA') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 160 211 93 + OUTLINECOLOR 0 0 0 + SYMBOL "circle" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "AUT" + EXPRESSION ('[code_financement_equ_public]' = 'AUT' and '[code_procedure_amenagement]' = 'PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 160 211 93 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "AUT" + EXPRESSION ('[code_financement_equ_public]' = 'AUT' and '[code_procedure_amenagement]' = 'ZAC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 160 211 93 + OUTLINECOLOR 0 0 0 + SYMBOL "square" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "AUT" + EXPRESSION ('[code_financement_equ_public]' = 'AUT' and '[code_procedure_amenagement]' = 'PA/PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 160 211 93 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "AUT" + EXPRESSION ('[code_financement_equ_public]' = 'AUT' and '[code_procedure_amenagement]' = 'AUT') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 160 211 93 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "AUT" + EXPRESSION ('[code_financement_equ_public]' = 'AUT' and '[code_procedure_amenagement]' = 'ND') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 160 211 93 + OUTLINECOLOR 0 0 0 + SYMBOL "triangle" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "ND NULL" + EXPRESSION ('[code_financement_equ_public]' = 'ND' or '[code_financement_equ_public]' = '' and '[code_procedure_amenagement]' = 'PA') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 255 255 + OUTLINECOLOR 0 0 0 + SYMBOL "circle" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "ND NULL" + EXPRESSION ('[code_financement_equ_public]' = 'ND' or '[code_financement_equ_public]' = '' and '[code_procedure_amenagement]' = 'PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 255 255 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "ND NULL" + EXPRESSION ('[code_financement_equ_public]' = 'ND' or '[code_financement_equ_public]' = '' and '[code_procedure_amenagement]' = 'ZAC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 255 255 + OUTLINECOLOR 0 0 0 + SYMBOL "square" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "ND NULL" + EXPRESSION ('[code_financement_equ_public]' = 'ND' or '[code_financement_equ_public]' = '' and '[code_procedure_amenagement]' = 'PA/PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 255 255 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "ND NULL" + EXPRESSION ('[code_financement_equ_public]' = 'ND' or '[code_financement_equ_public]' = '' and '[code_procedure_amenagement]' = 'AUT') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 255 255 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "ND NULL" + EXPRESSION ('[code_financement_equ_public]' = 'ND' or '[code_financement_equ_public]' = '' and '[code_procedure_amenagement]' = 'ND') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 255 255 + OUTLINECOLOR 0 0 0 + SYMBOL "triangle" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "AUT,TA" + EXPRESSION ('[code_financement_equ_public]' = 'TA,AUT' or '[code_financement_equ_public]' = 'AUT,TA' and '[code_procedure_amenagement]' = 'PA') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 160 211 93 + OUTLINECOLOR 0 0 0 + SYMBOL "circle" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 161 101 196 + SYMBOL "circle" + SIZE 10 + END + END + CLASS + NAME "AUT,TA" + EXPRESSION ('[code_financement_equ_public]' = 'TA,AUT' or '[code_financement_equ_public]' = 'AUT,TA' and '[code_procedure_amenagement]' = 'PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 160 211 93 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 161 101 196 + SYMBOL "pentagon" + SIZE 9 + END + END + CLASS + NAME "AUT,TA" + EXPRESSION ('[code_financement_equ_public]' = 'TA,AUT' or '[code_financement_equ_public]' = 'AUT,TA' and '[code_procedure_amenagement]' = 'ZAC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 160 211 93 + OUTLINECOLOR 0 0 0 + SYMBOL "square" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 161 101 196 + SYMBOL "square" + SIZE 9 + END + END + CLASS + NAME "AUT,TA" + EXPRESSION ('[code_financement_equ_public]' = 'TA,AUT' or '[code_financement_equ_public]' = 'AUT,TA' and '[code_procedure_amenagement]' = 'PA/PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 160 211 93 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 161 101 196 + SYMBOL "pentagon" + SIZE 9 + END + END + CLASS + NAME "AUT,TA" + EXPRESSION ('[code_financement_equ_public]' = 'TA,AUT' or '[code_financement_equ_public]' = 'AUT,TA' and '[code_procedure_amenagement]' = 'AUT') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 160 211 93 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 161 101 196 + SYMBOL "pentagon" + SIZE 9 + END + END + CLASS + NAME "AUT,TA" + EXPRESSION ('[code_financement_equ_public]' = 'TA,AUT' or '[code_financement_equ_public]' = 'AUT,TA' and '[code_procedure_amenagement]' = 'ND') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 160 211 93 + OUTLINECOLOR 0 0 0 + SYMBOL "triangle" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 161 101 196 + SYMBOL "triangle" + SIZE 9 + END + END + CLASS + NAME "PEPE,TA" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE,TA' or '[code_financement_equ_public]' = 'TA,PEPE' and '[code_procedure_amenagement]' = 'PA') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 223 223 223 + OUTLINECOLOR 0 0 0 + SYMBOL "circle" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 161 101 196 + SYMBOL "circle" + SIZE 10 + END + END + CLASS + NAME "PEPE,TA" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE,TA' or '[code_financement_equ_public]' = 'TA,PEPE' and '[code_procedure_amenagement]' = 'PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 223 223 223 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 161 101 196 + SYMBOL "pentagon" + SIZE 9 + END + END + CLASS + NAME "PEPE,TA" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE,TA' or '[code_financement_equ_public]' = 'TA,PEPE' and '[code_procedure_amenagement]' = 'ZAC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 223 223 223 + OUTLINECOLOR 0 0 0 + SYMBOL "square" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 161 101 196 + SYMBOL "square" + SIZE 9 + END + END + CLASS + NAME "PEPE,TA" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE,TA' or '[code_financement_equ_public]' = 'TA,PEPE' and '[code_procedure_amenagement]' = 'PA/PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 223 223 223 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 161 101 196 + SYMBOL "pentagon" + SIZE 9 + END + END + CLASS + NAME "PEPE,TA" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE,TA' or '[code_financement_equ_public]' = 'TA,PEPE' and '[code_procedure_amenagement]' = 'AUT') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 223 223 223 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 161 101 196 + SYMBOL "pentagon" + SIZE 9 + END + END + CLASS + NAME "PEPE,TA" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE,TA' or '[code_financement_equ_public]' = 'TA,PEPE' and '[code_procedure_amenagement]' = 'ND') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 223 223 223 + OUTLINECOLOR 0 0 0 + SYMBOL "triangle" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 161 101 196 + SYMBOL "triangle" + SIZE 9 + END + END + CLASS + NAME "PEPE,PUP" + EXPRESSION ('[code_financement_equ_public]' = 'PUP,PEPE' or '[code_financement_equ_public]' = 'PEPE,PUP' and '[code_procedure_amenagement]' = 'PA') + KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 145 0 + OUTLINECOLOR 0 0 0 + SYMBOL "circle" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 223 223 223 + SYMBOL "circle" + SIZE 10 + END + END + CLASS + NAME "PEPE,PUP" + EXPRESSION ('[code_financement_equ_public]' = 'PUP,PEPE' or '[code_financement_equ_public]' = 'PEPE,PUP' and '[code_procedure_amenagement]' = 'PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 145 0 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 223 223 223 + SYMBOL "pentagon" + SIZE 9 + END + END + CLASS + NAME "PEPE,PUP" + EXPRESSION ('[code_financement_equ_public]' = 'PUP,PEPE' or '[code_financement_equ_public]' = 'PEPE,PUP' and '[code_procedure_amenagement]' = 'ZAC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 145 0 + OUTLINECOLOR 0 0 0 + SYMBOL "square" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 223 223 223 + SYMBOL "square" + SIZE 9 + END + END + CLASS + NAME "PEPE,PUP" + EXPRESSION ('[code_financement_equ_public]' = 'PUP,PEPE' or '[code_financement_equ_public]' = 'PEPE,PUP' and '[code_procedure_amenagement]' = 'PA/PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 145 0 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 223 223 223 + SYMBOL "pentagon" + SIZE 9 + END + END + CLASS + NAME "PEPE,PUP" + EXPRESSION ('[code_financement_equ_public]' = 'PUP,PEPE' or '[code_financement_equ_public]' = 'PEPE,PUP' and '[code_procedure_amenagement]' = 'AUT') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 145 0 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 223 223 223 + SYMBOL "pentagon" + SIZE 9 + END + END + CLASS + NAME "PEPE,PUP" + EXPRESSION ('[code_financement_equ_public]' = 'PUP,PEPE' or '[code_financement_equ_public]' = 'PEPE,PUP' and '[code_procedure_amenagement]' = 'ND') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 145 0 + OUTLINECOLOR 0 0 0 + SYMBOL "triangle" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 223 223 223 + SYMBOL "triangle" + SIZE 9 + END + END + CLASS + NAME "PEPE,PUP,TA" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE,PUP,TA' or '[code_financement_equ_public]' = 'PUP,PEPE,TA' or '[code_financement_equ_public]' = 'TA,PUP,PEPE' or '[code_financement_equ_public]' = 'TA,PEPE,PUP' or '[code_financement_equ_public]' = 'PEPE,TA,PUP' or '[code_financement_equ_public]' = 'PUP,TA,PEPE' and '[code_procedure_amenagement]' = 'PA') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 145 0 + OUTLINECOLOR 0 0 0 + SYMBOL "circle" + SIZE 25 + WIDTH 2 + END + STYLE + COLOR 223 223 223 + SYMBOL "circle" + SIZE 15 + END + STYLE + COLOR 161 101 196 + SYMBOL "circle" + SIZE 5 + END + END + CLASS + NAME "PEPE,PUP,TA" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE,PUP,TA' or '[code_financement_equ_public]' = 'PUP,PEPE,TA' or '[code_financement_equ_public]' = 'TA,PUP,PEPE' or '[code_financement_equ_public]' = 'TA,PEPE,PUP' or '[code_financement_equ_public]' = 'PEPE,TA,PUP' or '[code_financement_equ_public]' = 'PUP,TA,PEPE' and '[code_procedure_amenagement]' = 'PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 145 0 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 25 + WIDTH 2 + END + STYLE + COLOR 223 223 223 + SYMBOL "pentagon" + SIZE 15 + END + STYLE + COLOR 161 101 196 + SYMBOL "pentagon" + SIZE 5 + END + END + + + + + + + END + +END diff --git a/src/vitis/vas/doc/suivi_prod_immo/get_map_image_2_type.py b/src/vitis/vas/doc/suivi_prod_immo/get_map_image_2_type.py new file mode 100644 index 0000000000000000000000000000000000000000..8fee0fedc5529b9ea9fff984314717092e321ed9 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/get_map_image_2_type.py @@ -0,0 +1,32 @@ +import sys +import mapscript + +# HOW TO USE : +# python get_map_image_2_type.py 837588.444451396 6513503.28085589 849482.196139512 6525007.96208339 ctm_1_porteur.png 5,8,9,359,774,781,784,789,790,791,857,860,865,866,867,868,869,875,877,881,882,887,889,962,1036,1037,1041,1042,1051,1054,1058,1059,1082 + +mapfile = '/var/www/vmap/vas/doc/suivi_prod_immo/get_map_image_2_type.map' +tmpdir = '/var/www/vmap/vas/ws_data/vm4ms/map/tmp/' + +xmin=float(sys.argv[1]) +ymin=float(sys.argv[2]) +xmax=float(sys.argv[3]) +ymax=float(sys.argv[4]) +image=str(sys.argv[5]) +filter=str(sys.argv[6]) + +# map +map = mapscript.mapObj(mapfile) +map.setExtent(xmin, ymin, xmax, ymax) +# layers +a_id_operation=filter.split(',') +operation='' +for id_operation in a_id_operation: + if operation=='': + operation="[id_operation]='"+id_operation+"'" + else: + operation+=" or [id_operation]='"+id_operation+"'" +layer_op = map.getLayerByName("prod_immo_operation"); +result = layer_op.setFilter("("+operation+")") +# image +img = map.draw() +img.save(tmpdir+image) \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/get_map_image_3_porteur.map b/src/vitis/vas/doc/suivi_prod_immo/get_map_image_3_porteur.map new file mode 100644 index 0000000000000000000000000000000000000000..1173e27f25171da75d0a3ddbe7f358d869ec6946 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/get_map_image_3_porteur.map @@ -0,0 +1,950 @@ +MAP + NAME bd_prod_immo + STATUS ON + # Étentue de la carte + EXTENT 842299 6516833 843076 6517501 + # Taille de l'image générée + SIZE 700 500 + # Couleur de fond de l'image générée + IMAGECOLOR 255 255 255 + + # Format de sortie de l'image générée + OUTPUTFORMAT + NAME "png" + DRIVER AGG/PNG + MIMETYPE "image/png" + IMAGEMODE RGB + EXTENSION "png" + FORMATOPTION "GAMMA=0.75" + END + IMAGETYPE "png" + + # Type de légende générée (HTML) + LEGEND + STATUS ON + IMAGECOLOR 244 244 244 + KEYSIZE 15 15 + KEYSPACING 5 5 + LABEL + TYPE TRUETYPE + FONT "arial" + SIZE 8 + COLOR 0 0 0 + PARTIALS TRUE + END + TEMPLATE "/var/www/vmap/vas/ws_data/vm4ms/map/template/legend.html" + END + + MAXSIZE 4096 + SYMBOLSET "/var/www/vmap/vas/ws_data/vm4ms/map/symbols/symbols.sym" + FONTSET "/var/www/vmap/vas/ws_data/vm4ms/map/fonts/fonts.list" + + #CONFIG "MS_ERRORFILE" "/var/www/vmap/vas/log/mapserver/test/cb973e656aa3c2e416beff082ac7b2c165c152f4c2e14c679b2652476cabcb9d_prod_immo_programme_immobilier_vocation.log" + CONFIG "PROJ_LIB" "/var/www/vmap/vas/ws_data/vm4ms/map/proj" + DEBUG 2 + + PROJECTION + #EPSG:2154 / RGF93 + "+init=epsg:2154" + END + + WEB + IMAGEPATH "/var/www/vmap/vas/ws_data/vm4ms/map/tmp/" + IMAGEURL "https://geo.urbalyon.org//ws_data/vm4ms/map/tmp/" + END + + LAYER + NAME "Ortho" + TYPE RASTER + STATUS ON + CONNECTION "https://download.data.grandlyon.com/wms/grandlyon?" + CONNECTIONTYPE WMS + METADATA + "wms_srs" "EPSG:3946" + "wms_name" "Ortho2018_Dalle_unique_8cm_CC46" + "wms_server_version" "1.1.0" + "wms_format" "image/png" + END + END + + LAYER + NAME "prod_immo_operation" + TYPE POINT + STATUS ON + CONNECTIONTYPE postgis + CONNECTION "user='fabien' password='Cov6Cov6' dbname='suivi_prod_immo' host='srv-postgres' port='5432'" + DATA "geom from \"prod_immo\".\"v_operation_financement_layer\" USING SRID=2154 USING UNIQUE id_operation" + OPACITY 100 + PROJECTION + "+init=epsg:2154" + END + #CLASSITEM "geom_approximative" + LABELITEM "code_financement_equ_public" + #FILTERITEM "id_operation" + #FILTER ([id_operation]='1037' or [id_operation]='941' or [id_operation]='628') + #SIZEUNITS METERS + + CLASS + #NAME "PUP" + EXPRESSION ('[code_financement_equ_public]' = 'PUP' and '[code_procedure_amenagement]' = 'PA') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 145 0 + OUTLINECOLOR 0 0 0 + SYMBOL "circle" + SIZE 20 + WIDTH 2 + END + END + CLASS + #NAME "PUP" + EXPRESSION ('[code_financement_equ_public]' = 'PUP' and '[code_procedure_amenagement]' = 'PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 145 0 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + #NAME "PUP" + EXPRESSION ('[code_financement_equ_public]' = 'PUP' and '[code_procedure_amenagement]' = 'ZAC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + #MINSCALEDENOM 60000 + COLOR 255 145 0 + OUTLINECOLOR 0 0 0 + SYMBOL "square" + SIZE 20 + WIDTH 2 + END + END + CLASS + #NAME "PUP" + EXPRESSION ('[code_financement_equ_public]' = 'PUP' and '[code_procedure_amenagement]' = 'PA/PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 145 0 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + #NAME "PUP" + EXPRESSION ('[code_financement_equ_public]' = 'PUP' and '[code_procedure_amenagement]' = 'AUT') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 145 0 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + #NAME "PUP" + EXPRESSION ('[code_financement_equ_public]' = 'PUP' and '[code_procedure_amenagement]' = 'ND') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 145 0 + OUTLINECOLOR 0 0 0 + SYMBOL "triangle" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "FINZAC" + EXPRESSION ('[code_financement_equ_public]' = 'FINZAC' and '[code_procedure_amenagement]' = 'PA') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 106 163 227 + OUTLINECOLOR 0 0 0 + SYMBOL "circle" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "FINZAC" + EXPRESSION ('[code_financement_equ_public]' = 'FINZAC' and '[code_procedure_amenagement]' = 'PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 106 163 227 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "FINZAC" + EXPRESSION ('[code_financement_equ_public]' = 'FINZAC' and '[code_procedure_amenagement]' = 'ZAC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 106 163 227 + OUTLINECOLOR 0 0 0 + SYMBOL "square" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "FINZAC" + EXPRESSION ('[code_financement_equ_public]' = 'FINZAC' and '[code_procedure_amenagement]' = 'PA/PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 106 163 227 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "FINZAC" + EXPRESSION ('[code_financement_equ_public]' = 'FINZAC' and '[code_procedure_amenagement]' = 'AUT') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 106 163 227 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "FINZAC" + EXPRESSION ('[code_financement_equ_public]' = 'FINZAC' and '[code_procedure_amenagement]' = 'ND') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 106 163 227 + OUTLINECOLOR 0 0 0 + SYMBOL "triangle" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "TA" + EXPRESSION ('[code_financement_equ_public]' = 'TA' and '[code_procedure_amenagement]' = 'PA') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 161 101 196 + OUTLINECOLOR 0 0 0 + SYMBOL "circle" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "TA" + EXPRESSION ('[code_financement_equ_public]' = 'TA' and '[code_procedure_amenagement]' = 'PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 161 101 196 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "TA" + EXPRESSION ('[code_financement_equ_public]' = 'TA' and '[code_procedure_amenagement]' = 'ZAC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 161 101 196 + OUTLINECOLOR 0 0 0 + SYMBOL "square" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "TA" + EXPRESSION ('[code_financement_equ_public]' = 'TA' and '[code_procedure_amenagement]' = 'PA/PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 161 101 196 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "TA" + EXPRESSION ('[code_financement_equ_public]' = 'TA' and '[code_procedure_amenagement]' = 'AUT') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 161 101 196 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "TA" + EXPRESSION ('[code_financement_equ_public]' = 'TA' and '[code_procedure_amenagement]' = 'ND') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 161 101 196 + OUTLINECOLOR 0 0 0 + SYMBOL "triangle" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "TAM" + EXPRESSION ('[code_financement_equ_public]' = 'TAM' and '[code_procedure_amenagement]' = 'PA') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 253 105 + OUTLINECOLOR 0 0 0 + SYMBOL "circle" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "TAM" + EXPRESSION ('[code_financement_equ_public]' = 'TAM' and '[code_procedure_amenagement]' = 'PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 253 105 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "TAM" + EXPRESSION ('[code_financement_equ_public]' = 'TAM' and '[code_procedure_amenagement]' = 'ZAC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 253 105 + OUTLINECOLOR 0 0 0 + SYMBOL "square" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "TAM" + EXPRESSION ('[code_financement_equ_public]' = 'TAM' and '[code_procedure_amenagement]' = 'PA/PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 253 105 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "TAM" + EXPRESSION ('[code_financement_equ_public]' = 'TAM' and '[code_procedure_amenagement]' = 'AUT') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 253 105 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "TAM" + EXPRESSION ('[code_financement_equ_public]' = 'TAM' and '[code_procedure_amenagement]' = 'ND') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 253 105 + OUTLINECOLOR 0 0 0 + SYMBOL "triangle" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "PEPE" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE' and '[code_procedure_amenagement]' = 'PA') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 223 223 223 + OUTLINECOLOR 0 0 0 + SYMBOL "circle" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "PEPE" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE' and '[code_procedure_amenagement]' = 'PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 223 223 223 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "PEPE" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE' and '[code_procedure_amenagement]' = 'ZAC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 223 223 223 + OUTLINECOLOR 0 0 0 + SYMBOL "square" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "PEPE" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE' and '[code_procedure_amenagement]' = 'PA/PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 223 223 223 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "PEPE" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE' and '[code_procedure_amenagement]' = 'AUT') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 223 223 223 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "PEPE" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE' and '[code_procedure_amenagement]' = 'ND') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 223 223 223 + OUTLINECOLOR 0 0 0 + SYMBOL "triangle" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "AUT" + EXPRESSION ('[code_financement_equ_public]' = 'AUT' and '[code_procedure_amenagement]' = 'PA') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 160 211 93 + OUTLINECOLOR 0 0 0 + SYMBOL "circle" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "AUT" + EXPRESSION ('[code_financement_equ_public]' = 'AUT' and '[code_procedure_amenagement]' = 'PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 160 211 93 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "AUT" + EXPRESSION ('[code_financement_equ_public]' = 'AUT' and '[code_procedure_amenagement]' = 'ZAC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 160 211 93 + OUTLINECOLOR 0 0 0 + SYMBOL "square" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "AUT" + EXPRESSION ('[code_financement_equ_public]' = 'AUT' and '[code_procedure_amenagement]' = 'PA/PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 160 211 93 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "AUT" + EXPRESSION ('[code_financement_equ_public]' = 'AUT' and '[code_procedure_amenagement]' = 'AUT') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 160 211 93 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "AUT" + EXPRESSION ('[code_financement_equ_public]' = 'AUT' and '[code_procedure_amenagement]' = 'ND') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 160 211 93 + OUTLINECOLOR 0 0 0 + SYMBOL "triangle" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "ND NULL" + EXPRESSION ('[code_financement_equ_public]' = 'ND' or '[code_financement_equ_public]' = '' and '[code_procedure_amenagement]' = 'PA') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 255 255 + OUTLINECOLOR 0 0 0 + SYMBOL "circle" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "ND NULL" + EXPRESSION ('[code_financement_equ_public]' = 'ND' or '[code_financement_equ_public]' = '' and '[code_procedure_amenagement]' = 'PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 255 255 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "ND NULL" + EXPRESSION ('[code_financement_equ_public]' = 'ND' or '[code_financement_equ_public]' = '' and '[code_procedure_amenagement]' = 'ZAC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 255 255 + OUTLINECOLOR 0 0 0 + SYMBOL "square" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "ND NULL" + EXPRESSION ('[code_financement_equ_public]' = 'ND' or '[code_financement_equ_public]' = '' and '[code_procedure_amenagement]' = 'PA/PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 255 255 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "ND NULL" + EXPRESSION ('[code_financement_equ_public]' = 'ND' or '[code_financement_equ_public]' = '' and '[code_procedure_amenagement]' = 'AUT') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 255 255 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "ND NULL" + EXPRESSION ('[code_financement_equ_public]' = 'ND' or '[code_financement_equ_public]' = '' and '[code_procedure_amenagement]' = 'ND') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 255 255 + OUTLINECOLOR 0 0 0 + SYMBOL "triangle" + SIZE 20 + WIDTH 2 + END + END + CLASS + NAME "AUT,TA" + EXPRESSION ('[code_financement_equ_public]' = 'AUT,TA' or '[code_financement_equ_public]' = 'TA,AUT' and '[code_procedure_amenagement]' = 'PA') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 160 211 93 + OUTLINECOLOR 0 0 0 + SYMBOL "circle" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 161 101 196 + SYMBOL "circle" + SIZE 10 + END + END + CLASS + NAME "AUT,TA" + EXPRESSION ('[code_financement_equ_public]' = 'AUT,TA' or '[code_financement_equ_public]' = 'TA,AUT' and '[code_procedure_amenagement]' = 'PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 160 211 93 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 161 101 196 + SYMBOL "pentagon" + SIZE 9 + END + END + CLASS + NAME "AUT,TA" + EXPRESSION ('[code_financement_equ_public]' = 'AUT,TA' or '[code_financement_equ_public]' = 'TA,AUT' and '[code_procedure_amenagement]' = 'ZAC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 160 211 93 + OUTLINECOLOR 0 0 0 + SYMBOL "square" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 161 101 196 + SYMBOL "square" + SIZE 9 + END + END + CLASS + NAME "AUT,TA" + EXPRESSION ('[code_financement_equ_public]' = 'AUT,TA' or '[code_financement_equ_public]' = 'TA,AUT' and '[code_procedure_amenagement]' = 'PA/PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 160 211 93 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 161 101 196 + SYMBOL "pentagon" + SIZE 9 + END + END + CLASS + NAME "AUT,TA" + EXPRESSION ('[code_financement_equ_public]' = 'AUT,TA' or '[code_financement_equ_public]' = 'TA,AUT' and '[code_procedure_amenagement]' = 'AUT') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 160 211 93 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 161 101 196 + SYMBOL "pentagon" + SIZE 9 + END + END + CLASS + NAME "AUT,TA" + EXPRESSION ('[code_financement_equ_public]' = 'AUT,TA' or '[code_financement_equ_public]' = 'TA,AUT' and '[code_procedure_amenagement]' = 'ND') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 160 211 93 + OUTLINECOLOR 0 0 0 + SYMBOL "triangle" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 161 101 196 + SYMBOL "triangle" + SIZE 9 + END + END + CLASS + NAME "PEPE,TA" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE,TA' or '[code_financement_equ_public]' = 'TA,PEPE' and '[code_procedure_amenagement]' = 'PA') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 223 223 223 + OUTLINECOLOR 0 0 0 + SYMBOL "circle" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 161 101 196 + SYMBOL "circle" + SIZE 10 + END + END + CLASS + NAME "PEPE,TA" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE,TA' or '[code_financement_equ_public]' = 'TA,PEPE' and '[code_procedure_amenagement]' = 'PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 223 223 223 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 161 101 196 + SYMBOL "pentagon" + SIZE 9 + END + END + CLASS + NAME "PEPE,TA" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE,TA' or '[code_financement_equ_public]' = 'TA,PEPE' and '[code_procedure_amenagement]' = 'ZAC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 223 223 223 + OUTLINECOLOR 0 0 0 + SYMBOL "square" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 161 101 196 + SYMBOL "square" + SIZE 9 + END + END + CLASS + NAME "PEPE,TA" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE,TA' or '[code_financement_equ_public]' = 'TA,PEPE' and '[code_procedure_amenagement]' = 'PA/PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 223 223 223 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 161 101 196 + SYMBOL "pentagon" + SIZE 9 + END + END + CLASS + NAME "PEPE,TA" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE,TA' or '[code_financement_equ_public]' = 'TA,PEPE' and '[code_procedure_amenagement]' = 'AUT') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 223 223 223 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 161 101 196 + SYMBOL "pentagon" + SIZE 9 + END + END + CLASS + NAME "PEPE,TA" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE,TA' or '[code_financement_equ_public]' = 'TA,PEPE' and '[code_procedure_amenagement]' = 'ND') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 223 223 223 + OUTLINECOLOR 0 0 0 + SYMBOL "triangle" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 161 101 196 + SYMBOL "triangle" + SIZE 9 + END + END + CLASS + NAME "PEPE,PUP" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE,PUP' or '[code_financement_equ_public]' = 'PUP,PEPE' and '[code_procedure_amenagement]' = 'PA') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 145 0 + OUTLINECOLOR 0 0 0 + SYMBOL "circle" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 223 223 223 + SYMBOL "circle" + SIZE 10 + END + END + CLASS + NAME "PEPE,PUP" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE,PUP' or '[code_financement_equ_public]' = 'PUP,PEPE' and '[code_procedure_amenagement]' = 'PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 145 0 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 223 223 223 + SYMBOL "pentagon" + SIZE 9 + END + END + CLASS + NAME "PEPE,PUP" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE,PUP' or '[code_financement_equ_public]' = 'PUP,PEPE' and '[code_procedure_amenagement]' = 'ZAC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 145 0 + OUTLINECOLOR 0 0 0 + SYMBOL "square" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 223 223 223 + SYMBOL "square" + SIZE 9 + END + END + CLASS + NAME "PEPE,PUP" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE,PUP' or '[code_financement_equ_public]' = 'PUP,PEPE' and '[code_procedure_amenagement]' = 'PA/PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 145 0 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 223 223 223 + SYMBOL "pentagon" + SIZE 9 + END + END + CLASS + NAME "PEPE,PUP" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE,PUP' or '[code_financement_equ_public]' = 'PUP,PEPE' and '[code_procedure_amenagement]' = 'AUT') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 145 0 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 223 223 223 + SYMBOL "pentagon" + SIZE 9 + END + END + CLASS + NAME "PEPE,PUP" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE,PUP' or '[code_financement_equ_public]' = 'PUP,PEPE' and '[code_procedure_amenagement]' = 'ND') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 145 0 + OUTLINECOLOR 0 0 0 + SYMBOL "triangle" + SIZE 20 + WIDTH 2 + END + STYLE + COLOR 223 223 223 + SYMBOL "triangle" + SIZE 9 + END + END + CLASS + NAME "PEPE,PUP,TA" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE,PUP,TA' or '[code_financement_equ_public]' = 'PUP,PEPE,TA' or '[code_financement_equ_public]' = 'TA,PUP,PEPE' or '[code_financement_equ_public]' = 'TA,PEPE,PUP' or '[code_financement_equ_public]' = 'PEPE,TA,PUP' or '[code_financement_equ_public]' = 'PUP,TA,PEPE' and '[code_procedure_amenagement]' = 'PA') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 145 0 + OUTLINECOLOR 0 0 0 + SYMBOL "circle" + SIZE 25 + WIDTH 2 + END + STYLE + COLOR 223 223 223 + SYMBOL "circle" + SIZE 15 + END + STYLE + COLOR 161 101 196 + SYMBOL "circle" + SIZE 5 + END + END + CLASS + NAME "PEPE,PUP,TA" + EXPRESSION ('[code_financement_equ_public]' = 'PEPE,PUP,TA' or '[code_financement_equ_public]' = 'PUP,PEPE,TA' or '[code_financement_equ_public]' = 'TA,PUP,PEPE' or '[code_financement_equ_public]' = 'TA,PEPE,PUP' or '[code_financement_equ_public]' = 'PEPE,TA,PUP' or '[code_financement_equ_public]' = 'PUP,TA,PEPE' and '[code_procedure_amenagement]' = 'PC') + #KEYIMAGE "../symbols/legend_prod_immo/prod_immo_operation_legend.png" + STYLE + COLOR 255 145 0 + OUTLINECOLOR 0 0 0 + SYMBOL "pentagon" + SIZE 25 + WIDTH 2 + END + STYLE + COLOR 223 223 223 + SYMBOL "pentagon" + SIZE 15 + END + STYLE + COLOR 161 101 196 + SYMBOL "pentagon" + SIZE 5 + END + END + + + + + + + END + +END diff --git a/src/vitis/vas/doc/suivi_prod_immo/get_map_image_3_porteur.py b/src/vitis/vas/doc/suivi_prod_immo/get_map_image_3_porteur.py new file mode 100644 index 0000000000000000000000000000000000000000..3de2916d399db3d7fe1e4eb476b62aea2323df61 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/get_map_image_3_porteur.py @@ -0,0 +1,32 @@ +import sys +import mapscript + +# HOW TO USE : +# python /var/www/vmap/vas/doc/suivi_prod_immo/get_map_image_3_porteur.py 843911 6518881 844987 6519939 spl_part_dieu_porteur.png 5,359 + +mapfile = '/var/www/vmap/vas/doc/suivi_prod_immo/get_map_image_3_porteur.map' +tmpdir = '/var/www/vmap/vas/ws_data/vm4ms/map/tmp/' + +xmin=float(sys.argv[1]) +ymin=float(sys.argv[2]) +xmax=float(sys.argv[3]) +ymax=float(sys.argv[4]) +image=str(sys.argv[5]) +filter=str(sys.argv[6]) + +# map +map = mapscript.mapObj(mapfile) +map.setExtent(xmin, ymin, xmax, ymax) +# layers +a_id_operation=filter.split(',') +operation='' +for id_operation in a_id_operation: + if operation=='': + operation="[id_operation]='"+id_operation+"'" + else: + operation+=" or [id_operation]='"+id_operation+"'" +layer_op = map.getLayerByName("prod_immo_operation"); +result = layer_op.setFilter("("+operation+")") +# image +img = map.draw() +img.save(tmpdir+image) \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/images/arrow_right_1.png b/src/vitis/vas/doc/suivi_prod_immo/images/arrow_right_1.png new file mode 100644 index 0000000000000000000000000000000000000000..2a0f11edaad06e0753e9de292f160c82ac27b637 Binary files /dev/null and b/src/vitis/vas/doc/suivi_prod_immo/images/arrow_right_1.png differ diff --git a/src/vitis/vas/doc/suivi_prod_immo/images/arrow_right_2.png b/src/vitis/vas/doc/suivi_prod_immo/images/arrow_right_2.png new file mode 100644 index 0000000000000000000000000000000000000000..3bc89614c906a848c2ee14f670ed1293567eb9bc Binary files /dev/null and b/src/vitis/vas/doc/suivi_prod_immo/images/arrow_right_2.png differ diff --git a/src/vitis/vas/doc/suivi_prod_immo/images/arrow_right_3.png b/src/vitis/vas/doc/suivi_prod_immo/images/arrow_right_3.png new file mode 100644 index 0000000000000000000000000000000000000000..4c23bf8137f235c152913aba3911192252576337 Binary files /dev/null and b/src/vitis/vas/doc/suivi_prod_immo/images/arrow_right_3.png differ diff --git a/src/vitis/vas/doc/suivi_prod_immo/images/arrow_right_4.png b/src/vitis/vas/doc/suivi_prod_immo/images/arrow_right_4.png new file mode 100644 index 0000000000000000000000000000000000000000..4fe77eff0040459a2f4cd9ce4e3faf92fd219632 Binary files /dev/null and b/src/vitis/vas/doc/suivi_prod_immo/images/arrow_right_4.png differ diff --git a/src/vitis/vas/doc/suivi_prod_immo/images/arrow_right_border_1.png b/src/vitis/vas/doc/suivi_prod_immo/images/arrow_right_border_1.png new file mode 100644 index 0000000000000000000000000000000000000000..55a00a98331fe176ba9751e2cc7c35645b482fae Binary files /dev/null and b/src/vitis/vas/doc/suivi_prod_immo/images/arrow_right_border_1.png differ diff --git a/src/vitis/vas/doc/suivi_prod_immo/images/arrow_right_border_2.png b/src/vitis/vas/doc/suivi_prod_immo/images/arrow_right_border_2.png new file mode 100644 index 0000000000000000000000000000000000000000..de33f3fa234cc28501d9ea689ef3043d182f3082 Binary files /dev/null and b/src/vitis/vas/doc/suivi_prod_immo/images/arrow_right_border_2.png differ diff --git a/src/vitis/vas/doc/suivi_prod_immo/images/arrow_right_border_3.png b/src/vitis/vas/doc/suivi_prod_immo/images/arrow_right_border_3.png new file mode 100644 index 0000000000000000000000000000000000000000..485faae617d0fbaccce54ea0223cf53d53f2e680 Binary files /dev/null and b/src/vitis/vas/doc/suivi_prod_immo/images/arrow_right_border_3.png differ diff --git a/src/vitis/vas/doc/suivi_prod_immo/images/arrow_right_border_4.png b/src/vitis/vas/doc/suivi_prod_immo/images/arrow_right_border_4.png new file mode 100644 index 0000000000000000000000000000000000000000..4442d19654ea5b6ae6a6866079485ec89e72cee1 Binary files /dev/null and b/src/vitis/vas/doc/suivi_prod_immo/images/arrow_right_border_4.png differ diff --git a/src/vitis/vas/doc/suivi_prod_immo/images/grand_lyon.png b/src/vitis/vas/doc/suivi_prod_immo/images/grand_lyon.png new file mode 100644 index 0000000000000000000000000000000000000000..7ecc936312a5c68eef586224b011b81ddc58adae Binary files /dev/null and b/src/vitis/vas/doc/suivi_prod_immo/images/grand_lyon.png differ diff --git a/src/vitis/vas/doc/suivi_prod_immo/images/grand_lyon_large.png b/src/vitis/vas/doc/suivi_prod_immo/images/grand_lyon_large.png new file mode 100644 index 0000000000000000000000000000000000000000..0c88fd5dfe119425afa03a291b1aaf3908a604c1 Binary files /dev/null and b/src/vitis/vas/doc/suivi_prod_immo/images/grand_lyon_large.png differ diff --git a/src/vitis/vas/doc/suivi_prod_immo/images/legende_get_1_operation.png b/src/vitis/vas/doc/suivi_prod_immo/images/legende_get_1_operation.png new file mode 100644 index 0000000000000000000000000000000000000000..85edead5cc0612b6e41b244c230d0c1933442f50 Binary files /dev/null and b/src/vitis/vas/doc/suivi_prod_immo/images/legende_get_1_operation.png differ diff --git a/src/vitis/vas/doc/suivi_prod_immo/images/legende_get_2_type.png b/src/vitis/vas/doc/suivi_prod_immo/images/legende_get_2_type.png new file mode 100644 index 0000000000000000000000000000000000000000..6e2746afd90be0180e11f8596c8640f8e612eca3 Binary files /dev/null and b/src/vitis/vas/doc/suivi_prod_immo/images/legende_get_2_type.png differ diff --git a/src/vitis/vas/doc/suivi_prod_immo/images/legende_get_3_porteur.png b/src/vitis/vas/doc/suivi_prod_immo/images/legende_get_3_porteur.png new file mode 100644 index 0000000000000000000000000000000000000000..6e2746afd90be0180e11f8596c8640f8e612eca3 Binary files /dev/null and b/src/vitis/vas/doc/suivi_prod_immo/images/legende_get_3_porteur.png differ diff --git a/src/vitis/vas/doc/suivi_prod_immo/images/map_tmp.png b/src/vitis/vas/doc/suivi_prod_immo/images/map_tmp.png new file mode 100644 index 0000000000000000000000000000000000000000..260404f8bec7ce9df79588f059dcd0c0dac109db Binary files /dev/null and b/src/vitis/vas/doc/suivi_prod_immo/images/map_tmp.png differ diff --git a/src/vitis/vas/doc/suivi_prod_immo/images/urbalyon.png b/src/vitis/vas/doc/suivi_prod_immo/images/urbalyon.png new file mode 100644 index 0000000000000000000000000000000000000000..6c68f9b7ed875eddce4318780e59a09f3d5bd0cd Binary files /dev/null and b/src/vitis/vas/doc/suivi_prod_immo/images/urbalyon.png differ diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/Encryption.js b/src/vitis/vas/doc/suivi_prod_immo/js/Encryption.js new file mode 100644 index 0000000000000000000000000000000000000000..601306affff42ae8459e95900b09705b5ef2d800 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/Encryption.js @@ -0,0 +1,107 @@ + + +/** + * Encryption class for encrypt/decrypt that works between programming languages. + * + * @author Vee Winch. + * @link https://stackoverflow.com/questions/41222162/encrypt-in-php-openssl-and-decrypt-in-javascript-cryptojs Reference. + * @link https://github.com/brix/crypto-js/releases crypto-js.js can be download from here. + */ +class Encryption { + + + /** + * @var integer Return encrypt method or Cipher method number. (128, 192, 256) + */ + get encryptMethodLength() { + var encryptMethod = this.encryptMethod; + // get only number from string. + // @link https://stackoverflow.com/a/10003709/128761 Reference. + var aesNumber = encryptMethod.match(/\d+/)[0]; + return parseInt(aesNumber); + }// encryptMethodLength + + + /** + * @var integer Return cipher method divide by 8. example: AES number 256 will be 256/8 = 32. + */ + get encryptKeySize() { + var aesNumber = this.encryptMethodLength; + return parseInt(aesNumber / 8); + }// encryptKeySize + + + /** + * @link http://php.net/manual/en/function.openssl-get-cipher-methods.php Refer to available methods in PHP if we are working between JS & PHP encryption. + * @var string Cipher method. + * Recommended AES-128-CBC, AES-192-CBC, AES-256-CBC + * due to there is no `openssl_cipher_iv_length()` function in JavaScript + * and all of these methods are known as 16 in iv_length. + */ + get encryptMethod() { + return 'AES-256-CBC'; + }// encryptMethod + + + /** + * Decrypt string. + * + * @link https://stackoverflow.com/questions/41222162/encrypt-in-php-openssl-and-decrypt-in-javascript-cryptojs Reference. + * @link https://stackoverflow.com/questions/25492179/decode-a-base64-string-using-cryptojs Crypto JS base64 encode/decode reference. + * @param string encryptedString The encrypted string to be decrypt. + * @param string key The key. + * @return string Return decrypted string. + */ + decrypt(encryptedString, key) { + var json = JSON.parse(CryptoJS.enc.Utf8.stringify(CryptoJS.enc.Base64.parse(encryptedString))); + + var salt = CryptoJS.enc.Hex.parse(json.salt); + var iv = CryptoJS.enc.Hex.parse(json.iv); + + var encrypted = json.ciphertext;// no need to base64 decode. + + var iterations = parseInt(json.iterations); + if (iterations <= 0) { + iterations = 999; + } + var encryptMethodLength = (this.encryptMethodLength/4);// example: AES number is 256 / 4 = 64 + var hashKey = CryptoJS.PBKDF2(key, salt, {'hasher': CryptoJS.algo.SHA512, 'keySize': (encryptMethodLength/8), 'iterations': iterations}); + + var decrypted = CryptoJS.AES.decrypt(encrypted, hashKey, {'mode': CryptoJS.mode.CBC, 'iv': iv}); + + return decrypted.toString(CryptoJS.enc.Utf8); + }// decrypt + + + /** + * Encrypt string. + * + * @link https://stackoverflow.com/questions/41222162/encrypt-in-php-openssl-and-decrypt-in-javascript-cryptojs Reference. + * @link https://stackoverflow.com/questions/25492179/decode-a-base64-string-using-cryptojs Crypto JS base64 encode/decode reference. + * @param string string The original string to be encrypt. + * @param string key The key. + * @return string Return encrypted string. + */ + encrypt(string, key) { + var iv = CryptoJS.lib.WordArray.random(16);// the reason to be 16, please read on `encryptMethod` property. + + var salt = CryptoJS.lib.WordArray.random(256); + var iterations = 999; + var encryptMethodLength = (this.encryptMethodLength/4);// example: AES number is 256 / 4 = 64 + var hashKey = CryptoJS.PBKDF2(key, salt, {'hasher': CryptoJS.algo.SHA512, 'keySize': (encryptMethodLength/8), 'iterations': iterations}); + + var encrypted = CryptoJS.AES.encrypt(string, hashKey, {'mode': CryptoJS.mode.CBC, 'iv': iv}); + var encryptedString = CryptoJS.enc.Base64.stringify(encrypted.ciphertext); + + var output = { + 'ciphertext': encryptedString, + 'iv': CryptoJS.enc.Hex.stringify(iv), + 'salt': CryptoJS.enc.Hex.stringify(salt), + 'iterations': iterations + }; + + return CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(JSON.stringify(output))); + }// encrypt + + +} \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/chart.js_2.8.0/Chart.min.js b/src/vitis/vas/doc/suivi_prod_immo/js/chart.js_2.8.0/Chart.min.js new file mode 100644 index 0000000000000000000000000000000000000000..c74a7914a35f60ba32c6d8ecca9209208bced1ce --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/chart.js_2.8.0/Chart.min.js @@ -0,0 +1,7 @@ +/*! + * Chart.js v2.8.0 + * https://www.chartjs.org + * (c) 2019 Chart.js Contributors + * Released under the MIT License + */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(function(){try{return require("moment")}catch(t){}}()):"function"==typeof define&&define.amd?define(["require"],function(t){return e(function(){try{return t("moment")}catch(t){}}())}):t.Chart=e(t.moment)}(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e={rgb2hsl:i,rgb2hsv:n,rgb2hwb:a,rgb2cmyk:o,rgb2keyword:s,rgb2xyz:l,rgb2lab:d,rgb2lch:function(t){return x(d(t))},hsl2rgb:u,hsl2hsv:function(t){var e=t[0],i=t[1]/100,n=t[2]/100;if(0===n)return[0,0,0];return[e,100*(2*(i*=(n*=2)<=1?n:2-n)/(n+i)),100*((n+i)/2)]},hsl2hwb:function(t){return a(u(t))},hsl2cmyk:function(t){return o(u(t))},hsl2keyword:function(t){return s(u(t))},hsv2rgb:h,hsv2hsl:function(t){var e,i,n=t[0],a=t[1]/100,o=t[2]/100;return e=a*o,[n,100*(e=(e/=(i=(2-a)*o)<=1?i:2-i)||0),100*(i/=2)]},hsv2hwb:function(t){return a(h(t))},hsv2cmyk:function(t){return o(h(t))},hsv2keyword:function(t){return s(h(t))},hwb2rgb:c,hwb2hsl:function(t){return i(c(t))},hwb2hsv:function(t){return n(c(t))},hwb2cmyk:function(t){return o(c(t))},hwb2keyword:function(t){return s(c(t))},cmyk2rgb:f,cmyk2hsl:function(t){return i(f(t))},cmyk2hsv:function(t){return n(f(t))},cmyk2hwb:function(t){return a(f(t))},cmyk2keyword:function(t){return s(f(t))},keyword2rgb:w,keyword2hsl:function(t){return i(w(t))},keyword2hsv:function(t){return n(w(t))},keyword2hwb:function(t){return a(w(t))},keyword2cmyk:function(t){return o(w(t))},keyword2lab:function(t){return d(w(t))},keyword2xyz:function(t){return l(w(t))},xyz2rgb:p,xyz2lab:m,xyz2lch:function(t){return x(m(t))},lab2xyz:v,lab2rgb:y,lab2lch:x,lch2lab:k,lch2xyz:function(t){return v(k(t))},lch2rgb:function(t){return y(k(t))}};function i(t){var e,i,n=t[0]/255,a=t[1]/255,o=t[2]/255,r=Math.min(n,a,o),s=Math.max(n,a,o),l=s-r;return s==r?e=0:n==s?e=(a-o)/l:a==s?e=2+(o-n)/l:o==s&&(e=4+(n-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),i=(r+s)/2,[e,100*(s==r?0:i<=.5?l/(s+r):l/(2-s-r)),100*i]}function n(t){var e,i,n=t[0],a=t[1],o=t[2],r=Math.min(n,a,o),s=Math.max(n,a,o),l=s-r;return i=0==s?0:l/s*1e3/10,s==r?e=0:n==s?e=(a-o)/l:a==s?e=2+(o-n)/l:o==s&&(e=4+(n-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),[e,i,s/255*1e3/10]}function a(t){var e=t[0],n=t[1],a=t[2];return[i(t)[0],100*(1/255*Math.min(e,Math.min(n,a))),100*(a=1-1/255*Math.max(e,Math.max(n,a)))]}function o(t){var e,i=t[0]/255,n=t[1]/255,a=t[2]/255;return[100*((1-i-(e=Math.min(1-i,1-n,1-a)))/(1-e)||0),100*((1-n-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]}function s(t){return _[JSON.stringify(t)]}function l(t){var e=t[0]/255,i=t[1]/255,n=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)+.1805*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*e+.7152*i+.0722*n),100*(.0193*e+.1192*i+.9505*n)]}function d(t){var e=l(t),i=e[0],n=e[1],a=e[2];return n/=100,a/=108.883,i=(i/=95.047)>.008856?Math.pow(i,1/3):7.787*i+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(i-n),200*(n-(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116))]}function u(t){var e,i,n,a,o,r=t[0]/360,s=t[1]/100,l=t[2]/100;if(0==s)return[o=255*l,o,o];e=2*l-(i=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var d=0;d<3;d++)(n=r+1/3*-(d-1))<0&&n++,n>1&&n--,o=6*n<1?e+6*(i-e)*n:2*n<1?i:3*n<2?e+(i-e)*(2/3-n)*6:e,a[d]=255*o;return a}function h(t){var e=t[0]/60,i=t[1]/100,n=t[2]/100,a=Math.floor(e)%6,o=e-Math.floor(e),r=255*n*(1-i),s=255*n*(1-i*o),l=255*n*(1-i*(1-o));n*=255;switch(a){case 0:return[n,l,r];case 1:return[s,n,r];case 2:return[r,n,l];case 3:return[r,s,n];case 4:return[l,r,n];case 5:return[n,r,s]}}function c(t){var e,i,n,a,o=t[0]/360,s=t[1]/100,l=t[2]/100,d=s+l;switch(d>1&&(s/=d,l/=d),n=6*o-(e=Math.floor(6*o)),0!=(1&e)&&(n=1-n),a=s+n*((i=1-l)-s),e){default:case 6:case 0:r=i,g=a,b=s;break;case 1:r=a,g=i,b=s;break;case 2:r=s,g=i,b=a;break;case 3:r=s,g=a,b=i;break;case 4:r=a,g=s,b=i;break;case 5:r=i,g=s,b=a}return[255*r,255*g,255*b]}function f(t){var e=t[0]/100,i=t[1]/100,n=t[2]/100,a=t[3]/100;return[255*(1-Math.min(1,e*(1-a)+a)),255*(1-Math.min(1,i*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a))]}function p(t){var e,i,n,a=t[0]/100,o=t[1]/100,r=t[2]/100;return i=-.9689*a+1.8758*o+.0415*r,n=.0557*a+-.204*o+1.057*r,e=(e=3.2406*a+-1.5372*o+-.4986*r)>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,[255*(e=Math.min(Math.max(0,e),1)),255*(i=Math.min(Math.max(0,i),1)),255*(n=Math.min(Math.max(0,n),1))]}function m(t){var e=t[0],i=t[1],n=t[2];return i/=100,n/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(e-i),200*(i-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]}function v(t){var e,i,n,a,o=t[0],r=t[1],s=t[2];return o<=8?a=(i=100*o/903.3)/100*7.787+16/116:(i=100*Math.pow((o+16)/116,3),a=Math.pow(i/100,1/3)),[e=e/95.047<=.008856?e=95.047*(r/500+a-16/116)/7.787:95.047*Math.pow(r/500+a,3),i,n=n/108.883<=.008859?n=108.883*(a-s/200-16/116)/7.787:108.883*Math.pow(a-s/200,3)]}function x(t){var e,i=t[0],n=t[1],a=t[2];return(e=360*Math.atan2(a,n)/2/Math.PI)<0&&(e+=360),[i,Math.sqrt(n*n+a*a),e]}function y(t){return p(v(t))}function k(t){var e,i=t[0],n=t[1];return e=t[2]/360*2*Math.PI,[i,n*Math.cos(e),n*Math.sin(e)]}function w(t){return M[t]}var M={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},_={};for(var C in M)_[JSON.stringify(M[C])]=C;var S=function(){return new T};for(var P in e){S[P+"Raw"]=function(t){return function(i){return"number"==typeof i&&(i=Array.prototype.slice.call(arguments)),e[t](i)}}(P);var I=/(\w+)2(\w+)/.exec(P),A=I[1],D=I[2];(S[A]=S[A]||{})[D]=S[P]=function(t){return function(i){"number"==typeof i&&(i=Array.prototype.slice.call(arguments));var n=e[t](i);if("string"==typeof n||void 0===n)return n;for(var a=0;a<n.length;a++)n[a]=Math.round(n[a]);return n}}(P)}var T=function(){this.convs={}};T.prototype.routeSpace=function(t,e){var i=e[0];return void 0===i?this.getValues(t):("number"==typeof i&&(i=Array.prototype.slice.call(e)),this.setValues(t,i))},T.prototype.setValues=function(t,e){return this.space=t,this.convs={},this.convs[t]=e,this},T.prototype.getValues=function(t){var e=this.convs[t];if(!e){var i=this.space,n=this.convs[i];e=S[i][t](n),this.convs[t]=e}return e},["rgb","hsl","hsv","cmyk","keyword"].forEach(function(t){T.prototype[t]=function(e){return this.routeSpace(t,arguments)}});var F=S,L={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},R={getRgba:O,getHsla:z,getRgb:function(t){var e=O(t);return e&&e.slice(0,3)},getHsl:function(t){var e=z(t);return e&&e.slice(0,3)},getHwb:B,getAlpha:function(t){var e=O(t);if(e)return e[3];if(e=z(t))return e[3];if(e=B(t))return e[3]},hexString:function(t,e){var e=void 0!==e&&3===t.length?e:t[3];return"#"+H(t[0])+H(t[1])+H(t[2])+(e>=0&&e<1?H(Math.round(255*e)):"")},rgbString:function(t,e){if(e<1||t[3]&&t[3]<1)return N(t,e);return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:N,percentString:function(t,e){if(e<1||t[3]&&t[3]<1)return W(t,e);var i=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),a=Math.round(t[2]/255*100);return"rgb("+i+"%, "+n+"%, "+a+"%)"},percentaString:W,hslString:function(t,e){if(e<1||t[3]&&t[3]<1)return V(t,e);return"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:V,hwbString:function(t,e){void 0===e&&(e=void 0!==t[3]?t[3]:1);return"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return j[t.slice(0,3)]}};function O(t){if(t){var e=[0,0,0],i=1,n=t.match(/^#([a-fA-F0-9]{3,4})$/i),a="";if(n){a=(n=n[1])[3];for(var o=0;o<e.length;o++)e[o]=parseInt(n[o]+n[o],16);a&&(i=Math.round(parseInt(a+a,16)/255*100)/100)}else if(n=t.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){a=n[2],n=n[1];for(o=0;o<e.length;o++)e[o]=parseInt(n.slice(2*o,2*o+2),16);a&&(i=Math.round(parseInt(a,16)/255*100)/100)}else if(n=t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(o=0;o<e.length;o++)e[o]=parseInt(n[o+1]);i=parseFloat(n[4])}else if(n=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(o=0;o<e.length;o++)e[o]=Math.round(2.55*parseFloat(n[o+1]));i=parseFloat(n[4])}else if(n=t.match(/(\w+)/)){if("transparent"==n[1])return[0,0,0,0];if(!(e=L[n[1]]))return}for(o=0;o<e.length;o++)e[o]=E(e[o],0,255);return i=i||0==i?E(i,0,1):1,e[3]=i,e}}function z(t){if(t){var e=t.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var i=parseFloat(e[4]);return[E(parseInt(e[1]),0,360),E(parseFloat(e[2]),0,100),E(parseFloat(e[3]),0,100),E(isNaN(i)?1:i,0,1)]}}}function B(t){if(t){var e=t.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var i=parseFloat(e[4]);return[E(parseInt(e[1]),0,360),E(parseFloat(e[2]),0,100),E(parseFloat(e[3]),0,100),E(isNaN(i)?1:i,0,1)]}}}function N(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function W(t,e){return"rgba("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%, "+(e||t[3]||1)+")"}function V(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function E(t,e,i){return Math.min(Math.max(e,t),i)}function H(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var j={};for(var q in L)j[L[q]]=q;var Y=function(t){return t instanceof Y?t:this instanceof Y?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof t?(e=R.getRgba(t))?this.setValues("rgb",e):(e=R.getHsla(t))?this.setValues("hsl",e):(e=R.getHwb(t))&&this.setValues("hwb",e):"object"==typeof t&&(void 0!==(e=t).r||void 0!==e.red?this.setValues("rgb",e):void 0!==e.l||void 0!==e.lightness?this.setValues("hsl",e):void 0!==e.v||void 0!==e.value?this.setValues("hsv",e):void 0!==e.w||void 0!==e.whiteness?this.setValues("hwb",e):void 0===e.c&&void 0===e.cyan||this.setValues("cmyk",e)))):new Y(t);var e};Y.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t&&(t=(t%=360)<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return R.hexString(this.values.rgb)},rgbString:function(){return R.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return R.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return R.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return R.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return R.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return R.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return R.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],i=0;i<t.length;i++){var n=t[i]/255;e[i]=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),i=t.luminosity();return e>i?(e+.05)/(i+.05):(i+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,i=(e[0]+t)%360;return e[0]=i<0?360+i:i,this.setValues("hsl",e),this},mix:function(t,e){var i=t,n=void 0===e?.5:e,a=2*n-1,o=this.alpha()-i.alpha(),r=((a*o==-1?a:(a+o)/(1+a*o))+1)/2,s=1-r;return this.rgb(r*this.red()+s*i.red(),r*this.green()+s*i.green(),r*this.blue()+s*i.blue()).alpha(this.alpha()*n+i.alpha()*(1-n))},toJSON:function(){return this.rgb()},clone:function(){var t,e,i=new Y,n=this.values,a=i.values;for(var o in n)n.hasOwnProperty(o)&&(t=n[o],"[object Array]"===(e={}.toString.call(t))?a[o]=t.slice(0):"[object Number]"===e?a[o]=t:console.error("unexpected color value:",t));return i}},Y.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},Y.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},Y.prototype.getValues=function(t){for(var e=this.values,i={},n=0;n<t.length;n++)i[t.charAt(n)]=e[t][n];return 1!==e.alpha&&(i.a=e.alpha),i},Y.prototype.setValues=function(t,e){var i,n,a=this.values,o=this.spaces,r=this.maxes,s=1;if(this.valid=!0,"alpha"===t)s=e;else if(e.length)a[t]=e.slice(0,t.length),s=e[t.length];else if(void 0!==e[t.charAt(0)]){for(i=0;i<t.length;i++)a[t][i]=e[t.charAt(i)];s=e.a}else if(void 0!==e[o[t][0]]){var l=o[t];for(i=0;i<t.length;i++)a[t][i]=e[l[i]];s=e.alpha}if(a.alpha=Math.max(0,Math.min(1,void 0===s?a.alpha:s)),"alpha"===t)return!1;for(i=0;i<t.length;i++)n=Math.max(0,Math.min(r[t][i],a[t][i])),a[t][i]=Math.round(n);for(var d in o)d!==t&&(a[d]=F[t][d](a[t]));return!0},Y.prototype.setSpace=function(t,e){var i=e[0];return void 0===i?this.getValues(t):("number"==typeof i&&(i=Array.prototype.slice.call(e)),this.setValues(t,i),this)},Y.prototype.setChannel=function(t,e,i){var n=this.values[t];return void 0===i?n[e]:i===n[e]?this:(n[e]=i,this.setValues(t,n),this)},"undefined"!=typeof window&&(window.Color=Y);var U,X=Y,K={noop:function(){},uid:(U=0,function(){return U++}),isNullOrUndef:function(t){return null==t},isArray:function(t){if(Array.isArray&&Array.isArray(t))return!0;var e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},isFinite:function(t){return("number"==typeof t||t instanceof Number)&&isFinite(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,i){return K.valueOrDefault(K.isArray(t)?t[e]:t,i)},callback:function(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)},each:function(t,e,i,n){var a,o,r;if(K.isArray(t))if(o=t.length,n)for(a=o-1;a>=0;a--)e.call(i,t[a],a);else for(a=0;a<o;a++)e.call(i,t[a],a);else if(K.isObject(t))for(o=(r=Object.keys(t)).length,a=0;a<o;a++)e.call(i,t[r[a]],r[a])},arrayEquals:function(t,e){var i,n,a,o;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(a=t[i],o=e[i],a instanceof Array&&o instanceof Array){if(!K.arrayEquals(a,o))return!1}else if(a!==o)return!1;return!0},clone:function(t){if(K.isArray(t))return t.map(K.clone);if(K.isObject(t)){for(var e={},i=Object.keys(t),n=i.length,a=0;a<n;++a)e[i[a]]=K.clone(t[i[a]]);return e}return t},_merger:function(t,e,i,n){var a=e[t],o=i[t];K.isObject(a)&&K.isObject(o)?K.merge(a,o,n):e[t]=K.clone(o)},_mergerIf:function(t,e,i){var n=e[t],a=i[t];K.isObject(n)&&K.isObject(a)?K.mergeIf(n,a):e.hasOwnProperty(t)||(e[t]=K.clone(a))},merge:function(t,e,i){var n,a,o,r,s,l=K.isArray(e)?e:[e],d=l.length;if(!K.isObject(t))return t;for(n=(i=i||{}).merger||K._merger,a=0;a<d;++a)if(e=l[a],K.isObject(e))for(s=0,r=(o=Object.keys(e)).length;s<r;++s)n(o[s],t,e,i);return t},mergeIf:function(t,e){return K.merge(t,e,{merger:K._mergerIf})},extend:function(t){for(var e=function(e,i){t[i]=e},i=1,n=arguments.length;i<n;++i)K.each(arguments[i],e);return t},inherits:function(t){var e=this,i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},n=function(){this.constructor=i};return n.prototype=e.prototype,i.prototype=new n,i.extend=K.inherits,t&&K.extend(i.prototype,t),i.__super__=e.prototype,i}},G=K;K.callCallback=K.callback,K.indexOf=function(t,e,i){return Array.prototype.indexOf.call(t,e,i)},K.getValueOrDefault=K.valueOrDefault,K.getValueAtIndexOrDefault=K.valueAtIndexOrDefault;var Z={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i))},easeOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/i)+1)},easeInOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:2==(t/=.5)?1:(i||(i=.45),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),t<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-Z.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*Z.easeInBounce(2*t):.5*Z.easeOutBounce(2*t-1)+.5}},$={effects:Z};G.easingEffects=Z;var J=Math.PI,Q=J/180,tt=2*J,et=J/2,it=J/4,nt=2*J/3,at={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,i,n,a,o){if(o){var r=Math.min(o,a/2,n/2),s=e+r,l=i+r,d=e+n-r,u=i+a-r;t.moveTo(e,l),s<d&&l<u?(t.arc(s,l,r,-J,-et),t.arc(d,l,r,-et,0),t.arc(d,u,r,0,et),t.arc(s,u,r,et,J)):s<d?(t.moveTo(s,i),t.arc(d,l,r,-et,et),t.arc(s,l,r,et,J+et)):l<u?(t.arc(s,l,r,-J,0),t.arc(s,u,r,0,J)):t.arc(s,l,r,-J,J),t.closePath(),t.moveTo(e,i)}else t.rect(e,i,n,a)},drawPoint:function(t,e,i,n,a,o){var r,s,l,d,u,h=(o||0)*Q;if(!e||"object"!=typeof e||"[object HTMLImageElement]"!==(r=e.toString())&&"[object HTMLCanvasElement]"!==r){if(!(isNaN(i)||i<=0)){switch(t.beginPath(),e){default:t.arc(n,a,i,0,tt),t.closePath();break;case"triangle":t.moveTo(n+Math.sin(h)*i,a-Math.cos(h)*i),h+=nt,t.lineTo(n+Math.sin(h)*i,a-Math.cos(h)*i),h+=nt,t.lineTo(n+Math.sin(h)*i,a-Math.cos(h)*i),t.closePath();break;case"rectRounded":d=i-(u=.516*i),s=Math.cos(h+it)*d,l=Math.sin(h+it)*d,t.arc(n-s,a-l,u,h-J,h-et),t.arc(n+l,a-s,u,h-et,h),t.arc(n+s,a+l,u,h,h+et),t.arc(n-l,a+s,u,h+et,h+J),t.closePath();break;case"rect":if(!o){d=Math.SQRT1_2*i,t.rect(n-d,a-d,2*d,2*d);break}h+=it;case"rectRot":s=Math.cos(h)*i,l=Math.sin(h)*i,t.moveTo(n-s,a-l),t.lineTo(n+l,a-s),t.lineTo(n+s,a+l),t.lineTo(n-l,a+s),t.closePath();break;case"crossRot":h+=it;case"cross":s=Math.cos(h)*i,l=Math.sin(h)*i,t.moveTo(n-s,a-l),t.lineTo(n+s,a+l),t.moveTo(n+l,a-s),t.lineTo(n-l,a+s);break;case"star":s=Math.cos(h)*i,l=Math.sin(h)*i,t.moveTo(n-s,a-l),t.lineTo(n+s,a+l),t.moveTo(n+l,a-s),t.lineTo(n-l,a+s),h+=it,s=Math.cos(h)*i,l=Math.sin(h)*i,t.moveTo(n-s,a-l),t.lineTo(n+s,a+l),t.moveTo(n+l,a-s),t.lineTo(n-l,a+s);break;case"line":s=Math.cos(h)*i,l=Math.sin(h)*i,t.moveTo(n-s,a-l),t.lineTo(n+s,a+l);break;case"dash":t.moveTo(n,a),t.lineTo(n+Math.cos(h)*i,a+Math.sin(h)*i)}t.fill(),t.stroke()}}else t.drawImage(e,n-e.width/2,a-e.height/2,e.width,e.height)},_isPointInArea:function(t,e){return t.x>e.left-1e-6&&t.x<e.right+1e-6&&t.y>e.top-1e-6&&t.y<e.bottom+1e-6},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,i,n){var a=i.steppedLine;if(a){if("middle"===a){var o=(e.x+i.x)/2;t.lineTo(o,n?i.y:e.y),t.lineTo(o,n?e.y:i.y)}else"after"===a&&!n||"after"!==a&&n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}else i.tension?t.bezierCurveTo(n?e.controlPointPreviousX:e.controlPointNextX,n?e.controlPointPreviousY:e.controlPointNextY,n?i.controlPointNextX:i.controlPointPreviousX,n?i.controlPointNextY:i.controlPointPreviousY,i.x,i.y):t.lineTo(i.x,i.y)}},ot=at;G.clear=at.clear,G.drawRoundedRectangle=function(t){t.beginPath(),at.roundedRect.apply(at,arguments)};var rt={_set:function(t,e){return G.merge(this[t]||(this[t]={}),e)}};rt._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var st=rt,lt=G.valueOrDefault;var dt={toLineHeight:function(t,e){var i=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,i,n,a;return G.isObject(t)?(e=+t.top||0,i=+t.right||0,n=+t.bottom||0,a=+t.left||0):e=i=n=a=+t||0,{top:e,right:i,bottom:n,left:a,height:e+n,width:a+i}},_parseFont:function(t){var e=st.global,i=lt(t.fontSize,e.defaultFontSize),n={family:lt(t.fontFamily,e.defaultFontFamily),lineHeight:G.options.toLineHeight(lt(t.lineHeight,e.defaultLineHeight),i),size:i,style:lt(t.fontStyle,e.defaultFontStyle),weight:null,string:""};return n.string=function(t){return!t||G.isNullOrUndef(t.size)||G.isNullOrUndef(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(n),n},resolve:function(t,e,i){var n,a,o;for(n=0,a=t.length;n<a;++n)if(void 0!==(o=t[n])&&(void 0!==e&&"function"==typeof o&&(o=o(e)),void 0!==i&&G.isArray(o)&&(o=o[i]),void 0!==o))return o}},ut=G,ht=$,ct=ot,ft=dt;ut.easing=ht,ut.canvas=ct,ut.options=ft;var gt=function(t){ut.extend(this,t),this.initialize.apply(this,arguments)};ut.extend(gt.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=ut.clone(t._model)),t._start={},t},transition:function(t){var e=this,i=e._model,n=e._start,a=e._view;return i&&1!==t?(a||(a=e._view={}),n||(n=e._start={}),function(t,e,i,n){var a,o,r,s,l,d,u,h,c,f=Object.keys(i);for(a=0,o=f.length;a<o;++a)if(d=i[r=f[a]],e.hasOwnProperty(r)||(e[r]=d),(s=e[r])!==d&&"_"!==r[0]){if(t.hasOwnProperty(r)||(t[r]=s),(u=typeof d)==typeof(l=t[r]))if("string"===u){if((h=X(l)).valid&&(c=X(d)).valid){e[r]=c.mix(h,n).rgbString();continue}}else if(ut.isFinite(l)&&ut.isFinite(d)){e[r]=l+(d-l)*n;continue}e[r]=d}}(n,a,i,t),e):(e._view=i,e._start=null,e)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return ut.isNumber(this._model.x)&&ut.isNumber(this._model.y)}}),gt.extend=ut.inherits;var pt=gt,mt=pt.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),vt=mt;Object.defineProperty(mt.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(mt.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}}),st._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:ut.noop,onComplete:ut.noop}});var bt={animations:[],request:null,addAnimation:function(t,e,i,n){var a,o,r=this.animations;for(e.chart=t,e.startTime=Date.now(),e.duration=i,n||(t.animating=!0),a=0,o=r.length;a<o;++a)if(r[a].chart===t)return void(r[a]=e);r.push(e),1===r.length&&this.requestAnimationFrame()},cancelAnimation:function(t){var e=ut.findIndex(this.animations,function(e){return e.chart===t});-1!==e&&(this.animations.splice(e,1),t.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=ut.requestAnimFrame.call(window,function(){t.request=null,t.startDigest()}))},startDigest:function(){this.advance(),this.animations.length>0&&this.requestAnimationFrame()},advance:function(){for(var t,e,i,n,a=this.animations,o=0;o<a.length;)e=(t=a[o]).chart,i=t.numSteps,n=Math.floor((Date.now()-t.startTime)/t.duration*i)+1,t.currentStep=Math.min(n,i),ut.callback(t.render,[e,t],e),ut.callback(t.onAnimationProgress,[t],e),t.currentStep>=i?(ut.callback(t.onAnimationComplete,[t],e),e.animating=!1,a.splice(o,1)):++o}},xt=ut.options.resolve,yt=["push","pop","shift","splice","unshift"];function kt(t,e){var i=t._chartjs;if(i){var n=i.listeners,a=n.indexOf(e);-1!==a&&n.splice(a,1),n.length>0||(yt.forEach(function(e){delete t[e]}),delete t._chartjs)}}var wt=function(t,e){this.initialize(t,e)};ut.extend(wt.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){this.chart=t,this.index=e,this.linkScales(),this.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),i=t.getDataset();null!==e.xAxisID&&e.xAxisID in t.chart.scales||(e.xAxisID=i.xAxisID||t.chart.options.scales.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in t.chart.scales||(e.yAxisID=i.yAxisID||t.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this.update(!0)},destroy:function(){this._data&&kt(this._data,this)},createMetaDataset:function(){var t=this.datasetElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(t){var e=this.dataElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index,_index:t})},addElements:function(){var t,e,i=this.getMeta(),n=this.getDataset().data||[],a=i.data;for(t=0,e=n.length;t<e;++t)a[t]=a[t]||this.createMetaData(t);i.dataset=i.dataset||this.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var t,e,i=this,n=i.getDataset(),a=n.data||(n.data=[]);i._data!==a&&(i._data&&kt(i._data,i),a&&Object.isExtensible(a)&&(e=i,(t=a)._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),yt.forEach(function(e){var i="onData"+e.charAt(0).toUpperCase()+e.slice(1),n=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),a=n.apply(this,e);return ut.each(t._chartjs.listeners,function(t){"function"==typeof t[i]&&t[i].apply(t,e)}),a}})}))),i._data=a),i.resyncElements()},update:ut.noop,transition:function(t){for(var e=this.getMeta(),i=e.data||[],n=i.length,a=0;a<n;++a)i[a].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],i=e.length,n=0;for(t.dataset&&t.dataset.draw();n<i;++n)e[n].draw()},removeHoverStyle:function(t){ut.merge(t._model,t.$previousStyle||{}),delete t.$previousStyle},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,n=t.custom||{},a=t._model,o=ut.getHoverColor;t.$previousStyle={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderWidth:a.borderWidth},a.backgroundColor=xt([n.hoverBackgroundColor,e.hoverBackgroundColor,o(a.backgroundColor)],void 0,i),a.borderColor=xt([n.hoverBorderColor,e.hoverBorderColor,o(a.borderColor)],void 0,i),a.borderWidth=xt([n.hoverBorderWidth,e.hoverBorderWidth,a.borderWidth],void 0,i)},resyncElements:function(){var t=this.getMeta(),e=this.getDataset().data,i=t.data.length,n=e.length;n<i?t.data.splice(n,i-n):n>i&&this.insertElements(i,n-i)},insertElements:function(t,e){for(var i=0;i<e;++i)this.addElementAndReset(t+i)},onDataPush:function(){var t=arguments.length;this.insertElements(this.getDataset().data.length-t,t)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e),this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),wt.extend=ut.inherits;var Mt=wt;st._set("global",{elements:{arc:{backgroundColor:st.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var _t=pt.extend({inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)},inRange:function(t,e){var i=this._view;if(i){for(var n=ut.getAngleFromPoint(i,{x:t,y:e}),a=n.angle,o=n.distance,r=i.startAngle,s=i.endAngle;s<r;)s+=2*Math.PI;for(;a>s;)a-=2*Math.PI;for(;a<r;)a+=2*Math.PI;var l=a>=r&&a<=s,d=o>=i.innerRadius&&o<=i.outerRadius;return l&&d}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,i=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,i=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},draw:function(){var t,e=this._chart.ctx,i=this._view,n=i.startAngle,a=i.endAngle,o="inner"===i.borderAlign?.33:0;e.save(),e.beginPath(),e.arc(i.x,i.y,Math.max(i.outerRadius-o,0),n,a),e.arc(i.x,i.y,i.innerRadius,a,n,!0),e.closePath(),e.fillStyle=i.backgroundColor,e.fill(),i.borderWidth&&("inner"===i.borderAlign?(e.beginPath(),t=o/i.outerRadius,e.arc(i.x,i.y,i.outerRadius,n-t,a+t),i.innerRadius>o?(t=o/i.innerRadius,e.arc(i.x,i.y,i.innerRadius-o,a+t,n-t,!0)):e.arc(i.x,i.y,o,a+Math.PI/2,n-Math.PI/2),e.closePath(),e.clip(),e.beginPath(),e.arc(i.x,i.y,i.outerRadius,n,a),e.arc(i.x,i.y,i.innerRadius,a,n,!0),e.closePath(),e.lineWidth=2*i.borderWidth,e.lineJoin="round"):(e.lineWidth=i.borderWidth,e.lineJoin="bevel"),e.strokeStyle=i.borderColor,e.stroke()),e.restore()}}),Ct=ut.valueOrDefault,St=st.global.defaultColor;st._set("global",{elements:{line:{tension:.4,backgroundColor:St,borderWidth:3,borderColor:St,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var Pt=pt.extend({draw:function(){var t,e,i,n,a=this._view,o=this._chart.ctx,r=a.spanGaps,s=this._children.slice(),l=st.global,d=l.elements.line,u=-1;for(this._loop&&s.length&&s.push(s[0]),o.save(),o.lineCap=a.borderCapStyle||d.borderCapStyle,o.setLineDash&&o.setLineDash(a.borderDash||d.borderDash),o.lineDashOffset=Ct(a.borderDashOffset,d.borderDashOffset),o.lineJoin=a.borderJoinStyle||d.borderJoinStyle,o.lineWidth=Ct(a.borderWidth,d.borderWidth),o.strokeStyle=a.borderColor||l.defaultColor,o.beginPath(),u=-1,t=0;t<s.length;++t)e=s[t],i=ut.previousItem(s,t),n=e._view,0===t?n.skip||(o.moveTo(n.x,n.y),u=t):(i=-1===u?i:s[u],n.skip||(u!==t-1&&!r||-1===u?o.moveTo(n.x,n.y):ut.canvas.lineTo(o,i._view,e._view),u=t));o.stroke(),o.restore()}}),It=ut.valueOrDefault,At=st.global.defaultColor;function Dt(t){var e=this._view;return!!e&&Math.abs(t-e.x)<e.radius+e.hitRadius}st._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:At,borderColor:At,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var Tt=pt.extend({inRange:function(t,e){var i=this._view;return!!i&&Math.pow(t-i.x,2)+Math.pow(e-i.y,2)<Math.pow(i.hitRadius+i.radius,2)},inLabelRange:Dt,inXRange:Dt,inYRange:function(t){var e=this._view;return!!e&&Math.abs(t-e.y)<e.radius+e.hitRadius},getCenterPoint:function(){var t=this._view;return{x:t.x,y:t.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(t){var e=this._view,i=this._chart.ctx,n=e.pointStyle,a=e.rotation,o=e.radius,r=e.x,s=e.y,l=st.global,d=l.defaultColor;e.skip||(void 0===t||ut.canvas._isPointInArea(e,t))&&(i.strokeStyle=e.borderColor||d,i.lineWidth=It(e.borderWidth,l.elements.point.borderWidth),i.fillStyle=e.backgroundColor||d,ut.canvas.drawPoint(i,n,o,r,s,a))}}),Ft=st.global.defaultColor;function Lt(t){return t&&void 0!==t.width}function Rt(t){var e,i,n,a,o;return Lt(t)?(o=t.width/2,e=t.x-o,i=t.x+o,n=Math.min(t.y,t.base),a=Math.max(t.y,t.base)):(o=t.height/2,e=Math.min(t.x,t.base),i=Math.max(t.x,t.base),n=t.y-o,a=t.y+o),{left:e,top:n,right:i,bottom:a}}function Ot(t,e,i){return t===e?i:t===i?e:t}function zt(t,e,i){var n,a,o,r,s=t.borderWidth,l=function(t){var e=t.borderSkipped,i={};return e?(t.horizontal?t.base>t.x&&(e=Ot(e,"left","right")):t.base<t.y&&(e=Ot(e,"bottom","top")),i[e]=!0,i):i}(t);return ut.isObject(s)?(n=+s.top||0,a=+s.right||0,o=+s.bottom||0,r=+s.left||0):n=a=o=r=+s||0,{t:l.top||n<0?0:n>i?i:n,r:l.right||a<0?0:a>e?e:a,b:l.bottom||o<0?0:o>i?i:o,l:l.left||r<0?0:r>e?e:r}}function Bt(t,e,i){var n=null===e,a=null===i,o=!(!t||n&&a)&&Rt(t);return o&&(n||e>=o.left&&e<=o.right)&&(a||i>=o.top&&i<=o.bottom)}st._set("global",{elements:{rectangle:{backgroundColor:Ft,borderColor:Ft,borderSkipped:"bottom",borderWidth:0}}});var Nt=pt.extend({draw:function(){var t=this._chart.ctx,e=this._view,i=function(t){var e=Rt(t),i=e.right-e.left,n=e.bottom-e.top,a=zt(t,i/2,n/2);return{outer:{x:e.left,y:e.top,w:i,h:n},inner:{x:e.left+a.l,y:e.top+a.t,w:i-a.l-a.r,h:n-a.t-a.b}}}(e),n=i.outer,a=i.inner;t.fillStyle=e.backgroundColor,t.fillRect(n.x,n.y,n.w,n.h),n.w===a.w&&n.h===a.h||(t.save(),t.beginPath(),t.rect(n.x,n.y,n.w,n.h),t.clip(),t.fillStyle=e.borderColor,t.rect(a.x,a.y,a.w,a.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return Bt(this._view,t,e)},inLabelRange:function(t,e){var i=this._view;return Lt(i)?Bt(i,t,null):Bt(i,null,e)},inXRange:function(t){return Bt(this._view,t,null)},inYRange:function(t){return Bt(this._view,null,t)},getCenterPoint:function(){var t,e,i=this._view;return Lt(i)?(t=i.x,e=(i.y+i.base)/2):(t=(i.x+i.base)/2,e=i.y),{x:t,y:e}},getArea:function(){var t=this._view;return Lt(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),Wt={},Vt=_t,Et=Pt,Ht=Tt,jt=Nt;Wt.Arc=Vt,Wt.Line=Et,Wt.Point=Ht,Wt.Rectangle=jt;var qt=ut.options.resolve;st._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}});var Yt=Mt.extend({dataElementType:Wt.Rectangle,initialize:function(){var t;Mt.prototype.initialize.apply(this,arguments),(t=this.getMeta()).stack=this.getDataset().stack,t.bar=!0},update:function(t){var e,i,n=this.getMeta().data;for(this._ruler=this.getRuler(),e=0,i=n.length;e<i;++e)this.updateElement(n[e],e,t)},updateElement:function(t,e,i){var n=this,a=n.getMeta(),o=n.getDataset(),r=n._resolveElementOptions(t,e);t._xScale=n.getScaleForId(a.xAxisID),t._yScale=n.getScaleForId(a.yAxisID),t._datasetIndex=n.index,t._index=e,t._model={backgroundColor:r.backgroundColor,borderColor:r.borderColor,borderSkipped:r.borderSkipped,borderWidth:r.borderWidth,datasetLabel:o.label,label:n.chart.data.labels[e]},n._updateElementGeometry(t,e,i),t.pivot()},_updateElementGeometry:function(t,e,i){var n=this,a=t._model,o=n._getValueScale(),r=o.getBasePixel(),s=o.isHorizontal(),l=n._ruler||n.getRuler(),d=n.calculateBarValuePixels(n.index,e),u=n.calculateBarIndexPixels(n.index,e,l);a.horizontal=s,a.base=i?r:d.base,a.x=s?i?r:d.head:u.center,a.y=s?u.center:i?r:d.head,a.height=s?u.size:void 0,a.width=s?void 0:u.size},_getStacks:function(t){var e,i,n=this.chart,a=this._getIndexScale().options.stacked,o=void 0===t?n.data.datasets.length:t+1,r=[];for(e=0;e<o;++e)(i=n.getDatasetMeta(e)).bar&&n.isDatasetVisible(e)&&(!1===a||!0===a&&-1===r.indexOf(i.stack)||void 0===a&&(void 0===i.stack||-1===r.indexOf(i.stack)))&&r.push(i.stack);return r},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var i=this._getStacks(t),n=void 0!==e?i.indexOf(e):-1;return-1===n?i.length-1:n},getRuler:function(){var t,e,i=this._getIndexScale(),n=this.getStackCount(),a=this.index,o=i.isHorizontal(),r=o?i.left:i.top,s=r+(o?i.width:i.height),l=[];for(t=0,e=this.getMeta().data.length;t<e;++t)l.push(i.getPixelForValue(null,t,a));return{min:ut.isNullOrUndef(i.options.barThickness)?function(t,e){var i,n,a,o,r=t.isHorizontal()?t.width:t.height,s=t.getTicks();for(a=1,o=e.length;a<o;++a)r=Math.min(r,Math.abs(e[a]-e[a-1]));for(a=0,o=s.length;a<o;++a)n=t.getPixelForTick(a),r=a>0?Math.min(r,n-i):r,i=n;return r}(i,l):-1,pixels:l,start:r,end:s,stackCount:n,scale:i}},calculateBarValuePixels:function(t,e){var i,n,a,o,r,s,l=this.chart,d=this.getMeta(),u=this._getValueScale(),h=u.isHorizontal(),c=l.data.datasets,f=+u.getRightValue(c[t].data[e]),g=u.options.minBarLength,p=u.options.stacked,m=d.stack,v=0;if(p||void 0===p&&void 0!==m)for(i=0;i<t;++i)(n=l.getDatasetMeta(i)).bar&&n.stack===m&&n.controller._getValueScaleId()===u.id&&l.isDatasetVisible(i)&&(a=+u.getRightValue(c[i].data[e]),(f<0&&a<0||f>=0&&a>0)&&(v+=a));return o=u.getPixelForValue(v),s=(r=u.getPixelForValue(v+f))-o,void 0!==g&&Math.abs(s)<g&&(s=g,r=f>=0&&!h||f<0&&h?o-g:o+g),{size:s,base:o,head:r,center:r+s/2}},calculateBarIndexPixels:function(t,e,i){var n=i.scale.options,a="flex"===n.barThickness?function(t,e,i){var n,a=e.pixels,o=a[t],r=t>0?a[t-1]:null,s=t<a.length-1?a[t+1]:null,l=i.categoryPercentage;return null===r&&(r=o-(null===s?e.end-e.start:s-o)),null===s&&(s=o+o-r),n=o-(o-Math.min(r,s))/2*l,{chunk:Math.abs(s-r)/2*l/e.stackCount,ratio:i.barPercentage,start:n}}(e,i,n):function(t,e,i){var n,a,o=i.barThickness,r=e.stackCount,s=e.pixels[t];return ut.isNullOrUndef(o)?(n=e.min*i.categoryPercentage,a=i.barPercentage):(n=o*r,a=1),{chunk:n/r,ratio:a,start:s-n/2}}(e,i,n),o=this.getStackIndex(t,this.getMeta().stack),r=a.start+a.chunk*o+a.chunk/2,s=Math.min(ut.valueOrDefault(n.maxBarThickness,1/0),a.chunk*a.ratio);return{base:r-s/2,head:r+s/2,center:r,size:s}},draw:function(){var t=this.chart,e=this._getValueScale(),i=this.getMeta().data,n=this.getDataset(),a=i.length,o=0;for(ut.canvas.clipArea(t.ctx,t.chartArea);o<a;++o)isNaN(e.getRightValue(n.data[o]))||i[o].draw();ut.canvas.unclipArea(t.ctx)},_resolveElementOptions:function(t,e){var i,n,a,o=this.chart,r=o.data.datasets[this.index],s=t.custom||{},l=o.options.elements.rectangle,d={},u={chart:o,dataIndex:e,dataset:r,datasetIndex:this.index},h=["backgroundColor","borderColor","borderSkipped","borderWidth"];for(i=0,n=h.length;i<n;++i)d[a=h[i]]=qt([s[a],r[a],l[a]],u,e);return d}}),Ut=ut.valueOrDefault,Xt=ut.options.resolve;st._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){var i=e.datasets[t.datasetIndex].label||"",n=e.datasets[t.datasetIndex].data[t.index];return i+": ("+t.xLabel+", "+t.yLabel+", "+n.r+")"}}}});var Kt=Mt.extend({dataElementType:Wt.Point,update:function(t){var e=this,i=e.getMeta().data;ut.each(i,function(i,n){e.updateElement(i,n,t)})},updateElement:function(t,e,i){var n=this,a=n.getMeta(),o=t.custom||{},r=n.getScaleForId(a.xAxisID),s=n.getScaleForId(a.yAxisID),l=n._resolveElementOptions(t,e),d=n.getDataset().data[e],u=n.index,h=i?r.getPixelForDecimal(.5):r.getPixelForValue("object"==typeof d?d:NaN,e,u),c=i?s.getBasePixel():s.getPixelForValue(d,e,u);t._xScale=r,t._yScale=s,t._options=l,t._datasetIndex=u,t._index=e,t._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,rotation:l.rotation,radius:i?0:l.radius,skip:o.skip||isNaN(h)||isNaN(c),x:h,y:c},t.pivot()},setHoverStyle:function(t){var e=t._model,i=t._options,n=ut.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Ut(i.hoverBackgroundColor,n(i.backgroundColor)),e.borderColor=Ut(i.hoverBorderColor,n(i.borderColor)),e.borderWidth=Ut(i.hoverBorderWidth,i.borderWidth),e.radius=i.radius+i.hoverRadius},_resolveElementOptions:function(t,e){var i,n,a,o=this.chart,r=o.data.datasets[this.index],s=t.custom||{},l=o.options.elements.point,d=r.data[e],u={},h={chart:o,dataIndex:e,dataset:r,datasetIndex:this.index},c=["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"];for(i=0,n=c.length;i<n;++i)u[a=c[i]]=Xt([s[a],r[a],l[a]],h,e);return u.radius=Xt([s.radius,d?d.r:void 0,r.radius,l.radius],h,e),u}}),Gt=ut.options.resolve,Zt=ut.valueOrDefault;st._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');var i=t.data,n=i.datasets,a=i.labels;if(n.length)for(var o=0;o<n[0].data.length;++o)e.push('<li><span style="background-color:'+n[0].backgroundColor[o]+'"></span>'),a[o]&&e.push(a[o]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(i,n){var a=t.getDatasetMeta(0),o=e.datasets[0],r=a.data[n],s=r&&r.custom||{},l=t.options.elements.arc;return{text:i,fillStyle:Gt([s.backgroundColor,o.backgroundColor,l.backgroundColor],void 0,n),strokeStyle:Gt([s.borderColor,o.borderColor,l.borderColor],void 0,n),lineWidth:Gt([s.borderWidth,o.borderWidth,l.borderWidth],void 0,n),hidden:isNaN(o.data[n])||a.data[n].hidden,index:n}}):[]}},onClick:function(t,e){var i,n,a,o=e.index,r=this.chart;for(i=0,n=(r.data.datasets||[]).length;i<n;++i)(a=r.getDatasetMeta(i)).data[o]&&(a.data[o].hidden=!a.data[o].hidden);r.update()}},cutoutPercentage:50,rotation:-.5*Math.PI,circumference:2*Math.PI,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var i=e.labels[t.index],n=": "+e.datasets[t.datasetIndex].data[t.index];return ut.isArray(i)?(i=i.slice())[0]+=n:i+=n,i}}}});var $t=Mt.extend({dataElementType:Wt.Arc,linkScales:ut.noop,getRingIndex:function(t){for(var e=0,i=0;i<t;++i)this.chart.isDatasetVisible(i)&&++e;return e},update:function(t){var e,i,n=this,a=n.chart,o=a.chartArea,r=a.options,s=o.right-o.left,l=o.bottom-o.top,d=Math.min(s,l),u={x:0,y:0},h=n.getMeta(),c=h.data,f=r.cutoutPercentage,g=r.circumference,p=n._getRingWeight(n.index);if(g<2*Math.PI){var m=r.rotation%(2*Math.PI),v=(m+=2*Math.PI*(m>=Math.PI?-1:m<-Math.PI?1:0))+g,b={x:Math.cos(m),y:Math.sin(m)},x={x:Math.cos(v),y:Math.sin(v)},y=m<=0&&v>=0||m<=2*Math.PI&&2*Math.PI<=v,k=m<=.5*Math.PI&&.5*Math.PI<=v||m<=2.5*Math.PI&&2.5*Math.PI<=v,w=m<=-Math.PI&&-Math.PI<=v||m<=Math.PI&&Math.PI<=v,M=m<=.5*-Math.PI&&.5*-Math.PI<=v||m<=1.5*Math.PI&&1.5*Math.PI<=v,_=f/100,C={x:w?-1:Math.min(b.x*(b.x<0?1:_),x.x*(x.x<0?1:_)),y:M?-1:Math.min(b.y*(b.y<0?1:_),x.y*(x.y<0?1:_))},S={x:y?1:Math.max(b.x*(b.x>0?1:_),x.x*(x.x>0?1:_)),y:k?1:Math.max(b.y*(b.y>0?1:_),x.y*(x.y>0?1:_))},P={width:.5*(S.x-C.x),height:.5*(S.y-C.y)};d=Math.min(s/P.width,l/P.height),u={x:-.5*(S.x+C.x),y:-.5*(S.y+C.y)}}for(e=0,i=c.length;e<i;++e)c[e]._options=n._resolveElementOptions(c[e],e);for(a.borderWidth=n.getMaxBorderWidth(),a.outerRadius=Math.max((d-a.borderWidth)/2,0),a.innerRadius=Math.max(f?a.outerRadius/100*f:0,0),a.radiusLength=(a.outerRadius-a.innerRadius)/(n._getVisibleDatasetWeightTotal()||1),a.offsetX=u.x*a.outerRadius,a.offsetY=u.y*a.outerRadius,h.total=n.calculateTotal(),n.outerRadius=a.outerRadius-a.radiusLength*n._getRingWeightOffset(n.index),n.innerRadius=Math.max(n.outerRadius-a.radiusLength*p,0),e=0,i=c.length;e<i;++e)n.updateElement(c[e],e,t)},updateElement:function(t,e,i){var n=this,a=n.chart,o=a.chartArea,r=a.options,s=r.animation,l=(o.left+o.right)/2,d=(o.top+o.bottom)/2,u=r.rotation,h=r.rotation,c=n.getDataset(),f=i&&s.animateRotate?0:t.hidden?0:n.calculateCircumference(c.data[e])*(r.circumference/(2*Math.PI)),g=i&&s.animateScale?0:n.innerRadius,p=i&&s.animateScale?0:n.outerRadius,m=t._options||{};ut.extend(t,{_datasetIndex:n.index,_index:e,_model:{backgroundColor:m.backgroundColor,borderColor:m.borderColor,borderWidth:m.borderWidth,borderAlign:m.borderAlign,x:l+a.offsetX,y:d+a.offsetY,startAngle:u,endAngle:h,circumference:f,outerRadius:p,innerRadius:g,label:ut.valueAtIndexOrDefault(c.label,e,a.data.labels[e])}});var v=t._model;i&&s.animateRotate||(v.startAngle=0===e?r.rotation:n.getMeta().data[e-1]._model.endAngle,v.endAngle=v.startAngle+v.circumference),t.pivot()},calculateTotal:function(){var t,e=this.getDataset(),i=this.getMeta(),n=0;return ut.each(i.data,function(i,a){t=e.data[a],isNaN(t)||i.hidden||(n+=Math.abs(t))}),n},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,i,n,a,o,r,s,l,d=0,u=this.chart;if(!t)for(e=0,i=u.data.datasets.length;e<i;++e)if(u.isDatasetVisible(e)){t=(n=u.getDatasetMeta(e)).data,e!==this.index&&(o=n.controller);break}if(!t)return 0;for(e=0,i=t.length;e<i;++e)a=t[e],"inner"!==(r=o?o._resolveElementOptions(a,e):a._options).borderAlign&&(s=r.borderWidth,d=(l=r.hoverBorderWidth)>(d=s>d?s:d)?l:d);return d},setHoverStyle:function(t){var e=t._model,i=t._options,n=ut.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=Zt(i.hoverBackgroundColor,n(i.backgroundColor)),e.borderColor=Zt(i.hoverBorderColor,n(i.borderColor)),e.borderWidth=Zt(i.hoverBorderWidth,i.borderWidth)},_resolveElementOptions:function(t,e){var i,n,a,o=this.chart,r=this.getDataset(),s=t.custom||{},l=o.options.elements.arc,d={},u={chart:o,dataIndex:e,dataset:r,datasetIndex:this.index},h=["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"];for(i=0,n=h.length;i<n;++i)d[a=h[i]]=Gt([s[a],r[a],l[a]],u,e);return d},_getRingWeightOffset:function(t){for(var e=0,i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e},_getRingWeight:function(t){return Math.max(Zt(this.chart.data.datasets[t].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});st._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}});var Jt=Yt.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),Qt=ut.valueOrDefault,te=ut.options.resolve,ee=ut.canvas._isPointInArea;function ie(t,e){return Qt(t.showLine,e.showLines)}st._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var ne=Mt.extend({datasetElementType:Wt.Line,dataElementType:Wt.Point,update:function(t){var e,i,n=this,a=n.getMeta(),o=a.dataset,r=a.data||[],s=n.getScaleForId(a.yAxisID),l=n.getDataset(),d=ie(l,n.chart.options);for(d&&(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),o._scale=s,o._datasetIndex=n.index,o._children=r,o._model=n._resolveLineOptions(o),o.pivot()),e=0,i=r.length;e<i;++e)n.updateElement(r[e],e,t);for(d&&0!==o._model.tension&&n.updateBezierControlPoints(),e=0,i=r.length;e<i;++e)r[e].pivot()},updateElement:function(t,e,i){var n,a,o=this,r=o.getMeta(),s=t.custom||{},l=o.getDataset(),d=o.index,u=l.data[e],h=o.getScaleForId(r.yAxisID),c=o.getScaleForId(r.xAxisID),f=r.dataset._model,g=o._resolvePointOptions(t,e);n=c.getPixelForValue("object"==typeof u?u:NaN,e,d),a=i?h.getBasePixel():o.calculatePointY(u,e,d),t._xScale=c,t._yScale=h,t._options=g,t._datasetIndex=d,t._index=e,t._model={x:n,y:a,skip:s.skip||isNaN(n)||isNaN(a),radius:g.radius,pointStyle:g.pointStyle,rotation:g.rotation,backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,tension:Qt(s.tension,f?f.tension:0),steppedLine:!!f&&f.steppedLine,hitRadius:g.hitRadius}},_resolvePointOptions:function(t,e){var i,n,a,o=this.chart,r=o.data.datasets[this.index],s=t.custom||{},l=o.options.elements.point,d={},u={chart:o,dataIndex:e,dataset:r,datasetIndex:this.index},h={backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},c=Object.keys(h);for(i=0,n=c.length;i<n;++i)d[a=c[i]]=te([s[a],r[h[a]],r[a],l[a]],u,e);return d},_resolveLineOptions:function(t){var e,i,n,a=this.chart,o=a.data.datasets[this.index],r=t.custom||{},s=a.options,l=s.elements.line,d={},u=["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill","cubicInterpolationMode"];for(e=0,i=u.length;e<i;++e)d[n=u[e]]=te([r[n],o[n],l[n]]);return d.spanGaps=Qt(o.spanGaps,s.spanGaps),d.tension=Qt(o.lineTension,l.tension),d.steppedLine=te([r.steppedLine,o.steppedLine,l.stepped]),d},calculatePointY:function(t,e,i){var n,a,o,r=this.chart,s=this.getMeta(),l=this.getScaleForId(s.yAxisID),d=0,u=0;if(l.options.stacked){for(n=0;n<i;n++)if(a=r.data.datasets[n],"line"===(o=r.getDatasetMeta(n)).type&&o.yAxisID===l.id&&r.isDatasetVisible(n)){var h=Number(l.getRightValue(a.data[e]));h<0?u+=h||0:d+=h||0}var c=Number(l.getRightValue(t));return c<0?l.getPixelForValue(u+c):l.getPixelForValue(d+c)}return l.getPixelForValue(t)},updateBezierControlPoints:function(){var t,e,i,n,a=this.chart,o=this.getMeta(),r=o.dataset._model,s=a.chartArea,l=o.data||[];function d(t,e,i){return Math.max(Math.min(t,i),e)}if(r.spanGaps&&(l=l.filter(function(t){return!t._model.skip})),"monotone"===r.cubicInterpolationMode)ut.splineCurveMonotone(l);else for(t=0,e=l.length;t<e;++t)i=l[t]._model,n=ut.splineCurve(ut.previousItem(l,t)._model,i,ut.nextItem(l,t)._model,r.tension),i.controlPointPreviousX=n.previous.x,i.controlPointPreviousY=n.previous.y,i.controlPointNextX=n.next.x,i.controlPointNextY=n.next.y;if(a.options.elements.line.capBezierPoints)for(t=0,e=l.length;t<e;++t)i=l[t]._model,ee(i,s)&&(t>0&&ee(l[t-1]._model,s)&&(i.controlPointPreviousX=d(i.controlPointPreviousX,s.left,s.right),i.controlPointPreviousY=d(i.controlPointPreviousY,s.top,s.bottom)),t<l.length-1&&ee(l[t+1]._model,s)&&(i.controlPointNextX=d(i.controlPointNextX,s.left,s.right),i.controlPointNextY=d(i.controlPointNextY,s.top,s.bottom)))},draw:function(){var t,e=this.chart,i=this.getMeta(),n=i.data||[],a=e.chartArea,o=n.length,r=0;for(ie(this.getDataset(),e.options)&&(t=(i.dataset._model.borderWidth||0)/2,ut.canvas.clipArea(e.ctx,{left:a.left,right:a.right,top:a.top-t,bottom:a.bottom+t}),i.dataset.draw(),ut.canvas.unclipArea(e.ctx));r<o;++r)n[r].draw(a)},setHoverStyle:function(t){var e=t._model,i=t._options,n=ut.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Qt(i.hoverBackgroundColor,n(i.backgroundColor)),e.borderColor=Qt(i.hoverBorderColor,n(i.borderColor)),e.borderWidth=Qt(i.hoverBorderWidth,i.borderWidth),e.radius=Qt(i.hoverRadius,i.radius)}}),ae=ut.options.resolve;st._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');var i=t.data,n=i.datasets,a=i.labels;if(n.length)for(var o=0;o<n[0].data.length;++o)e.push('<li><span style="background-color:'+n[0].backgroundColor[o]+'"></span>'),a[o]&&e.push(a[o]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(i,n){var a=t.getDatasetMeta(0),o=e.datasets[0],r=a.data[n].custom||{},s=t.options.elements.arc;return{text:i,fillStyle:ae([r.backgroundColor,o.backgroundColor,s.backgroundColor],void 0,n),strokeStyle:ae([r.borderColor,o.borderColor,s.borderColor],void 0,n),lineWidth:ae([r.borderWidth,o.borderWidth,s.borderWidth],void 0,n),hidden:isNaN(o.data[n])||a.data[n].hidden,index:n}}):[]}},onClick:function(t,e){var i,n,a,o=e.index,r=this.chart;for(i=0,n=(r.data.datasets||[]).length;i<n;++i)(a=r.getDatasetMeta(i)).data[o].hidden=!a.data[o].hidden;r.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}});var oe=Mt.extend({dataElementType:Wt.Arc,linkScales:ut.noop,update:function(t){var e,i,n,a=this,o=a.getDataset(),r=a.getMeta(),s=a.chart.options.startAngle||0,l=a._starts=[],d=a._angles=[],u=r.data;for(a._updateRadius(),r.count=a.countVisibleElements(),e=0,i=o.data.length;e<i;e++)l[e]=s,n=a._computeAngle(e),d[e]=n,s+=n;for(e=0,i=u.length;e<i;++e)u[e]._options=a._resolveElementOptions(u[e],e),a.updateElement(u[e],e,t)},_updateRadius:function(){var t=this,e=t.chart,i=e.chartArea,n=e.options,a=Math.min(i.right-i.left,i.bottom-i.top);e.outerRadius=Math.max(a/2,0),e.innerRadius=Math.max(n.cutoutPercentage?e.outerRadius/100*n.cutoutPercentage:1,0),e.radiusLength=(e.outerRadius-e.innerRadius)/e.getVisibleDatasetCount(),t.outerRadius=e.outerRadius-e.radiusLength*t.index,t.innerRadius=t.outerRadius-e.radiusLength},updateElement:function(t,e,i){var n=this,a=n.chart,o=n.getDataset(),r=a.options,s=r.animation,l=a.scale,d=a.data.labels,u=l.xCenter,h=l.yCenter,c=r.startAngle,f=t.hidden?0:l.getDistanceFromCenterForValue(o.data[e]),g=n._starts[e],p=g+(t.hidden?0:n._angles[e]),m=s.animateScale?0:l.getDistanceFromCenterForValue(o.data[e]),v=t._options||{};ut.extend(t,{_datasetIndex:n.index,_index:e,_scale:l,_model:{backgroundColor:v.backgroundColor,borderColor:v.borderColor,borderWidth:v.borderWidth,borderAlign:v.borderAlign,x:u,y:h,innerRadius:0,outerRadius:i?m:f,startAngle:i&&s.animateRotate?c:g,endAngle:i&&s.animateRotate?c:p,label:ut.valueAtIndexOrDefault(d,e,d[e])}}),t.pivot()},countVisibleElements:function(){var t=this.getDataset(),e=this.getMeta(),i=0;return ut.each(e.data,function(e,n){isNaN(t.data[n])||e.hidden||i++}),i},setHoverStyle:function(t){var e=t._model,i=t._options,n=ut.getHoverColor,a=ut.valueOrDefault;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=a(i.hoverBackgroundColor,n(i.backgroundColor)),e.borderColor=a(i.hoverBorderColor,n(i.borderColor)),e.borderWidth=a(i.hoverBorderWidth,i.borderWidth)},_resolveElementOptions:function(t,e){var i,n,a,o=this.chart,r=this.getDataset(),s=t.custom||{},l=o.options.elements.arc,d={},u={chart:o,dataIndex:e,dataset:r,datasetIndex:this.index},h=["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"];for(i=0,n=h.length;i<n;++i)d[a=h[i]]=ae([s[a],r[a],l[a]],u,e);return d},_computeAngle:function(t){var e=this,i=this.getMeta().count,n=e.getDataset(),a=e.getMeta();if(isNaN(n.data[t])||a.data[t].hidden)return 0;var o={chart:e.chart,dataIndex:t,dataset:n,datasetIndex:e.index};return ae([e.chart.options.elements.arc.angle,2*Math.PI/i],o,t)}});st._set("pie",ut.clone(st.doughnut)),st._set("pie",{cutoutPercentage:0});var re=$t,se=ut.valueOrDefault,le=ut.options.resolve;st._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}});var de=Mt.extend({datasetElementType:Wt.Line,dataElementType:Wt.Point,linkScales:ut.noop,update:function(t){var e,i,n=this,a=n.getMeta(),o=a.dataset,r=a.data||[],s=n.chart.scale,l=n.getDataset();for(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),o._scale=s,o._datasetIndex=n.index,o._children=r,o._loop=!0,o._model=n._resolveLineOptions(o),o.pivot(),e=0,i=r.length;e<i;++e)n.updateElement(r[e],e,t);for(n.updateBezierControlPoints(),e=0,i=r.length;e<i;++e)r[e].pivot()},updateElement:function(t,e,i){var n=this,a=t.custom||{},o=n.getDataset(),r=n.chart.scale,s=r.getPointPositionForValue(e,o.data[e]),l=n._resolvePointOptions(t,e),d=n.getMeta().dataset._model,u=i?r.xCenter:s.x,h=i?r.yCenter:s.y;t._scale=r,t._options=l,t._datasetIndex=n.index,t._index=e,t._model={x:u,y:h,skip:a.skip||isNaN(u)||isNaN(h),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:se(a.tension,d?d.tension:0),hitRadius:l.hitRadius}},_resolvePointOptions:function(t,e){var i,n,a,o=this.chart,r=o.data.datasets[this.index],s=t.custom||{},l=o.options.elements.point,d={},u={chart:o,dataIndex:e,dataset:r,datasetIndex:this.index},h={backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},c=Object.keys(h);for(i=0,n=c.length;i<n;++i)d[a=c[i]]=le([s[a],r[h[a]],r[a],l[a]],u,e);return d},_resolveLineOptions:function(t){var e,i,n,a=this.chart,o=a.data.datasets[this.index],r=t.custom||{},s=a.options.elements.line,l={},d=["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"];for(e=0,i=d.length;e<i;++e)l[n=d[e]]=le([r[n],o[n],s[n]]);return l.tension=se(o.lineTension,s.tension),l},updateBezierControlPoints:function(){var t,e,i,n,a=this.getMeta(),o=this.chart.chartArea,r=a.data||[];function s(t,e,i){return Math.max(Math.min(t,i),e)}for(t=0,e=r.length;t<e;++t)i=r[t]._model,n=ut.splineCurve(ut.previousItem(r,t,!0)._model,i,ut.nextItem(r,t,!0)._model,i.tension),i.controlPointPreviousX=s(n.previous.x,o.left,o.right),i.controlPointPreviousY=s(n.previous.y,o.top,o.bottom),i.controlPointNextX=s(n.next.x,o.left,o.right),i.controlPointNextY=s(n.next.y,o.top,o.bottom)},setHoverStyle:function(t){var e=t._model,i=t._options,n=ut.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=se(i.hoverBackgroundColor,n(i.backgroundColor)),e.borderColor=se(i.hoverBorderColor,n(i.borderColor)),e.borderWidth=se(i.hoverBorderWidth,i.borderWidth),e.radius=se(i.hoverRadius,i.radius)}});st._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},showLines:!1,tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}});var ue={bar:Yt,bubble:Kt,doughnut:$t,horizontalBar:Jt,line:ne,polarArea:oe,pie:re,radar:de,scatter:ne};function he(t,e){return t.native?{x:t.x,y:t.y}:ut.getRelativePosition(t,e)}function ce(t,e){var i,n,a,o,r;for(n=0,o=t.data.datasets.length;n<o;++n)if(t.isDatasetVisible(n))for(a=0,r=(i=t.getDatasetMeta(n)).data.length;a<r;++a){var s=i.data[a];s._view.skip||e(s)}}function fe(t,e){var i=[];return ce(t,function(t){t.inRange(e.x,e.y)&&i.push(t)}),i}function ge(t,e,i,n){var a=Number.POSITIVE_INFINITY,o=[];return ce(t,function(t){if(!i||t.inRange(e.x,e.y)){var r=t.getCenterPoint(),s=n(e,r);s<a?(o=[t],a=s):s===a&&o.push(t)}}),o}function pe(t){var e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){var a=e?Math.abs(t.x-n.x):0,o=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(o,2))}}function me(t,e,i){var n=he(e,t);i.axis=i.axis||"x";var a=pe(i.axis),o=i.intersect?fe(t,n):ge(t,n,!1,a),r=[];return o.length?(t.data.datasets.forEach(function(e,i){if(t.isDatasetVisible(i)){var n=t.getDatasetMeta(i).data[o[0]._index];n&&!n._view.skip&&r.push(n)}}),r):[]}var ve={modes:{single:function(t,e){var i=he(e,t),n=[];return ce(t,function(t){if(t.inRange(i.x,i.y))return n.push(t),n}),n.slice(0,1)},label:me,index:me,dataset:function(t,e,i){var n=he(e,t);i.axis=i.axis||"xy";var a=pe(i.axis),o=i.intersect?fe(t,n):ge(t,n,!1,a);return o.length>0&&(o=t.getDatasetMeta(o[0]._datasetIndex).data),o},"x-axis":function(t,e){return me(t,e,{intersect:!1})},point:function(t,e){return fe(t,he(e,t))},nearest:function(t,e,i){var n=he(e,t);i.axis=i.axis||"xy";var a=pe(i.axis);return ge(t,n,i.intersect,a)},x:function(t,e,i){var n=he(e,t),a=[],o=!1;return ce(t,function(t){t.inXRange(n.x)&&a.push(t),t.inRange(n.x,n.y)&&(o=!0)}),i.intersect&&!o&&(a=[]),a},y:function(t,e,i){var n=he(e,t),a=[],o=!1;return ce(t,function(t){t.inYRange(n.y)&&a.push(t),t.inRange(n.x,n.y)&&(o=!0)}),i.intersect&&!o&&(a=[]),a}}};function be(t,e){return ut.where(t,function(t){return t.position===e})}function xe(t,e){t.forEach(function(t,e){return t._tmpIndex_=e,t}),t.sort(function(t,i){var n=e?i:t,a=e?t:i;return n.weight===a.weight?n._tmpIndex_-a._tmpIndex_:n.weight-a.weight}),t.forEach(function(t){delete t._tmpIndex_})}function ye(t,e){ut.each(t,function(t){e[t.position]+=t.isHorizontal()?t.height:t.width})}st._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var ke={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,t.boxes.push(e)},removeBox:function(t,e){var i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure:function(t,e,i){for(var n,a=["fullWidth","position","weight"],o=a.length,r=0;r<o;++r)n=a[r],i.hasOwnProperty(n)&&(e[n]=i[n])},update:function(t,e,i){if(t){var n=t.options.layout||{},a=ut.options.toPadding(n.padding),o=a.left,r=a.right,s=a.top,l=a.bottom,d=be(t.boxes,"left"),u=be(t.boxes,"right"),h=be(t.boxes,"top"),c=be(t.boxes,"bottom"),f=be(t.boxes,"chartArea");xe(d,!0),xe(u,!1),xe(h,!0),xe(c,!1);var g,p=d.concat(u),m=h.concat(c),v=p.concat(m),b=e-o-r,x=i-s-l,y=(e-b/2)/p.length,k=b,w=x,M={top:s,left:o,bottom:l,right:r},_=[];ut.each(v,function(t){var e,i=t.isHorizontal();i?(e=t.update(t.fullWidth?b:k,x/2),w-=e.height):(e=t.update(y,w),k-=e.width),_.push({horizontal:i,width:e.width,box:t})}),g=function(t){var e=0,i=0,n=0,a=0;return ut.each(t,function(t){if(t.getPadding){var o=t.getPadding();e=Math.max(e,o.top),i=Math.max(i,o.left),n=Math.max(n,o.bottom),a=Math.max(a,o.right)}}),{top:e,left:i,bottom:n,right:a}}(v),ut.each(p,T),ye(p,M),ut.each(m,T),ye(m,M),ut.each(p,function(t){var e=ut.findNextWhere(_,function(e){return e.box===t}),i={left:0,right:0,top:M.top,bottom:M.bottom};e&&t.update(e.width,w,i)}),ye(v,M={top:s,left:o,bottom:l,right:r});var C=Math.max(g.left-M.left,0);M.left+=C,M.right+=Math.max(g.right-M.right,0);var S=Math.max(g.top-M.top,0);M.top+=S,M.bottom+=Math.max(g.bottom-M.bottom,0);var P=i-M.top-M.bottom,I=e-M.left-M.right;I===k&&P===w||(ut.each(p,function(t){t.height=P}),ut.each(m,function(t){t.fullWidth||(t.width=I)}),w=P,k=I);var A=o+C,D=s+S;ut.each(d.concat(h),F),A+=k,D+=w,ut.each(u,F),ut.each(c,F),t.chartArea={left:M.left,top:M.top,right:M.left+k,bottom:M.top+w},ut.each(f,function(e){e.left=t.chartArea.left,e.top=t.chartArea.top,e.right=t.chartArea.right,e.bottom=t.chartArea.bottom,e.update(k,w)})}function T(t){var e=ut.findNextWhere(_,function(e){return e.box===t});if(e)if(e.horizontal){var i={left:Math.max(M.left,g.left),right:Math.max(M.right,g.right),top:0,bottom:0};t.update(t.fullWidth?b:k,x/2,i)}else t.update(e.width,w)}function F(t){t.isHorizontal()?(t.left=t.fullWidth?o:M.left,t.right=t.fullWidth?e-r:M.left+k,t.top=D,t.bottom=D+t.height,D=t.bottom):(t.left=A,t.right=A+t.width,t.top=M.top,t.bottom=M.top+w,A=t.right)}}};var we,Me=(we=Object.freeze({default:"@keyframes chartjs-render-animation{from{opacity:.99}to{opacity:1}}.chartjs-render-monitor{animation:chartjs-render-animation 1ms}.chartjs-size-monitor,.chartjs-size-monitor-expand,.chartjs-size-monitor-shrink{position:absolute;direction:ltr;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1}.chartjs-size-monitor-expand>div{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0}"}))&&we.default||we,_e="$chartjs",Ce="chartjs-size-monitor",Se="chartjs-render-monitor",Pe="chartjs-render-animation",Ie=["animationstart","webkitAnimationStart"],Ae={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function De(t,e){var i=ut.getStyle(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?Number(n[1]):void 0}var Te=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};function Fe(t,e,i){t.addEventListener(e,i,Te)}function Le(t,e,i){t.removeEventListener(e,i,Te)}function Re(t,e,i,n,a){return{type:t,chart:e,native:a||null,x:void 0!==i?i:null,y:void 0!==n?n:null}}function Oe(t){var e=document.createElement("div");return e.className=t||"",e}function ze(t,e,i){var n,a,o,r,s=t[_e]||(t[_e]={}),l=s.resizer=function(t){var e=Oe(Ce),i=Oe(Ce+"-expand"),n=Oe(Ce+"-shrink");i.appendChild(Oe()),n.appendChild(Oe()),e.appendChild(i),e.appendChild(n),e._reset=function(){i.scrollLeft=1e6,i.scrollTop=1e6,n.scrollLeft=1e6,n.scrollTop=1e6};var a=function(){e._reset(),t()};return Fe(i,"scroll",a.bind(i,"expand")),Fe(n,"scroll",a.bind(n,"shrink")),e}((n=function(){if(s.resizer){var n=i.options.maintainAspectRatio&&t.parentNode,a=n?n.clientWidth:0;e(Re("resize",i)),n&&n.clientWidth<a&&i.canvas&&e(Re("resize",i))}},o=!1,r=[],function(){r=Array.prototype.slice.call(arguments),a=a||this,o||(o=!0,ut.requestAnimFrame.call(window,function(){o=!1,n.apply(a,r)}))}));!function(t,e){var i=t[_e]||(t[_e]={}),n=i.renderProxy=function(t){t.animationName===Pe&&e()};ut.each(Ie,function(e){Fe(t,e,n)}),i.reflow=!!t.offsetParent,t.classList.add(Se)}(t,function(){if(s.resizer){var e=t.parentNode;e&&e!==l.parentNode&&e.insertBefore(l,e.firstChild),l._reset()}})}function Be(t){var e=t[_e]||{},i=e.resizer;delete e.resizer,function(t){var e=t[_e]||{},i=e.renderProxy;i&&(ut.each(Ie,function(e){Le(t,e,i)}),delete e.renderProxy),t.classList.remove(Se)}(t),i&&i.parentNode&&i.parentNode.removeChild(i)}var Ne={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(){var t,e,i;this._loaded||(this._loaded=!0,this.disableCSSInjection||(e=Me,i=(t=this)._style||document.createElement("style"),t._style||(t._style=i,e="/* Chart.js */\n"+e,i.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(i)),i.appendChild(document.createTextNode(e))))},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var i=t&&t.getContext&&t.getContext("2d");return this._ensureLoaded(),i&&i.canvas===t?(function(t,e){var i=t.style,n=t.getAttribute("height"),a=t.getAttribute("width");if(t[_e]={initial:{height:n,width:a,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",null===a||""===a){var o=De(t,"width");void 0!==o&&(t.width=o)}if(null===n||""===n)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var r=De(t,"height");void 0!==o&&(t.height=r)}}(t,e),i):null},releaseContext:function(t){var e=t.canvas;if(e[_e]){var i=e[_e].initial;["height","width"].forEach(function(t){var n=i[t];ut.isNullOrUndef(n)?e.removeAttribute(t):e.setAttribute(t,n)}),ut.each(i.style||{},function(t,i){e.style[i]=t}),e.width=e.width,delete e[_e]}},addEventListener:function(t,e,i){var n=t.canvas;if("resize"!==e){var a=i[_e]||(i[_e]={});Fe(n,e,(a.proxies||(a.proxies={}))[t.id+"_"+e]=function(e){i(function(t,e){var i=Ae[t.type]||t.type,n=ut.getRelativePosition(t,e);return Re(i,e,n.x,n.y,t)}(e,t))})}else ze(n,i,t)},removeEventListener:function(t,e,i){var n=t.canvas;if("resize"!==e){var a=((i[_e]||{}).proxies||{})[t.id+"_"+e];a&&Le(n,e,a)}else Be(n)}};ut.addEvent=Fe,ut.removeEvent=Le;var We=Ne._enabled?Ne:{acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}},Ve=ut.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},We);st._set("global",{plugins:{}});var Ee={_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),this._cacheId++},unregister:function(t){var e=this._plugins;[].concat(t).forEach(function(t){var i=e.indexOf(t);-1!==i&&e.splice(i,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,i){var n,a,o,r,s,l=this.descriptors(t),d=l.length;for(n=0;n<d;++n)if("function"==typeof(s=(o=(a=l[n]).plugin)[e])&&((r=[t].concat(i||[])).push(a.options),!1===s.apply(o,r)))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var i=[],n=[],a=t&&t.config||{},o=a.options&&a.options.plugins||{};return this._plugins.concat(a.plugins||[]).forEach(function(t){if(-1===i.indexOf(t)){var e=t.id,a=o[e];!1!==a&&(!0===a&&(a=ut.clone(st.global.plugins[e])),i.push(t),n.push({plugin:t,options:a||{}}))}}),e.descriptors=n,e.id=this._cacheId,n},_invalidate:function(t){delete t.$plugins}},He={constructors:{},defaults:{},registerScaleType:function(t,e,i){this.constructors[t]=e,this.defaults[t]=ut.clone(i)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?ut.merge({},[st.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){this.defaults.hasOwnProperty(t)&&(this.defaults[t]=ut.extend(this.defaults[t],e))},addScalesToLayout:function(t){ut.each(t.scales,function(e){e.fullWidth=e.options.fullWidth,e.position=e.options.position,e.weight=e.options.weight,ke.addBox(t,e)})}},je=ut.valueOrDefault;st._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:ut.noop,title:function(t,e){var i="",n=e.labels,a=n?n.length:0;if(t.length>0){var o=t[0];o.label?i=o.label:o.xLabel?i=o.xLabel:a>0&&o.index<a&&(i=n[o.index])}return i},afterTitle:ut.noop,beforeBody:ut.noop,beforeLabel:ut.noop,label:function(t,e){var i=e.datasets[t.datasetIndex].label||"";return i&&(i+=": "),ut.isNullOrUndef(t.value)?i+=t.yLabel:i+=t.value,i},labelColor:function(t,e){var i=e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return{borderColor:i.borderColor,backgroundColor:i.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:ut.noop,afterBody:ut.noop,beforeFooter:ut.noop,footer:ut.noop,afterFooter:ut.noop}}});var qe={average:function(t){if(!t.length)return!1;var e,i,n=0,a=0,o=0;for(e=0,i=t.length;e<i;++e){var r=t[e];if(r&&r.hasValue()){var s=r.tooltipPosition();n+=s.x,a+=s.y,++o}}return{x:n/o,y:a/o}},nearest:function(t,e){var i,n,a,o=e.x,r=e.y,s=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){var l=t[i];if(l&&l.hasValue()){var d=l.getCenterPoint(),u=ut.distanceBetweenPoints(e,d);u<s&&(s=u,a=l)}}if(a){var h=a.tooltipPosition();o=h.x,r=h.y}return{x:o,y:r}}};function Ye(t,e){return e&&(ut.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Ue(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Xe(t){var e=st.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,bodyFontColor:t.bodyFontColor,_bodyFontFamily:je(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:je(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:je(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:je(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:je(t.titleFontStyle,e.defaultFontStyle),titleFontSize:je(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:je(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:je(t.footerFontStyle,e.defaultFontStyle),footerFontSize:je(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function Ke(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function Ge(t){return Ye([],Ue(t))}var Ze=pt.extend({initialize:function(){this._model=Xe(this._options),this._lastActive=[]},getTitle:function(){var t=this._options.callbacks,e=t.beforeTitle.apply(this,arguments),i=t.title.apply(this,arguments),n=t.afterTitle.apply(this,arguments),a=[];return a=Ye(a,Ue(e)),a=Ye(a,Ue(i)),a=Ye(a,Ue(n))},getBeforeBody:function(){return Ge(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var i=this,n=i._options.callbacks,a=[];return ut.each(t,function(t){var o={before:[],lines:[],after:[]};Ye(o.before,Ue(n.beforeLabel.call(i,t,e))),Ye(o.lines,n.label.call(i,t,e)),Ye(o.after,Ue(n.afterLabel.call(i,t,e))),a.push(o)}),a},getAfterBody:function(){return Ge(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this._options.callbacks,e=t.beforeFooter.apply(this,arguments),i=t.footer.apply(this,arguments),n=t.afterFooter.apply(this,arguments),a=[];return a=Ye(a,Ue(e)),a=Ye(a,Ue(i)),a=Ye(a,Ue(n))},update:function(t){var e,i,n,a,o,r,s,l,d,u,h=this,c=h._options,f=h._model,g=h._model=Xe(c),p=h._active,m=h._data,v={xAlign:f.xAlign,yAlign:f.yAlign},b={x:f.x,y:f.y},x={width:f.width,height:f.height},y={x:f.caretX,y:f.caretY};if(p.length){g.opacity=1;var k=[],w=[];y=qe[c.position].call(h,p,h._eventPosition);var M=[];for(e=0,i=p.length;e<i;++e)M.push((n=p[e],a=void 0,o=void 0,r=void 0,s=void 0,l=void 0,d=void 0,u=void 0,a=n._xScale,o=n._yScale||n._scale,r=n._index,s=n._datasetIndex,l=n._chart.getDatasetMeta(s).controller,d=l._getIndexScale(),u=l._getValueScale(),{xLabel:a?a.getLabelForIndex(r,s):"",yLabel:o?o.getLabelForIndex(r,s):"",label:d?""+d.getLabelForIndex(r,s):"",value:u?""+u.getLabelForIndex(r,s):"",index:r,datasetIndex:s,x:n._model.x,y:n._model.y}));c.filter&&(M=M.filter(function(t){return c.filter(t,m)})),c.itemSort&&(M=M.sort(function(t,e){return c.itemSort(t,e,m)})),ut.each(M,function(t){k.push(c.callbacks.labelColor.call(h,t,h._chart)),w.push(c.callbacks.labelTextColor.call(h,t,h._chart))}),g.title=h.getTitle(M,m),g.beforeBody=h.getBeforeBody(M,m),g.body=h.getBody(M,m),g.afterBody=h.getAfterBody(M,m),g.footer=h.getFooter(M,m),g.x=y.x,g.y=y.y,g.caretPadding=c.caretPadding,g.labelColors=k,g.labelTextColors=w,g.dataPoints=M,x=function(t,e){var i=t._chart.ctx,n=2*e.yPadding,a=0,o=e.body,r=o.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);r+=e.beforeBody.length+e.afterBody.length;var s=e.title.length,l=e.footer.length,d=e.titleFontSize,u=e.bodyFontSize,h=e.footerFontSize;n+=s*d,n+=s?(s-1)*e.titleSpacing:0,n+=s?e.titleMarginBottom:0,n+=r*u,n+=r?(r-1)*e.bodySpacing:0,n+=l?e.footerMarginTop:0,n+=l*h,n+=l?(l-1)*e.footerSpacing:0;var c=0,f=function(t){a=Math.max(a,i.measureText(t).width+c)};return i.font=ut.fontString(d,e._titleFontStyle,e._titleFontFamily),ut.each(e.title,f),i.font=ut.fontString(u,e._bodyFontStyle,e._bodyFontFamily),ut.each(e.beforeBody.concat(e.afterBody),f),c=e.displayColors?u+2:0,ut.each(o,function(t){ut.each(t.before,f),ut.each(t.lines,f),ut.each(t.after,f)}),c=0,i.font=ut.fontString(h,e._footerFontStyle,e._footerFontFamily),ut.each(e.footer,f),{width:a+=2*e.xPadding,height:n}}(this,g),b=function(t,e,i,n){var a=t.x,o=t.y,r=t.caretSize,s=t.caretPadding,l=t.cornerRadius,d=i.xAlign,u=i.yAlign,h=r+s,c=l+s;return"right"===d?a-=e.width:"center"===d&&((a-=e.width/2)+e.width>n.width&&(a=n.width-e.width),a<0&&(a=0)),"top"===u?o+=h:o-="bottom"===u?e.height+h:e.height/2,"center"===u?"left"===d?a+=h:"right"===d&&(a-=h):"left"===d?a-=c:"right"===d&&(a+=c),{x:a,y:o}}(g,x,v=function(t,e){var i,n,a,o,r,s=t._model,l=t._chart,d=t._chart.chartArea,u="center",h="center";s.y<e.height?h="top":s.y>l.height-e.height&&(h="bottom");var c=(d.left+d.right)/2,f=(d.top+d.bottom)/2;"center"===h?(i=function(t){return t<=c},n=function(t){return t>c}):(i=function(t){return t<=e.width/2},n=function(t){return t>=l.width-e.width/2}),a=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},o=function(t){return t-e.width-s.caretSize-s.caretPadding<0},r=function(t){return t<=f?"top":"bottom"},i(s.x)?(u="left",a(s.x)&&(u="center",h=r(s.y))):n(s.x)&&(u="right",o(s.x)&&(u="center",h=r(s.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:u,yAlign:g.yAlign?g.yAlign:h}}(this,x),h._chart)}else g.opacity=0;return g.xAlign=v.xAlign,g.yAlign=v.yAlign,g.x=b.x,g.y=b.y,g.width=x.width,g.height=x.height,g.caretX=y.x,g.caretY=y.y,h._model=g,t&&c.custom&&c.custom.call(h,g),h},drawCaret:function(t,e){var i=this._chart.ctx,n=this._view,a=this.getCaretPosition(t,e,n);i.lineTo(a.x1,a.y1),i.lineTo(a.x2,a.y2),i.lineTo(a.x3,a.y3)},getCaretPosition:function(t,e,i){var n,a,o,r,s,l,d=i.caretSize,u=i.cornerRadius,h=i.xAlign,c=i.yAlign,f=t.x,g=t.y,p=e.width,m=e.height;if("center"===c)s=g+m/2,"left"===h?(a=(n=f)-d,o=n,r=s+d,l=s-d):(a=(n=f+p)+d,o=n,r=s-d,l=s+d);else if("left"===h?(n=(a=f+u+d)-d,o=a+d):"right"===h?(n=(a=f+p-u-d)-d,o=a+d):(n=(a=i.caretX)-d,o=a+d),"top"===c)s=(r=g)-d,l=r;else{s=(r=g+m)+d,l=r;var v=o;o=n,n=v}return{x1:n,x2:a,x3:o,y1:r,y2:s,y3:l}},drawTitle:function(t,e,i){var n=e.title;if(n.length){t.x=Ke(e,e._titleAlign),i.textAlign=e._titleAlign,i.textBaseline="top";var a,o,r=e.titleFontSize,s=e.titleSpacing;for(i.fillStyle=e.titleFontColor,i.font=ut.fontString(r,e._titleFontStyle,e._titleFontFamily),a=0,o=n.length;a<o;++a)i.fillText(n[a],t.x,t.y),t.y+=r+s,a+1===n.length&&(t.y+=e.titleMarginBottom-s)}},drawBody:function(t,e,i){var n,a=e.bodyFontSize,o=e.bodySpacing,r=e._bodyAlign,s=e.body,l=e.displayColors,d=e.labelColors,u=0,h=l?Ke(e,"left"):0;i.textAlign=r,i.textBaseline="top",i.font=ut.fontString(a,e._bodyFontStyle,e._bodyFontFamily),t.x=Ke(e,r);var c=function(e){i.fillText(e,t.x+u,t.y),t.y+=a+o};i.fillStyle=e.bodyFontColor,ut.each(e.beforeBody,c),u=l&&"right"!==r?"center"===r?a/2+1:a+2:0,ut.each(s,function(o,r){n=e.labelTextColors[r],i.fillStyle=n,ut.each(o.before,c),ut.each(o.lines,function(o){l&&(i.fillStyle=e.legendColorBackground,i.fillRect(h,t.y,a,a),i.lineWidth=1,i.strokeStyle=d[r].borderColor,i.strokeRect(h,t.y,a,a),i.fillStyle=d[r].backgroundColor,i.fillRect(h+1,t.y+1,a-2,a-2),i.fillStyle=n),c(o)}),ut.each(o.after,c)}),u=0,ut.each(e.afterBody,c),t.y-=o},drawFooter:function(t,e,i){var n=e.footer;n.length&&(t.x=Ke(e,e._footerAlign),t.y+=e.footerMarginTop,i.textAlign=e._footerAlign,i.textBaseline="top",i.fillStyle=e.footerFontColor,i.font=ut.fontString(e.footerFontSize,e._footerFontStyle,e._footerFontFamily),ut.each(n,function(n){i.fillText(n,t.x,t.y),t.y+=e.footerFontSize+e.footerSpacing}))},drawBackground:function(t,e,i,n){i.fillStyle=e.backgroundColor,i.strokeStyle=e.borderColor,i.lineWidth=e.borderWidth;var a=e.xAlign,o=e.yAlign,r=t.x,s=t.y,l=n.width,d=n.height,u=e.cornerRadius;i.beginPath(),i.moveTo(r+u,s),"top"===o&&this.drawCaret(t,n),i.lineTo(r+l-u,s),i.quadraticCurveTo(r+l,s,r+l,s+u),"center"===o&&"right"===a&&this.drawCaret(t,n),i.lineTo(r+l,s+d-u),i.quadraticCurveTo(r+l,s+d,r+l-u,s+d),"bottom"===o&&this.drawCaret(t,n),i.lineTo(r+u,s+d),i.quadraticCurveTo(r,s+d,r,s+d-u),"center"===o&&"left"===a&&this.drawCaret(t,n),i.lineTo(r,s+u),i.quadraticCurveTo(r,s,r+u,s),i.closePath(),i.fill(),e.borderWidth>0&&i.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var i={width:e.width,height:e.height},n={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity,o=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&o&&(t.save(),t.globalAlpha=a,this.drawBackground(n,e,t,i),n.y+=e.yPadding,this.drawTitle(n,e,t),this.drawBody(n,e,t),this.drawFooter(n,e,t),t.restore())}},handleEvent:function(t){var e,i=this,n=i._options;return i._lastActive=i._lastActive||[],"mouseout"===t.type?i._active=[]:i._active=i._chart.getElementsAtEventForMode(t,n.mode,n),(e=!ut.arrayEquals(i._active,i._lastActive))&&(i._lastActive=i._active,(n.enabled||n.custom)&&(i._eventPosition={x:t.x,y:t.y},i.update(!0),i.pivot())),e}}),$e=qe,Je=Ze;Je.positioners=$e;var Qe=ut.valueOrDefault;function ti(){return ut.merge({},[].slice.call(arguments),{merger:function(t,e,i,n){if("xAxes"===t||"yAxes"===t){var a,o,r,s=i[t].length;for(e[t]||(e[t]=[]),a=0;a<s;++a)r=i[t][a],o=Qe(r.type,"xAxes"===t?"category":"linear"),a>=e[t].length&&e[t].push({}),!e[t][a].type||r.type&&r.type!==e[t][a].type?ut.merge(e[t][a],[He.getScaleDefaults(o),r]):ut.merge(e[t][a],r)}else ut._merger(t,e,i,n)}})}function ei(){return ut.merge({},[].slice.call(arguments),{merger:function(t,e,i,n){var a=e[t]||{},o=i[t];"scales"===t?e[t]=ti(a,o):"scale"===t?e[t]=ut.merge(a,[He.getScaleDefaults(o.type),o]):ut._merger(t,e,i,n)}})}function ii(t){return"top"===t||"bottom"===t}st._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var ni=function(t,e){return this.construct(t,e),this};ut.extend(ni.prototype,{construct:function(t,e){var i=this;e=function(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=ei(st.global,st[t.type],t.options||{}),t}(e);var n=Ve.acquireContext(t,e),a=n&&n.canvas,o=a&&a.height,r=a&&a.width;i.id=ut.uid(),i.ctx=n,i.canvas=a,i.config=e,i.width=r,i.height=o,i.aspectRatio=o?r/o:null,i.options=e.options,i._bufferedRender=!1,i.chart=i,i.controller=i,ni.instances[i.id]=i,Object.defineProperty(i,"data",{get:function(){return i.config.data},set:function(t){i.config.data=t}}),n&&a?(i.initialize(),i.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return Ee.notify(t,"beforeInit"),ut.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.initToolTip(),Ee.notify(t,"afterInit"),t},clear:function(){return ut.canvas.clear(this),this},stop:function(){return bt.cancelAnimation(this),this},resize:function(t){var e=this,i=e.options,n=e.canvas,a=i.maintainAspectRatio&&e.aspectRatio||null,o=Math.max(0,Math.floor(ut.getMaximumWidth(n))),r=Math.max(0,Math.floor(a?o/a:ut.getMaximumHeight(n)));if((e.width!==o||e.height!==r)&&(n.width=e.width=o,n.height=e.height=r,n.style.width=o+"px",n.style.height=r+"px",ut.retinaScale(e,i.devicePixelRatio),!t)){var s={width:o,height:r};Ee.notify(e,"resize",[s]),i.onResize&&i.onResize(e,s),e.stop(),e.update({duration:i.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},i=t.scale;ut.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),ut.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),i&&(i.id=i.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,i=t.scales||{},n=[],a=Object.keys(i).reduce(function(t,e){return t[e]=!1,t},{});e.scales&&(n=n.concat((e.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(e.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),e.scale&&n.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),ut.each(n,function(e){var n=e.options,o=n.id,r=Qe(n.type,e.dtype);ii(n.position)!==ii(e.dposition)&&(n.position=e.dposition),a[o]=!0;var s=null;if(o in i&&i[o].type===r)(s=i[o]).options=n,s.ctx=t.ctx,s.chart=t;else{var l=He.getScaleConstructor(r);if(!l)return;s=new l({id:o,type:r,options:n,ctx:t.ctx,chart:t}),i[s.id]=s}s.mergeTicksOptions(),e.isDefault&&(t.scale=s)}),ut.each(a,function(t,e){t||delete i[e]}),t.scales=i,He.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t=this,e=[];return ut.each(t.data.datasets,function(i,n){var a=t.getDatasetMeta(n),o=i.type||t.config.type;if(a.type&&a.type!==o&&(t.destroyDatasetMeta(n),a=t.getDatasetMeta(n)),a.type=o,a.controller)a.controller.updateIndex(n),a.controller.linkScales();else{var r=ue[a.type];if(void 0===r)throw new Error('"'+a.type+'" is not a chart type.');a.controller=new r(t,n),e.push(a.controller)}},t),e},resetElements:function(){var t=this;ut.each(t.data.datasets,function(e,i){t.getDatasetMeta(i).controller.reset()},t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,i,n=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),i=(e=n).options,ut.each(e.scales,function(t){ke.removeBox(e,t)}),i=ei(st.global,st[e.config.type],i),e.options=e.config.options=i,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=i.tooltips,e.tooltip.initialize(),Ee._invalidate(n),!1!==Ee.notify(n,"beforeUpdate")){n.tooltip._data=n.data;var a=n.buildOrUpdateControllers();ut.each(n.data.datasets,function(t,e){n.getDatasetMeta(e).controller.buildOrUpdateElements()},n),n.updateLayout(),n.options.animation&&n.options.animation.duration&&ut.each(a,function(t){t.reset()}),n.updateDatasets(),n.tooltip.initialize(),n.lastActive=[],Ee.notify(n,"afterUpdate"),n._bufferedRender?n._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:n.render(t)}},updateLayout:function(){!1!==Ee.notify(this,"beforeLayout")&&(ke.update(this,this.width,this.height),Ee.notify(this,"afterScaleUpdate"),Ee.notify(this,"afterLayout"))},updateDatasets:function(){if(!1!==Ee.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t<e;++t)this.updateDataset(t);Ee.notify(this,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this.getDatasetMeta(t),i={meta:e,index:t};!1!==Ee.notify(this,"beforeDatasetUpdate",[i])&&(e.controller.update(),Ee.notify(this,"afterDatasetUpdate",[i]))},render:function(t){var e=this;t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]});var i=e.options.animation,n=Qe(t.duration,i&&i.duration),a=t.lazy;if(!1!==Ee.notify(e,"beforeRender")){var o=function(t){Ee.notify(e,"afterRender"),ut.callback(i&&i.onComplete,[t],e)};if(i&&n){var r=new vt({numSteps:n/16.66,easing:t.easing||i.easing,render:function(t,e){var i=ut.easing.effects[e.easing],n=e.currentStep,a=n/e.numSteps;t.draw(i(a),a,n)},onAnimationProgress:i.onProgress,onAnimationComplete:o});bt.addAnimation(e,r,n,a)}else e.draw(),o(new vt({numSteps:0,chart:e}));return e}},draw:function(t){var e=this;e.clear(),ut.isNullOrUndef(t)&&(t=1),e.transition(t),e.width<=0||e.height<=0||!1!==Ee.notify(e,"beforeDraw",[t])&&(ut.each(e.boxes,function(t){t.draw(e.chartArea)},e),e.drawDatasets(t),e._drawTooltip(t),Ee.notify(e,"afterDraw",[t]))},transition:function(t){for(var e=0,i=(this.data.datasets||[]).length;e<i;++e)this.isDatasetVisible(e)&&this.getDatasetMeta(e).controller.transition(t);this.tooltip.transition(t)},drawDatasets:function(t){var e=this;if(!1!==Ee.notify(e,"beforeDatasetsDraw",[t])){for(var i=(e.data.datasets||[]).length-1;i>=0;--i)e.isDatasetVisible(i)&&e.drawDataset(i,t);Ee.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var i=this.getDatasetMeta(t),n={meta:i,index:t,easingValue:e};!1!==Ee.notify(this,"beforeDatasetDraw",[n])&&(i.controller.draw(e),Ee.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this.tooltip,i={tooltip:e,easingValue:t};!1!==Ee.notify(this,"beforeTooltipDraw",[i])&&(e.draw(),Ee.notify(this,"afterTooltipDraw",[i]))},getElementAtEvent:function(t){return ve.modes.single(this,t)},getElementsAtEvent:function(t){return ve.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return ve.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,i){var n=ve.modes[e];return"function"==typeof n?n(this,t,i):[]},getDatasetAtEvent:function(t){return ve.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var i=e._meta[this.id];return i||(i=e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),i},getVisibleDatasetCount:function(){for(var t=0,e=0,i=this.data.datasets.length;e<i;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(t){var e=this.id,i=this.data.datasets[t],n=i._meta&&i._meta[e];n&&(n.controller.destroy(),delete i._meta[e])},destroy:function(){var t,e,i=this,n=i.canvas;for(i.stop(),t=0,e=i.data.datasets.length;t<e;++t)i.destroyDatasetMeta(t);n&&(i.unbindEvents(),ut.canvas.clear(i),Ve.releaseContext(i.ctx),i.canvas=null,i.ctx=null),Ee.notify(i,"destroy"),delete ni.instances[i.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var t=this;t.tooltip=new Je({_chart:t,_chartInstance:t,_data:t.data,_options:t.options.tooltips},t)},bindEvents:function(){var t=this,e=t._listeners={},i=function(){t.eventHandler.apply(t,arguments)};ut.each(t.options.events,function(n){Ve.addEventListener(t,n,i),e[n]=i}),t.options.responsive&&(i=function(){t.resize()},Ve.addEventListener(t,"resize",i),e.resize=i)},unbindEvents:function(){var t=this,e=t._listeners;e&&(delete t._listeners,ut.each(e,function(e,i){Ve.removeEventListener(t,i,e)}))},updateHoverStyle:function(t,e,i){var n,a,o,r=i?"setHoverStyle":"removeHoverStyle";for(a=0,o=t.length;a<o;++a)(n=t[a])&&this.getDatasetMeta(n._datasetIndex).controller[r](n)},eventHandler:function(t){var e=this,i=e.tooltip;if(!1!==Ee.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var n=e.handleEvent(t);i&&(n=i._start?i.handleEvent(t):n|i.handleEvent(t)),Ee.notify(e,"afterEvent",[t]);var a=e._bufferedRequest;return a?e.render(a):n&&!e.animating&&(e.stop(),e.render({duration:e.options.hover.animationDuration,lazy:!0})),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e,i=this,n=i.options||{},a=n.hover;return i.lastActive=i.lastActive||[],"mouseout"===t.type?i.active=[]:i.active=i.getElementsAtEventForMode(t,a.mode,a),ut.callback(n.onHover||n.hover.onHover,[t.native,i.active],i),"mouseup"!==t.type&&"click"!==t.type||n.onClick&&n.onClick.call(i,t.native,i.active),i.lastActive.length&&i.updateHoverStyle(i.lastActive,a.mode,!1),i.active.length&&a.mode&&i.updateHoverStyle(i.active,a.mode,!0),e=!ut.arrayEquals(i.active,i.lastActive),i.lastActive=i.active,e}}),ni.instances={};var ai=ni;ni.Controller=ni,ni.types={},ut.configMerge=ei,ut.scaleMerge=ti;function oi(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function ri(t){this.options=t||{}}ut.extend(ri.prototype,{formats:oi,parse:oi,format:oi,add:oi,diff:oi,startOf:oi,endOf:oi,_create:function(t){return t}}),ri.override=function(t){ut.extend(ri.prototype,t)};var si={_date:ri},li={formatters:{values:function(t){return ut.isArray(t)?t:""+t},linear:function(t,e,i){var n=i.length>3?i[2]-i[1]:i[1]-i[0];Math.abs(n)>1&&t!==Math.floor(t)&&(n=t-Math.floor(t));var a=ut.log10(Math.abs(n)),o="";if(0!==t)if(Math.max(Math.abs(i[0]),Math.abs(i[i.length-1]))<1e-4){var r=ut.log10(Math.abs(t));o=t.toExponential(Math.floor(r)-Math.floor(a))}else{var s=-1*Math.floor(a);s=Math.max(Math.min(s,20),0),o=t.toFixed(s)}else o="0";return o},logarithmic:function(t,e,i){var n=t/Math.pow(10,Math.floor(ut.log10(t)));return 0===t?"0":1===n||2===n||5===n||0===e||e===i.length-1?t.toExponential():""}}},di=ut.valueOrDefault,ui=ut.valueAtIndexOrDefault;function hi(t){var e,i,n=[];for(e=0,i=t.length;e<i;++e)n.push(t[e].label);return n}function ci(t,e,i){return ut.isArray(e)?ut.longestText(t,i,e):t.measureText(e).width}st._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:li.formatters.values,minor:{},major:{}}});var fi=pt.extend({getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},getTicks:function(){return this._ticks},mergeTicksOptions:function(){var t=this.options.ticks;for(var e in!1===t.minor&&(t.minor={display:!1}),!1===t.major&&(t.major={display:!1}),t)"major"!==e&&"minor"!==e&&(void 0===t.minor[e]&&(t.minor[e]=t[e]),void 0===t.major[e]&&(t.major[e]=t[e]))},beforeUpdate:function(){ut.callback(this.options.beforeUpdate,[this])},update:function(t,e,i){var n,a,o,r,s,l,d=this;for(d.beforeUpdate(),d.maxWidth=t,d.maxHeight=e,d.margins=ut.extend({left:0,right:0,top:0,bottom:0},i),d._maxLabelLines=0,d.longestLabelWidth=0,d.longestTextCache=d.longestTextCache||{},d.beforeSetDimensions(),d.setDimensions(),d.afterSetDimensions(),d.beforeDataLimits(),d.determineDataLimits(),d.afterDataLimits(),d.beforeBuildTicks(),s=d.buildTicks()||[],s=d.afterBuildTicks(s)||s,d.beforeTickToLabelConversion(),o=d.convertTicksToLabels(s)||d.ticks,d.afterTickToLabelConversion(),d.ticks=o,n=0,a=o.length;n<a;++n)r=o[n],(l=s[n])?l.label=r:s.push(l={label:r,major:!1});return d._ticks=s,d.beforeCalculateTickRotation(),d.calculateTickRotation(),d.afterCalculateTickRotation(),d.beforeFit(),d.fit(),d.afterFit(),d.afterUpdate(),d.minSize},afterUpdate:function(){ut.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){ut.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){ut.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){ut.callback(this.options.beforeDataLimits,[this])},determineDataLimits:ut.noop,afterDataLimits:function(){ut.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){ut.callback(this.options.beforeBuildTicks,[this])},buildTicks:ut.noop,afterBuildTicks:function(t){var e=this;return ut.isArray(t)&&t.length?ut.callback(e.options.afterBuildTicks,[e,t]):(e.ticks=ut.callback(e.options.afterBuildTicks,[e,e.ticks])||e.ticks,t)},beforeTickToLabelConversion:function(){ut.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this.options.ticks;this.ticks=this.ticks.map(t.userCallback||t.callback,this)},afterTickToLabelConversion:function(){ut.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){ut.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t=this,e=t.ctx,i=t.options.ticks,n=hi(t._ticks),a=ut.options._parseFont(i);e.font=a.string;var o=i.minRotation||0;if(n.length&&t.options.display&&t.isHorizontal())for(var r,s=ut.longestText(e,a.string,n,t.longestTextCache),l=s,d=t.getPixelForTick(1)-t.getPixelForTick(0)-6;l>d&&o<i.maxRotation;){var u=ut.toRadians(o);if(r=Math.cos(u),Math.sin(u)*s>t.maxHeight){o--;break}o++,l=r*s}t.labelRotation=o},afterCalculateTickRotation:function(){ut.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){ut.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},i=hi(t._ticks),n=t.options,a=n.ticks,o=n.scaleLabel,r=n.gridLines,s=t._isVisible(),l=n.position,d=t.isHorizontal(),u=ut.options._parseFont,h=u(a),c=n.gridLines.tickMarkLength;if(e.width=d?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:s&&r.drawTicks?c:0,e.height=d?s&&r.drawTicks?c:0:t.maxHeight,o.display&&s){var f=u(o),g=ut.options.toPadding(o.padding),p=f.lineHeight+g.height;d?e.height+=p:e.width+=p}if(a.display&&s){var m=ut.longestText(t.ctx,h.string,i,t.longestTextCache),v=ut.numberOfLabelLines(i),b=.5*h.size,x=t.options.ticks.padding;if(t._maxLabelLines=v,t.longestLabelWidth=m,d){var y=ut.toRadians(t.labelRotation),k=Math.cos(y),w=Math.sin(y)*m+h.lineHeight*v+b;e.height=Math.min(t.maxHeight,e.height+w+x),t.ctx.font=h.string;var M,_,C=ci(t.ctx,i[0],h.string),S=ci(t.ctx,i[i.length-1],h.string),P=t.getPixelForTick(0)-t.left,I=t.right-t.getPixelForTick(i.length-1);0!==t.labelRotation?(M="bottom"===l?k*C:k*b,_="bottom"===l?k*b:k*S):(M=C/2,_=S/2),t.paddingLeft=Math.max(M-P,0)+3,t.paddingRight=Math.max(_-I,0)+3}else a.mirror?m=0:m+=x+b,e.width=Math.min(t.maxWidth,e.width+m),t.paddingTop=h.size/2,t.paddingBottom=h.size/2}t.handleMargins(),t.width=e.width,t.height=e.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){ut.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(ut.isNullOrUndef(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},getLabelForIndex:ut.noop,getPixelForValue:ut.noop,getValueForPixel:ut.noop,getPixelForTick:function(t){var e=this,i=e.options.offset;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(i?0:1),1),a=n*t+e.paddingLeft;i&&(a+=n/2);var o=e.left+a;return o+=e.isFullWidth()?e.margins.left:0}var r=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(r/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var i=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft,n=e.left+i;return n+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0},_autoSkip:function(t){var e,i,n=this,a=n.isHorizontal(),o=n.options.ticks.minor,r=t.length,s=!1,l=o.maxTicksLimit,d=n._tickSize()*(r-1),u=a?n.width-(n.paddingLeft+n.paddingRight):n.height-(n.paddingTop+n.PaddingBottom),h=[];for(d>u&&(s=1+Math.floor(d/u)),r>l&&(s=Math.max(s,1+Math.floor(r/l))),e=0;e<r;e++)i=t[e],s>1&&e%s>0&&delete i.label,h.push(i);return h},_tickSize:function(){var t=this,e=t.isHorizontal(),i=t.options.ticks.minor,n=ut.toRadians(t.labelRotation),a=Math.abs(Math.cos(n)),o=Math.abs(Math.sin(n)),r=i.autoSkipPadding||0,s=t.longestLabelWidth+r||0,l=ut.options._parseFont(i),d=t._maxLabelLines*l.lineHeight+r||0;return e?d*a>s*o?s/a:d/o:d*o<s*a?d/a:s/o},_isVisible:function(){var t,e,i,n=this.chart,a=this.options.display;if("auto"!==a)return!!a;for(t=0,e=n.data.datasets.length;t<e;++t)if(n.isDatasetVisible(t)&&((i=n.getDatasetMeta(t)).xAxisID===this.id||i.yAxisID===this.id))return!0;return!1},draw:function(t){var e=this,i=e.options;if(e._isVisible()){var n,a,o,r=e.chart,s=e.ctx,l=st.global.defaultFontColor,d=i.ticks.minor,u=i.ticks.major||d,h=i.gridLines,c=i.scaleLabel,f=i.position,g=0!==e.labelRotation,p=d.mirror,m=e.isHorizontal(),v=ut.options._parseFont,b=d.display&&d.autoSkip?e._autoSkip(e.getTicks()):e.getTicks(),x=di(d.fontColor,l),y=v(d),k=y.lineHeight,w=di(u.fontColor,l),M=v(u),_=d.padding,C=d.labelOffset,S=h.drawTicks?h.tickMarkLength:0,P=di(c.fontColor,l),I=v(c),A=ut.options.toPadding(c.padding),D=ut.toRadians(e.labelRotation),T=[],F=h.drawBorder?ui(h.lineWidth,0,0):0,L=ut._alignPixel;"top"===f?(n=L(r,e.bottom,F),a=e.bottom-S,o=n-F/2):"bottom"===f?(n=L(r,e.top,F),a=n+F/2,o=e.top+S):"left"===f?(n=L(r,e.right,F),a=e.right-S,o=n-F/2):(n=L(r,e.left,F),a=n+F/2,o=e.left+S);if(ut.each(b,function(n,s){if(!ut.isNullOrUndef(n.label)){var l,d,u,c,v,b,x,y,w,M,P,I,A,R,O,z,B=n.label;s===e.zeroLineIndex&&i.offset===h.offsetGridLines?(l=h.zeroLineWidth,d=h.zeroLineColor,u=h.zeroLineBorderDash||[],c=h.zeroLineBorderDashOffset||0):(l=ui(h.lineWidth,s),d=ui(h.color,s),u=h.borderDash||[],c=h.borderDashOffset||0);var N=ut.isArray(B)?B.length:1,W=function(t,e,i){var n=t.getPixelForTick(e);return i&&(1===t.getTicks().length?n-=t.isHorizontal()?Math.max(n-t.left,t.right-n):Math.max(n-t.top,t.bottom-n):n-=0===e?(t.getPixelForTick(1)-n)/2:(n-t.getPixelForTick(e-1))/2),n}(e,s,h.offsetGridLines);if(m){var V=S+_;W<e.left-1e-7&&(d="rgba(0,0,0,0)"),v=x=w=P=L(r,W,l),b=a,y=o,A=e.getPixelForTick(s)+C,"top"===f?(M=L(r,t.top,F)+F/2,I=t.bottom,O=((g?1:.5)-N)*k,z=g?"left":"center",R=e.bottom-V):(M=t.top,I=L(r,t.bottom,F)-F/2,O=(g?0:.5)*k,z=g?"right":"center",R=e.top+V)}else{var E=(p?0:S)+_;W<e.top-1e-7&&(d="rgba(0,0,0,0)"),v=a,x=o,b=y=M=I=L(r,W,l),R=e.getPixelForTick(s)+C,O=(1-N)*k/2,"left"===f?(w=L(r,t.left,F)+F/2,P=t.right,z=p?"left":"right",A=e.right-E):(w=t.left,P=L(r,t.right,F)-F/2,z=p?"right":"left",A=e.left+E)}T.push({tx1:v,ty1:b,tx2:x,ty2:y,x1:w,y1:M,x2:P,y2:I,labelX:A,labelY:R,glWidth:l,glColor:d,glBorderDash:u,glBorderDashOffset:c,rotation:-1*D,label:B,major:n.major,textOffset:O,textAlign:z})}}),ut.each(T,function(t){var e=t.glWidth,i=t.glColor;if(h.display&&e&&i&&(s.save(),s.lineWidth=e,s.strokeStyle=i,s.setLineDash&&(s.setLineDash(t.glBorderDash),s.lineDashOffset=t.glBorderDashOffset),s.beginPath(),h.drawTicks&&(s.moveTo(t.tx1,t.ty1),s.lineTo(t.tx2,t.ty2)),h.drawOnChartArea&&(s.moveTo(t.x1,t.y1),s.lineTo(t.x2,t.y2)),s.stroke(),s.restore()),d.display){s.save(),s.translate(t.labelX,t.labelY),s.rotate(t.rotation),s.font=t.major?M.string:y.string,s.fillStyle=t.major?w:x,s.textBaseline="middle",s.textAlign=t.textAlign;var n=t.label,a=t.textOffset;if(ut.isArray(n))for(var o=0;o<n.length;++o)s.fillText(""+n[o],0,a),a+=k;else s.fillText(n,0,a);s.restore()}}),c.display){var R,O,z=0,B=I.lineHeight/2;if(m)R=e.left+(e.right-e.left)/2,O="bottom"===f?e.bottom-B-A.bottom:e.top+B+A.top;else{var N="left"===f;R=N?e.left+B+A.top:e.right-B-A.top,O=e.top+(e.bottom-e.top)/2,z=N?-.5*Math.PI:.5*Math.PI}s.save(),s.translate(R,O),s.rotate(z),s.textAlign="center",s.textBaseline="middle",s.fillStyle=P,s.font=I.string,s.fillText(c.labelString,0,0),s.restore()}if(F){var W,V,E,H,j=F,q=ui(h.lineWidth,b.length-1,0);m?(W=L(r,e.left,j)-j/2,V=L(r,e.right,q)+q/2,E=H=n):(E=L(r,e.top,j)-j/2,H=L(r,e.bottom,q)+q/2,W=V=n),s.lineWidth=F,s.strokeStyle=ui(h.color,0),s.beginPath(),s.moveTo(W,E),s.lineTo(V,H),s.stroke()}}}}),gi=fi.extend({getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels},determineDataLimits:function(){var t,e=this,i=e.getLabels();e.minIndex=0,e.maxIndex=i.length-1,void 0!==e.options.ticks.min&&(t=i.indexOf(e.options.ticks.min),e.minIndex=-1!==t?t:e.minIndex),void 0!==e.options.ticks.max&&(t=i.indexOf(e.options.ticks.max),e.maxIndex=-1!==t?t:e.maxIndex),e.min=i[e.minIndex],e.max=i[e.maxIndex]},buildTicks:function(){var t=this,e=t.getLabels();t.ticks=0===t.minIndex&&t.maxIndex===e.length-1?e:e.slice(t.minIndex,t.maxIndex+1)},getLabelForIndex:function(t,e){var i=this,n=i.chart;return n.getDatasetMeta(e).controller._getValueScaleId()===i.id?i.getRightValue(n.data.datasets[e].data[t]):i.ticks[t-i.minIndex]},getPixelForValue:function(t,e){var i,n=this,a=n.options.offset,o=Math.max(n.maxIndex+1-n.minIndex-(a?0:1),1);if(null!=t&&(i=n.isHorizontal()?t.x:t.y),void 0!==i||void 0!==t&&isNaN(e)){t=i||t;var r=n.getLabels().indexOf(t);e=-1!==r?r:e}if(n.isHorizontal()){var s=n.width/o,l=s*(e-n.minIndex);return a&&(l+=s/2),n.left+l}var d=n.height/o,u=d*(e-n.minIndex);return a&&(u+=d/2),n.top+u},getPixelForTick:function(t){return this.getPixelForValue(this.ticks[t],t+this.minIndex,null)},getValueForPixel:function(t){var e=this,i=e.options.offset,n=Math.max(e._ticks.length-(i?0:1),1),a=e.isHorizontal(),o=(a?e.width:e.height)/n;return t-=a?e.left:e.top,i&&(t-=o/2),(t<=0?0:Math.round(t/o))+e.minIndex},getBasePixel:function(){return this.bottom}}),pi={position:"bottom"};gi._defaults=pi;var mi=ut.noop,vi=ut.isNullOrUndef;var bi=fi.extend({getRightValue:function(t){return"string"==typeof t?+t:fi.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var i=ut.sign(t.min),n=ut.sign(t.max);i<0&&n<0?t.max=0:i>0&&n>0&&(t.min=0)}var a=void 0!==e.min||void 0!==e.suggestedMin,o=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),a!==o&&t.min>=t.max&&(a?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this.options.ticks,i=e.stepSize,n=e.maxTicksLimit;return i?t=Math.ceil(this.max/i)-Math.floor(this.min/i)+1:(t=this._computeTickLimit(),n=n||11),n&&(t=Math.min(n,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:mi,buildTicks:function(){var t=this,e=t.options.ticks,i=t.getTickLimit(),n={maxTicks:i=Math.max(2,i),min:e.min,max:e.max,precision:e.precision,stepSize:ut.valueOrDefault(e.fixedStepSize,e.stepSize)},a=t.ticks=function(t,e){var i,n,a,o,r=[],s=t.stepSize,l=s||1,d=t.maxTicks-1,u=t.min,h=t.max,c=t.precision,f=e.min,g=e.max,p=ut.niceNum((g-f)/d/l)*l;if(p<1e-14&&vi(u)&&vi(h))return[f,g];(o=Math.ceil(g/p)-Math.floor(f/p))>d&&(p=ut.niceNum(o*p/d/l)*l),s||vi(c)?i=Math.pow(10,ut._decimalPlaces(p)):(i=Math.pow(10,c),p=Math.ceil(p*i)/i),n=Math.floor(f/p)*p,a=Math.ceil(g/p)*p,s&&(!vi(u)&&ut.almostWhole(u/p,p/1e3)&&(n=u),!vi(h)&&ut.almostWhole(h/p,p/1e3)&&(a=h)),o=(a-n)/p,o=ut.almostEquals(o,Math.round(o),p/1e3)?Math.round(o):Math.ceil(o),n=Math.round(n*i)/i,a=Math.round(a*i)/i,r.push(vi(u)?n:u);for(var m=1;m<o;++m)r.push(Math.round((n+m*p)*i)/i);return r.push(vi(h)?a:h),r}(n,t);t.handleDirectionalChanges(),t.max=ut.max(a),t.min=ut.min(a),e.reverse?(a.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var t=this;t.ticksAsNumbers=t.ticks.slice(),t.zeroLineIndex=t.ticks.indexOf(0),fi.prototype.convertTicksToLabels.call(t)}}),xi={position:"left",ticks:{callback:li.formatters.linear}},yi=bi.extend({determineDataLimits:function(){var t=this,e=t.options,i=t.chart,n=i.data.datasets,a=t.isHorizontal();function o(e){return a?e.xAxisID===t.id:e.yAxisID===t.id}t.min=null,t.max=null;var r=e.stacked;if(void 0===r&&ut.each(n,function(t,e){if(!r){var n=i.getDatasetMeta(e);i.isDatasetVisible(e)&&o(n)&&void 0!==n.stack&&(r=!0)}}),e.stacked||r){var s={};ut.each(n,function(n,a){var r=i.getDatasetMeta(a),l=[r.type,void 0===e.stacked&&void 0===r.stack?a:"",r.stack].join(".");void 0===s[l]&&(s[l]={positiveValues:[],negativeValues:[]});var d=s[l].positiveValues,u=s[l].negativeValues;i.isDatasetVisible(a)&&o(r)&&ut.each(n.data,function(i,n){var a=+t.getRightValue(i);isNaN(a)||r.data[n].hidden||(d[n]=d[n]||0,u[n]=u[n]||0,e.relativePoints?d[n]=100:a<0?u[n]+=a:d[n]+=a)})}),ut.each(s,function(e){var i=e.positiveValues.concat(e.negativeValues),n=ut.min(i),a=ut.max(i);t.min=null===t.min?n:Math.min(t.min,n),t.max=null===t.max?a:Math.max(t.max,a)})}else ut.each(n,function(e,n){var a=i.getDatasetMeta(n);i.isDatasetVisible(n)&&o(a)&&ut.each(e.data,function(e,i){var n=+t.getRightValue(e);isNaN(n)||a.data[i].hidden||(null===t.min?t.min=n:n<t.min&&(t.min=n),null===t.max?t.max=n:n>t.max&&(t.max=n))})});t.min=isFinite(t.min)&&!isNaN(t.min)?t.min:0,t.max=isFinite(t.max)&&!isNaN(t.max)?t.max:1,this.handleTickRangeOptions()},_computeTickLimit:function(){var t;return this.isHorizontal()?Math.ceil(this.width/40):(t=ut.options._parseFont(this.options.ticks),Math.ceil(this.height/t.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e=this,i=e.start,n=+e.getRightValue(t),a=e.end-i;return e.isHorizontal()?e.left+e.width/a*(n-i):e.bottom-e.height/a*(n-i)},getValueForPixel:function(t){var e=this,i=e.isHorizontal(),n=i?e.width:e.height,a=(i?t-e.left:e.bottom-t)/n;return e.start+(e.end-e.start)*a},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}}),ki=xi;yi._defaults=ki;var wi=ut.valueOrDefault;var Mi={position:"left",ticks:{callback:li.formatters.logarithmic}};function _i(t,e){return ut.isFinite(t)&&t>=0?t:e}var Ci=fi.extend({determineDataLimits:function(){var t=this,e=t.options,i=t.chart,n=i.data.datasets,a=t.isHorizontal();function o(e){return a?e.xAxisID===t.id:e.yAxisID===t.id}t.min=null,t.max=null,t.minNotZero=null;var r=e.stacked;if(void 0===r&&ut.each(n,function(t,e){if(!r){var n=i.getDatasetMeta(e);i.isDatasetVisible(e)&&o(n)&&void 0!==n.stack&&(r=!0)}}),e.stacked||r){var s={};ut.each(n,function(n,a){var r=i.getDatasetMeta(a),l=[r.type,void 0===e.stacked&&void 0===r.stack?a:"",r.stack].join(".");i.isDatasetVisible(a)&&o(r)&&(void 0===s[l]&&(s[l]=[]),ut.each(n.data,function(e,i){var n=s[l],a=+t.getRightValue(e);isNaN(a)||r.data[i].hidden||a<0||(n[i]=n[i]||0,n[i]+=a)}))}),ut.each(s,function(e){if(e.length>0){var i=ut.min(e),n=ut.max(e);t.min=null===t.min?i:Math.min(t.min,i),t.max=null===t.max?n:Math.max(t.max,n)}})}else ut.each(n,function(e,n){var a=i.getDatasetMeta(n);i.isDatasetVisible(n)&&o(a)&&ut.each(e.data,function(e,i){var n=+t.getRightValue(e);isNaN(n)||a.data[i].hidden||n<0||(null===t.min?t.min=n:n<t.min&&(t.min=n),null===t.max?t.max=n:n>t.max&&(t.max=n),0!==n&&(null===t.minNotZero||n<t.minNotZero)&&(t.minNotZero=n))})});this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;t.min=_i(e.min,t.min),t.max=_i(e.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(ut.log10(t.min))-1),t.max=Math.pow(10,Math.floor(ut.log10(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor(ut.log10(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(ut.log10(t.min))+1):10),null===t.minNotZero&&(t.min>0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(ut.log10(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,i=!t.isHorizontal(),n={min:_i(e.min),max:_i(e.max)},a=t.ticks=function(t,e){var i,n,a=[],o=wi(t.min,Math.pow(10,Math.floor(ut.log10(e.min)))),r=Math.floor(ut.log10(e.max)),s=Math.ceil(e.max/Math.pow(10,r));0===o?(i=Math.floor(ut.log10(e.minNotZero)),n=Math.floor(e.minNotZero/Math.pow(10,i)),a.push(o),o=n*Math.pow(10,i)):(i=Math.floor(ut.log10(o)),n=Math.floor(o/Math.pow(10,i)));var l=i<0?Math.pow(10,Math.abs(i)):1;do{a.push(o),10==++n&&(n=1,l=++i>=0?1:l),o=Math.round(n*Math.pow(10,i)*l)/l}while(i<r||i===r&&n<s);var d=wi(t.max,o);return a.push(d),a}(n,t);t.max=ut.max(a),t.min=ut.min(a),e.reverse?(i=!i,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),i&&a.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),fi.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){return this.getPixelForValue(this.tickValues[t])},_getFirstTickValue:function(t){var e=Math.floor(ut.log10(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},getPixelForValue:function(t){var e,i,n,a,o,r=this,s=r.options.ticks,l=s.reverse,d=ut.log10,u=r._getFirstTickValue(r.minNotZero),h=0;return t=+r.getRightValue(t),l?(n=r.end,a=r.start,o=-1):(n=r.start,a=r.end,o=1),r.isHorizontal()?(e=r.width,i=l?r.right:r.left):(e=r.height,o*=-1,i=l?r.top:r.bottom),t!==n&&(0===n&&(e-=h=wi(s.fontSize,st.global.defaultFontSize),n=u),0!==t&&(h+=e/(d(a)-d(n))*(d(t)-d(n))),i+=o*h),i},getValueForPixel:function(t){var e,i,n,a,o=this,r=o.options.ticks,s=r.reverse,l=ut.log10,d=o._getFirstTickValue(o.minNotZero);if(s?(i=o.end,n=o.start):(i=o.start,n=o.end),o.isHorizontal()?(e=o.width,a=s?o.right-t:t-o.left):(e=o.height,a=s?t-o.top:o.bottom-t),a!==i){if(0===i){var u=wi(r.fontSize,st.global.defaultFontSize);a-=u,e-=u,i=d}a*=l(n)-l(i),a/=e,a=Math.pow(10,l(i)+a)}return a}}),Si=Mi;Ci._defaults=Si;var Pi=ut.valueOrDefault,Ii=ut.valueAtIndexOrDefault,Ai=ut.options.resolve,Di={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:li.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function Ti(t){var e=t.options;return e.angleLines.display||e.pointLabels.display?t.chart.data.labels.length:0}function Fi(t){var e=t.ticks;return e.display&&t.display?Pi(e.fontSize,st.global.defaultFontSize)+2*e.backdropPaddingY:0}function Li(t,e,i,n,a){return t===n||t===a?{start:e-i/2,end:e+i/2}:t<n||t>a?{start:e-i,end:e}:{start:e,end:e+i}}function Ri(t){return 0===t||180===t?"center":t<180?"left":"right"}function Oi(t,e,i,n){var a,o,r=i.y+n/2;if(ut.isArray(e))for(a=0,o=e.length;a<o;++a)t.fillText(e[a],i.x,r),r+=n;else t.fillText(e,i.x,r)}function zi(t,e,i){90===t||270===t?i.y-=e.h/2:(t>270||t<90)&&(i.y-=e.h)}function Bi(t){return ut.isNumber(t)?t:0}var Ni=bi.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Fi(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var t=this,e=t.chart,i=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;ut.each(e.data.datasets,function(a,o){if(e.isDatasetVisible(o)){var r=e.getDatasetMeta(o);ut.each(a.data,function(e,a){var o=+t.getRightValue(e);isNaN(o)||r.data[a].hidden||(i=Math.min(o,i),n=Math.max(o,n))})}}),t.min=i===Number.POSITIVE_INFINITY?0:i,t.max=n===Number.NEGATIVE_INFINITY?0:n,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Fi(this.options))},convertTicksToLabels:function(){var t=this;bi.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map(t.options.pointLabels.callback,t)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this.options;t.display&&t.pointLabels.display?function(t){var e,i,n,a=ut.options._parseFont(t.options.pointLabels),o={l:0,r:t.width,t:0,b:t.height-t.paddingTop},r={};t.ctx.font=a.string,t._pointLabelSizes=[];var s,l,d,u=Ti(t);for(e=0;e<u;e++){n=t.getPointPosition(e,t.drawingArea+5),s=t.ctx,l=a.lineHeight,d=t.pointLabels[e]||"",i=ut.isArray(d)?{w:ut.longestText(s,s.font,d),h:d.length*l}:{w:s.measureText(d).width,h:l},t._pointLabelSizes[e]=i;var h=t.getIndexAngle(e),c=ut.toDegrees(h)%360,f=Li(c,n.x,i.w,0,180),g=Li(c,n.y,i.h,90,270);f.start<o.l&&(o.l=f.start,r.l=h),f.end>o.r&&(o.r=f.end,r.r=h),g.start<o.t&&(o.t=g.start,r.t=h),g.end>o.b&&(o.b=g.end,r.b=h)}t.setReductions(t.drawingArea,o,r)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(t,e,i){var n=this,a=e.l/Math.sin(i.l),o=Math.max(e.r-n.width,0)/Math.sin(i.r),r=-e.t/Math.cos(i.t),s=-Math.max(e.b-(n.height-n.paddingTop),0)/Math.cos(i.b);a=Bi(a),o=Bi(o),r=Bi(r),s=Bi(s),n.drawingArea=Math.min(Math.floor(t-(a+o)/2),Math.floor(t-(r+s)/2)),n.setCenterPoint(a,o,r,s)},setCenterPoint:function(t,e,i,n){var a=this,o=a.width-e-a.drawingArea,r=t+a.drawingArea,s=i+a.drawingArea,l=a.height-a.paddingTop-n-a.drawingArea;a.xCenter=Math.floor((r+o)/2+a.left),a.yCenter=Math.floor((s+l)/2+a.top+a.paddingTop)},getIndexAngle:function(t){return t*(2*Math.PI/Ti(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(null===t)return 0;var i=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*i:(t-e.min)*i},getPointPosition:function(t,e){var i=this.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(i)*e+this.xCenter,y:Math.sin(i)*e+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this.min,e=this.max;return this.getPointPositionForValue(0,this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0)},draw:function(){var t=this,e=t.options,i=e.gridLines,n=e.ticks;if(e.display){var a=t.ctx,o=this.getIndexAngle(0),r=ut.options._parseFont(n);(e.angleLines.display||e.pointLabels.display)&&function(t){var e=t.ctx,i=t.options,n=i.angleLines,a=i.gridLines,o=i.pointLabels,r=Pi(n.lineWidth,a.lineWidth),s=Pi(n.color,a.color),l=Fi(i);e.save(),e.lineWidth=r,e.strokeStyle=s,e.setLineDash&&(e.setLineDash(Ai([n.borderDash,a.borderDash,[]])),e.lineDashOffset=Ai([n.borderDashOffset,a.borderDashOffset,0]));var d=t.getDistanceFromCenterForValue(i.ticks.reverse?t.min:t.max),u=ut.options._parseFont(o);e.font=u.string,e.textBaseline="middle";for(var h=Ti(t)-1;h>=0;h--){if(n.display&&r&&s){var c=t.getPointPosition(h,d);e.beginPath(),e.moveTo(t.xCenter,t.yCenter),e.lineTo(c.x,c.y),e.stroke()}if(o.display){var f=0===h?l/2:0,g=t.getPointPosition(h,d+f+5),p=Ii(o.fontColor,h,st.global.defaultFontColor);e.fillStyle=p;var m=t.getIndexAngle(h),v=ut.toDegrees(m);e.textAlign=Ri(v),zi(v,t._pointLabelSizes[h],g),Oi(e,t.pointLabels[h]||"",g,u.lineHeight)}}e.restore()}(t),ut.each(t.ticks,function(e,s){if(s>0||n.reverse){var l=t.getDistanceFromCenterForValue(t.ticksAsNumbers[s]);if(i.display&&0!==s&&function(t,e,i,n){var a,o=t.ctx,r=e.circular,s=Ti(t),l=Ii(e.color,n-1),d=Ii(e.lineWidth,n-1);if((r||s)&&l&&d){if(o.save(),o.strokeStyle=l,o.lineWidth=d,o.setLineDash&&(o.setLineDash(e.borderDash||[]),o.lineDashOffset=e.borderDashOffset||0),o.beginPath(),r)o.arc(t.xCenter,t.yCenter,i,0,2*Math.PI);else{a=t.getPointPosition(0,i),o.moveTo(a.x,a.y);for(var u=1;u<s;u++)a=t.getPointPosition(u,i),o.lineTo(a.x,a.y)}o.closePath(),o.stroke(),o.restore()}}(t,i,l,s),n.display){var d=Pi(n.fontColor,st.global.defaultFontColor);if(a.font=r.string,a.save(),a.translate(t.xCenter,t.yCenter),a.rotate(o),n.showLabelBackdrop){var u=a.measureText(e).width;a.fillStyle=n.backdropColor,a.fillRect(-u/2-n.backdropPaddingX,-l-r.size/2-n.backdropPaddingY,u+2*n.backdropPaddingX,r.size+2*n.backdropPaddingY)}a.textAlign="center",a.textBaseline="middle",a.fillStyle=d,a.fillText(e,0,-l),a.restore()}}})}}}),Wi=Di;Ni._defaults=Wi;var Vi=ut.valueOrDefault,Ei=Number.MIN_SAFE_INTEGER||-9007199254740991,Hi=Number.MAX_SAFE_INTEGER||9007199254740991,ji={millisecond:{common:!0,size:1,steps:[1,2,5,10,20,50,100,250,500]},second:{common:!0,size:1e3,steps:[1,2,5,10,15,30]},minute:{common:!0,size:6e4,steps:[1,2,5,10,15,30]},hour:{common:!0,size:36e5,steps:[1,2,3,6,12]},day:{common:!0,size:864e5,steps:[1,2,5]},week:{common:!1,size:6048e5,steps:[1,2,3,4]},month:{common:!0,size:2628e6,steps:[1,2,3]},quarter:{common:!1,size:7884e6,steps:[1,2,3,4]},year:{common:!0,size:3154e7}},qi=Object.keys(ji);function Yi(t,e){return t-e}function Ui(t){var e,i,n,a={},o=[];for(e=0,i=t.length;e<i;++e)a[n=t[e]]||(a[n]=!0,o.push(n));return o}function Xi(t,e,i,n){var a=function(t,e,i){for(var n,a,o,r=0,s=t.length-1;r>=0&&r<=s;){if(a=t[(n=r+s>>1)-1]||null,o=t[n],!a)return{lo:null,hi:o};if(o[e]<i)r=n+1;else{if(!(a[e]>i))return{lo:a,hi:o};s=n-1}}return{lo:o,hi:null}}(t,e,i),o=a.lo?a.hi?a.lo:t[t.length-2]:t[0],r=a.lo?a.hi?a.hi:t[t.length-1]:t[1],s=r[e]-o[e],l=s?(i-o[e])/s:0,d=(r[n]-o[n])*l;return o[n]+d}function Ki(t,e){var i=t._adapter,n=t.options.time,a=n.parser,o=a||n.format,r=e;return"function"==typeof a&&(r=a(r)),ut.isFinite(r)||(r="string"==typeof o?i.parse(r,o):i.parse(r)),null!==r?+r:(a||"function"!=typeof o||(r=o(e),ut.isFinite(r)||(r=i.parse(r))),r)}function Gi(t,e){if(ut.isNullOrUndef(e))return null;var i=t.options.time,n=Ki(t,t.getRightValue(e));return null===n?n:(i.round&&(n=+t._adapter.startOf(n,i.round)),n)}function Zi(t){for(var e=qi.indexOf(t)+1,i=qi.length;e<i;++e)if(ji[qi[e]].common)return qi[e]}function $i(t,e,i,n){var a,o=t._adapter,r=t.options,s=r.time,l=s.unit||function(t,e,i,n){var a,o,r,s=qi.length;for(a=qi.indexOf(t);a<s-1;++a)if(r=(o=ji[qi[a]]).steps?o.steps[o.steps.length-1]:Hi,o.common&&Math.ceil((i-e)/(r*o.size))<=n)return qi[a];return qi[s-1]}(s.minUnit,e,i,n),d=Zi(l),u=Vi(s.stepSize,s.unitStepSize),h="week"===l&&s.isoWeekday,c=r.ticks.major.enabled,f=ji[l],g=e,p=i,m=[];for(u||(u=function(t,e,i,n){var a,o,r,s=e-t,l=ji[i],d=l.size,u=l.steps;if(!u)return Math.ceil(s/(n*d));for(a=0,o=u.length;a<o&&(r=u[a],!(Math.ceil(s/(d*r))<=n));++a);return r}(e,i,l,n)),h&&(g=+o.startOf(g,"isoWeek",h),p=+o.startOf(p,"isoWeek",h)),g=+o.startOf(g,h?"day":l),(p=+o.startOf(p,h?"day":l))<i&&(p=+o.add(p,1,l)),a=g,c&&d&&!h&&!s.round&&(a=+o.startOf(a,d),a=+o.add(a,~~((g-a)/(f.size*u))*u,l));a<p;a=+o.add(a,u,l))m.push(+a);return m.push(+a),m}var Ji=fi.extend({initialize:function(){this.mergeTicksOptions(),fi.prototype.initialize.call(this)},update:function(){var t=this.options,e=t.time||(t.time={}),i=this._adapter=new si._date(t.adapters.date);return e.format&&console.warn("options.time.format is deprecated and replaced by options.time.parser."),ut.mergeIf(e.displayFormats,i.formats()),fi.prototype.update.apply(this,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),fi.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,i,n,a,o,r=this,s=r.chart,l=r._adapter,d=r.options.time,u=d.unit||"day",h=Hi,c=Ei,f=[],g=[],p=[],m=s.data.labels||[];for(t=0,i=m.length;t<i;++t)p.push(Gi(r,m[t]));for(t=0,i=(s.data.datasets||[]).length;t<i;++t)if(s.isDatasetVisible(t))if(a=s.data.datasets[t].data,ut.isObject(a[0]))for(g[t]=[],e=0,n=a.length;e<n;++e)o=Gi(r,a[e]),f.push(o),g[t][e]=o;else{for(e=0,n=p.length;e<n;++e)f.push(p[e]);g[t]=p.slice(0)}else g[t]=[];p.length&&(p=Ui(p).sort(Yi),h=Math.min(h,p[0]),c=Math.max(c,p[p.length-1])),f.length&&(f=Ui(f).sort(Yi),h=Math.min(h,f[0]),c=Math.max(c,f[f.length-1])),h=Gi(r,d.min)||h,c=Gi(r,d.max)||c,h=h===Hi?+l.startOf(Date.now(),u):h,c=c===Ei?+l.endOf(Date.now(),u)+1:c,r.min=Math.min(h,c),r.max=Math.max(h+1,c),r._horizontal=r.isHorizontal(),r._table=[],r._timestamps={data:f,datasets:g,labels:p}},buildTicks:function(){var t,e,i,n=this,a=n.min,o=n.max,r=n.options,s=r.time,l=[],d=[];switch(r.ticks.source){case"data":l=n._timestamps.data;break;case"labels":l=n._timestamps.labels;break;case"auto":default:l=$i(n,a,o,n.getLabelCapacity(a))}for("ticks"===r.bounds&&l.length&&(a=l[0],o=l[l.length-1]),a=Gi(n,s.min)||a,o=Gi(n,s.max)||o,t=0,e=l.length;t<e;++t)(i=l[t])>=a&&i<=o&&d.push(i);return n.min=a,n.max=o,n._unit=s.unit||function(t,e,i,n,a){var o,r;for(o=qi.length-1;o>=qi.indexOf(i);o--)if(r=qi[o],ji[r].common&&t._adapter.diff(a,n,r)>=e.length)return r;return qi[i?qi.indexOf(i):0]}(n,d,s.minUnit,n.min,n.max),n._majorUnit=Zi(n._unit),n._table=function(t,e,i,n){if("linear"===n||!t.length)return[{time:e,pos:0},{time:i,pos:1}];var a,o,r,s,l,d=[],u=[e];for(a=0,o=t.length;a<o;++a)(s=t[a])>e&&s<i&&u.push(s);for(u.push(i),a=0,o=u.length;a<o;++a)l=u[a+1],r=u[a-1],s=u[a],void 0!==r&&void 0!==l&&Math.round((l+r)/2)===s||d.push({time:s,pos:a/(o-1)});return d}(n._timestamps.data,a,o,r.distribution),n._offsets=function(t,e,i,n,a){var o,r,s=0,l=0;return a.offset&&e.length&&(a.time.min||(o=Xi(t,"time",e[0],"pos"),s=1===e.length?1-o:(Xi(t,"time",e[1],"pos")-o)/2),a.time.max||(r=Xi(t,"time",e[e.length-1],"pos"),l=1===e.length?r:(r-Xi(t,"time",e[e.length-2],"pos"))/2)),{start:s,end:l}}(n._table,d,0,0,r),r.ticks.reverse&&d.reverse(),function(t,e,i){var n,a,o,r,s=[];for(n=0,a=e.length;n<a;++n)o=e[n],r=!!i&&o===+t._adapter.startOf(o,i),s.push({value:o,major:r});return s}(n,d,n._majorUnit)},getLabelForIndex:function(t,e){var i=this,n=i._adapter,a=i.chart.data,o=i.options.time,r=a.labels&&t<a.labels.length?a.labels[t]:"",s=a.datasets[e].data[t];return ut.isObject(s)&&(r=i.getRightValue(s)),o.tooltipFormat?n.format(Ki(i,r),o.tooltipFormat):"string"==typeof r?r:n.format(Ki(i,r),o.displayFormats.datetime)},tickFormatFunction:function(t,e,i,n){var a=this._adapter,o=this.options,r=o.time.displayFormats,s=r[this._unit],l=this._majorUnit,d=r[l],u=+a.startOf(t,l),h=o.ticks.major,c=h.enabled&&l&&d&&t===u,f=a.format(t,n||(c?d:s)),g=c?h:o.ticks.minor,p=Vi(g.callback,g.userCallback);return p?p(f,e,i):f},convertTicksToLabels:function(t){var e,i,n=[];for(e=0,i=t.length;e<i;++e)n.push(this.tickFormatFunction(t[e].value,e,t));return n},getPixelForOffset:function(t){var e=this,i=e.options.ticks.reverse,n=e._horizontal?e.width:e.height,a=e._horizontal?i?e.right:e.left:i?e.bottom:e.top,o=Xi(e._table,"time",t,"pos"),r=n*(e._offsets.start+o)/(e._offsets.start+1+e._offsets.end);return i?a-r:a+r},getPixelForValue:function(t,e,i){var n=null;if(void 0!==e&&void 0!==i&&(n=this._timestamps.datasets[i][e]),null===n&&(n=Gi(this,t)),null!==n)return this.getPixelForOffset(n)},getPixelForTick:function(t){var e=this.getTicks();return t>=0&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var e=this,i=e._horizontal?e.width:e.height,n=e._horizontal?e.left:e.top,a=(i?(t-n)/i:0)*(e._offsets.start+1+e._offsets.start)-e._offsets.end,o=Xi(e._table,"pos",a,"time");return e._adapter._create(o)},getLabelWidth:function(t){var e=this.options.ticks,i=this.ctx.measureText(t).width,n=ut.toRadians(e.maxRotation),a=Math.cos(n),o=Math.sin(n);return i*a+Vi(e.fontSize,st.global.defaultFontSize)*o},getLabelCapacity:function(t){var e=this,i=e.options.time.displayFormats.millisecond,n=e.tickFormatFunction(t,0,[],i),a=e.getLabelWidth(n),o=e.isHorizontal()?e.width:e.height,r=Math.floor(o/a);return r>0?r:1}}),Qi={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};Ji._defaults=Qi;var tn={category:gi,linear:yi,logarithmic:Ci,radialLinear:Ni,time:Ji},en={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};si._date.override("function"==typeof t?{_id:"moment",formats:function(){return en},parse:function(e,i){return"string"==typeof e&&"string"==typeof i?e=t(e,i):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,i){return t(e).format(i)},add:function(e,i,n){return t(e).add(i,n).valueOf()},diff:function(e,i,n){return t.duration(t(e).diff(t(i))).as(n)},startOf:function(e,i,n){return e=t(e),"isoWeek"===i?e.isoWeekday(n).valueOf():e.startOf(i).valueOf()},endOf:function(e,i){return t(e).endOf(i).valueOf()},_create:function(e){return t(e)}}:{}),st._set("global",{plugins:{filler:{propagate:!0}}});var nn={dataset:function(t){var e=t.fill,i=t.chart,n=i.getDatasetMeta(e),a=n&&i.isDatasetVisible(e)&&n.dataset._children||[],o=a.length||0;return o?function(t,e){return e<o&&a[e]._view||null}:null},boundary:function(t){var e=t.boundary,i=e?e.x:null,n=e?e.y:null;return function(t){return{x:null===i?t.x:i,y:null===n?t.y:n}}}};function an(t,e,i){var n,a=t._model||{},o=a.fill;if(void 0===o&&(o=!!a.backgroundColor),!1===o||null===o)return!1;if(!0===o)return"origin";if(n=parseFloat(o,10),isFinite(n)&&Math.floor(n)===n)return"-"!==o[0]&&"+"!==o[0]||(n=e+n),!(n===e||n<0||n>=i)&&n;switch(o){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return o;default:return!1}}function on(t){var e,i=t.el._model||{},n=t.el._scale||{},a=t.fill,o=null;if(isFinite(a))return null;if("start"===a?o=void 0===i.scaleBottom?n.bottom:i.scaleBottom:"end"===a?o=void 0===i.scaleTop?n.top:i.scaleTop:void 0!==i.scaleZero?o=i.scaleZero:n.getBasePosition?o=n.getBasePosition():n.getBasePixel&&(o=n.getBasePixel()),null!=o){if(void 0!==o.x&&void 0!==o.y)return o;if(ut.isFinite(o))return{x:(e=n.isHorizontal())?o:null,y:e?null:o}}return null}function rn(t,e,i){var n,a=t[e].fill,o=[e];if(!i)return a;for(;!1!==a&&-1===o.indexOf(a);){if(!isFinite(a))return a;if(!(n=t[a]))return!1;if(n.visible)return a;o.push(a),a=n.fill}return!1}function sn(t){var e=t.fill,i="dataset";return!1===e?null:(isFinite(e)||(i="boundary"),nn[i](t))}function ln(t){return t&&!t.skip}function dn(t,e,i,n,a){var o;if(n&&a){for(t.moveTo(e[0].x,e[0].y),o=1;o<n;++o)ut.canvas.lineTo(t,e[o-1],e[o]);for(t.lineTo(i[a-1].x,i[a-1].y),o=a-1;o>0;--o)ut.canvas.lineTo(t,i[o],i[o-1],!0)}}var un={id:"filler",afterDatasetsUpdate:function(t,e){var i,n,a,o,r=(t.data.datasets||[]).length,s=e.propagate,l=[];for(n=0;n<r;++n)o=null,(a=(i=t.getDatasetMeta(n)).dataset)&&a._model&&a instanceof Wt.Line&&(o={visible:t.isDatasetVisible(n),fill:an(a,n,r),chart:t,el:a}),i.$filler=o,l.push(o);for(n=0;n<r;++n)(o=l[n])&&(o.fill=rn(l,n,s),o.boundary=on(o),o.mapper=sn(o))},beforeDatasetDraw:function(t,e){var i=e.meta.$filler;if(i){var n=t.ctx,a=i.el,o=a._view,r=a._children||[],s=i.mapper,l=o.backgroundColor||st.global.defaultColor;s&&l&&r.length&&(ut.canvas.clipArea(n,t.chartArea),function(t,e,i,n,a,o){var r,s,l,d,u,h,c,f=e.length,g=n.spanGaps,p=[],m=[],v=0,b=0;for(t.beginPath(),r=0,s=f+!!o;r<s;++r)u=i(d=e[l=r%f]._view,l,n),h=ln(d),c=ln(u),h&&c?(v=p.push(d),b=m.push(u)):v&&b&&(g?(h&&p.push(d),c&&m.push(u)):(dn(t,p,m,v,b),v=b=0,p=[],m=[]));dn(t,p,m,v,b),t.closePath(),t.fillStyle=a,t.fill()}(n,r,s,o,l,a._loop),ut.canvas.unclipArea(n))}}},hn=ut.noop,cn=ut.valueOrDefault;function fn(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}st._set("global",{legend:{display:!0,position:"top",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var i=e.datasetIndex,n=this.chart,a=n.getDatasetMeta(i);a.hidden=null===a.hidden?!n.data.datasets[i].hidden:null,n.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data;return ut.isArray(e.datasets)?e.datasets.map(function(e,i){return{text:e.label,fillStyle:ut.isArray(e.backgroundColor)?e.backgroundColor[0]:e.backgroundColor,hidden:!t.isDatasetVisible(i),lineCap:e.borderCapStyle,lineDash:e.borderDash,lineDashOffset:e.borderDashOffset,lineJoin:e.borderJoinStyle,lineWidth:e.borderWidth,strokeStyle:e.borderColor,pointStyle:e.pointStyle,datasetIndex:i}},this):[]}}},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');for(var i=0;i<t.data.datasets.length;i++)e.push('<li><span style="background-color:'+t.data.datasets[i].backgroundColor+'"></span>'),t.data.datasets[i].label&&e.push(t.data.datasets[i].label),e.push("</li>");return e.push("</ul>"),e.join("")}});var gn=pt.extend({initialize:function(t){ut.extend(this,t),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:hn,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:hn,beforeSetDimensions:hn,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:hn,beforeBuildLabels:hn,buildLabels:function(){var t=this,e=t.options.labels||{},i=ut.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(i=i.filter(function(i){return e.filter(i,t.chart.data)})),t.options.reverse&&i.reverse(),t.legendItems=i},afterBuildLabels:hn,beforeFit:hn,fit:function(){var t=this,e=t.options,i=e.labels,n=e.display,a=t.ctx,o=ut.options._parseFont(i),r=o.size,s=t.legendHitBoxes=[],l=t.minSize,d=t.isHorizontal();if(d?(l.width=t.maxWidth,l.height=n?10:0):(l.width=n?10:0,l.height=t.maxHeight),n)if(a.font=o.string,d){var u=t.lineWidths=[0],h=0;a.textAlign="left",a.textBaseline="top",ut.each(t.legendItems,function(t,e){var n=fn(i,r)+r/2+a.measureText(t.text).width;(0===e||u[u.length-1]+n+i.padding>l.width)&&(h+=r+i.padding,u[u.length-(e>0?0:1)]=i.padding),s[e]={left:0,top:0,width:n,height:r},u[u.length-1]+=n+i.padding}),l.height+=h}else{var c=i.padding,f=t.columnWidths=[],g=i.padding,p=0,m=0,v=r+c;ut.each(t.legendItems,function(t,e){var n=fn(i,r)+r/2+a.measureText(t.text).width;e>0&&m+v>l.height-c&&(g+=p+i.padding,f.push(p),p=0,m=0),p=Math.max(p,n),m+=v,s[e]={left:0,top:0,width:n,height:r}}),g+=p,f.push(p),l.width+=g}t.width=l.width,t.height=l.height},afterFit:hn,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,i=e.labels,n=st.global,a=n.defaultColor,o=n.elements.line,r=t.width,s=t.lineWidths;if(e.display){var l,d=t.ctx,u=cn(i.fontColor,n.defaultFontColor),h=ut.options._parseFont(i),c=h.size;d.textAlign="left",d.textBaseline="middle",d.lineWidth=.5,d.strokeStyle=u,d.fillStyle=u,d.font=h.string;var f=fn(i,c),g=t.legendHitBoxes,p=t.isHorizontal();l=p?{x:t.left+(r-s[0])/2+i.padding,y:t.top+i.padding,line:0}:{x:t.left+i.padding,y:t.top+i.padding,line:0};var m=c+i.padding;ut.each(t.legendItems,function(n,u){var h=d.measureText(n.text).width,v=f+c/2+h,b=l.x,x=l.y;p?u>0&&b+v+i.padding>t.left+t.minSize.width&&(x=l.y+=m,l.line++,b=l.x=t.left+(r-s[l.line])/2+i.padding):u>0&&x+m>t.top+t.minSize.height&&(b=l.x=b+t.columnWidths[l.line]+i.padding,x=l.y=t.top+i.padding,l.line++),function(t,i,n){if(!(isNaN(f)||f<=0)){d.save();var r=cn(n.lineWidth,o.borderWidth);if(d.fillStyle=cn(n.fillStyle,a),d.lineCap=cn(n.lineCap,o.borderCapStyle),d.lineDashOffset=cn(n.lineDashOffset,o.borderDashOffset),d.lineJoin=cn(n.lineJoin,o.borderJoinStyle),d.lineWidth=r,d.strokeStyle=cn(n.strokeStyle,a),d.setLineDash&&d.setLineDash(cn(n.lineDash,o.borderDash)),e.labels&&e.labels.usePointStyle){var s=f*Math.SQRT2/2,l=t+f/2,u=i+c/2;ut.canvas.drawPoint(d,n.pointStyle,s,l,u)}else 0!==r&&d.strokeRect(t,i,f,c),d.fillRect(t,i,f,c);d.restore()}}(b,x,n),g[u].left=b,g[u].top=x,function(t,e,i,n){var a=c/2,o=f+a+t,r=e+a;d.fillText(i.text,o,r),i.hidden&&(d.beginPath(),d.lineWidth=2,d.moveTo(o,r),d.lineTo(o+n,r),d.stroke())}(b,x,n,h),p?l.x+=v+i.padding:l.y+=m})}},_getLegendItemAt:function(t,e){var i,n,a,o=this;if(t>=o.left&&t<=o.right&&e>=o.top&&e<=o.bottom)for(a=o.legendHitBoxes,i=0;i<a.length;++i)if(t>=(n=a[i]).left&&t<=n.left+n.width&&e>=n.top&&e<=n.top+n.height)return o.legendItems[i];return null},handleEvent:function(t){var e,i=this,n=i.options,a="mouseup"===t.type?"click":t.type;if("mousemove"===a){if(!n.onHover&&!n.onLeave)return}else{if("click"!==a)return;if(!n.onClick)return}e=i._getLegendItemAt(t.x,t.y),"click"===a?e&&n.onClick&&n.onClick.call(i,t.native,e):(n.onLeave&&e!==i._hoveredItem&&(i._hoveredItem&&n.onLeave.call(i,t.native,i._hoveredItem),i._hoveredItem=e),n.onHover&&e&&n.onHover.call(i,t.native,e))}});function pn(t,e){var i=new gn({ctx:t.ctx,options:e,chart:t});ke.configure(t,i,e),ke.addBox(t,i),t.legend=i}var mn={id:"legend",_element:gn,beforeInit:function(t){var e=t.options.legend;e&&pn(t,e)},beforeUpdate:function(t){var e=t.options.legend,i=t.legend;e?(ut.mergeIf(e,st.global.legend),i?(ke.configure(t,i,e),i.options=e):pn(t,e)):i&&(ke.removeBox(t,i),delete t.legend)},afterEvent:function(t,e){var i=t.legend;i&&i.handleEvent(e)}},vn=ut.noop;st._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var bn=pt.extend({initialize:function(t){ut.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:vn,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:vn,beforeSetDimensions:vn,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:vn,beforeBuildLabels:vn,buildLabels:vn,afterBuildLabels:vn,beforeFit:vn,fit:function(){var t=this,e=t.options,i=e.display,n=t.minSize,a=ut.isArray(e.text)?e.text.length:1,o=ut.options._parseFont(e),r=i?a*o.lineHeight+2*e.padding:0;t.isHorizontal()?(n.width=t.maxWidth,n.height=r):(n.width=r,n.height=t.maxHeight),t.width=n.width,t.height=n.height},afterFit:vn,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,i=t.options;if(i.display){var n,a,o,r=ut.options._parseFont(i),s=r.lineHeight,l=s/2+i.padding,d=0,u=t.top,h=t.left,c=t.bottom,f=t.right;e.fillStyle=ut.valueOrDefault(i.fontColor,st.global.defaultFontColor),e.font=r.string,t.isHorizontal()?(a=h+(f-h)/2,o=u+l,n=f-h):(a="left"===i.position?h+l:f-l,o=u+(c-u)/2,n=c-u,d=Math.PI*("left"===i.position?-.5:.5)),e.save(),e.translate(a,o),e.rotate(d),e.textAlign="center",e.textBaseline="middle";var g=i.text;if(ut.isArray(g))for(var p=0,m=0;m<g.length;++m)e.fillText(g[m],0,p,n),p+=s;else e.fillText(g,0,0,n);e.restore()}}});function xn(t,e){var i=new bn({ctx:t.ctx,options:e,chart:t});ke.configure(t,i,e),ke.addBox(t,i),t.titleBlock=i}var yn={},kn=un,wn=mn,Mn={id:"title",_element:bn,beforeInit:function(t){var e=t.options.title;e&&xn(t,e)},beforeUpdate:function(t){var e=t.options.title,i=t.titleBlock;e?(ut.mergeIf(e,st.global.title),i?(ke.configure(t,i,e),i.options=e):xn(t,e)):i&&(ke.removeBox(t,i),delete t.titleBlock)}};for(var _n in yn.filler=kn,yn.legend=wn,yn.title=Mn,ai.helpers=ut,function(){function t(t,e,i){var n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}function e(t){return null!=t&&"none"!==t}function i(i,n,a){var o=document.defaultView,r=ut._getParentNode(i),s=o.getComputedStyle(i)[n],l=o.getComputedStyle(r)[n],d=e(s),u=e(l),h=Number.POSITIVE_INFINITY;return d||u?Math.min(d?t(s,i,a):h,u?t(l,r,a):h):"none"}ut.where=function(t,e){if(ut.isArray(t)&&Array.prototype.filter)return t.filter(e);var i=[];return ut.each(t,function(t){e(t)&&i.push(t)}),i},ut.findIndex=Array.prototype.findIndex?function(t,e,i){return t.findIndex(e,i)}:function(t,e,i){i=void 0===i?t:i;for(var n=0,a=t.length;n<a;++n)if(e.call(i,t[n],n,t))return n;return-1},ut.findNextWhere=function(t,e,i){ut.isNullOrUndef(i)&&(i=-1);for(var n=i+1;n<t.length;n++){var a=t[n];if(e(a))return a}},ut.findPreviousWhere=function(t,e,i){ut.isNullOrUndef(i)&&(i=t.length);for(var n=i-1;n>=0;n--){var a=t[n];if(e(a))return a}},ut.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},ut.almostEquals=function(t,e,i){return Math.abs(t-e)<i},ut.almostWhole=function(t,e){var i=Math.round(t);return i-e<t&&i+e>t},ut.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},ut.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},ut.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},ut.log10=Math.log10?function(t){return Math.log10(t)}:function(t){var e=Math.log(t)*Math.LOG10E,i=Math.round(e);return t===Math.pow(10,i)?i:e},ut.toRadians=function(t){return t*(Math.PI/180)},ut.toDegrees=function(t){return t*(180/Math.PI)},ut._decimalPlaces=function(t){if(ut.isFinite(t)){for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}},ut.getAngleFromPoint=function(t,e){var i=e.x-t.x,n=e.y-t.y,a=Math.sqrt(i*i+n*n),o=Math.atan2(n,i);return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:a}},ut.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},ut.aliasPixel=function(t){return t%2==0?0:.5},ut._alignPixel=function(t,e,i){var n=t.currentDevicePixelRatio,a=i/2;return Math.round((e-a)*n)/n+a},ut.splineCurve=function(t,e,i,n){var a=t.skip?e:t,o=e,r=i.skip?e:i,s=Math.sqrt(Math.pow(o.x-a.x,2)+Math.pow(o.y-a.y,2)),l=Math.sqrt(Math.pow(r.x-o.x,2)+Math.pow(r.y-o.y,2)),d=s/(s+l),u=l/(s+l),h=n*(d=isNaN(d)?0:d),c=n*(u=isNaN(u)?0:u);return{previous:{x:o.x-h*(r.x-a.x),y:o.y-h*(r.y-a.y)},next:{x:o.x+c*(r.x-a.x),y:o.y+c*(r.y-a.y)}}},ut.EPSILON=Number.EPSILON||1e-14,ut.splineCurveMonotone=function(t){var e,i,n,a,o,r,s,l,d,u=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),h=u.length;for(e=0;e<h;++e)if(!(n=u[e]).model.skip){if(i=e>0?u[e-1]:null,(a=e<h-1?u[e+1]:null)&&!a.model.skip){var c=a.model.x-n.model.x;n.deltaK=0!==c?(a.model.y-n.model.y)/c:0}!i||i.model.skip?n.mK=n.deltaK:!a||a.model.skip?n.mK=i.deltaK:this.sign(i.deltaK)!==this.sign(n.deltaK)?n.mK=0:n.mK=(i.deltaK+n.deltaK)/2}for(e=0;e<h-1;++e)n=u[e],a=u[e+1],n.model.skip||a.model.skip||(ut.almostEquals(n.deltaK,0,this.EPSILON)?n.mK=a.mK=0:(o=n.mK/n.deltaK,r=a.mK/n.deltaK,(l=Math.pow(o,2)+Math.pow(r,2))<=9||(s=3/Math.sqrt(l),n.mK=o*s*n.deltaK,a.mK=r*s*n.deltaK)));for(e=0;e<h;++e)(n=u[e]).model.skip||(i=e>0?u[e-1]:null,a=e<h-1?u[e+1]:null,i&&!i.model.skip&&(d=(n.model.x-i.model.x)/3,n.model.controlPointPreviousX=n.model.x-d,n.model.controlPointPreviousY=n.model.y-d*n.mK),a&&!a.model.skip&&(d=(a.model.x-n.model.x)/3,n.model.controlPointNextX=n.model.x+d,n.model.controlPointNextY=n.model.y+d*n.mK))},ut.nextItem=function(t,e,i){return i?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},ut.previousItem=function(t,e,i){return i?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},ut.niceNum=function(t,e){var i=Math.floor(ut.log10(t)),n=t/Math.pow(10,i);return(e?n<1.5?1:n<3?2:n<7?5:10:n<=1?1:n<=2?2:n<=5?5:10)*Math.pow(10,i)},ut.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},ut.getRelativePosition=function(t,e){var i,n,a=t.originalEvent||t,o=t.target||t.srcElement,r=o.getBoundingClientRect(),s=a.touches;s&&s.length>0?(i=s[0].clientX,n=s[0].clientY):(i=a.clientX,n=a.clientY);var l=parseFloat(ut.getStyle(o,"padding-left")),d=parseFloat(ut.getStyle(o,"padding-top")),u=parseFloat(ut.getStyle(o,"padding-right")),h=parseFloat(ut.getStyle(o,"padding-bottom")),c=r.right-r.left-l-u,f=r.bottom-r.top-d-h;return{x:i=Math.round((i-r.left-l)/c*o.width/e.currentDevicePixelRatio),y:n=Math.round((n-r.top-d)/f*o.height/e.currentDevicePixelRatio)}},ut.getConstraintWidth=function(t){return i(t,"max-width","clientWidth")},ut.getConstraintHeight=function(t){return i(t,"max-height","clientHeight")},ut._calculatePadding=function(t,e,i){return(e=ut.getStyle(t,e)).indexOf("%")>-1?i*parseInt(e,10)/100:parseInt(e,10)},ut._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},ut.getMaximumWidth=function(t){var e=ut._getParentNode(t);if(!e)return t.clientWidth;var i=e.clientWidth,n=i-ut._calculatePadding(e,"padding-left",i)-ut._calculatePadding(e,"padding-right",i),a=ut.getConstraintWidth(t);return isNaN(a)?n:Math.min(n,a)},ut.getMaximumHeight=function(t){var e=ut._getParentNode(t);if(!e)return t.clientHeight;var i=e.clientHeight,n=i-ut._calculatePadding(e,"padding-top",i)-ut._calculatePadding(e,"padding-bottom",i),a=ut.getConstraintHeight(t);return isNaN(a)?n:Math.min(n,a)},ut.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},ut.retinaScale=function(t,e){var i=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==i){var n=t.canvas,a=t.height,o=t.width;n.height=a*i,n.width=o*i,t.ctx.scale(i,i),n.style.height||n.style.width||(n.style.height=a+"px",n.style.width=o+"px")}},ut.fontString=function(t,e,i){return e+" "+t+"px "+i},ut.longestText=function(t,e,i,n){var a=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(a=n.data={},o=n.garbageCollect=[],n.font=e),t.font=e;var r=0;ut.each(i,function(e){null!=e&&!0!==ut.isArray(e)?r=ut.measureText(t,a,o,r,e):ut.isArray(e)&&ut.each(e,function(e){null==e||ut.isArray(e)||(r=ut.measureText(t,a,o,r,e))})});var s=o.length/2;if(s>i.length){for(var l=0;l<s;l++)delete a[o[l]];o.splice(0,s)}return r},ut.measureText=function(t,e,i,n,a){var o=e[a];return o||(o=e[a]=t.measureText(a).width,i.push(a)),o>n&&(n=o),n},ut.numberOfLabelLines=function(t){var e=1;return ut.each(t,function(t){ut.isArray(t)&&t.length>e&&(e=t.length)}),e},ut.color=X?function(t){return t instanceof CanvasGradient&&(t=st.global.defaultColor),X(t)}:function(t){return console.error("Color.js not found!"),t},ut.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:ut.color(t).saturate(.5).darken(.1).rgbString()}}(),ai._adapters=si,ai.Animation=vt,ai.animationService=bt,ai.controllers=ue,ai.DatasetController=Mt,ai.defaults=st,ai.Element=pt,ai.elements=Wt,ai.Interaction=ve,ai.layouts=ke,ai.platform=Ve,ai.plugins=Ee,ai.Scale=fi,ai.scaleService=He,ai.Ticks=li,ai.Tooltip=Je,ai.helpers.each(tn,function(t,e){ai.scaleService.registerScaleType(e,t,t._defaults)}),yn)yn.hasOwnProperty(_n)&&ai.plugins.register(yn[_n]);ai.platform.initialize();var Cn=ai;return"undefined"!=typeof window&&(window.Chart=ai),ai.Chart=ai,ai.Legend=yn.legend._element,ai.Title=yn.title._element,ai.pluginService=ai.plugins,ai.PluginBase=ai.Element.extend({}),ai.canvasHelpers=ai.helpers.canvas,ai.layoutService=ai.layouts,ai.LinearScaleBase=bi,ai.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],function(t){ai[t]=function(e,i){return new ai(e,ai.helpers.merge(i||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}}),Cn}); diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/CONTRIBUTING.md b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/CONTRIBUTING.md new file mode 100644 index 0000000000000000000000000000000000000000..09bf774aaab77809f2ffcd19027731e3ee0aedd1 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/CONTRIBUTING.md @@ -0,0 +1,28 @@ +# Contribution + +# Git Flow + +The crypto-js project uses [git flow](https://github.com/nvie/gitflow) to manage branches. +Do your changes on the `develop` or even better on a `feature/*` branch. Don't do any changes on the `master` branch. + +# Pull request + +Target your pull request on `develop` branch. Other pull request won't be accepted. + +# How to build + +1. Clone + +2. Run + + ```sh + npm install + ``` + +3. Run + + ```sh + npm run build + ``` + +4. Check `build` folder \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/LICENSE b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..b0828e52a6b3f0716727bc4e03c4634d25a7568c --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/LICENSE @@ -0,0 +1,24 @@ +# License + +[The MIT License (MIT)](http://opensource.org/licenses/MIT) + +Copyright (c) 2009-2013 Jeff Mott +Copyright (c) 2013-2016 Evan Vosberg + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/README.md b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/README.md new file mode 100644 index 0000000000000000000000000000000000000000..1f4b0efab5077451208469f81f8c7ed2ed2837fd --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/README.md @@ -0,0 +1,198 @@ +# crypto-js + +JavaScript library of crypto standards. + +## Node.js (Install) + +Requirements: + +- Node.js +- npm (Node.js package manager) + +```bash +npm install crypto-js +``` + +### Usage + +Modular include: + +```javascript +var AES = require("crypto-js/aes"); +var SHA256 = require("crypto-js/sha256"); +... +console.log(SHA256("Message")); +``` + +Including all libraries, for access to extra methods: + +```javascript +var CryptoJS = require("crypto-js"); +console.log(CryptoJS.HmacSHA1("Message", "Key")); +``` + +## Client (browser) + +Requirements: + +- Node.js +- Bower (package manager for frontend) + +```bash +bower install crypto-js +``` + +### Usage + +Modular include: + +```javascript +require.config({ + packages: [ + { + name: 'crypto-js', + location: 'path-to/bower_components/crypto-js', + main: 'index' + } + ] +}); + +require(["crypto-js/aes", "crypto-js/sha256"], function (AES, SHA256) { + console.log(SHA256("Message")); +}); +``` + +Including all libraries, for access to extra methods: + +```javascript +// Above-mentioned will work or use this simple form +require.config({ + paths: { + 'crypto-js': 'path-to/bower_components/crypto-js/crypto-js' + } +}); + +require(["crypto-js"], function (CryptoJS) { + console.log(CryptoJS.HmacSHA1("Message", "Key")); +}); +``` + +### Usage without RequireJS + +```html +<script type="text/javascript" src="path-to/bower_components/crypto-js/crypto-js.js"></script> +<script type="text/javascript"> + var encrypted = CryptoJS.AES(...); + var encrypted = CryptoJS.SHA256(...); +</script> +``` + +## API + +See: https://code.google.com/p/crypto-js + +### AES Encryption + +#### Plain text encryption + +```javascript +var CryptoJS = require("crypto-js"); + +// Encrypt +var ciphertext = CryptoJS.AES.encrypt('my message', 'secret key 123'); + +// Decrypt +var bytes = CryptoJS.AES.decrypt(ciphertext.toString(), 'secret key 123'); +var plaintext = bytes.toString(CryptoJS.enc.Utf8); + +console.log(plaintext); +``` + +#### Object encryption + +```javascript +var CryptoJS = require("crypto-js"); + +var data = [{id: 1}, {id: 2}] + +// Encrypt +var ciphertext = CryptoJS.AES.encrypt(JSON.stringify(data), 'secret key 123'); + +// Decrypt +var bytes = CryptoJS.AES.decrypt(ciphertext.toString(), 'secret key 123'); +var decryptedData = JSON.parse(bytes.toString(CryptoJS.enc.Utf8)); + +console.log(decryptedData); +``` + +### List of modules + + +- ```crypto-js/core``` +- ```crypto-js/x64-core``` +- ```crypto-js/lib-typedarrays``` + +--- + +- ```crypto-js/md5``` +- ```crypto-js/sha1``` +- ```crypto-js/sha256``` +- ```crypto-js/sha224``` +- ```crypto-js/sha512``` +- ```crypto-js/sha384``` +- ```crypto-js/sha3``` +- ```crypto-js/ripemd160``` + +--- + +- ```crypto-js/hmac-md5``` +- ```crypto-js/hmac-sha1``` +- ```crypto-js/hmac-sha256``` +- ```crypto-js/hmac-sha224``` +- ```crypto-js/hmac-sha512``` +- ```crypto-js/hmac-sha384``` +- ```crypto-js/hmac-sha3``` +- ```crypto-js/hmac-ripemd160``` + +--- + +- ```crypto-js/pbkdf2``` + +--- + +- ```crypto-js/aes``` +- ```crypto-js/tripledes``` +- ```crypto-js/rc4``` +- ```crypto-js/rabbit``` +- ```crypto-js/rabbit-legacy``` +- ```crypto-js/evpkdf``` + +--- + +- ```crypto-js/format-openssl``` +- ```crypto-js/format-hex``` + +--- + +- ```crypto-js/enc-latin1``` +- ```crypto-js/enc-utf8``` +- ```crypto-js/enc-hex``` +- ```crypto-js/enc-utf16``` +- ```crypto-js/enc-base64``` + +--- + +- ```crypto-js/mode-cfb``` +- ```crypto-js/mode-ctr``` +- ```crypto-js/mode-ctr-gladman``` +- ```crypto-js/mode-ofb``` +- ```crypto-js/mode-ecb``` + +--- + +- ```crypto-js/pad-pkcs7``` +- ```crypto-js/pad-ansix923``` +- ```crypto-js/pad-iso10126``` +- ```crypto-js/pad-iso97971``` +- ```crypto-js/pad-zeropadding``` +- ```crypto-js/pad-nopadding``` diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/aes.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/aes.js new file mode 100644 index 0000000000000000000000000000000000000000..508d512772164ea04bec7b6d3ecc6fe0e1d6caec --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/aes.js @@ -0,0 +1,232 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + + // Lookup tables + var SBOX = []; + var INV_SBOX = []; + var SUB_MIX_0 = []; + var SUB_MIX_1 = []; + var SUB_MIX_2 = []; + var SUB_MIX_3 = []; + var INV_SUB_MIX_0 = []; + var INV_SUB_MIX_1 = []; + var INV_SUB_MIX_2 = []; + var INV_SUB_MIX_3 = []; + + // Compute lookup tables + (function () { + // Compute double table + var d = []; + for (var i = 0; i < 256; i++) { + if (i < 128) { + d[i] = i << 1; + } else { + d[i] = (i << 1) ^ 0x11b; + } + } + + // Walk GF(2^8) + var x = 0; + var xi = 0; + for (var i = 0; i < 256; i++) { + // Compute sbox + var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4); + sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63; + SBOX[x] = sx; + INV_SBOX[sx] = x; + + // Compute multiplication + var x2 = d[x]; + var x4 = d[x2]; + var x8 = d[x4]; + + // Compute sub bytes, mix columns tables + var t = (d[sx] * 0x101) ^ (sx * 0x1010100); + SUB_MIX_0[x] = (t << 24) | (t >>> 8); + SUB_MIX_1[x] = (t << 16) | (t >>> 16); + SUB_MIX_2[x] = (t << 8) | (t >>> 24); + SUB_MIX_3[x] = t; + + // Compute inv sub bytes, inv mix columns tables + var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100); + INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8); + INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16); + INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24); + INV_SUB_MIX_3[sx] = t; + + // Compute next counter + if (!x) { + x = xi = 1; + } else { + x = x2 ^ d[d[d[x8 ^ x2]]]; + xi ^= d[d[xi]]; + } + } + }()); + + // Precomputed Rcon lookup + var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]; + + /** + * AES block cipher algorithm. + */ + var AES = C_algo.AES = BlockCipher.extend({ + _doReset: function () { + // Skip reset of nRounds has been set before and key did not change + if (this._nRounds && this._keyPriorReset === this._key) { + return; + } + + // Shortcuts + var key = this._keyPriorReset = this._key; + var keyWords = key.words; + var keySize = key.sigBytes / 4; + + // Compute number of rounds + var nRounds = this._nRounds = keySize + 6; + + // Compute number of key schedule rows + var ksRows = (nRounds + 1) * 4; + + // Compute key schedule + var keySchedule = this._keySchedule = []; + for (var ksRow = 0; ksRow < ksRows; ksRow++) { + if (ksRow < keySize) { + keySchedule[ksRow] = keyWords[ksRow]; + } else { + var t = keySchedule[ksRow - 1]; + + if (!(ksRow % keySize)) { + // Rot word + t = (t << 8) | (t >>> 24); + + // Sub word + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + + // Mix Rcon + t ^= RCON[(ksRow / keySize) | 0] << 24; + } else if (keySize > 6 && ksRow % keySize == 4) { + // Sub word + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + } + + keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t; + } + } + + // Compute inv key schedule + var invKeySchedule = this._invKeySchedule = []; + for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) { + var ksRow = ksRows - invKsRow; + + if (invKsRow % 4) { + var t = keySchedule[ksRow]; + } else { + var t = keySchedule[ksRow - 4]; + } + + if (invKsRow < 4 || ksRow <= 4) { + invKeySchedule[invKsRow] = t; + } else { + invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^ + INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]]; + } + } + }, + + encryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX); + }, + + decryptBlock: function (M, offset) { + // Swap 2nd and 4th rows + var t = M[offset + 1]; + M[offset + 1] = M[offset + 3]; + M[offset + 3] = t; + + this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX); + + // Inv swap 2nd and 4th rows + var t = M[offset + 1]; + M[offset + 1] = M[offset + 3]; + M[offset + 3] = t; + }, + + _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) { + // Shortcut + var nRounds = this._nRounds; + + // Get input, add round key + var s0 = M[offset] ^ keySchedule[0]; + var s1 = M[offset + 1] ^ keySchedule[1]; + var s2 = M[offset + 2] ^ keySchedule[2]; + var s3 = M[offset + 3] ^ keySchedule[3]; + + // Key schedule row counter + var ksRow = 4; + + // Rounds + for (var round = 1; round < nRounds; round++) { + // Shift rows, sub bytes, mix columns, add round key + var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++]; + var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++]; + var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++]; + var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++]; + + // Update state + s0 = t0; + s1 = t1; + s2 = t2; + s3 = t3; + } + + // Shift rows, sub bytes, add round key + var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]; + var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]; + var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]; + var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]; + + // Set output + M[offset] = t0; + M[offset + 1] = t1; + M[offset + 2] = t2; + M[offset + 3] = t3; + }, + + keySize: 256/32 + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg); + */ + C.AES = BlockCipher._createHelper(AES); + }()); + + + return CryptoJS.AES; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/bower.json b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/bower.json new file mode 100644 index 0000000000000000000000000000000000000000..a995f687cc9eba1f5afe5ca267dcd36f1e3d47a9 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/bower.json @@ -0,0 +1,35 @@ +{ + "name": "crypto-js", + "version": "3.1.9", + "description": "JavaScript library of crypto standards.", + "license": "MIT", + "homepage": "http://github.com/brix/crypto-js", + "repository": { + "type": "git", + "url": "http://github.com/brix/crypto-js.git" + }, + "keywords": [ + "security", + "crypto", + "Hash", + "MD5", + "SHA1", + "SHA-1", + "SHA256", + "SHA-256", + "RC4", + "Rabbit", + "AES", + "DES", + "PBKDF2", + "HMAC", + "OFB", + "CFB", + "CTR", + "CBC", + "Base64" + ], + "main": "index.js", + "dependencies": {}, + "ignore": [] +} diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/cipher-core.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/cipher-core.js new file mode 100644 index 0000000000000000000000000000000000000000..751c816684ac75ee23ed9aa1ed796f63b642ec7b --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/cipher-core.js @@ -0,0 +1,880 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./evpkdf")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./evpkdf"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Cipher core components. + */ + CryptoJS.lib.Cipher || (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm; + var C_enc = C.enc; + var Utf8 = C_enc.Utf8; + var Base64 = C_enc.Base64; + var C_algo = C.algo; + var EvpKDF = C_algo.EvpKDF; + + /** + * Abstract base cipher template. + * + * @property {number} keySize This cipher's key size. Default: 4 (128 bits) + * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits) + * @property {number} _ENC_XFORM_MODE A constant representing encryption mode. + * @property {number} _DEC_XFORM_MODE A constant representing decryption mode. + */ + var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + * + * @property {WordArray} iv The IV to use for this operation. + */ + cfg: Base.extend(), + + /** + * Creates this cipher in encryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray }); + */ + createEncryptor: function (key, cfg) { + return this.create(this._ENC_XFORM_MODE, key, cfg); + }, + + /** + * Creates this cipher in decryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray }); + */ + createDecryptor: function (key, cfg) { + return this.create(this._DEC_XFORM_MODE, key, cfg); + }, + + /** + * Initializes a newly created cipher. + * + * @param {number} xformMode Either the encryption or decryption transormation mode constant. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @example + * + * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray }); + */ + init: function (xformMode, key, cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); + + // Store transform mode and key + this._xformMode = xformMode; + this._key = key; + + // Set initial values + this.reset(); + }, + + /** + * Resets this cipher to its initial state. + * + * @example + * + * cipher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); + + // Perform concrete-cipher logic + this._doReset(); + }, + + /** + * Adds data to be encrypted or decrypted. + * + * @param {WordArray|string} dataUpdate The data to encrypt or decrypt. + * + * @return {WordArray} The data after processing. + * + * @example + * + * var encrypted = cipher.process('data'); + * var encrypted = cipher.process(wordArray); + */ + process: function (dataUpdate) { + // Append + this._append(dataUpdate); + + // Process available blocks + return this._process(); + }, + + /** + * Finalizes the encryption or decryption process. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt. + * + * @return {WordArray} The data after final processing. + * + * @example + * + * var encrypted = cipher.finalize(); + * var encrypted = cipher.finalize('data'); + * var encrypted = cipher.finalize(wordArray); + */ + finalize: function (dataUpdate) { + // Final data update + if (dataUpdate) { + this._append(dataUpdate); + } + + // Perform concrete-cipher logic + var finalProcessedData = this._doFinalize(); + + return finalProcessedData; + }, + + keySize: 128/32, + + ivSize: 128/32, + + _ENC_XFORM_MODE: 1, + + _DEC_XFORM_MODE: 2, + + /** + * Creates shortcut functions to a cipher's object interface. + * + * @param {Cipher} cipher The cipher to create a helper for. + * + * @return {Object} An object with encrypt and decrypt shortcut functions. + * + * @static + * + * @example + * + * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES); + */ + _createHelper: (function () { + function selectCipherStrategy(key) { + if (typeof key == 'string') { + return PasswordBasedCipher; + } else { + return SerializableCipher; + } + } + + return function (cipher) { + return { + encrypt: function (message, key, cfg) { + return selectCipherStrategy(key).encrypt(cipher, message, key, cfg); + }, + + decrypt: function (ciphertext, key, cfg) { + return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg); + } + }; + }; + }()) + }); + + /** + * Abstract base stream cipher template. + * + * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits) + */ + var StreamCipher = C_lib.StreamCipher = Cipher.extend({ + _doFinalize: function () { + // Process partial blocks + var finalProcessedBlocks = this._process(!!'flush'); + + return finalProcessedBlocks; + }, + + blockSize: 1 + }); + + /** + * Mode namespace. + */ + var C_mode = C.mode = {}; + + /** + * Abstract base block cipher mode template. + */ + var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({ + /** + * Creates this mode for encryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words); + */ + createEncryptor: function (cipher, iv) { + return this.Encryptor.create(cipher, iv); + }, + + /** + * Creates this mode for decryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words); + */ + createDecryptor: function (cipher, iv) { + return this.Decryptor.create(cipher, iv); + }, + + /** + * Initializes a newly created mode. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @example + * + * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words); + */ + init: function (cipher, iv) { + this._cipher = cipher; + this._iv = iv; + } + }); + + /** + * Cipher Block Chaining mode. + */ + var CBC = C_mode.CBC = (function () { + /** + * Abstract base CBC mode. + */ + var CBC = BlockCipherMode.extend(); + + /** + * CBC encryptor. + */ + CBC.Encryptor = CBC.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // XOR and encrypt + xorBlock.call(this, words, offset, blockSize); + cipher.encryptBlock(words, offset); + + // Remember this block to use with next block + this._prevBlock = words.slice(offset, offset + blockSize); + } + }); + + /** + * CBC decryptor. + */ + CBC.Decryptor = CBC.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // Remember this block to use with next block + var thisBlock = words.slice(offset, offset + blockSize); + + // Decrypt and XOR + cipher.decryptBlock(words, offset); + xorBlock.call(this, words, offset, blockSize); + + // This block becomes the previous block + this._prevBlock = thisBlock; + } + }); + + function xorBlock(words, offset, blockSize) { + // Shortcut + var iv = this._iv; + + // Choose mixing block + if (iv) { + var block = iv; + + // Remove IV for subsequent blocks + this._iv = undefined; + } else { + var block = this._prevBlock; + } + + // XOR blocks + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= block[i]; + } + } + + return CBC; + }()); + + /** + * Padding namespace. + */ + var C_pad = C.pad = {}; + + /** + * PKCS #5/7 padding strategy. + */ + var Pkcs7 = C_pad.Pkcs7 = { + /** + * Pads data using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to pad. + * @param {number} blockSize The multiple that the data should be padded to. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.pad(wordArray, 4); + */ + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; + + // Create padding word + var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes; + + // Create padding + var paddingWords = []; + for (var i = 0; i < nPaddingBytes; i += 4) { + paddingWords.push(paddingWord); + } + var padding = WordArray.create(paddingWords, nPaddingBytes); + + // Add padding + data.concat(padding); + }, + + /** + * Unpads data that had been padded using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to unpad. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.unpad(wordArray); + */ + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + /** + * Abstract base block cipher template. + * + * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits) + */ + var BlockCipher = C_lib.BlockCipher = Cipher.extend({ + /** + * Configuration options. + * + * @property {Mode} mode The block mode to use. Default: CBC + * @property {Padding} padding The padding strategy to use. Default: Pkcs7 + */ + cfg: Cipher.cfg.extend({ + mode: CBC, + padding: Pkcs7 + }), + + reset: function () { + // Reset cipher + Cipher.reset.call(this); + + // Shortcuts + var cfg = this.cfg; + var iv = cfg.iv; + var mode = cfg.mode; + + // Reset block mode + if (this._xformMode == this._ENC_XFORM_MODE) { + var modeCreator = mode.createEncryptor; + } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { + var modeCreator = mode.createDecryptor; + // Keep at least one block in the buffer for unpadding + this._minBufferSize = 1; + } + + if (this._mode && this._mode.__creator == modeCreator) { + this._mode.init(this, iv && iv.words); + } else { + this._mode = modeCreator.call(mode, this, iv && iv.words); + this._mode.__creator = modeCreator; + } + }, + + _doProcessBlock: function (words, offset) { + this._mode.processBlock(words, offset); + }, + + _doFinalize: function () { + // Shortcut + var padding = this.cfg.padding; + + // Finalize + if (this._xformMode == this._ENC_XFORM_MODE) { + // Pad data + padding.pad(this._data, this.blockSize); + + // Process final blocks + var finalProcessedBlocks = this._process(!!'flush'); + } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { + // Process final blocks + var finalProcessedBlocks = this._process(!!'flush'); + + // Unpad data + padding.unpad(finalProcessedBlocks); + } + + return finalProcessedBlocks; + }, + + blockSize: 128/32 + }); + + /** + * A collection of cipher parameters. + * + * @property {WordArray} ciphertext The raw ciphertext. + * @property {WordArray} key The key to this ciphertext. + * @property {WordArray} iv The IV used in the ciphering operation. + * @property {WordArray} salt The salt used with a key derivation function. + * @property {Cipher} algorithm The cipher algorithm. + * @property {Mode} mode The block mode used in the ciphering operation. + * @property {Padding} padding The padding scheme used in the ciphering operation. + * @property {number} blockSize The block size of the cipher. + * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string. + */ + var CipherParams = C_lib.CipherParams = Base.extend({ + /** + * Initializes a newly created cipher params object. + * + * @param {Object} cipherParams An object with any of the possible cipher parameters. + * + * @example + * + * var cipherParams = CryptoJS.lib.CipherParams.create({ + * ciphertext: ciphertextWordArray, + * key: keyWordArray, + * iv: ivWordArray, + * salt: saltWordArray, + * algorithm: CryptoJS.algo.AES, + * mode: CryptoJS.mode.CBC, + * padding: CryptoJS.pad.PKCS7, + * blockSize: 4, + * formatter: CryptoJS.format.OpenSSL + * }); + */ + init: function (cipherParams) { + this.mixIn(cipherParams); + }, + + /** + * Converts this cipher params object to a string. + * + * @param {Format} formatter (Optional) The formatting strategy to use. + * + * @return {string} The stringified cipher params. + * + * @throws Error If neither the formatter nor the default formatter is set. + * + * @example + * + * var string = cipherParams + ''; + * var string = cipherParams.toString(); + * var string = cipherParams.toString(CryptoJS.format.OpenSSL); + */ + toString: function (formatter) { + return (formatter || this.formatter).stringify(this); + } + }); + + /** + * Format namespace. + */ + var C_format = C.format = {}; + + /** + * OpenSSL formatting strategy. + */ + var OpenSSLFormatter = C_format.OpenSSL = { + /** + * Converts a cipher params object to an OpenSSL-compatible string. + * + * @param {CipherParams} cipherParams The cipher params object. + * + * @return {string} The OpenSSL-compatible string. + * + * @static + * + * @example + * + * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams); + */ + stringify: function (cipherParams) { + // Shortcuts + var ciphertext = cipherParams.ciphertext; + var salt = cipherParams.salt; + + // Format + if (salt) { + var wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext); + } else { + var wordArray = ciphertext; + } + + return wordArray.toString(Base64); + }, + + /** + * Converts an OpenSSL-compatible string to a cipher params object. + * + * @param {string} openSSLStr The OpenSSL-compatible string. + * + * @return {CipherParams} The cipher params object. + * + * @static + * + * @example + * + * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString); + */ + parse: function (openSSLStr) { + // Parse base64 + var ciphertext = Base64.parse(openSSLStr); + + // Shortcut + var ciphertextWords = ciphertext.words; + + // Test for salt + if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) { + // Extract salt + var salt = WordArray.create(ciphertextWords.slice(2, 4)); + + // Remove salt from ciphertext + ciphertextWords.splice(0, 4); + ciphertext.sigBytes -= 16; + } + + return CipherParams.create({ ciphertext: ciphertext, salt: salt }); + } + }; + + /** + * A cipher wrapper that returns ciphertext as a serializable cipher params object. + */ + var SerializableCipher = C_lib.SerializableCipher = Base.extend({ + /** + * Configuration options. + * + * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL + */ + cfg: Base.extend({ + format: OpenSSLFormatter + }), + + /** + * Encrypts a message. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv }); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + encrypt: function (cipher, message, key, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Encrypt + var encryptor = cipher.createEncryptor(key, cfg); + var ciphertext = encryptor.finalize(message); + + // Shortcut + var cipherCfg = encryptor.cfg; + + // Create and return serializable cipher params + return CipherParams.create({ + ciphertext: ciphertext, + key: key, + iv: cipherCfg.iv, + algorithm: cipher, + mode: cipherCfg.mode, + padding: cipherCfg.padding, + blockSize: cipher.blockSize, + formatter: cfg.format + }); + }, + + /** + * Decrypts serialized ciphertext. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + decrypt: function (cipher, ciphertext, key, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Convert string to CipherParams + ciphertext = this._parse(ciphertext, cfg.format); + + // Decrypt + var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext); + + return plaintext; + }, + + /** + * Converts serialized ciphertext to CipherParams, + * else assumed CipherParams already and returns ciphertext unchanged. + * + * @param {CipherParams|string} ciphertext The ciphertext. + * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext. + * + * @return {CipherParams} The unserialized ciphertext. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format); + */ + _parse: function (ciphertext, format) { + if (typeof ciphertext == 'string') { + return format.parse(ciphertext, this); + } else { + return ciphertext; + } + } + }); + + /** + * Key derivation function namespace. + */ + var C_kdf = C.kdf = {}; + + /** + * OpenSSL key derivation function. + */ + var OpenSSLKdf = C_kdf.OpenSSL = { + /** + * Derives a key and IV from a password. + * + * @param {string} password The password to derive from. + * @param {number} keySize The size in words of the key to generate. + * @param {number} ivSize The size in words of the IV to generate. + * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly. + * + * @return {CipherParams} A cipher params object with the key, IV, and salt. + * + * @static + * + * @example + * + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32); + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt'); + */ + execute: function (password, keySize, ivSize, salt) { + // Generate random salt + if (!salt) { + salt = WordArray.random(64/8); + } + + // Derive key and IV + var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt); + + // Separate key and IV + var iv = WordArray.create(key.words.slice(keySize), ivSize * 4); + key.sigBytes = keySize * 4; + + // Return params + return CipherParams.create({ key: key, iv: iv, salt: salt }); + } + }; + + /** + * A serializable cipher wrapper that derives the key from a password, + * and returns ciphertext as a serializable cipher params object. + */ + var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({ + /** + * Configuration options. + * + * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL + */ + cfg: SerializableCipher.cfg.extend({ + kdf: OpenSSLKdf + }), + + /** + * Encrypts a message using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password'); + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL }); + */ + encrypt: function (cipher, message, password, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Derive key and other params + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize); + + // Add IV to config + cfg.iv = derivedParams.iv; + + // Encrypt + var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg); + + // Mix in derived params + ciphertext.mixIn(derivedParams); + + return ciphertext; + }, + + /** + * Decrypts serialized ciphertext using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL }); + */ + decrypt: function (cipher, ciphertext, password, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Convert string to CipherParams + ciphertext = this._parse(ciphertext, cfg.format); + + // Derive key and other params + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt); + + // Add IV to config + cfg.iv = derivedParams.iv; + + // Decrypt + var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg); + + return plaintext; + } + }); + }()); + + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/core.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/core.js new file mode 100644 index 0000000000000000000000000000000000000000..28e34c13c1ebedfc2ffdd22a0c9cd8aa0af7cca9 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/core.js @@ -0,0 +1,760 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(); + } + else if (typeof define === "function" && define.amd) { + // AMD + define([], factory); + } + else { + // Global (browser) + root.CryptoJS = factory(); + } +}(this, function () { + + /** + * CryptoJS core components. + */ + var CryptoJS = CryptoJS || (function (Math, undefined) { + /* + * Local polyfil of Object.create + */ + var create = Object.create || (function () { + function F() {}; + + return function (obj) { + var subtype; + + F.prototype = obj; + + subtype = new F(); + + F.prototype = null; + + return subtype; + }; + }()) + + /** + * CryptoJS namespace. + */ + var C = {}; + + /** + * Library namespace. + */ + var C_lib = C.lib = {}; + + /** + * Base object for prototypal inheritance. + */ + var Base = C_lib.Base = (function () { + + + return { + /** + * Creates a new object that inherits from this object. + * + * @param {Object} overrides Properties to copy into the new object. + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * field: 'value', + * + * method: function () { + * } + * }); + */ + extend: function (overrides) { + // Spawn + var subtype = create(this); + + // Augment + if (overrides) { + subtype.mixIn(overrides); + } + + // Create default initializer + if (!subtype.hasOwnProperty('init') || this.init === subtype.init) { + subtype.init = function () { + subtype.$super.init.apply(this, arguments); + }; + } + + // Initializer's prototype is the subtype object + subtype.init.prototype = subtype; + + // Reference supertype + subtype.$super = this; + + return subtype; + }, + + /** + * Extends this object and runs the init method. + * Arguments to create() will be passed to init(). + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var instance = MyType.create(); + */ + create: function () { + var instance = this.extend(); + instance.init.apply(instance, arguments); + + return instance; + }, + + /** + * Initializes a newly created object. + * Override this method to add some logic when your objects are created. + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * init: function () { + * // ... + * } + * }); + */ + init: function () { + }, + + /** + * Copies properties into this object. + * + * @param {Object} properties The properties to mix in. + * + * @example + * + * MyType.mixIn({ + * field: 'value' + * }); + */ + mixIn: function (properties) { + for (var propertyName in properties) { + if (properties.hasOwnProperty(propertyName)) { + this[propertyName] = properties[propertyName]; + } + } + + // IE won't copy toString using the loop above + if (properties.hasOwnProperty('toString')) { + this.toString = properties.toString; + } + }, + + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = instance.clone(); + */ + clone: function () { + return this.init.prototype.extend(this); + } + }; + }()); + + /** + * An array of 32-bit words. + * + * @property {Array} words The array of 32-bit words. + * @property {number} sigBytes The number of significant bytes in this word array. + */ + var WordArray = C_lib.WordArray = Base.extend({ + /** + * Initializes a newly created word array. + * + * @param {Array} words (Optional) An array of 32-bit words. + * @param {number} sigBytes (Optional) The number of significant bytes in the words. + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.create(); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6); + */ + init: function (words, sigBytes) { + words = this.words = words || []; + + if (sigBytes != undefined) { + this.sigBytes = sigBytes; + } else { + this.sigBytes = words.length * 4; + } + }, + + /** + * Converts this word array to a string. + * + * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex + * + * @return {string} The stringified word array. + * + * @example + * + * var string = wordArray + ''; + * var string = wordArray.toString(); + * var string = wordArray.toString(CryptoJS.enc.Utf8); + */ + toString: function (encoder) { + return (encoder || Hex).stringify(this); + }, + + /** + * Concatenates a word array to this word array. + * + * @param {WordArray} wordArray The word array to append. + * + * @return {WordArray} This word array. + * + * @example + * + * wordArray1.concat(wordArray2); + */ + concat: function (wordArray) { + // Shortcuts + var thisWords = this.words; + var thatWords = wordArray.words; + var thisSigBytes = this.sigBytes; + var thatSigBytes = wordArray.sigBytes; + + // Clamp excess bits + this.clamp(); + + // Concat + if (thisSigBytes % 4) { + // Copy one byte at a time + for (var i = 0; i < thatSigBytes; i++) { + var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8); + } + } else { + // Copy one word at a time + for (var i = 0; i < thatSigBytes; i += 4) { + thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2]; + } + } + this.sigBytes += thatSigBytes; + + // Chainable + return this; + }, + + /** + * Removes insignificant bits. + * + * @example + * + * wordArray.clamp(); + */ + clamp: function () { + // Shortcuts + var words = this.words; + var sigBytes = this.sigBytes; + + // Clamp + words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8); + words.length = Math.ceil(sigBytes / 4); + }, + + /** + * Creates a copy of this word array. + * + * @return {WordArray} The clone. + * + * @example + * + * var clone = wordArray.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone.words = this.words.slice(0); + + return clone; + }, + + /** + * Creates a word array filled with random bytes. + * + * @param {number} nBytes The number of random bytes to generate. + * + * @return {WordArray} The random word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.random(16); + */ + random: function (nBytes) { + var words = []; + + var r = (function (m_w) { + var m_w = m_w; + var m_z = 0x3ade68b1; + var mask = 0xffffffff; + + return function () { + m_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask; + m_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask; + var result = ((m_z << 0x10) + m_w) & mask; + result /= 0x100000000; + result += 0.5; + return result * (Math.random() > .5 ? 1 : -1); + } + }); + + for (var i = 0, rcache; i < nBytes; i += 4) { + var _r = r((rcache || Math.random()) * 0x100000000); + + rcache = _r() * 0x3ade67b7; + words.push((_r() * 0x100000000) | 0); + } + + return new WordArray.init(words, nBytes); + } + }); + + /** + * Encoder namespace. + */ + var C_enc = C.enc = {}; + + /** + * Hex encoding strategy. + */ + var Hex = C_enc.Hex = { + /** + * Converts a word array to a hex string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The hex string. + * + * @static + * + * @example + * + * var hexString = CryptoJS.enc.Hex.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var hexChars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + hexChars.push((bite >>> 4).toString(16)); + hexChars.push((bite & 0x0f).toString(16)); + } + + return hexChars.join(''); + }, + + /** + * Converts a hex string to a word array. + * + * @param {string} hexStr The hex string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Hex.parse(hexString); + */ + parse: function (hexStr) { + // Shortcut + var hexStrLength = hexStr.length; + + // Convert + var words = []; + for (var i = 0; i < hexStrLength; i += 2) { + words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4); + } + + return new WordArray.init(words, hexStrLength / 2); + } + }; + + /** + * Latin1 encoding strategy. + */ + var Latin1 = C_enc.Latin1 = { + /** + * Converts a word array to a Latin1 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Latin1 string. + * + * @static + * + * @example + * + * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var latin1Chars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + latin1Chars.push(String.fromCharCode(bite)); + } + + return latin1Chars.join(''); + }, + + /** + * Converts a Latin1 string to a word array. + * + * @param {string} latin1Str The Latin1 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Latin1.parse(latin1String); + */ + parse: function (latin1Str) { + // Shortcut + var latin1StrLength = latin1Str.length; + + // Convert + var words = []; + for (var i = 0; i < latin1StrLength; i++) { + words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8); + } + + return new WordArray.init(words, latin1StrLength); + } + }; + + /** + * UTF-8 encoding strategy. + */ + var Utf8 = C_enc.Utf8 = { + /** + * Converts a word array to a UTF-8 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-8 string. + * + * @static + * + * @example + * + * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray); + */ + stringify: function (wordArray) { + try { + return decodeURIComponent(escape(Latin1.stringify(wordArray))); + } catch (e) { + throw new Error('Malformed UTF-8 data'); + } + }, + + /** + * Converts a UTF-8 string to a word array. + * + * @param {string} utf8Str The UTF-8 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf8.parse(utf8String); + */ + parse: function (utf8Str) { + return Latin1.parse(unescape(encodeURIComponent(utf8Str))); + } + }; + + /** + * Abstract buffered block algorithm template. + * + * The property blockSize must be implemented in a concrete subtype. + * + * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0 + */ + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({ + /** + * Resets this block algorithm's data buffer to its initial state. + * + * @example + * + * bufferedBlockAlgorithm.reset(); + */ + reset: function () { + // Initial values + this._data = new WordArray.init(); + this._nDataBytes = 0; + }, + + /** + * Adds new data to this block algorithm's buffer. + * + * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8. + * + * @example + * + * bufferedBlockAlgorithm._append('data'); + * bufferedBlockAlgorithm._append(wordArray); + */ + _append: function (data) { + // Convert string to WordArray, else assume WordArray already + if (typeof data == 'string') { + data = Utf8.parse(data); + } + + // Append + this._data.concat(data); + this._nDataBytes += data.sigBytes; + }, + + /** + * Processes available data blocks. + * + * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype. + * + * @param {boolean} doFlush Whether all blocks and partial blocks should be processed. + * + * @return {WordArray} The processed data. + * + * @example + * + * var processedData = bufferedBlockAlgorithm._process(); + * var processedData = bufferedBlockAlgorithm._process(!!'flush'); + */ + _process: function (doFlush) { + // Shortcuts + var data = this._data; + var dataWords = data.words; + var dataSigBytes = data.sigBytes; + var blockSize = this.blockSize; + var blockSizeBytes = blockSize * 4; + + // Count blocks ready + var nBlocksReady = dataSigBytes / blockSizeBytes; + if (doFlush) { + // Round up to include partial blocks + nBlocksReady = Math.ceil(nBlocksReady); + } else { + // Round down to include only full blocks, + // less the number of blocks that must remain in the buffer + nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); + } + + // Count words ready + var nWordsReady = nBlocksReady * blockSize; + + // Count bytes ready + var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); + + // Process blocks + if (nWordsReady) { + for (var offset = 0; offset < nWordsReady; offset += blockSize) { + // Perform concrete-algorithm logic + this._doProcessBlock(dataWords, offset); + } + + // Remove processed words + var processedWords = dataWords.splice(0, nWordsReady); + data.sigBytes -= nBytesReady; + } + + // Return processed words + return new WordArray.init(processedWords, nBytesReady); + }, + + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = bufferedBlockAlgorithm.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone._data = this._data.clone(); + + return clone; + }, + + _minBufferSize: 0 + }); + + /** + * Abstract hasher template. + * + * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits) + */ + var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + */ + cfg: Base.extend(), + + /** + * Initializes a newly created hasher. + * + * @param {Object} cfg (Optional) The configuration options to use for this hash computation. + * + * @example + * + * var hasher = CryptoJS.algo.SHA256.create(); + */ + init: function (cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); + + // Set initial values + this.reset(); + }, + + /** + * Resets this hasher to its initial state. + * + * @example + * + * hasher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); + + // Perform concrete-hasher logic + this._doReset(); + }, + + /** + * Updates this hasher with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {Hasher} This hasher. + * + * @example + * + * hasher.update('message'); + * hasher.update(wordArray); + */ + update: function (messageUpdate) { + // Append + this._append(messageUpdate); + + // Update the hash + this._process(); + + // Chainable + return this; + }, + + /** + * Finalizes the hash computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The hash. + * + * @example + * + * var hash = hasher.finalize(); + * var hash = hasher.finalize('message'); + * var hash = hasher.finalize(wordArray); + */ + finalize: function (messageUpdate) { + // Final message update + if (messageUpdate) { + this._append(messageUpdate); + } + + // Perform concrete-hasher logic + var hash = this._doFinalize(); + + return hash; + }, + + blockSize: 512/32, + + /** + * Creates a shortcut function to a hasher's object interface. + * + * @param {Hasher} hasher The hasher to create a helper for. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256); + */ + _createHelper: function (hasher) { + return function (message, cfg) { + return new hasher.init(cfg).finalize(message); + }; + }, + + /** + * Creates a shortcut function to the HMAC's object interface. + * + * @param {Hasher} hasher The hasher to use in this HMAC helper. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256); + */ + _createHmacHelper: function (hasher) { + return function (message, key) { + return new C_algo.HMAC.init(hasher, key).finalize(message); + }; + } + }); + + /** + * Algorithm namespace. + */ + var C_algo = C.algo = {}; + + return C; + }(Math)); + + + return CryptoJS; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/crypto-js.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/crypto-js.js new file mode 100644 index 0000000000000000000000000000000000000000..17f2b1163a74d56fd16b4e2de193d975a0f464d2 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/crypto-js.js @@ -0,0 +1,5988 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(); + } + else if (typeof define === "function" && define.amd) { + // AMD + define([], factory); + } + else { + // Global (browser) + root.CryptoJS = factory(); + } +}(this, function () { + + /** + * CryptoJS core components. + */ + var CryptoJS = CryptoJS || (function (Math, undefined) { + /* + * Local polyfil of Object.create + */ + var create = Object.create || (function () { + function F() {}; + + return function (obj) { + var subtype; + + F.prototype = obj; + + subtype = new F(); + + F.prototype = null; + + return subtype; + }; + }()) + + /** + * CryptoJS namespace. + */ + var C = {}; + + /** + * Library namespace. + */ + var C_lib = C.lib = {}; + + /** + * Base object for prototypal inheritance. + */ + var Base = C_lib.Base = (function () { + + + return { + /** + * Creates a new object that inherits from this object. + * + * @param {Object} overrides Properties to copy into the new object. + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * field: 'value', + * + * method: function () { + * } + * }); + */ + extend: function (overrides) { + // Spawn + var subtype = create(this); + + // Augment + if (overrides) { + subtype.mixIn(overrides); + } + + // Create default initializer + if (!subtype.hasOwnProperty('init') || this.init === subtype.init) { + subtype.init = function () { + subtype.$super.init.apply(this, arguments); + }; + } + + // Initializer's prototype is the subtype object + subtype.init.prototype = subtype; + + // Reference supertype + subtype.$super = this; + + return subtype; + }, + + /** + * Extends this object and runs the init method. + * Arguments to create() will be passed to init(). + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var instance = MyType.create(); + */ + create: function () { + var instance = this.extend(); + instance.init.apply(instance, arguments); + + return instance; + }, + + /** + * Initializes a newly created object. + * Override this method to add some logic when your objects are created. + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * init: function () { + * // ... + * } + * }); + */ + init: function () { + }, + + /** + * Copies properties into this object. + * + * @param {Object} properties The properties to mix in. + * + * @example + * + * MyType.mixIn({ + * field: 'value' + * }); + */ + mixIn: function (properties) { + for (var propertyName in properties) { + if (properties.hasOwnProperty(propertyName)) { + this[propertyName] = properties[propertyName]; + } + } + + // IE won't copy toString using the loop above + if (properties.hasOwnProperty('toString')) { + this.toString = properties.toString; + } + }, + + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = instance.clone(); + */ + clone: function () { + return this.init.prototype.extend(this); + } + }; + }()); + + /** + * An array of 32-bit words. + * + * @property {Array} words The array of 32-bit words. + * @property {number} sigBytes The number of significant bytes in this word array. + */ + var WordArray = C_lib.WordArray = Base.extend({ + /** + * Initializes a newly created word array. + * + * @param {Array} words (Optional) An array of 32-bit words. + * @param {number} sigBytes (Optional) The number of significant bytes in the words. + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.create(); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6); + */ + init: function (words, sigBytes) { + words = this.words = words || []; + + if (sigBytes != undefined) { + this.sigBytes = sigBytes; + } else { + this.sigBytes = words.length * 4; + } + }, + + /** + * Converts this word array to a string. + * + * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex + * + * @return {string} The stringified word array. + * + * @example + * + * var string = wordArray + ''; + * var string = wordArray.toString(); + * var string = wordArray.toString(CryptoJS.enc.Utf8); + */ + toString: function (encoder) { + return (encoder || Hex).stringify(this); + }, + + /** + * Concatenates a word array to this word array. + * + * @param {WordArray} wordArray The word array to append. + * + * @return {WordArray} This word array. + * + * @example + * + * wordArray1.concat(wordArray2); + */ + concat: function (wordArray) { + // Shortcuts + var thisWords = this.words; + var thatWords = wordArray.words; + var thisSigBytes = this.sigBytes; + var thatSigBytes = wordArray.sigBytes; + + // Clamp excess bits + this.clamp(); + + // Concat + if (thisSigBytes % 4) { + // Copy one byte at a time + for (var i = 0; i < thatSigBytes; i++) { + var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8); + } + } else { + // Copy one word at a time + for (var i = 0; i < thatSigBytes; i += 4) { + thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2]; + } + } + this.sigBytes += thatSigBytes; + + // Chainable + return this; + }, + + /** + * Removes insignificant bits. + * + * @example + * + * wordArray.clamp(); + */ + clamp: function () { + // Shortcuts + var words = this.words; + var sigBytes = this.sigBytes; + + // Clamp + words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8); + words.length = Math.ceil(sigBytes / 4); + }, + + /** + * Creates a copy of this word array. + * + * @return {WordArray} The clone. + * + * @example + * + * var clone = wordArray.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone.words = this.words.slice(0); + + return clone; + }, + + /** + * Creates a word array filled with random bytes. + * + * @param {number} nBytes The number of random bytes to generate. + * + * @return {WordArray} The random word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.random(16); + */ + random: function (nBytes) { + var words = []; + + var r = (function (m_w) { + var m_w = m_w; + var m_z = 0x3ade68b1; + var mask = 0xffffffff; + + return function () { + m_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask; + m_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask; + var result = ((m_z << 0x10) + m_w) & mask; + result /= 0x100000000; + result += 0.5; + return result * (Math.random() > .5 ? 1 : -1); + } + }); + + for (var i = 0, rcache; i < nBytes; i += 4) { + var _r = r((rcache || Math.random()) * 0x100000000); + + rcache = _r() * 0x3ade67b7; + words.push((_r() * 0x100000000) | 0); + } + + return new WordArray.init(words, nBytes); + } + }); + + /** + * Encoder namespace. + */ + var C_enc = C.enc = {}; + + /** + * Hex encoding strategy. + */ + var Hex = C_enc.Hex = { + /** + * Converts a word array to a hex string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The hex string. + * + * @static + * + * @example + * + * var hexString = CryptoJS.enc.Hex.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var hexChars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + hexChars.push((bite >>> 4).toString(16)); + hexChars.push((bite & 0x0f).toString(16)); + } + + return hexChars.join(''); + }, + + /** + * Converts a hex string to a word array. + * + * @param {string} hexStr The hex string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Hex.parse(hexString); + */ + parse: function (hexStr) { + // Shortcut + var hexStrLength = hexStr.length; + + // Convert + var words = []; + for (var i = 0; i < hexStrLength; i += 2) { + words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4); + } + + return new WordArray.init(words, hexStrLength / 2); + } + }; + + /** + * Latin1 encoding strategy. + */ + var Latin1 = C_enc.Latin1 = { + /** + * Converts a word array to a Latin1 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Latin1 string. + * + * @static + * + * @example + * + * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var latin1Chars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + latin1Chars.push(String.fromCharCode(bite)); + } + + return latin1Chars.join(''); + }, + + /** + * Converts a Latin1 string to a word array. + * + * @param {string} latin1Str The Latin1 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Latin1.parse(latin1String); + */ + parse: function (latin1Str) { + // Shortcut + var latin1StrLength = latin1Str.length; + + // Convert + var words = []; + for (var i = 0; i < latin1StrLength; i++) { + words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8); + } + + return new WordArray.init(words, latin1StrLength); + } + }; + + /** + * UTF-8 encoding strategy. + */ + var Utf8 = C_enc.Utf8 = { + /** + * Converts a word array to a UTF-8 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-8 string. + * + * @static + * + * @example + * + * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray); + */ + stringify: function (wordArray) { + try { + return decodeURIComponent(escape(Latin1.stringify(wordArray))); + } catch (e) { + throw new Error('Malformed UTF-8 data'); + } + }, + + /** + * Converts a UTF-8 string to a word array. + * + * @param {string} utf8Str The UTF-8 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf8.parse(utf8String); + */ + parse: function (utf8Str) { + return Latin1.parse(unescape(encodeURIComponent(utf8Str))); + } + }; + + /** + * Abstract buffered block algorithm template. + * + * The property blockSize must be implemented in a concrete subtype. + * + * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0 + */ + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({ + /** + * Resets this block algorithm's data buffer to its initial state. + * + * @example + * + * bufferedBlockAlgorithm.reset(); + */ + reset: function () { + // Initial values + this._data = new WordArray.init(); + this._nDataBytes = 0; + }, + + /** + * Adds new data to this block algorithm's buffer. + * + * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8. + * + * @example + * + * bufferedBlockAlgorithm._append('data'); + * bufferedBlockAlgorithm._append(wordArray); + */ + _append: function (data) { + // Convert string to WordArray, else assume WordArray already + if (typeof data == 'string') { + data = Utf8.parse(data); + } + + // Append + this._data.concat(data); + this._nDataBytes += data.sigBytes; + }, + + /** + * Processes available data blocks. + * + * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype. + * + * @param {boolean} doFlush Whether all blocks and partial blocks should be processed. + * + * @return {WordArray} The processed data. + * + * @example + * + * var processedData = bufferedBlockAlgorithm._process(); + * var processedData = bufferedBlockAlgorithm._process(!!'flush'); + */ + _process: function (doFlush) { + // Shortcuts + var data = this._data; + var dataWords = data.words; + var dataSigBytes = data.sigBytes; + var blockSize = this.blockSize; + var blockSizeBytes = blockSize * 4; + + // Count blocks ready + var nBlocksReady = dataSigBytes / blockSizeBytes; + if (doFlush) { + // Round up to include partial blocks + nBlocksReady = Math.ceil(nBlocksReady); + } else { + // Round down to include only full blocks, + // less the number of blocks that must remain in the buffer + nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); + } + + // Count words ready + var nWordsReady = nBlocksReady * blockSize; + + // Count bytes ready + var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); + + // Process blocks + if (nWordsReady) { + for (var offset = 0; offset < nWordsReady; offset += blockSize) { + // Perform concrete-algorithm logic + this._doProcessBlock(dataWords, offset); + } + + // Remove processed words + var processedWords = dataWords.splice(0, nWordsReady); + data.sigBytes -= nBytesReady; + } + + // Return processed words + return new WordArray.init(processedWords, nBytesReady); + }, + + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = bufferedBlockAlgorithm.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone._data = this._data.clone(); + + return clone; + }, + + _minBufferSize: 0 + }); + + /** + * Abstract hasher template. + * + * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits) + */ + var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + */ + cfg: Base.extend(), + + /** + * Initializes a newly created hasher. + * + * @param {Object} cfg (Optional) The configuration options to use for this hash computation. + * + * @example + * + * var hasher = CryptoJS.algo.SHA256.create(); + */ + init: function (cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); + + // Set initial values + this.reset(); + }, + + /** + * Resets this hasher to its initial state. + * + * @example + * + * hasher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); + + // Perform concrete-hasher logic + this._doReset(); + }, + + /** + * Updates this hasher with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {Hasher} This hasher. + * + * @example + * + * hasher.update('message'); + * hasher.update(wordArray); + */ + update: function (messageUpdate) { + // Append + this._append(messageUpdate); + + // Update the hash + this._process(); + + // Chainable + return this; + }, + + /** + * Finalizes the hash computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The hash. + * + * @example + * + * var hash = hasher.finalize(); + * var hash = hasher.finalize('message'); + * var hash = hasher.finalize(wordArray); + */ + finalize: function (messageUpdate) { + // Final message update + if (messageUpdate) { + this._append(messageUpdate); + } + + // Perform concrete-hasher logic + var hash = this._doFinalize(); + + return hash; + }, + + blockSize: 512/32, + + /** + * Creates a shortcut function to a hasher's object interface. + * + * @param {Hasher} hasher The hasher to create a helper for. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256); + */ + _createHelper: function (hasher) { + return function (message, cfg) { + return new hasher.init(cfg).finalize(message); + }; + }, + + /** + * Creates a shortcut function to the HMAC's object interface. + * + * @param {Hasher} hasher The hasher to use in this HMAC helper. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256); + */ + _createHmacHelper: function (hasher) { + return function (message, key) { + return new C_algo.HMAC.init(hasher, key).finalize(message); + }; + } + }); + + /** + * Algorithm namespace. + */ + var C_algo = C.algo = {}; + + return C; + }(Math)); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + + /** + * Base64 encoding strategy. + */ + var Base64 = C_enc.Base64 = { + /** + * Converts a word array to a Base64 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Base64 string. + * + * @static + * + * @example + * + * var base64String = CryptoJS.enc.Base64.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + var map = this._map; + + // Clamp excess bits + wordArray.clamp(); + + // Convert + var base64Chars = []; + for (var i = 0; i < sigBytes; i += 3) { + var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; + var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; + + var triplet = (byte1 << 16) | (byte2 << 8) | byte3; + + for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { + base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); + } + } + + // Add padding + var paddingChar = map.charAt(64); + if (paddingChar) { + while (base64Chars.length % 4) { + base64Chars.push(paddingChar); + } + } + + return base64Chars.join(''); + }, + + /** + * Converts a Base64 string to a word array. + * + * @param {string} base64Str The Base64 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Base64.parse(base64String); + */ + parse: function (base64Str) { + // Shortcuts + var base64StrLength = base64Str.length; + var map = this._map; + var reverseMap = this._reverseMap; + + if (!reverseMap) { + reverseMap = this._reverseMap = []; + for (var j = 0; j < map.length; j++) { + reverseMap[map.charCodeAt(j)] = j; + } + } + + // Ignore padding + var paddingChar = map.charAt(64); + if (paddingChar) { + var paddingIndex = base64Str.indexOf(paddingChar); + if (paddingIndex !== -1) { + base64StrLength = paddingIndex; + } + } + + // Convert + return parseLoop(base64Str, base64StrLength, reverseMap); + + }, + + _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' + }; + + function parseLoop(base64Str, base64StrLength, reverseMap) { + var words = []; + var nBytes = 0; + for (var i = 0; i < base64StrLength; i++) { + if (i % 4) { + var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2); + var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2); + words[nBytes >>> 2] |= (bits1 | bits2) << (24 - (nBytes % 4) * 8); + nBytes++; + } + } + return WordArray.create(words, nBytes); + } + }()); + + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Constants table + var T = []; + + // Compute constants + (function () { + for (var i = 0; i < 64; i++) { + T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0; + } + }()); + + /** + * MD5 hash algorithm. + */ + var MD5 = C_algo.MD5 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0x67452301, 0xefcdab89, + 0x98badcfe, 0x10325476 + ]); + }, + + _doProcessBlock: function (M, offset) { + // Swap endian + for (var i = 0; i < 16; i++) { + // Shortcuts + var offset_i = offset + i; + var M_offset_i = M[offset_i]; + + M[offset_i] = ( + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ); + } + + // Shortcuts + var H = this._hash.words; + + var M_offset_0 = M[offset + 0]; + var M_offset_1 = M[offset + 1]; + var M_offset_2 = M[offset + 2]; + var M_offset_3 = M[offset + 3]; + var M_offset_4 = M[offset + 4]; + var M_offset_5 = M[offset + 5]; + var M_offset_6 = M[offset + 6]; + var M_offset_7 = M[offset + 7]; + var M_offset_8 = M[offset + 8]; + var M_offset_9 = M[offset + 9]; + var M_offset_10 = M[offset + 10]; + var M_offset_11 = M[offset + 11]; + var M_offset_12 = M[offset + 12]; + var M_offset_13 = M[offset + 13]; + var M_offset_14 = M[offset + 14]; + var M_offset_15 = M[offset + 15]; + + // Working varialbes + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + + // Computation + a = FF(a, b, c, d, M_offset_0, 7, T[0]); + d = FF(d, a, b, c, M_offset_1, 12, T[1]); + c = FF(c, d, a, b, M_offset_2, 17, T[2]); + b = FF(b, c, d, a, M_offset_3, 22, T[3]); + a = FF(a, b, c, d, M_offset_4, 7, T[4]); + d = FF(d, a, b, c, M_offset_5, 12, T[5]); + c = FF(c, d, a, b, M_offset_6, 17, T[6]); + b = FF(b, c, d, a, M_offset_7, 22, T[7]); + a = FF(a, b, c, d, M_offset_8, 7, T[8]); + d = FF(d, a, b, c, M_offset_9, 12, T[9]); + c = FF(c, d, a, b, M_offset_10, 17, T[10]); + b = FF(b, c, d, a, M_offset_11, 22, T[11]); + a = FF(a, b, c, d, M_offset_12, 7, T[12]); + d = FF(d, a, b, c, M_offset_13, 12, T[13]); + c = FF(c, d, a, b, M_offset_14, 17, T[14]); + b = FF(b, c, d, a, M_offset_15, 22, T[15]); + + a = GG(a, b, c, d, M_offset_1, 5, T[16]); + d = GG(d, a, b, c, M_offset_6, 9, T[17]); + c = GG(c, d, a, b, M_offset_11, 14, T[18]); + b = GG(b, c, d, a, M_offset_0, 20, T[19]); + a = GG(a, b, c, d, M_offset_5, 5, T[20]); + d = GG(d, a, b, c, M_offset_10, 9, T[21]); + c = GG(c, d, a, b, M_offset_15, 14, T[22]); + b = GG(b, c, d, a, M_offset_4, 20, T[23]); + a = GG(a, b, c, d, M_offset_9, 5, T[24]); + d = GG(d, a, b, c, M_offset_14, 9, T[25]); + c = GG(c, d, a, b, M_offset_3, 14, T[26]); + b = GG(b, c, d, a, M_offset_8, 20, T[27]); + a = GG(a, b, c, d, M_offset_13, 5, T[28]); + d = GG(d, a, b, c, M_offset_2, 9, T[29]); + c = GG(c, d, a, b, M_offset_7, 14, T[30]); + b = GG(b, c, d, a, M_offset_12, 20, T[31]); + + a = HH(a, b, c, d, M_offset_5, 4, T[32]); + d = HH(d, a, b, c, M_offset_8, 11, T[33]); + c = HH(c, d, a, b, M_offset_11, 16, T[34]); + b = HH(b, c, d, a, M_offset_14, 23, T[35]); + a = HH(a, b, c, d, M_offset_1, 4, T[36]); + d = HH(d, a, b, c, M_offset_4, 11, T[37]); + c = HH(c, d, a, b, M_offset_7, 16, T[38]); + b = HH(b, c, d, a, M_offset_10, 23, T[39]); + a = HH(a, b, c, d, M_offset_13, 4, T[40]); + d = HH(d, a, b, c, M_offset_0, 11, T[41]); + c = HH(c, d, a, b, M_offset_3, 16, T[42]); + b = HH(b, c, d, a, M_offset_6, 23, T[43]); + a = HH(a, b, c, d, M_offset_9, 4, T[44]); + d = HH(d, a, b, c, M_offset_12, 11, T[45]); + c = HH(c, d, a, b, M_offset_15, 16, T[46]); + b = HH(b, c, d, a, M_offset_2, 23, T[47]); + + a = II(a, b, c, d, M_offset_0, 6, T[48]); + d = II(d, a, b, c, M_offset_7, 10, T[49]); + c = II(c, d, a, b, M_offset_14, 15, T[50]); + b = II(b, c, d, a, M_offset_5, 21, T[51]); + a = II(a, b, c, d, M_offset_12, 6, T[52]); + d = II(d, a, b, c, M_offset_3, 10, T[53]); + c = II(c, d, a, b, M_offset_10, 15, T[54]); + b = II(b, c, d, a, M_offset_1, 21, T[55]); + a = II(a, b, c, d, M_offset_8, 6, T[56]); + d = II(d, a, b, c, M_offset_15, 10, T[57]); + c = II(c, d, a, b, M_offset_6, 15, T[58]); + b = II(b, c, d, a, M_offset_13, 21, T[59]); + a = II(a, b, c, d, M_offset_4, 6, T[60]); + d = II(d, a, b, c, M_offset_11, 10, T[61]); + c = II(c, d, a, b, M_offset_2, 15, T[62]); + b = II(b, c, d, a, M_offset_9, 21, T[63]); + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + + var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000); + var nBitsTotalL = nBitsTotal; + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = ( + (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) | + (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00) + ); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( + (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) | + (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00) + ); + + data.sigBytes = (dataWords.length + 1) * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var hash = this._hash; + var H = hash.words; + + // Swap endian + for (var i = 0; i < 4; i++) { + // Shortcut + var H_i = H[i]; + + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + } + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + function FF(a, b, c, d, x, s, t) { + var n = a + ((b & c) | (~b & d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function GG(a, b, c, d, x, s, t) { + var n = a + ((b & d) | (c & ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function HH(a, b, c, d, x, s, t) { + var n = a + (b ^ c ^ d) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function II(a, b, c, d, x, s, t) { + var n = a + (c ^ (b | ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.MD5('message'); + * var hash = CryptoJS.MD5(wordArray); + */ + C.MD5 = Hasher._createHelper(MD5); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacMD5(message, key); + */ + C.HmacMD5 = Hasher._createHmacHelper(MD5); + }(Math)); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Reusable object + var W = []; + + /** + * SHA-1 hash algorithm. + */ + var SHA1 = C_algo.SHA1 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0x67452301, 0xefcdab89, + 0x98badcfe, 0x10325476, + 0xc3d2e1f0 + ]); + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var H = this._hash.words; + + // Working variables + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + var e = H[4]; + + // Computation + for (var i = 0; i < 80; i++) { + if (i < 16) { + W[i] = M[offset + i] | 0; + } else { + var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]; + W[i] = (n << 1) | (n >>> 31); + } + + var t = ((a << 5) | (a >>> 27)) + e + W[i]; + if (i < 20) { + t += ((b & c) | (~b & d)) + 0x5a827999; + } else if (i < 40) { + t += (b ^ c ^ d) + 0x6ed9eba1; + } else if (i < 60) { + t += ((b & c) | (b & d) | (c & d)) - 0x70e44324; + } else /* if (i < 80) */ { + t += (b ^ c ^ d) - 0x359d3e2a; + } + + e = d; + d = c; + c = (b << 30) | (b >>> 2); + b = a; + a = t; + } + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + H[4] = (H[4] + e) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Return final computed hash + return this._hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA1('message'); + * var hash = CryptoJS.SHA1(wordArray); + */ + C.SHA1 = Hasher._createHelper(SHA1); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA1(message, key); + */ + C.HmacSHA1 = Hasher._createHmacHelper(SHA1); + }()); + + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Initialization and round constants tables + var H = []; + var K = []; + + // Compute constants + (function () { + function isPrime(n) { + var sqrtN = Math.sqrt(n); + for (var factor = 2; factor <= sqrtN; factor++) { + if (!(n % factor)) { + return false; + } + } + + return true; + } + + function getFractionalBits(n) { + return ((n - (n | 0)) * 0x100000000) | 0; + } + + var n = 2; + var nPrime = 0; + while (nPrime < 64) { + if (isPrime(n)) { + if (nPrime < 8) { + H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2)); + } + K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3)); + + nPrime++; + } + + n++; + } + }()); + + // Reusable object + var W = []; + + /** + * SHA-256 hash algorithm. + */ + var SHA256 = C_algo.SHA256 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init(H.slice(0)); + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var H = this._hash.words; + + // Working variables + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + var e = H[4]; + var f = H[5]; + var g = H[6]; + var h = H[7]; + + // Computation + for (var i = 0; i < 64; i++) { + if (i < 16) { + W[i] = M[offset + i] | 0; + } else { + var gamma0x = W[i - 15]; + var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^ + ((gamma0x << 14) | (gamma0x >>> 18)) ^ + (gamma0x >>> 3); + + var gamma1x = W[i - 2]; + var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^ + ((gamma1x << 13) | (gamma1x >>> 19)) ^ + (gamma1x >>> 10); + + W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; + } + + var ch = (e & f) ^ (~e & g); + var maj = (a & b) ^ (a & c) ^ (b & c); + + var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22)); + var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25)); + + var t1 = h + sigma1 + ch + K[i] + W[i]; + var t2 = sigma0 + maj; + + h = g; + g = f; + f = e; + e = (d + t1) | 0; + d = c; + c = b; + b = a; + a = (t1 + t2) | 0; + } + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + H[4] = (H[4] + e) | 0; + H[5] = (H[5] + f) | 0; + H[6] = (H[6] + g) | 0; + H[7] = (H[7] + h) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Return final computed hash + return this._hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA256('message'); + * var hash = CryptoJS.SHA256(wordArray); + */ + C.SHA256 = Hasher._createHelper(SHA256); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA256(message, key); + */ + C.HmacSHA256 = Hasher._createHmacHelper(SHA256); + }(Math)); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + + /** + * UTF-16 BE encoding strategy. + */ + var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = { + /** + * Converts a word array to a UTF-16 BE string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-16 BE string. + * + * @static + * + * @example + * + * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var utf16Chars = []; + for (var i = 0; i < sigBytes; i += 2) { + var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff; + utf16Chars.push(String.fromCharCode(codePoint)); + } + + return utf16Chars.join(''); + }, + + /** + * Converts a UTF-16 BE string to a word array. + * + * @param {string} utf16Str The UTF-16 BE string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf16.parse(utf16String); + */ + parse: function (utf16Str) { + // Shortcut + var utf16StrLength = utf16Str.length; + + // Convert + var words = []; + for (var i = 0; i < utf16StrLength; i++) { + words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16); + } + + return WordArray.create(words, utf16StrLength * 2); + } + }; + + /** + * UTF-16 LE encoding strategy. + */ + C_enc.Utf16LE = { + /** + * Converts a word array to a UTF-16 LE string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-16 LE string. + * + * @static + * + * @example + * + * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var utf16Chars = []; + for (var i = 0; i < sigBytes; i += 2) { + var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff); + utf16Chars.push(String.fromCharCode(codePoint)); + } + + return utf16Chars.join(''); + }, + + /** + * Converts a UTF-16 LE string to a word array. + * + * @param {string} utf16Str The UTF-16 LE string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str); + */ + parse: function (utf16Str) { + // Shortcut + var utf16StrLength = utf16Str.length; + + // Convert + var words = []; + for (var i = 0; i < utf16StrLength; i++) { + words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16)); + } + + return WordArray.create(words, utf16StrLength * 2); + } + }; + + function swapEndian(word) { + return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff); + } + }()); + + + (function () { + // Check if typed arrays are supported + if (typeof ArrayBuffer != 'function') { + return; + } + + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + + // Reference original init + var superInit = WordArray.init; + + // Augment WordArray.init to handle typed arrays + var subInit = WordArray.init = function (typedArray) { + // Convert buffers to uint8 + if (typedArray instanceof ArrayBuffer) { + typedArray = new Uint8Array(typedArray); + } + + // Convert other array views to uint8 + if ( + typedArray instanceof Int8Array || + (typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray) || + typedArray instanceof Int16Array || + typedArray instanceof Uint16Array || + typedArray instanceof Int32Array || + typedArray instanceof Uint32Array || + typedArray instanceof Float32Array || + typedArray instanceof Float64Array + ) { + typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); + } + + // Handle Uint8Array + if (typedArray instanceof Uint8Array) { + // Shortcut + var typedArrayByteLength = typedArray.byteLength; + + // Extract bytes + var words = []; + for (var i = 0; i < typedArrayByteLength; i++) { + words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8); + } + + // Initialize this word array + superInit.call(this, words, typedArrayByteLength); + } else { + // Else call normal init + superInit.apply(this, arguments); + } + }; + + subInit.prototype = WordArray; + }()); + + + /** @preserve + (c) 2012 by Cédric Mesnil. All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Constants table + var _zl = WordArray.create([ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, + 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, + 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, + 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]); + var _zr = WordArray.create([ + 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, + 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, + 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, + 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, + 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]); + var _sl = WordArray.create([ + 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, + 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, + 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, + 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, + 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]); + var _sr = WordArray.create([ + 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, + 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, + 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, + 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, + 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]); + + var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]); + var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]); + + /** + * RIPEMD160 hash algorithm. + */ + var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({ + _doReset: function () { + this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]); + }, + + _doProcessBlock: function (M, offset) { + + // Swap endian + for (var i = 0; i < 16; i++) { + // Shortcuts + var offset_i = offset + i; + var M_offset_i = M[offset_i]; + + // Swap + M[offset_i] = ( + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ); + } + // Shortcut + var H = this._hash.words; + var hl = _hl.words; + var hr = _hr.words; + var zl = _zl.words; + var zr = _zr.words; + var sl = _sl.words; + var sr = _sr.words; + + // Working variables + var al, bl, cl, dl, el; + var ar, br, cr, dr, er; + + ar = al = H[0]; + br = bl = H[1]; + cr = cl = H[2]; + dr = dl = H[3]; + er = el = H[4]; + // Computation + var t; + for (var i = 0; i < 80; i += 1) { + t = (al + M[offset+zl[i]])|0; + if (i<16){ + t += f1(bl,cl,dl) + hl[0]; + } else if (i<32) { + t += f2(bl,cl,dl) + hl[1]; + } else if (i<48) { + t += f3(bl,cl,dl) + hl[2]; + } else if (i<64) { + t += f4(bl,cl,dl) + hl[3]; + } else {// if (i<80) { + t += f5(bl,cl,dl) + hl[4]; + } + t = t|0; + t = rotl(t,sl[i]); + t = (t+el)|0; + al = el; + el = dl; + dl = rotl(cl, 10); + cl = bl; + bl = t; + + t = (ar + M[offset+zr[i]])|0; + if (i<16){ + t += f5(br,cr,dr) + hr[0]; + } else if (i<32) { + t += f4(br,cr,dr) + hr[1]; + } else if (i<48) { + t += f3(br,cr,dr) + hr[2]; + } else if (i<64) { + t += f2(br,cr,dr) + hr[3]; + } else {// if (i<80) { + t += f1(br,cr,dr) + hr[4]; + } + t = t|0; + t = rotl(t,sr[i]) ; + t = (t+er)|0; + ar = er; + er = dr; + dr = rotl(cr, 10); + cr = br; + br = t; + } + // Intermediate hash value + t = (H[1] + cl + dr)|0; + H[1] = (H[2] + dl + er)|0; + H[2] = (H[3] + el + ar)|0; + H[3] = (H[4] + al + br)|0; + H[4] = (H[0] + bl + cr)|0; + H[0] = t; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( + (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) | + (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00) + ); + data.sigBytes = (dataWords.length + 1) * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var hash = this._hash; + var H = hash.words; + + // Swap endian + for (var i = 0; i < 5; i++) { + // Shortcut + var H_i = H[i]; + + // Swap + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + } + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + + function f1(x, y, z) { + return ((x) ^ (y) ^ (z)); + + } + + function f2(x, y, z) { + return (((x)&(y)) | ((~x)&(z))); + } + + function f3(x, y, z) { + return (((x) | (~(y))) ^ (z)); + } + + function f4(x, y, z) { + return (((x) & (z)) | ((y)&(~(z)))); + } + + function f5(x, y, z) { + return ((x) ^ ((y) |(~(z)))); + + } + + function rotl(x,n) { + return (x<<n) | (x>>>(32-n)); + } + + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.RIPEMD160('message'); + * var hash = CryptoJS.RIPEMD160(wordArray); + */ + C.RIPEMD160 = Hasher._createHelper(RIPEMD160); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacRIPEMD160(message, key); + */ + C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160); + }(Math)); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var C_enc = C.enc; + var Utf8 = C_enc.Utf8; + var C_algo = C.algo; + + /** + * HMAC algorithm. + */ + var HMAC = C_algo.HMAC = Base.extend({ + /** + * Initializes a newly created HMAC. + * + * @param {Hasher} hasher The hash algorithm to use. + * @param {WordArray|string} key The secret key. + * + * @example + * + * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key); + */ + init: function (hasher, key) { + // Init hasher + hasher = this._hasher = new hasher.init(); + + // Convert string to WordArray, else assume WordArray already + if (typeof key == 'string') { + key = Utf8.parse(key); + } + + // Shortcuts + var hasherBlockSize = hasher.blockSize; + var hasherBlockSizeBytes = hasherBlockSize * 4; + + // Allow arbitrary length keys + if (key.sigBytes > hasherBlockSizeBytes) { + key = hasher.finalize(key); + } + + // Clamp excess bits + key.clamp(); + + // Clone key for inner and outer pads + var oKey = this._oKey = key.clone(); + var iKey = this._iKey = key.clone(); + + // Shortcuts + var oKeyWords = oKey.words; + var iKeyWords = iKey.words; + + // XOR keys with pad constants + for (var i = 0; i < hasherBlockSize; i++) { + oKeyWords[i] ^= 0x5c5c5c5c; + iKeyWords[i] ^= 0x36363636; + } + oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes; + + // Set initial values + this.reset(); + }, + + /** + * Resets this HMAC to its initial state. + * + * @example + * + * hmacHasher.reset(); + */ + reset: function () { + // Shortcut + var hasher = this._hasher; + + // Reset + hasher.reset(); + hasher.update(this._iKey); + }, + + /** + * Updates this HMAC with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {HMAC} This HMAC instance. + * + * @example + * + * hmacHasher.update('message'); + * hmacHasher.update(wordArray); + */ + update: function (messageUpdate) { + this._hasher.update(messageUpdate); + + // Chainable + return this; + }, + + /** + * Finalizes the HMAC computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The HMAC. + * + * @example + * + * var hmac = hmacHasher.finalize(); + * var hmac = hmacHasher.finalize('message'); + * var hmac = hmacHasher.finalize(wordArray); + */ + finalize: function (messageUpdate) { + // Shortcut + var hasher = this._hasher; + + // Compute HMAC + var innerHash = hasher.finalize(messageUpdate); + hasher.reset(); + var hmac = hasher.finalize(this._oKey.clone().concat(innerHash)); + + return hmac; + } + }); + }()); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var SHA1 = C_algo.SHA1; + var HMAC = C_algo.HMAC; + + /** + * Password-Based Key Derivation Function 2 algorithm. + */ + var PBKDF2 = C_algo.PBKDF2 = Base.extend({ + /** + * Configuration options. + * + * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) + * @property {Hasher} hasher The hasher to use. Default: SHA1 + * @property {number} iterations The number of iterations to perform. Default: 1 + */ + cfg: Base.extend({ + keySize: 128/32, + hasher: SHA1, + iterations: 1 + }), + + /** + * Initializes a newly created key derivation function. + * + * @param {Object} cfg (Optional) The configuration options to use for the derivation. + * + * @example + * + * var kdf = CryptoJS.algo.PBKDF2.create(); + * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 }); + * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 }); + */ + init: function (cfg) { + this.cfg = this.cfg.extend(cfg); + }, + + /** + * Computes the Password-Based Key Derivation Function 2. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * + * @return {WordArray} The derived key. + * + * @example + * + * var key = kdf.compute(password, salt); + */ + compute: function (password, salt) { + // Shortcut + var cfg = this.cfg; + + // Init HMAC + var hmac = HMAC.create(cfg.hasher, password); + + // Initial values + var derivedKey = WordArray.create(); + var blockIndex = WordArray.create([0x00000001]); + + // Shortcuts + var derivedKeyWords = derivedKey.words; + var blockIndexWords = blockIndex.words; + var keySize = cfg.keySize; + var iterations = cfg.iterations; + + // Generate key + while (derivedKeyWords.length < keySize) { + var block = hmac.update(salt).finalize(blockIndex); + hmac.reset(); + + // Shortcuts + var blockWords = block.words; + var blockWordsLength = blockWords.length; + + // Iterations + var intermediate = block; + for (var i = 1; i < iterations; i++) { + intermediate = hmac.finalize(intermediate); + hmac.reset(); + + // Shortcut + var intermediateWords = intermediate.words; + + // XOR intermediate with block + for (var j = 0; j < blockWordsLength; j++) { + blockWords[j] ^= intermediateWords[j]; + } + } + + derivedKey.concat(block); + blockIndexWords[0]++; + } + derivedKey.sigBytes = keySize * 4; + + return derivedKey; + } + }); + + /** + * Computes the Password-Based Key Derivation Function 2. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * @param {Object} cfg (Optional) The configuration options to use for this computation. + * + * @return {WordArray} The derived key. + * + * @static + * + * @example + * + * var key = CryptoJS.PBKDF2(password, salt); + * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 }); + * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 }); + */ + C.PBKDF2 = function (password, salt, cfg) { + return PBKDF2.create(cfg).compute(password, salt); + }; + }()); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var MD5 = C_algo.MD5; + + /** + * This key derivation function is meant to conform with EVP_BytesToKey. + * www.openssl.org/docs/crypto/EVP_BytesToKey.html + */ + var EvpKDF = C_algo.EvpKDF = Base.extend({ + /** + * Configuration options. + * + * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) + * @property {Hasher} hasher The hash algorithm to use. Default: MD5 + * @property {number} iterations The number of iterations to perform. Default: 1 + */ + cfg: Base.extend({ + keySize: 128/32, + hasher: MD5, + iterations: 1 + }), + + /** + * Initializes a newly created key derivation function. + * + * @param {Object} cfg (Optional) The configuration options to use for the derivation. + * + * @example + * + * var kdf = CryptoJS.algo.EvpKDF.create(); + * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 }); + * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 }); + */ + init: function (cfg) { + this.cfg = this.cfg.extend(cfg); + }, + + /** + * Derives a key from a password. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * + * @return {WordArray} The derived key. + * + * @example + * + * var key = kdf.compute(password, salt); + */ + compute: function (password, salt) { + // Shortcut + var cfg = this.cfg; + + // Init hasher + var hasher = cfg.hasher.create(); + + // Initial values + var derivedKey = WordArray.create(); + + // Shortcuts + var derivedKeyWords = derivedKey.words; + var keySize = cfg.keySize; + var iterations = cfg.iterations; + + // Generate key + while (derivedKeyWords.length < keySize) { + if (block) { + hasher.update(block); + } + var block = hasher.update(password).finalize(salt); + hasher.reset(); + + // Iterations + for (var i = 1; i < iterations; i++) { + block = hasher.finalize(block); + hasher.reset(); + } + + derivedKey.concat(block); + } + derivedKey.sigBytes = keySize * 4; + + return derivedKey; + } + }); + + /** + * Derives a key from a password. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * @param {Object} cfg (Optional) The configuration options to use for this computation. + * + * @return {WordArray} The derived key. + * + * @static + * + * @example + * + * var key = CryptoJS.EvpKDF(password, salt); + * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 }); + * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 }); + */ + C.EvpKDF = function (password, salt, cfg) { + return EvpKDF.create(cfg).compute(password, salt); + }; + }()); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var SHA256 = C_algo.SHA256; + + /** + * SHA-224 hash algorithm. + */ + var SHA224 = C_algo.SHA224 = SHA256.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, + 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 + ]); + }, + + _doFinalize: function () { + var hash = SHA256._doFinalize.call(this); + + hash.sigBytes -= 4; + + return hash; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA224('message'); + * var hash = CryptoJS.SHA224(wordArray); + */ + C.SHA224 = SHA256._createHelper(SHA224); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA224(message, key); + */ + C.HmacSHA224 = SHA256._createHmacHelper(SHA224); + }()); + + + (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var X32WordArray = C_lib.WordArray; + + /** + * x64 namespace. + */ + var C_x64 = C.x64 = {}; + + /** + * A 64-bit word. + */ + var X64Word = C_x64.Word = Base.extend({ + /** + * Initializes a newly created 64-bit word. + * + * @param {number} high The high 32 bits. + * @param {number} low The low 32 bits. + * + * @example + * + * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607); + */ + init: function (high, low) { + this.high = high; + this.low = low; + } + + /** + * Bitwise NOTs this word. + * + * @return {X64Word} A new x64-Word object after negating. + * + * @example + * + * var negated = x64Word.not(); + */ + // not: function () { + // var high = ~this.high; + // var low = ~this.low; + + // return X64Word.create(high, low); + // }, + + /** + * Bitwise ANDs this word with the passed word. + * + * @param {X64Word} word The x64-Word to AND with this word. + * + * @return {X64Word} A new x64-Word object after ANDing. + * + * @example + * + * var anded = x64Word.and(anotherX64Word); + */ + // and: function (word) { + // var high = this.high & word.high; + // var low = this.low & word.low; + + // return X64Word.create(high, low); + // }, + + /** + * Bitwise ORs this word with the passed word. + * + * @param {X64Word} word The x64-Word to OR with this word. + * + * @return {X64Word} A new x64-Word object after ORing. + * + * @example + * + * var ored = x64Word.or(anotherX64Word); + */ + // or: function (word) { + // var high = this.high | word.high; + // var low = this.low | word.low; + + // return X64Word.create(high, low); + // }, + + /** + * Bitwise XORs this word with the passed word. + * + * @param {X64Word} word The x64-Word to XOR with this word. + * + * @return {X64Word} A new x64-Word object after XORing. + * + * @example + * + * var xored = x64Word.xor(anotherX64Word); + */ + // xor: function (word) { + // var high = this.high ^ word.high; + // var low = this.low ^ word.low; + + // return X64Word.create(high, low); + // }, + + /** + * Shifts this word n bits to the left. + * + * @param {number} n The number of bits to shift. + * + * @return {X64Word} A new x64-Word object after shifting. + * + * @example + * + * var shifted = x64Word.shiftL(25); + */ + // shiftL: function (n) { + // if (n < 32) { + // var high = (this.high << n) | (this.low >>> (32 - n)); + // var low = this.low << n; + // } else { + // var high = this.low << (n - 32); + // var low = 0; + // } + + // return X64Word.create(high, low); + // }, + + /** + * Shifts this word n bits to the right. + * + * @param {number} n The number of bits to shift. + * + * @return {X64Word} A new x64-Word object after shifting. + * + * @example + * + * var shifted = x64Word.shiftR(7); + */ + // shiftR: function (n) { + // if (n < 32) { + // var low = (this.low >>> n) | (this.high << (32 - n)); + // var high = this.high >>> n; + // } else { + // var low = this.high >>> (n - 32); + // var high = 0; + // } + + // return X64Word.create(high, low); + // }, + + /** + * Rotates this word n bits to the left. + * + * @param {number} n The number of bits to rotate. + * + * @return {X64Word} A new x64-Word object after rotating. + * + * @example + * + * var rotated = x64Word.rotL(25); + */ + // rotL: function (n) { + // return this.shiftL(n).or(this.shiftR(64 - n)); + // }, + + /** + * Rotates this word n bits to the right. + * + * @param {number} n The number of bits to rotate. + * + * @return {X64Word} A new x64-Word object after rotating. + * + * @example + * + * var rotated = x64Word.rotR(7); + */ + // rotR: function (n) { + // return this.shiftR(n).or(this.shiftL(64 - n)); + // }, + + /** + * Adds this word with the passed word. + * + * @param {X64Word} word The x64-Word to add with this word. + * + * @return {X64Word} A new x64-Word object after adding. + * + * @example + * + * var added = x64Word.add(anotherX64Word); + */ + // add: function (word) { + // var low = (this.low + word.low) | 0; + // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0; + // var high = (this.high + word.high + carry) | 0; + + // return X64Word.create(high, low); + // } + }); + + /** + * An array of 64-bit words. + * + * @property {Array} words The array of CryptoJS.x64.Word objects. + * @property {number} sigBytes The number of significant bytes in this word array. + */ + var X64WordArray = C_x64.WordArray = Base.extend({ + /** + * Initializes a newly created word array. + * + * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects. + * @param {number} sigBytes (Optional) The number of significant bytes in the words. + * + * @example + * + * var wordArray = CryptoJS.x64.WordArray.create(); + * + * var wordArray = CryptoJS.x64.WordArray.create([ + * CryptoJS.x64.Word.create(0x00010203, 0x04050607), + * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) + * ]); + * + * var wordArray = CryptoJS.x64.WordArray.create([ + * CryptoJS.x64.Word.create(0x00010203, 0x04050607), + * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) + * ], 10); + */ + init: function (words, sigBytes) { + words = this.words = words || []; + + if (sigBytes != undefined) { + this.sigBytes = sigBytes; + } else { + this.sigBytes = words.length * 8; + } + }, + + /** + * Converts this 64-bit word array to a 32-bit word array. + * + * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array. + * + * @example + * + * var x32WordArray = x64WordArray.toX32(); + */ + toX32: function () { + // Shortcuts + var x64Words = this.words; + var x64WordsLength = x64Words.length; + + // Convert + var x32Words = []; + for (var i = 0; i < x64WordsLength; i++) { + var x64Word = x64Words[i]; + x32Words.push(x64Word.high); + x32Words.push(x64Word.low); + } + + return X32WordArray.create(x32Words, this.sigBytes); + }, + + /** + * Creates a copy of this word array. + * + * @return {X64WordArray} The clone. + * + * @example + * + * var clone = x64WordArray.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + + // Clone "words" array + var words = clone.words = this.words.slice(0); + + // Clone each X64Word object + var wordsLength = words.length; + for (var i = 0; i < wordsLength; i++) { + words[i] = words[i].clone(); + } + + return clone; + } + }); + }()); + + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var C_algo = C.algo; + + // Constants tables + var RHO_OFFSETS = []; + var PI_INDEXES = []; + var ROUND_CONSTANTS = []; + + // Compute Constants + (function () { + // Compute rho offset constants + var x = 1, y = 0; + for (var t = 0; t < 24; t++) { + RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64; + + var newX = y % 5; + var newY = (2 * x + 3 * y) % 5; + x = newX; + y = newY; + } + + // Compute pi index constants + for (var x = 0; x < 5; x++) { + for (var y = 0; y < 5; y++) { + PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5; + } + } + + // Compute round constants + var LFSR = 0x01; + for (var i = 0; i < 24; i++) { + var roundConstantMsw = 0; + var roundConstantLsw = 0; + + for (var j = 0; j < 7; j++) { + if (LFSR & 0x01) { + var bitPosition = (1 << j) - 1; + if (bitPosition < 32) { + roundConstantLsw ^= 1 << bitPosition; + } else /* if (bitPosition >= 32) */ { + roundConstantMsw ^= 1 << (bitPosition - 32); + } + } + + // Compute next LFSR + if (LFSR & 0x80) { + // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1 + LFSR = (LFSR << 1) ^ 0x71; + } else { + LFSR <<= 1; + } + } + + ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw); + } + }()); + + // Reusable objects for temporary values + var T = []; + (function () { + for (var i = 0; i < 25; i++) { + T[i] = X64Word.create(); + } + }()); + + /** + * SHA-3 hash algorithm. + */ + var SHA3 = C_algo.SHA3 = Hasher.extend({ + /** + * Configuration options. + * + * @property {number} outputLength + * The desired number of bits in the output hash. + * Only values permitted are: 224, 256, 384, 512. + * Default: 512 + */ + cfg: Hasher.cfg.extend({ + outputLength: 512 + }), + + _doReset: function () { + var state = this._state = [] + for (var i = 0; i < 25; i++) { + state[i] = new X64Word.init(); + } + + this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32; + }, + + _doProcessBlock: function (M, offset) { + // Shortcuts + var state = this._state; + var nBlockSizeLanes = this.blockSize / 2; + + // Absorb + for (var i = 0; i < nBlockSizeLanes; i++) { + // Shortcuts + var M2i = M[offset + 2 * i]; + var M2i1 = M[offset + 2 * i + 1]; + + // Swap endian + M2i = ( + (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) | + (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00) + ); + M2i1 = ( + (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) | + (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00) + ); + + // Absorb message into state + var lane = state[i]; + lane.high ^= M2i1; + lane.low ^= M2i; + } + + // Rounds + for (var round = 0; round < 24; round++) { + // Theta + for (var x = 0; x < 5; x++) { + // Mix column lanes + var tMsw = 0, tLsw = 0; + for (var y = 0; y < 5; y++) { + var lane = state[x + 5 * y]; + tMsw ^= lane.high; + tLsw ^= lane.low; + } + + // Temporary values + var Tx = T[x]; + Tx.high = tMsw; + Tx.low = tLsw; + } + for (var x = 0; x < 5; x++) { + // Shortcuts + var Tx4 = T[(x + 4) % 5]; + var Tx1 = T[(x + 1) % 5]; + var Tx1Msw = Tx1.high; + var Tx1Lsw = Tx1.low; + + // Mix surrounding columns + var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31)); + var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31)); + for (var y = 0; y < 5; y++) { + var lane = state[x + 5 * y]; + lane.high ^= tMsw; + lane.low ^= tLsw; + } + } + + // Rho Pi + for (var laneIndex = 1; laneIndex < 25; laneIndex++) { + // Shortcuts + var lane = state[laneIndex]; + var laneMsw = lane.high; + var laneLsw = lane.low; + var rhoOffset = RHO_OFFSETS[laneIndex]; + + // Rotate lanes + if (rhoOffset < 32) { + var tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset)); + var tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset)); + } else /* if (rhoOffset >= 32) */ { + var tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset)); + var tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset)); + } + + // Transpose lanes + var TPiLane = T[PI_INDEXES[laneIndex]]; + TPiLane.high = tMsw; + TPiLane.low = tLsw; + } + + // Rho pi at x = y = 0 + var T0 = T[0]; + var state0 = state[0]; + T0.high = state0.high; + T0.low = state0.low; + + // Chi + for (var x = 0; x < 5; x++) { + for (var y = 0; y < 5; y++) { + // Shortcuts + var laneIndex = x + 5 * y; + var lane = state[laneIndex]; + var TLane = T[laneIndex]; + var Tx1Lane = T[((x + 1) % 5) + 5 * y]; + var Tx2Lane = T[((x + 2) % 5) + 5 * y]; + + // Mix rows + lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high); + lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low); + } + } + + // Iota + var lane = state[0]; + var roundConstant = ROUND_CONSTANTS[round]; + lane.high ^= roundConstant.high; + lane.low ^= roundConstant.low;; + } + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + var blockSizeBits = this.blockSize * 32; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32); + dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var state = this._state; + var outputLengthBytes = this.cfg.outputLength / 8; + var outputLengthLanes = outputLengthBytes / 8; + + // Squeeze + var hashWords = []; + for (var i = 0; i < outputLengthLanes; i++) { + // Shortcuts + var lane = state[i]; + var laneMsw = lane.high; + var laneLsw = lane.low; + + // Swap endian + laneMsw = ( + (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) | + (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00) + ); + laneLsw = ( + (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) | + (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00) + ); + + // Squeeze state to retrieve hash + hashWords.push(laneLsw); + hashWords.push(laneMsw); + } + + // Return final computed hash + return new WordArray.init(hashWords, outputLengthBytes); + }, + + clone: function () { + var clone = Hasher.clone.call(this); + + var state = clone._state = this._state.slice(0); + for (var i = 0; i < 25; i++) { + state[i] = state[i].clone(); + } + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA3('message'); + * var hash = CryptoJS.SHA3(wordArray); + */ + C.SHA3 = Hasher._createHelper(SHA3); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA3(message, key); + */ + C.HmacSHA3 = Hasher._createHmacHelper(SHA3); + }(Math)); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Hasher = C_lib.Hasher; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var X64WordArray = C_x64.WordArray; + var C_algo = C.algo; + + function X64Word_create() { + return X64Word.create.apply(X64Word, arguments); + } + + // Constants + var K = [ + X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd), + X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc), + X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019), + X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118), + X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe), + X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2), + X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1), + X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694), + X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3), + X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65), + X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483), + X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5), + X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210), + X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4), + X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725), + X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70), + X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926), + X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df), + X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8), + X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b), + X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001), + X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30), + X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910), + X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8), + X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53), + X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8), + X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb), + X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3), + X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60), + X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec), + X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9), + X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b), + X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207), + X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178), + X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6), + X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b), + X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493), + X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c), + X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a), + X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817) + ]; + + // Reusable objects + var W = []; + (function () { + for (var i = 0; i < 80; i++) { + W[i] = X64Word_create(); + } + }()); + + /** + * SHA-512 hash algorithm. + */ + var SHA512 = C_algo.SHA512 = Hasher.extend({ + _doReset: function () { + this._hash = new X64WordArray.init([ + new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b), + new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1), + new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f), + new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179) + ]); + }, + + _doProcessBlock: function (M, offset) { + // Shortcuts + var H = this._hash.words; + + var H0 = H[0]; + var H1 = H[1]; + var H2 = H[2]; + var H3 = H[3]; + var H4 = H[4]; + var H5 = H[5]; + var H6 = H[6]; + var H7 = H[7]; + + var H0h = H0.high; + var H0l = H0.low; + var H1h = H1.high; + var H1l = H1.low; + var H2h = H2.high; + var H2l = H2.low; + var H3h = H3.high; + var H3l = H3.low; + var H4h = H4.high; + var H4l = H4.low; + var H5h = H5.high; + var H5l = H5.low; + var H6h = H6.high; + var H6l = H6.low; + var H7h = H7.high; + var H7l = H7.low; + + // Working variables + var ah = H0h; + var al = H0l; + var bh = H1h; + var bl = H1l; + var ch = H2h; + var cl = H2l; + var dh = H3h; + var dl = H3l; + var eh = H4h; + var el = H4l; + var fh = H5h; + var fl = H5l; + var gh = H6h; + var gl = H6l; + var hh = H7h; + var hl = H7l; + + // Rounds + for (var i = 0; i < 80; i++) { + // Shortcut + var Wi = W[i]; + + // Extend message + if (i < 16) { + var Wih = Wi.high = M[offset + i * 2] | 0; + var Wil = Wi.low = M[offset + i * 2 + 1] | 0; + } else { + // Gamma0 + var gamma0x = W[i - 15]; + var gamma0xh = gamma0x.high; + var gamma0xl = gamma0x.low; + var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7); + var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25)); + + // Gamma1 + var gamma1x = W[i - 2]; + var gamma1xh = gamma1x.high; + var gamma1xl = gamma1x.low; + var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6); + var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26)); + + // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] + var Wi7 = W[i - 7]; + var Wi7h = Wi7.high; + var Wi7l = Wi7.low; + + var Wi16 = W[i - 16]; + var Wi16h = Wi16.high; + var Wi16l = Wi16.low; + + var Wil = gamma0l + Wi7l; + var Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0); + var Wil = Wil + gamma1l; + var Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0); + var Wil = Wil + Wi16l; + var Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0); + + Wi.high = Wih; + Wi.low = Wil; + } + + var chh = (eh & fh) ^ (~eh & gh); + var chl = (el & fl) ^ (~el & gl); + var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch); + var majl = (al & bl) ^ (al & cl) ^ (bl & cl); + + var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7)); + var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7)); + var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9)); + var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9)); + + // t1 = h + sigma1 + ch + K[i] + W[i] + var Ki = K[i]; + var Kih = Ki.high; + var Kil = Ki.low; + + var t1l = hl + sigma1l; + var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0); + var t1l = t1l + chl; + var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0); + var t1l = t1l + Kil; + var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0); + var t1l = t1l + Wil; + var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0); + + // t2 = sigma0 + maj + var t2l = sigma0l + majl; + var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0); + + // Update working variables + hh = gh; + hl = gl; + gh = fh; + gl = fl; + fh = eh; + fl = el; + el = (dl + t1l) | 0; + eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0; + dh = ch; + dl = cl; + ch = bh; + cl = bl; + bh = ah; + bl = al; + al = (t1l + t2l) | 0; + ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0; + } + + // Intermediate hash value + H0l = H0.low = (H0l + al); + H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0)); + H1l = H1.low = (H1l + bl); + H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0)); + H2l = H2.low = (H2l + cl); + H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0)); + H3l = H3.low = (H3l + dl); + H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0)); + H4l = H4.low = (H4l + el); + H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0)); + H5l = H5.low = (H5l + fl); + H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0)); + H6l = H6.low = (H6l + gl); + H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0)); + H7l = H7.low = (H7l + hl); + H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0)); + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Convert hash to 32-bit word array before returning + var hash = this._hash.toX32(); + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + }, + + blockSize: 1024/32 + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA512('message'); + * var hash = CryptoJS.SHA512(wordArray); + */ + C.SHA512 = Hasher._createHelper(SHA512); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA512(message, key); + */ + C.HmacSHA512 = Hasher._createHmacHelper(SHA512); + }()); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var X64WordArray = C_x64.WordArray; + var C_algo = C.algo; + var SHA512 = C_algo.SHA512; + + /** + * SHA-384 hash algorithm. + */ + var SHA384 = C_algo.SHA384 = SHA512.extend({ + _doReset: function () { + this._hash = new X64WordArray.init([ + new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507), + new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939), + new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511), + new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4) + ]); + }, + + _doFinalize: function () { + var hash = SHA512._doFinalize.call(this); + + hash.sigBytes -= 16; + + return hash; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA384('message'); + * var hash = CryptoJS.SHA384(wordArray); + */ + C.SHA384 = SHA512._createHelper(SHA384); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA384(message, key); + */ + C.HmacSHA384 = SHA512._createHmacHelper(SHA384); + }()); + + + /** + * Cipher core components. + */ + CryptoJS.lib.Cipher || (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm; + var C_enc = C.enc; + var Utf8 = C_enc.Utf8; + var Base64 = C_enc.Base64; + var C_algo = C.algo; + var EvpKDF = C_algo.EvpKDF; + + /** + * Abstract base cipher template. + * + * @property {number} keySize This cipher's key size. Default: 4 (128 bits) + * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits) + * @property {number} _ENC_XFORM_MODE A constant representing encryption mode. + * @property {number} _DEC_XFORM_MODE A constant representing decryption mode. + */ + var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + * + * @property {WordArray} iv The IV to use for this operation. + */ + cfg: Base.extend(), + + /** + * Creates this cipher in encryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray }); + */ + createEncryptor: function (key, cfg) { + return this.create(this._ENC_XFORM_MODE, key, cfg); + }, + + /** + * Creates this cipher in decryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray }); + */ + createDecryptor: function (key, cfg) { + return this.create(this._DEC_XFORM_MODE, key, cfg); + }, + + /** + * Initializes a newly created cipher. + * + * @param {number} xformMode Either the encryption or decryption transormation mode constant. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @example + * + * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray }); + */ + init: function (xformMode, key, cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); + + // Store transform mode and key + this._xformMode = xformMode; + this._key = key; + + // Set initial values + this.reset(); + }, + + /** + * Resets this cipher to its initial state. + * + * @example + * + * cipher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); + + // Perform concrete-cipher logic + this._doReset(); + }, + + /** + * Adds data to be encrypted or decrypted. + * + * @param {WordArray|string} dataUpdate The data to encrypt or decrypt. + * + * @return {WordArray} The data after processing. + * + * @example + * + * var encrypted = cipher.process('data'); + * var encrypted = cipher.process(wordArray); + */ + process: function (dataUpdate) { + // Append + this._append(dataUpdate); + + // Process available blocks + return this._process(); + }, + + /** + * Finalizes the encryption or decryption process. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt. + * + * @return {WordArray} The data after final processing. + * + * @example + * + * var encrypted = cipher.finalize(); + * var encrypted = cipher.finalize('data'); + * var encrypted = cipher.finalize(wordArray); + */ + finalize: function (dataUpdate) { + // Final data update + if (dataUpdate) { + this._append(dataUpdate); + } + + // Perform concrete-cipher logic + var finalProcessedData = this._doFinalize(); + + return finalProcessedData; + }, + + keySize: 128/32, + + ivSize: 128/32, + + _ENC_XFORM_MODE: 1, + + _DEC_XFORM_MODE: 2, + + /** + * Creates shortcut functions to a cipher's object interface. + * + * @param {Cipher} cipher The cipher to create a helper for. + * + * @return {Object} An object with encrypt and decrypt shortcut functions. + * + * @static + * + * @example + * + * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES); + */ + _createHelper: (function () { + function selectCipherStrategy(key) { + if (typeof key == 'string') { + return PasswordBasedCipher; + } else { + return SerializableCipher; + } + } + + return function (cipher) { + return { + encrypt: function (message, key, cfg) { + return selectCipherStrategy(key).encrypt(cipher, message, key, cfg); + }, + + decrypt: function (ciphertext, key, cfg) { + return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg); + } + }; + }; + }()) + }); + + /** + * Abstract base stream cipher template. + * + * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits) + */ + var StreamCipher = C_lib.StreamCipher = Cipher.extend({ + _doFinalize: function () { + // Process partial blocks + var finalProcessedBlocks = this._process(!!'flush'); + + return finalProcessedBlocks; + }, + + blockSize: 1 + }); + + /** + * Mode namespace. + */ + var C_mode = C.mode = {}; + + /** + * Abstract base block cipher mode template. + */ + var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({ + /** + * Creates this mode for encryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words); + */ + createEncryptor: function (cipher, iv) { + return this.Encryptor.create(cipher, iv); + }, + + /** + * Creates this mode for decryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words); + */ + createDecryptor: function (cipher, iv) { + return this.Decryptor.create(cipher, iv); + }, + + /** + * Initializes a newly created mode. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @example + * + * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words); + */ + init: function (cipher, iv) { + this._cipher = cipher; + this._iv = iv; + } + }); + + /** + * Cipher Block Chaining mode. + */ + var CBC = C_mode.CBC = (function () { + /** + * Abstract base CBC mode. + */ + var CBC = BlockCipherMode.extend(); + + /** + * CBC encryptor. + */ + CBC.Encryptor = CBC.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // XOR and encrypt + xorBlock.call(this, words, offset, blockSize); + cipher.encryptBlock(words, offset); + + // Remember this block to use with next block + this._prevBlock = words.slice(offset, offset + blockSize); + } + }); + + /** + * CBC decryptor. + */ + CBC.Decryptor = CBC.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // Remember this block to use with next block + var thisBlock = words.slice(offset, offset + blockSize); + + // Decrypt and XOR + cipher.decryptBlock(words, offset); + xorBlock.call(this, words, offset, blockSize); + + // This block becomes the previous block + this._prevBlock = thisBlock; + } + }); + + function xorBlock(words, offset, blockSize) { + // Shortcut + var iv = this._iv; + + // Choose mixing block + if (iv) { + var block = iv; + + // Remove IV for subsequent blocks + this._iv = undefined; + } else { + var block = this._prevBlock; + } + + // XOR blocks + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= block[i]; + } + } + + return CBC; + }()); + + /** + * Padding namespace. + */ + var C_pad = C.pad = {}; + + /** + * PKCS #5/7 padding strategy. + */ + var Pkcs7 = C_pad.Pkcs7 = { + /** + * Pads data using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to pad. + * @param {number} blockSize The multiple that the data should be padded to. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.pad(wordArray, 4); + */ + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; + + // Create padding word + var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes; + + // Create padding + var paddingWords = []; + for (var i = 0; i < nPaddingBytes; i += 4) { + paddingWords.push(paddingWord); + } + var padding = WordArray.create(paddingWords, nPaddingBytes); + + // Add padding + data.concat(padding); + }, + + /** + * Unpads data that had been padded using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to unpad. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.unpad(wordArray); + */ + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + /** + * Abstract base block cipher template. + * + * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits) + */ + var BlockCipher = C_lib.BlockCipher = Cipher.extend({ + /** + * Configuration options. + * + * @property {Mode} mode The block mode to use. Default: CBC + * @property {Padding} padding The padding strategy to use. Default: Pkcs7 + */ + cfg: Cipher.cfg.extend({ + mode: CBC, + padding: Pkcs7 + }), + + reset: function () { + // Reset cipher + Cipher.reset.call(this); + + // Shortcuts + var cfg = this.cfg; + var iv = cfg.iv; + var mode = cfg.mode; + + // Reset block mode + if (this._xformMode == this._ENC_XFORM_MODE) { + var modeCreator = mode.createEncryptor; + } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { + var modeCreator = mode.createDecryptor; + // Keep at least one block in the buffer for unpadding + this._minBufferSize = 1; + } + + if (this._mode && this._mode.__creator == modeCreator) { + this._mode.init(this, iv && iv.words); + } else { + this._mode = modeCreator.call(mode, this, iv && iv.words); + this._mode.__creator = modeCreator; + } + }, + + _doProcessBlock: function (words, offset) { + this._mode.processBlock(words, offset); + }, + + _doFinalize: function () { + // Shortcut + var padding = this.cfg.padding; + + // Finalize + if (this._xformMode == this._ENC_XFORM_MODE) { + // Pad data + padding.pad(this._data, this.blockSize); + + // Process final blocks + var finalProcessedBlocks = this._process(!!'flush'); + } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { + // Process final blocks + var finalProcessedBlocks = this._process(!!'flush'); + + // Unpad data + padding.unpad(finalProcessedBlocks); + } + + return finalProcessedBlocks; + }, + + blockSize: 128/32 + }); + + /** + * A collection of cipher parameters. + * + * @property {WordArray} ciphertext The raw ciphertext. + * @property {WordArray} key The key to this ciphertext. + * @property {WordArray} iv The IV used in the ciphering operation. + * @property {WordArray} salt The salt used with a key derivation function. + * @property {Cipher} algorithm The cipher algorithm. + * @property {Mode} mode The block mode used in the ciphering operation. + * @property {Padding} padding The padding scheme used in the ciphering operation. + * @property {number} blockSize The block size of the cipher. + * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string. + */ + var CipherParams = C_lib.CipherParams = Base.extend({ + /** + * Initializes a newly created cipher params object. + * + * @param {Object} cipherParams An object with any of the possible cipher parameters. + * + * @example + * + * var cipherParams = CryptoJS.lib.CipherParams.create({ + * ciphertext: ciphertextWordArray, + * key: keyWordArray, + * iv: ivWordArray, + * salt: saltWordArray, + * algorithm: CryptoJS.algo.AES, + * mode: CryptoJS.mode.CBC, + * padding: CryptoJS.pad.PKCS7, + * blockSize: 4, + * formatter: CryptoJS.format.OpenSSL + * }); + */ + init: function (cipherParams) { + this.mixIn(cipherParams); + }, + + /** + * Converts this cipher params object to a string. + * + * @param {Format} formatter (Optional) The formatting strategy to use. + * + * @return {string} The stringified cipher params. + * + * @throws Error If neither the formatter nor the default formatter is set. + * + * @example + * + * var string = cipherParams + ''; + * var string = cipherParams.toString(); + * var string = cipherParams.toString(CryptoJS.format.OpenSSL); + */ + toString: function (formatter) { + return (formatter || this.formatter).stringify(this); + } + }); + + /** + * Format namespace. + */ + var C_format = C.format = {}; + + /** + * OpenSSL formatting strategy. + */ + var OpenSSLFormatter = C_format.OpenSSL = { + /** + * Converts a cipher params object to an OpenSSL-compatible string. + * + * @param {CipherParams} cipherParams The cipher params object. + * + * @return {string} The OpenSSL-compatible string. + * + * @static + * + * @example + * + * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams); + */ + stringify: function (cipherParams) { + // Shortcuts + var ciphertext = cipherParams.ciphertext; + var salt = cipherParams.salt; + + // Format + if (salt) { + var wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext); + } else { + var wordArray = ciphertext; + } + + return wordArray.toString(Base64); + }, + + /** + * Converts an OpenSSL-compatible string to a cipher params object. + * + * @param {string} openSSLStr The OpenSSL-compatible string. + * + * @return {CipherParams} The cipher params object. + * + * @static + * + * @example + * + * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString); + */ + parse: function (openSSLStr) { + // Parse base64 + var ciphertext = Base64.parse(openSSLStr); + + // Shortcut + var ciphertextWords = ciphertext.words; + + // Test for salt + if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) { + // Extract salt + var salt = WordArray.create(ciphertextWords.slice(2, 4)); + + // Remove salt from ciphertext + ciphertextWords.splice(0, 4); + ciphertext.sigBytes -= 16; + } + + return CipherParams.create({ ciphertext: ciphertext, salt: salt }); + } + }; + + /** + * A cipher wrapper that returns ciphertext as a serializable cipher params object. + */ + var SerializableCipher = C_lib.SerializableCipher = Base.extend({ + /** + * Configuration options. + * + * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL + */ + cfg: Base.extend({ + format: OpenSSLFormatter + }), + + /** + * Encrypts a message. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv }); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + encrypt: function (cipher, message, key, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Encrypt + var encryptor = cipher.createEncryptor(key, cfg); + var ciphertext = encryptor.finalize(message); + + // Shortcut + var cipherCfg = encryptor.cfg; + + // Create and return serializable cipher params + return CipherParams.create({ + ciphertext: ciphertext, + key: key, + iv: cipherCfg.iv, + algorithm: cipher, + mode: cipherCfg.mode, + padding: cipherCfg.padding, + blockSize: cipher.blockSize, + formatter: cfg.format + }); + }, + + /** + * Decrypts serialized ciphertext. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + decrypt: function (cipher, ciphertext, key, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Convert string to CipherParams + ciphertext = this._parse(ciphertext, cfg.format); + + // Decrypt + var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext); + + return plaintext; + }, + + /** + * Converts serialized ciphertext to CipherParams, + * else assumed CipherParams already and returns ciphertext unchanged. + * + * @param {CipherParams|string} ciphertext The ciphertext. + * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext. + * + * @return {CipherParams} The unserialized ciphertext. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format); + */ + _parse: function (ciphertext, format) { + if (typeof ciphertext == 'string') { + return format.parse(ciphertext, this); + } else { + return ciphertext; + } + } + }); + + /** + * Key derivation function namespace. + */ + var C_kdf = C.kdf = {}; + + /** + * OpenSSL key derivation function. + */ + var OpenSSLKdf = C_kdf.OpenSSL = { + /** + * Derives a key and IV from a password. + * + * @param {string} password The password to derive from. + * @param {number} keySize The size in words of the key to generate. + * @param {number} ivSize The size in words of the IV to generate. + * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly. + * + * @return {CipherParams} A cipher params object with the key, IV, and salt. + * + * @static + * + * @example + * + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32); + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt'); + */ + execute: function (password, keySize, ivSize, salt) { + // Generate random salt + if (!salt) { + salt = WordArray.random(64/8); + } + + // Derive key and IV + var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt); + + // Separate key and IV + var iv = WordArray.create(key.words.slice(keySize), ivSize * 4); + key.sigBytes = keySize * 4; + + // Return params + return CipherParams.create({ key: key, iv: iv, salt: salt }); + } + }; + + /** + * A serializable cipher wrapper that derives the key from a password, + * and returns ciphertext as a serializable cipher params object. + */ + var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({ + /** + * Configuration options. + * + * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL + */ + cfg: SerializableCipher.cfg.extend({ + kdf: OpenSSLKdf + }), + + /** + * Encrypts a message using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password'); + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL }); + */ + encrypt: function (cipher, message, password, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Derive key and other params + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize); + + // Add IV to config + cfg.iv = derivedParams.iv; + + // Encrypt + var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg); + + // Mix in derived params + ciphertext.mixIn(derivedParams); + + return ciphertext; + }, + + /** + * Decrypts serialized ciphertext using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL }); + */ + decrypt: function (cipher, ciphertext, password, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Convert string to CipherParams + ciphertext = this._parse(ciphertext, cfg.format); + + // Derive key and other params + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt); + + // Add IV to config + cfg.iv = derivedParams.iv; + + // Decrypt + var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg); + + return plaintext; + } + }); + }()); + + + /** + * Cipher Feedback block mode. + */ + CryptoJS.mode.CFB = (function () { + var CFB = CryptoJS.lib.BlockCipherMode.extend(); + + CFB.Encryptor = CFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); + + // Remember this block to use with next block + this._prevBlock = words.slice(offset, offset + blockSize); + } + }); + + CFB.Decryptor = CFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // Remember this block to use with next block + var thisBlock = words.slice(offset, offset + blockSize); + + generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); + + // This block becomes the previous block + this._prevBlock = thisBlock; + } + }); + + function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) { + // Shortcut + var iv = this._iv; + + // Generate keystream + if (iv) { + var keystream = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } else { + var keystream = this._prevBlock; + } + cipher.encryptBlock(keystream, 0); + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + + return CFB; + }()); + + + /** + * Electronic Codebook block mode. + */ + CryptoJS.mode.ECB = (function () { + var ECB = CryptoJS.lib.BlockCipherMode.extend(); + + ECB.Encryptor = ECB.extend({ + processBlock: function (words, offset) { + this._cipher.encryptBlock(words, offset); + } + }); + + ECB.Decryptor = ECB.extend({ + processBlock: function (words, offset) { + this._cipher.decryptBlock(words, offset); + } + }); + + return ECB; + }()); + + + /** + * ANSI X.923 padding strategy. + */ + CryptoJS.pad.AnsiX923 = { + pad: function (data, blockSize) { + // Shortcuts + var dataSigBytes = data.sigBytes; + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes; + + // Compute last byte position + var lastBytePos = dataSigBytes + nPaddingBytes - 1; + + // Pad + data.clamp(); + data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8); + data.sigBytes += nPaddingBytes; + }, + + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + + /** + * ISO 10126 padding strategy. + */ + CryptoJS.pad.Iso10126 = { + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; + + // Pad + data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)). + concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1)); + }, + + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + + /** + * ISO/IEC 9797-1 Padding Method 2. + */ + CryptoJS.pad.Iso97971 = { + pad: function (data, blockSize) { + // Add 0x80 byte + data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1)); + + // Zero pad the rest + CryptoJS.pad.ZeroPadding.pad(data, blockSize); + }, + + unpad: function (data) { + // Remove zero padding + CryptoJS.pad.ZeroPadding.unpad(data); + + // Remove one more byte -- the 0x80 byte + data.sigBytes--; + } + }; + + + /** + * Output Feedback block mode. + */ + CryptoJS.mode.OFB = (function () { + var OFB = CryptoJS.lib.BlockCipherMode.extend(); + + var Encryptor = OFB.Encryptor = OFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var keystream = this._keystream; + + // Generate keystream + if (iv) { + keystream = this._keystream = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } + cipher.encryptBlock(keystream, 0); + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); + + OFB.Decryptor = Encryptor; + + return OFB; + }()); + + + /** + * A noop padding strategy. + */ + CryptoJS.pad.NoPadding = { + pad: function () { + }, + + unpad: function () { + } + }; + + + (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var CipherParams = C_lib.CipherParams; + var C_enc = C.enc; + var Hex = C_enc.Hex; + var C_format = C.format; + + var HexFormatter = C_format.Hex = { + /** + * Converts the ciphertext of a cipher params object to a hexadecimally encoded string. + * + * @param {CipherParams} cipherParams The cipher params object. + * + * @return {string} The hexadecimally encoded string. + * + * @static + * + * @example + * + * var hexString = CryptoJS.format.Hex.stringify(cipherParams); + */ + stringify: function (cipherParams) { + return cipherParams.ciphertext.toString(Hex); + }, + + /** + * Converts a hexadecimally encoded ciphertext string to a cipher params object. + * + * @param {string} input The hexadecimally encoded string. + * + * @return {CipherParams} The cipher params object. + * + * @static + * + * @example + * + * var cipherParams = CryptoJS.format.Hex.parse(hexString); + */ + parse: function (input) { + var ciphertext = Hex.parse(input); + return CipherParams.create({ ciphertext: ciphertext }); + } + }; + }()); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + + // Lookup tables + var SBOX = []; + var INV_SBOX = []; + var SUB_MIX_0 = []; + var SUB_MIX_1 = []; + var SUB_MIX_2 = []; + var SUB_MIX_3 = []; + var INV_SUB_MIX_0 = []; + var INV_SUB_MIX_1 = []; + var INV_SUB_MIX_2 = []; + var INV_SUB_MIX_3 = []; + + // Compute lookup tables + (function () { + // Compute double table + var d = []; + for (var i = 0; i < 256; i++) { + if (i < 128) { + d[i] = i << 1; + } else { + d[i] = (i << 1) ^ 0x11b; + } + } + + // Walk GF(2^8) + var x = 0; + var xi = 0; + for (var i = 0; i < 256; i++) { + // Compute sbox + var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4); + sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63; + SBOX[x] = sx; + INV_SBOX[sx] = x; + + // Compute multiplication + var x2 = d[x]; + var x4 = d[x2]; + var x8 = d[x4]; + + // Compute sub bytes, mix columns tables + var t = (d[sx] * 0x101) ^ (sx * 0x1010100); + SUB_MIX_0[x] = (t << 24) | (t >>> 8); + SUB_MIX_1[x] = (t << 16) | (t >>> 16); + SUB_MIX_2[x] = (t << 8) | (t >>> 24); + SUB_MIX_3[x] = t; + + // Compute inv sub bytes, inv mix columns tables + var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100); + INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8); + INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16); + INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24); + INV_SUB_MIX_3[sx] = t; + + // Compute next counter + if (!x) { + x = xi = 1; + } else { + x = x2 ^ d[d[d[x8 ^ x2]]]; + xi ^= d[d[xi]]; + } + } + }()); + + // Precomputed Rcon lookup + var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]; + + /** + * AES block cipher algorithm. + */ + var AES = C_algo.AES = BlockCipher.extend({ + _doReset: function () { + // Skip reset of nRounds has been set before and key did not change + if (this._nRounds && this._keyPriorReset === this._key) { + return; + } + + // Shortcuts + var key = this._keyPriorReset = this._key; + var keyWords = key.words; + var keySize = key.sigBytes / 4; + + // Compute number of rounds + var nRounds = this._nRounds = keySize + 6; + + // Compute number of key schedule rows + var ksRows = (nRounds + 1) * 4; + + // Compute key schedule + var keySchedule = this._keySchedule = []; + for (var ksRow = 0; ksRow < ksRows; ksRow++) { + if (ksRow < keySize) { + keySchedule[ksRow] = keyWords[ksRow]; + } else { + var t = keySchedule[ksRow - 1]; + + if (!(ksRow % keySize)) { + // Rot word + t = (t << 8) | (t >>> 24); + + // Sub word + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + + // Mix Rcon + t ^= RCON[(ksRow / keySize) | 0] << 24; + } else if (keySize > 6 && ksRow % keySize == 4) { + // Sub word + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + } + + keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t; + } + } + + // Compute inv key schedule + var invKeySchedule = this._invKeySchedule = []; + for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) { + var ksRow = ksRows - invKsRow; + + if (invKsRow % 4) { + var t = keySchedule[ksRow]; + } else { + var t = keySchedule[ksRow - 4]; + } + + if (invKsRow < 4 || ksRow <= 4) { + invKeySchedule[invKsRow] = t; + } else { + invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^ + INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]]; + } + } + }, + + encryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX); + }, + + decryptBlock: function (M, offset) { + // Swap 2nd and 4th rows + var t = M[offset + 1]; + M[offset + 1] = M[offset + 3]; + M[offset + 3] = t; + + this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX); + + // Inv swap 2nd and 4th rows + var t = M[offset + 1]; + M[offset + 1] = M[offset + 3]; + M[offset + 3] = t; + }, + + _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) { + // Shortcut + var nRounds = this._nRounds; + + // Get input, add round key + var s0 = M[offset] ^ keySchedule[0]; + var s1 = M[offset + 1] ^ keySchedule[1]; + var s2 = M[offset + 2] ^ keySchedule[2]; + var s3 = M[offset + 3] ^ keySchedule[3]; + + // Key schedule row counter + var ksRow = 4; + + // Rounds + for (var round = 1; round < nRounds; round++) { + // Shift rows, sub bytes, mix columns, add round key + var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++]; + var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++]; + var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++]; + var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++]; + + // Update state + s0 = t0; + s1 = t1; + s2 = t2; + s3 = t3; + } + + // Shift rows, sub bytes, add round key + var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]; + var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]; + var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]; + var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]; + + // Set output + M[offset] = t0; + M[offset + 1] = t1; + M[offset + 2] = t2; + M[offset + 3] = t3; + }, + + keySize: 256/32 + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg); + */ + C.AES = BlockCipher._createHelper(AES); + }()); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + + // Permuted Choice 1 constants + var PC1 = [ + 57, 49, 41, 33, 25, 17, 9, 1, + 58, 50, 42, 34, 26, 18, 10, 2, + 59, 51, 43, 35, 27, 19, 11, 3, + 60, 52, 44, 36, 63, 55, 47, 39, + 31, 23, 15, 7, 62, 54, 46, 38, + 30, 22, 14, 6, 61, 53, 45, 37, + 29, 21, 13, 5, 28, 20, 12, 4 + ]; + + // Permuted Choice 2 constants + var PC2 = [ + 14, 17, 11, 24, 1, 5, + 3, 28, 15, 6, 21, 10, + 23, 19, 12, 4, 26, 8, + 16, 7, 27, 20, 13, 2, + 41, 52, 31, 37, 47, 55, + 30, 40, 51, 45, 33, 48, + 44, 49, 39, 56, 34, 53, + 46, 42, 50, 36, 29, 32 + ]; + + // Cumulative bit shift constants + var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28]; + + // SBOXes and round permutation constants + var SBOX_P = [ + { + 0x0: 0x808200, + 0x10000000: 0x8000, + 0x20000000: 0x808002, + 0x30000000: 0x2, + 0x40000000: 0x200, + 0x50000000: 0x808202, + 0x60000000: 0x800202, + 0x70000000: 0x800000, + 0x80000000: 0x202, + 0x90000000: 0x800200, + 0xa0000000: 0x8200, + 0xb0000000: 0x808000, + 0xc0000000: 0x8002, + 0xd0000000: 0x800002, + 0xe0000000: 0x0, + 0xf0000000: 0x8202, + 0x8000000: 0x0, + 0x18000000: 0x808202, + 0x28000000: 0x8202, + 0x38000000: 0x8000, + 0x48000000: 0x808200, + 0x58000000: 0x200, + 0x68000000: 0x808002, + 0x78000000: 0x2, + 0x88000000: 0x800200, + 0x98000000: 0x8200, + 0xa8000000: 0x808000, + 0xb8000000: 0x800202, + 0xc8000000: 0x800002, + 0xd8000000: 0x8002, + 0xe8000000: 0x202, + 0xf8000000: 0x800000, + 0x1: 0x8000, + 0x10000001: 0x2, + 0x20000001: 0x808200, + 0x30000001: 0x800000, + 0x40000001: 0x808002, + 0x50000001: 0x8200, + 0x60000001: 0x200, + 0x70000001: 0x800202, + 0x80000001: 0x808202, + 0x90000001: 0x808000, + 0xa0000001: 0x800002, + 0xb0000001: 0x8202, + 0xc0000001: 0x202, + 0xd0000001: 0x800200, + 0xe0000001: 0x8002, + 0xf0000001: 0x0, + 0x8000001: 0x808202, + 0x18000001: 0x808000, + 0x28000001: 0x800000, + 0x38000001: 0x200, + 0x48000001: 0x8000, + 0x58000001: 0x800002, + 0x68000001: 0x2, + 0x78000001: 0x8202, + 0x88000001: 0x8002, + 0x98000001: 0x800202, + 0xa8000001: 0x202, + 0xb8000001: 0x808200, + 0xc8000001: 0x800200, + 0xd8000001: 0x0, + 0xe8000001: 0x8200, + 0xf8000001: 0x808002 + }, + { + 0x0: 0x40084010, + 0x1000000: 0x4000, + 0x2000000: 0x80000, + 0x3000000: 0x40080010, + 0x4000000: 0x40000010, + 0x5000000: 0x40084000, + 0x6000000: 0x40004000, + 0x7000000: 0x10, + 0x8000000: 0x84000, + 0x9000000: 0x40004010, + 0xa000000: 0x40000000, + 0xb000000: 0x84010, + 0xc000000: 0x80010, + 0xd000000: 0x0, + 0xe000000: 0x4010, + 0xf000000: 0x40080000, + 0x800000: 0x40004000, + 0x1800000: 0x84010, + 0x2800000: 0x10, + 0x3800000: 0x40004010, + 0x4800000: 0x40084010, + 0x5800000: 0x40000000, + 0x6800000: 0x80000, + 0x7800000: 0x40080010, + 0x8800000: 0x80010, + 0x9800000: 0x0, + 0xa800000: 0x4000, + 0xb800000: 0x40080000, + 0xc800000: 0x40000010, + 0xd800000: 0x84000, + 0xe800000: 0x40084000, + 0xf800000: 0x4010, + 0x10000000: 0x0, + 0x11000000: 0x40080010, + 0x12000000: 0x40004010, + 0x13000000: 0x40084000, + 0x14000000: 0x40080000, + 0x15000000: 0x10, + 0x16000000: 0x84010, + 0x17000000: 0x4000, + 0x18000000: 0x4010, + 0x19000000: 0x80000, + 0x1a000000: 0x80010, + 0x1b000000: 0x40000010, + 0x1c000000: 0x84000, + 0x1d000000: 0x40004000, + 0x1e000000: 0x40000000, + 0x1f000000: 0x40084010, + 0x10800000: 0x84010, + 0x11800000: 0x80000, + 0x12800000: 0x40080000, + 0x13800000: 0x4000, + 0x14800000: 0x40004000, + 0x15800000: 0x40084010, + 0x16800000: 0x10, + 0x17800000: 0x40000000, + 0x18800000: 0x40084000, + 0x19800000: 0x40000010, + 0x1a800000: 0x40004010, + 0x1b800000: 0x80010, + 0x1c800000: 0x0, + 0x1d800000: 0x4010, + 0x1e800000: 0x40080010, + 0x1f800000: 0x84000 + }, + { + 0x0: 0x104, + 0x100000: 0x0, + 0x200000: 0x4000100, + 0x300000: 0x10104, + 0x400000: 0x10004, + 0x500000: 0x4000004, + 0x600000: 0x4010104, + 0x700000: 0x4010000, + 0x800000: 0x4000000, + 0x900000: 0x4010100, + 0xa00000: 0x10100, + 0xb00000: 0x4010004, + 0xc00000: 0x4000104, + 0xd00000: 0x10000, + 0xe00000: 0x4, + 0xf00000: 0x100, + 0x80000: 0x4010100, + 0x180000: 0x4010004, + 0x280000: 0x0, + 0x380000: 0x4000100, + 0x480000: 0x4000004, + 0x580000: 0x10000, + 0x680000: 0x10004, + 0x780000: 0x104, + 0x880000: 0x4, + 0x980000: 0x100, + 0xa80000: 0x4010000, + 0xb80000: 0x10104, + 0xc80000: 0x10100, + 0xd80000: 0x4000104, + 0xe80000: 0x4010104, + 0xf80000: 0x4000000, + 0x1000000: 0x4010100, + 0x1100000: 0x10004, + 0x1200000: 0x10000, + 0x1300000: 0x4000100, + 0x1400000: 0x100, + 0x1500000: 0x4010104, + 0x1600000: 0x4000004, + 0x1700000: 0x0, + 0x1800000: 0x4000104, + 0x1900000: 0x4000000, + 0x1a00000: 0x4, + 0x1b00000: 0x10100, + 0x1c00000: 0x4010000, + 0x1d00000: 0x104, + 0x1e00000: 0x10104, + 0x1f00000: 0x4010004, + 0x1080000: 0x4000000, + 0x1180000: 0x104, + 0x1280000: 0x4010100, + 0x1380000: 0x0, + 0x1480000: 0x10004, + 0x1580000: 0x4000100, + 0x1680000: 0x100, + 0x1780000: 0x4010004, + 0x1880000: 0x10000, + 0x1980000: 0x4010104, + 0x1a80000: 0x10104, + 0x1b80000: 0x4000004, + 0x1c80000: 0x4000104, + 0x1d80000: 0x4010000, + 0x1e80000: 0x4, + 0x1f80000: 0x10100 + }, + { + 0x0: 0x80401000, + 0x10000: 0x80001040, + 0x20000: 0x401040, + 0x30000: 0x80400000, + 0x40000: 0x0, + 0x50000: 0x401000, + 0x60000: 0x80000040, + 0x70000: 0x400040, + 0x80000: 0x80000000, + 0x90000: 0x400000, + 0xa0000: 0x40, + 0xb0000: 0x80001000, + 0xc0000: 0x80400040, + 0xd0000: 0x1040, + 0xe0000: 0x1000, + 0xf0000: 0x80401040, + 0x8000: 0x80001040, + 0x18000: 0x40, + 0x28000: 0x80400040, + 0x38000: 0x80001000, + 0x48000: 0x401000, + 0x58000: 0x80401040, + 0x68000: 0x0, + 0x78000: 0x80400000, + 0x88000: 0x1000, + 0x98000: 0x80401000, + 0xa8000: 0x400000, + 0xb8000: 0x1040, + 0xc8000: 0x80000000, + 0xd8000: 0x400040, + 0xe8000: 0x401040, + 0xf8000: 0x80000040, + 0x100000: 0x400040, + 0x110000: 0x401000, + 0x120000: 0x80000040, + 0x130000: 0x0, + 0x140000: 0x1040, + 0x150000: 0x80400040, + 0x160000: 0x80401000, + 0x170000: 0x80001040, + 0x180000: 0x80401040, + 0x190000: 0x80000000, + 0x1a0000: 0x80400000, + 0x1b0000: 0x401040, + 0x1c0000: 0x80001000, + 0x1d0000: 0x400000, + 0x1e0000: 0x40, + 0x1f0000: 0x1000, + 0x108000: 0x80400000, + 0x118000: 0x80401040, + 0x128000: 0x0, + 0x138000: 0x401000, + 0x148000: 0x400040, + 0x158000: 0x80000000, + 0x168000: 0x80001040, + 0x178000: 0x40, + 0x188000: 0x80000040, + 0x198000: 0x1000, + 0x1a8000: 0x80001000, + 0x1b8000: 0x80400040, + 0x1c8000: 0x1040, + 0x1d8000: 0x80401000, + 0x1e8000: 0x400000, + 0x1f8000: 0x401040 + }, + { + 0x0: 0x80, + 0x1000: 0x1040000, + 0x2000: 0x40000, + 0x3000: 0x20000000, + 0x4000: 0x20040080, + 0x5000: 0x1000080, + 0x6000: 0x21000080, + 0x7000: 0x40080, + 0x8000: 0x1000000, + 0x9000: 0x20040000, + 0xa000: 0x20000080, + 0xb000: 0x21040080, + 0xc000: 0x21040000, + 0xd000: 0x0, + 0xe000: 0x1040080, + 0xf000: 0x21000000, + 0x800: 0x1040080, + 0x1800: 0x21000080, + 0x2800: 0x80, + 0x3800: 0x1040000, + 0x4800: 0x40000, + 0x5800: 0x20040080, + 0x6800: 0x21040000, + 0x7800: 0x20000000, + 0x8800: 0x20040000, + 0x9800: 0x0, + 0xa800: 0x21040080, + 0xb800: 0x1000080, + 0xc800: 0x20000080, + 0xd800: 0x21000000, + 0xe800: 0x1000000, + 0xf800: 0x40080, + 0x10000: 0x40000, + 0x11000: 0x80, + 0x12000: 0x20000000, + 0x13000: 0x21000080, + 0x14000: 0x1000080, + 0x15000: 0x21040000, + 0x16000: 0x20040080, + 0x17000: 0x1000000, + 0x18000: 0x21040080, + 0x19000: 0x21000000, + 0x1a000: 0x1040000, + 0x1b000: 0x20040000, + 0x1c000: 0x40080, + 0x1d000: 0x20000080, + 0x1e000: 0x0, + 0x1f000: 0x1040080, + 0x10800: 0x21000080, + 0x11800: 0x1000000, + 0x12800: 0x1040000, + 0x13800: 0x20040080, + 0x14800: 0x20000000, + 0x15800: 0x1040080, + 0x16800: 0x80, + 0x17800: 0x21040000, + 0x18800: 0x40080, + 0x19800: 0x21040080, + 0x1a800: 0x0, + 0x1b800: 0x21000000, + 0x1c800: 0x1000080, + 0x1d800: 0x40000, + 0x1e800: 0x20040000, + 0x1f800: 0x20000080 + }, + { + 0x0: 0x10000008, + 0x100: 0x2000, + 0x200: 0x10200000, + 0x300: 0x10202008, + 0x400: 0x10002000, + 0x500: 0x200000, + 0x600: 0x200008, + 0x700: 0x10000000, + 0x800: 0x0, + 0x900: 0x10002008, + 0xa00: 0x202000, + 0xb00: 0x8, + 0xc00: 0x10200008, + 0xd00: 0x202008, + 0xe00: 0x2008, + 0xf00: 0x10202000, + 0x80: 0x10200000, + 0x180: 0x10202008, + 0x280: 0x8, + 0x380: 0x200000, + 0x480: 0x202008, + 0x580: 0x10000008, + 0x680: 0x10002000, + 0x780: 0x2008, + 0x880: 0x200008, + 0x980: 0x2000, + 0xa80: 0x10002008, + 0xb80: 0x10200008, + 0xc80: 0x0, + 0xd80: 0x10202000, + 0xe80: 0x202000, + 0xf80: 0x10000000, + 0x1000: 0x10002000, + 0x1100: 0x10200008, + 0x1200: 0x10202008, + 0x1300: 0x2008, + 0x1400: 0x200000, + 0x1500: 0x10000000, + 0x1600: 0x10000008, + 0x1700: 0x202000, + 0x1800: 0x202008, + 0x1900: 0x0, + 0x1a00: 0x8, + 0x1b00: 0x10200000, + 0x1c00: 0x2000, + 0x1d00: 0x10002008, + 0x1e00: 0x10202000, + 0x1f00: 0x200008, + 0x1080: 0x8, + 0x1180: 0x202000, + 0x1280: 0x200000, + 0x1380: 0x10000008, + 0x1480: 0x10002000, + 0x1580: 0x2008, + 0x1680: 0x10202008, + 0x1780: 0x10200000, + 0x1880: 0x10202000, + 0x1980: 0x10200008, + 0x1a80: 0x2000, + 0x1b80: 0x202008, + 0x1c80: 0x200008, + 0x1d80: 0x0, + 0x1e80: 0x10000000, + 0x1f80: 0x10002008 + }, + { + 0x0: 0x100000, + 0x10: 0x2000401, + 0x20: 0x400, + 0x30: 0x100401, + 0x40: 0x2100401, + 0x50: 0x0, + 0x60: 0x1, + 0x70: 0x2100001, + 0x80: 0x2000400, + 0x90: 0x100001, + 0xa0: 0x2000001, + 0xb0: 0x2100400, + 0xc0: 0x2100000, + 0xd0: 0x401, + 0xe0: 0x100400, + 0xf0: 0x2000000, + 0x8: 0x2100001, + 0x18: 0x0, + 0x28: 0x2000401, + 0x38: 0x2100400, + 0x48: 0x100000, + 0x58: 0x2000001, + 0x68: 0x2000000, + 0x78: 0x401, + 0x88: 0x100401, + 0x98: 0x2000400, + 0xa8: 0x2100000, + 0xb8: 0x100001, + 0xc8: 0x400, + 0xd8: 0x2100401, + 0xe8: 0x1, + 0xf8: 0x100400, + 0x100: 0x2000000, + 0x110: 0x100000, + 0x120: 0x2000401, + 0x130: 0x2100001, + 0x140: 0x100001, + 0x150: 0x2000400, + 0x160: 0x2100400, + 0x170: 0x100401, + 0x180: 0x401, + 0x190: 0x2100401, + 0x1a0: 0x100400, + 0x1b0: 0x1, + 0x1c0: 0x0, + 0x1d0: 0x2100000, + 0x1e0: 0x2000001, + 0x1f0: 0x400, + 0x108: 0x100400, + 0x118: 0x2000401, + 0x128: 0x2100001, + 0x138: 0x1, + 0x148: 0x2000000, + 0x158: 0x100000, + 0x168: 0x401, + 0x178: 0x2100400, + 0x188: 0x2000001, + 0x198: 0x2100000, + 0x1a8: 0x0, + 0x1b8: 0x2100401, + 0x1c8: 0x100401, + 0x1d8: 0x400, + 0x1e8: 0x2000400, + 0x1f8: 0x100001 + }, + { + 0x0: 0x8000820, + 0x1: 0x20000, + 0x2: 0x8000000, + 0x3: 0x20, + 0x4: 0x20020, + 0x5: 0x8020820, + 0x6: 0x8020800, + 0x7: 0x800, + 0x8: 0x8020000, + 0x9: 0x8000800, + 0xa: 0x20800, + 0xb: 0x8020020, + 0xc: 0x820, + 0xd: 0x0, + 0xe: 0x8000020, + 0xf: 0x20820, + 0x80000000: 0x800, + 0x80000001: 0x8020820, + 0x80000002: 0x8000820, + 0x80000003: 0x8000000, + 0x80000004: 0x8020000, + 0x80000005: 0x20800, + 0x80000006: 0x20820, + 0x80000007: 0x20, + 0x80000008: 0x8000020, + 0x80000009: 0x820, + 0x8000000a: 0x20020, + 0x8000000b: 0x8020800, + 0x8000000c: 0x0, + 0x8000000d: 0x8020020, + 0x8000000e: 0x8000800, + 0x8000000f: 0x20000, + 0x10: 0x20820, + 0x11: 0x8020800, + 0x12: 0x20, + 0x13: 0x800, + 0x14: 0x8000800, + 0x15: 0x8000020, + 0x16: 0x8020020, + 0x17: 0x20000, + 0x18: 0x0, + 0x19: 0x20020, + 0x1a: 0x8020000, + 0x1b: 0x8000820, + 0x1c: 0x8020820, + 0x1d: 0x20800, + 0x1e: 0x820, + 0x1f: 0x8000000, + 0x80000010: 0x20000, + 0x80000011: 0x800, + 0x80000012: 0x8020020, + 0x80000013: 0x20820, + 0x80000014: 0x20, + 0x80000015: 0x8020000, + 0x80000016: 0x8000000, + 0x80000017: 0x8000820, + 0x80000018: 0x8020820, + 0x80000019: 0x8000020, + 0x8000001a: 0x8000800, + 0x8000001b: 0x0, + 0x8000001c: 0x20800, + 0x8000001d: 0x820, + 0x8000001e: 0x20020, + 0x8000001f: 0x8020800 + } + ]; + + // Masks that select the SBOX input + var SBOX_MASK = [ + 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000, + 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f + ]; + + /** + * DES block cipher algorithm. + */ + var DES = C_algo.DES = BlockCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + + // Select 56 bits according to PC1 + var keyBits = []; + for (var i = 0; i < 56; i++) { + var keyBitPos = PC1[i] - 1; + keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1; + } + + // Assemble 16 subkeys + var subKeys = this._subKeys = []; + for (var nSubKey = 0; nSubKey < 16; nSubKey++) { + // Create subkey + var subKey = subKeys[nSubKey] = []; + + // Shortcut + var bitShift = BIT_SHIFTS[nSubKey]; + + // Select 48 bits according to PC2 + for (var i = 0; i < 24; i++) { + // Select from the left 28 key bits + subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6); + + // Select from the right 28 key bits + subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6); + } + + // Since each subkey is applied to an expanded 32-bit input, + // the subkey can be broken into 8 values scaled to 32-bits, + // which allows the key to be used without expansion + subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31); + for (var i = 1; i < 7; i++) { + subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3); + } + subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27); + } + + // Compute inverse subkeys + var invSubKeys = this._invSubKeys = []; + for (var i = 0; i < 16; i++) { + invSubKeys[i] = subKeys[15 - i]; + } + }, + + encryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._subKeys); + }, + + decryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._invSubKeys); + }, + + _doCryptBlock: function (M, offset, subKeys) { + // Get input + this._lBlock = M[offset]; + this._rBlock = M[offset + 1]; + + // Initial permutation + exchangeLR.call(this, 4, 0x0f0f0f0f); + exchangeLR.call(this, 16, 0x0000ffff); + exchangeRL.call(this, 2, 0x33333333); + exchangeRL.call(this, 8, 0x00ff00ff); + exchangeLR.call(this, 1, 0x55555555); + + // Rounds + for (var round = 0; round < 16; round++) { + // Shortcuts + var subKey = subKeys[round]; + var lBlock = this._lBlock; + var rBlock = this._rBlock; + + // Feistel function + var f = 0; + for (var i = 0; i < 8; i++) { + f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0]; + } + this._lBlock = rBlock; + this._rBlock = lBlock ^ f; + } + + // Undo swap from last round + var t = this._lBlock; + this._lBlock = this._rBlock; + this._rBlock = t; + + // Final permutation + exchangeLR.call(this, 1, 0x55555555); + exchangeRL.call(this, 8, 0x00ff00ff); + exchangeRL.call(this, 2, 0x33333333); + exchangeLR.call(this, 16, 0x0000ffff); + exchangeLR.call(this, 4, 0x0f0f0f0f); + + // Set output + M[offset] = this._lBlock; + M[offset + 1] = this._rBlock; + }, + + keySize: 64/32, + + ivSize: 64/32, + + blockSize: 64/32 + }); + + // Swap bits across the left and right words + function exchangeLR(offset, mask) { + var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask; + this._rBlock ^= t; + this._lBlock ^= t << offset; + } + + function exchangeRL(offset, mask) { + var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask; + this._lBlock ^= t; + this._rBlock ^= t << offset; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg); + */ + C.DES = BlockCipher._createHelper(DES); + + /** + * Triple-DES block cipher algorithm. + */ + var TripleDES = C_algo.TripleDES = BlockCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + + // Create DES instances + this._des1 = DES.createEncryptor(WordArray.create(keyWords.slice(0, 2))); + this._des2 = DES.createEncryptor(WordArray.create(keyWords.slice(2, 4))); + this._des3 = DES.createEncryptor(WordArray.create(keyWords.slice(4, 6))); + }, + + encryptBlock: function (M, offset) { + this._des1.encryptBlock(M, offset); + this._des2.decryptBlock(M, offset); + this._des3.encryptBlock(M, offset); + }, + + decryptBlock: function (M, offset) { + this._des3.decryptBlock(M, offset); + this._des2.encryptBlock(M, offset); + this._des1.decryptBlock(M, offset); + }, + + keySize: 192/32, + + ivSize: 64/32, + + blockSize: 64/32 + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg); + */ + C.TripleDES = BlockCipher._createHelper(TripleDES); + }()); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + /** + * RC4 stream cipher algorithm. + */ + var RC4 = C_algo.RC4 = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + var keySigBytes = key.sigBytes; + + // Init sbox + var S = this._S = []; + for (var i = 0; i < 256; i++) { + S[i] = i; + } + + // Key setup + for (var i = 0, j = 0; i < 256; i++) { + var keyByteIndex = i % keySigBytes; + var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff; + + j = (j + S[i] + keyByte) % 256; + + // Swap + var t = S[i]; + S[i] = S[j]; + S[j] = t; + } + + // Counters + this._i = this._j = 0; + }, + + _doProcessBlock: function (M, offset) { + M[offset] ^= generateKeystreamWord.call(this); + }, + + keySize: 256/32, + + ivSize: 0 + }); + + function generateKeystreamWord() { + // Shortcuts + var S = this._S; + var i = this._i; + var j = this._j; + + // Generate keystream word + var keystreamWord = 0; + for (var n = 0; n < 4; n++) { + i = (i + 1) % 256; + j = (j + S[i]) % 256; + + // Swap + var t = S[i]; + S[i] = S[j]; + S[j] = t; + + keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8); + } + + // Update counters + this._i = i; + this._j = j; + + return keystreamWord; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg); + */ + C.RC4 = StreamCipher._createHelper(RC4); + + /** + * Modified RC4 stream cipher algorithm. + */ + var RC4Drop = C_algo.RC4Drop = RC4.extend({ + /** + * Configuration options. + * + * @property {number} drop The number of keystream words to drop. Default 192 + */ + cfg: RC4.cfg.extend({ + drop: 192 + }), + + _doReset: function () { + RC4._doReset.call(this); + + // Drop + for (var i = this.cfg.drop; i > 0; i--) { + generateKeystreamWord.call(this); + } + } + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg); + */ + C.RC4Drop = StreamCipher._createHelper(RC4Drop); + }()); + + + /** @preserve + * Counter block mode compatible with Dr Brian Gladman fileenc.c + * derived from CryptoJS.mode.CTR + * Jan Hruby jhruby.web@gmail.com + */ + CryptoJS.mode.CTRGladman = (function () { + var CTRGladman = CryptoJS.lib.BlockCipherMode.extend(); + + function incWord(word) + { + if (((word >> 24) & 0xff) === 0xff) { //overflow + var b1 = (word >> 16)&0xff; + var b2 = (word >> 8)&0xff; + var b3 = word & 0xff; + + if (b1 === 0xff) // overflow b1 + { + b1 = 0; + if (b2 === 0xff) + { + b2 = 0; + if (b3 === 0xff) + { + b3 = 0; + } + else + { + ++b3; + } + } + else + { + ++b2; + } + } + else + { + ++b1; + } + + word = 0; + word += (b1 << 16); + word += (b2 << 8); + word += b3; + } + else + { + word += (0x01 << 24); + } + return word; + } + + function incCounter(counter) + { + if ((counter[0] = incWord(counter[0])) === 0) + { + // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8 + counter[1] = incWord(counter[1]); + } + return counter; + } + + var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var counter = this._counter; + + // Generate keystream + if (iv) { + counter = this._counter = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } + + incCounter(counter); + + var keystream = counter.slice(0); + cipher.encryptBlock(keystream, 0); + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); + + CTRGladman.Decryptor = Encryptor; + + return CTRGladman; + }()); + + + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + // Reusable objects + var S = []; + var C_ = []; + var G = []; + + /** + * Rabbit stream cipher algorithm + */ + var Rabbit = C_algo.Rabbit = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var K = this._key.words; + var iv = this.cfg.iv; + + // Swap endian + for (var i = 0; i < 4; i++) { + K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) | + (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00); + } + + // Generate initial state values + var X = this._X = [ + K[0], (K[3] << 16) | (K[2] >>> 16), + K[1], (K[0] << 16) | (K[3] >>> 16), + K[2], (K[1] << 16) | (K[0] >>> 16), + K[3], (K[2] << 16) | (K[1] >>> 16) + ]; + + // Generate initial counter values + var C = this._C = [ + (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), + (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), + (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), + (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) + ]; + + // Carry bit + this._b = 0; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + + // Modify the counters + for (var i = 0; i < 8; i++) { + C[i] ^= X[(i + 4) & 7]; + } + + // IV setup + if (iv) { + // Shortcuts + var IV = iv.words; + var IV_0 = IV[0]; + var IV_1 = IV[1]; + + // Generate four subvectors + var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); + var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); + var i1 = (i0 >>> 16) | (i2 & 0xffff0000); + var i3 = (i2 << 16) | (i0 & 0x0000ffff); + + // Modify counter values + C[0] ^= i0; + C[1] ^= i1; + C[2] ^= i2; + C[3] ^= i3; + C[4] ^= i0; + C[5] ^= i1; + C[6] ^= i2; + C[7] ^= i3; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + } + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var X = this._X; + + // Iterate the system + nextState.call(this); + + // Generate four keystream words + S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); + S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); + S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); + S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); + + for (var i = 0; i < 4; i++) { + // Swap endian + S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | + (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); + + // Encrypt + M[offset + i] ^= S[i]; + } + }, + + blockSize: 128/32, + + ivSize: 64/32 + }); + + function nextState() { + // Shortcuts + var X = this._X; + var C = this._C; + + // Save old counter values + for (var i = 0; i < 8; i++) { + C_[i] = C[i]; + } + + // Calculate new counter values + C[0] = (C[0] + 0x4d34d34d + this._b) | 0; + C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; + C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; + C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; + C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; + C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; + C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; + C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; + this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; + + // Calculate the g-values + for (var i = 0; i < 8; i++) { + var gx = X[i] + C[i]; + + // Construct high and low argument for squaring + var ga = gx & 0xffff; + var gb = gx >>> 16; + + // Calculate high and low result of squaring + var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; + var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); + + // High XOR low + G[i] = gh ^ gl; + } + + // Calculate new state values + X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; + X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; + X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; + X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; + X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; + X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; + X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; + X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg); + * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg); + */ + C.Rabbit = StreamCipher._createHelper(Rabbit); + }()); + + + /** + * Counter block mode. + */ + CryptoJS.mode.CTR = (function () { + var CTR = CryptoJS.lib.BlockCipherMode.extend(); + + var Encryptor = CTR.Encryptor = CTR.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var counter = this._counter; + + // Generate keystream + if (iv) { + counter = this._counter = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } + var keystream = counter.slice(0); + cipher.encryptBlock(keystream, 0); + + // Increment counter + counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0 + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); + + CTR.Decryptor = Encryptor; + + return CTR; + }()); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + // Reusable objects + var S = []; + var C_ = []; + var G = []; + + /** + * Rabbit stream cipher algorithm. + * + * This is a legacy version that neglected to convert the key to little-endian. + * This error doesn't affect the cipher's security, + * but it does affect its compatibility with other implementations. + */ + var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var K = this._key.words; + var iv = this.cfg.iv; + + // Generate initial state values + var X = this._X = [ + K[0], (K[3] << 16) | (K[2] >>> 16), + K[1], (K[0] << 16) | (K[3] >>> 16), + K[2], (K[1] << 16) | (K[0] >>> 16), + K[3], (K[2] << 16) | (K[1] >>> 16) + ]; + + // Generate initial counter values + var C = this._C = [ + (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), + (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), + (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), + (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) + ]; + + // Carry bit + this._b = 0; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + + // Modify the counters + for (var i = 0; i < 8; i++) { + C[i] ^= X[(i + 4) & 7]; + } + + // IV setup + if (iv) { + // Shortcuts + var IV = iv.words; + var IV_0 = IV[0]; + var IV_1 = IV[1]; + + // Generate four subvectors + var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); + var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); + var i1 = (i0 >>> 16) | (i2 & 0xffff0000); + var i3 = (i2 << 16) | (i0 & 0x0000ffff); + + // Modify counter values + C[0] ^= i0; + C[1] ^= i1; + C[2] ^= i2; + C[3] ^= i3; + C[4] ^= i0; + C[5] ^= i1; + C[6] ^= i2; + C[7] ^= i3; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + } + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var X = this._X; + + // Iterate the system + nextState.call(this); + + // Generate four keystream words + S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); + S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); + S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); + S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); + + for (var i = 0; i < 4; i++) { + // Swap endian + S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | + (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); + + // Encrypt + M[offset + i] ^= S[i]; + } + }, + + blockSize: 128/32, + + ivSize: 64/32 + }); + + function nextState() { + // Shortcuts + var X = this._X; + var C = this._C; + + // Save old counter values + for (var i = 0; i < 8; i++) { + C_[i] = C[i]; + } + + // Calculate new counter values + C[0] = (C[0] + 0x4d34d34d + this._b) | 0; + C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; + C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; + C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; + C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; + C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; + C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; + C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; + this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; + + // Calculate the g-values + for (var i = 0; i < 8; i++) { + var gx = X[i] + C[i]; + + // Construct high and low argument for squaring + var ga = gx & 0xffff; + var gb = gx >>> 16; + + // Calculate high and low result of squaring + var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; + var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); + + // High XOR low + G[i] = gh ^ gl; + } + + // Calculate new state values + X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; + X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; + X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; + X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; + X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; + X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; + X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; + X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg); + */ + C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy); + }()); + + + /** + * Zero padding strategy. + */ + CryptoJS.pad.ZeroPadding = { + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Pad + data.clamp(); + data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes); + }, + + unpad: function (data) { + // Shortcut + var dataWords = data.words; + + // Unpad + var i = data.sigBytes - 1; + while (!((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) { + i--; + } + data.sigBytes = i + 1; + } + }; + + + return CryptoJS; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/enc-base64.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/enc-base64.js new file mode 100644 index 0000000000000000000000000000000000000000..d5d40824d698242de4536c5c825beb43932560a6 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/enc-base64.js @@ -0,0 +1,135 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + + /** + * Base64 encoding strategy. + */ + var Base64 = C_enc.Base64 = { + /** + * Converts a word array to a Base64 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Base64 string. + * + * @static + * + * @example + * + * var base64String = CryptoJS.enc.Base64.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + var map = this._map; + + // Clamp excess bits + wordArray.clamp(); + + // Convert + var base64Chars = []; + for (var i = 0; i < sigBytes; i += 3) { + var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; + var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; + + var triplet = (byte1 << 16) | (byte2 << 8) | byte3; + + for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { + base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); + } + } + + // Add padding + var paddingChar = map.charAt(64); + if (paddingChar) { + while (base64Chars.length % 4) { + base64Chars.push(paddingChar); + } + } + + return base64Chars.join(''); + }, + + /** + * Converts a Base64 string to a word array. + * + * @param {string} base64Str The Base64 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Base64.parse(base64String); + */ + parse: function (base64Str) { + // Shortcuts + var base64StrLength = base64Str.length; + var map = this._map; + var reverseMap = this._reverseMap; + + if (!reverseMap) { + reverseMap = this._reverseMap = []; + for (var j = 0; j < map.length; j++) { + reverseMap[map.charCodeAt(j)] = j; + } + } + + // Ignore padding + var paddingChar = map.charAt(64); + if (paddingChar) { + var paddingIndex = base64Str.indexOf(paddingChar); + if (paddingIndex !== -1) { + base64StrLength = paddingIndex; + } + } + + // Convert + return parseLoop(base64Str, base64StrLength, reverseMap); + + }, + + _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' + }; + + function parseLoop(base64Str, base64StrLength, reverseMap) { + var words = []; + var nBytes = 0; + for (var i = 0; i < base64StrLength; i++) { + if (i % 4) { + var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2); + var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2); + words[nBytes >>> 2] |= (bits1 | bits2) << (24 - (nBytes % 4) * 8); + nBytes++; + } + } + return WordArray.create(words, nBytes); + } + }()); + + + return CryptoJS.enc.Base64; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/enc-hex.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/enc-hex.js new file mode 100644 index 0000000000000000000000000000000000000000..88161ff5f629c5b7a14598614c4e9df7a677e4f8 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/enc-hex.js @@ -0,0 +1,18 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.enc.Hex; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/enc-latin1.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/enc-latin1.js new file mode 100644 index 0000000000000000000000000000000000000000..ade56dcd49425fdaac7bd87645f5592a39d31d9a --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/enc-latin1.js @@ -0,0 +1,18 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.enc.Latin1; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/enc-utf16.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/enc-utf16.js new file mode 100644 index 0000000000000000000000000000000000000000..7de62457a52e57f3cf3dc53db0023764bc522920 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/enc-utf16.js @@ -0,0 +1,149 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + + /** + * UTF-16 BE encoding strategy. + */ + var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = { + /** + * Converts a word array to a UTF-16 BE string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-16 BE string. + * + * @static + * + * @example + * + * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var utf16Chars = []; + for (var i = 0; i < sigBytes; i += 2) { + var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff; + utf16Chars.push(String.fromCharCode(codePoint)); + } + + return utf16Chars.join(''); + }, + + /** + * Converts a UTF-16 BE string to a word array. + * + * @param {string} utf16Str The UTF-16 BE string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf16.parse(utf16String); + */ + parse: function (utf16Str) { + // Shortcut + var utf16StrLength = utf16Str.length; + + // Convert + var words = []; + for (var i = 0; i < utf16StrLength; i++) { + words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16); + } + + return WordArray.create(words, utf16StrLength * 2); + } + }; + + /** + * UTF-16 LE encoding strategy. + */ + C_enc.Utf16LE = { + /** + * Converts a word array to a UTF-16 LE string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-16 LE string. + * + * @static + * + * @example + * + * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var utf16Chars = []; + for (var i = 0; i < sigBytes; i += 2) { + var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff); + utf16Chars.push(String.fromCharCode(codePoint)); + } + + return utf16Chars.join(''); + }, + + /** + * Converts a UTF-16 LE string to a word array. + * + * @param {string} utf16Str The UTF-16 LE string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str); + */ + parse: function (utf16Str) { + // Shortcut + var utf16StrLength = utf16Str.length; + + // Convert + var words = []; + for (var i = 0; i < utf16StrLength; i++) { + words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16)); + } + + return WordArray.create(words, utf16StrLength * 2); + } + }; + + function swapEndian(word) { + return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff); + } + }()); + + + return CryptoJS.enc.Utf16; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/enc-utf8.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/enc-utf8.js new file mode 100644 index 0000000000000000000000000000000000000000..e7a251d885bd88af5a67078b3e65b866fd8de36d --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/enc-utf8.js @@ -0,0 +1,18 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.enc.Utf8; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/evpkdf.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/evpkdf.js new file mode 100644 index 0000000000000000000000000000000000000000..3fe5c01c843aa766a8138a08981740e0fbd9eb65 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/evpkdf.js @@ -0,0 +1,132 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./sha1"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./sha1", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var MD5 = C_algo.MD5; + + /** + * This key derivation function is meant to conform with EVP_BytesToKey. + * www.openssl.org/docs/crypto/EVP_BytesToKey.html + */ + var EvpKDF = C_algo.EvpKDF = Base.extend({ + /** + * Configuration options. + * + * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) + * @property {Hasher} hasher The hash algorithm to use. Default: MD5 + * @property {number} iterations The number of iterations to perform. Default: 1 + */ + cfg: Base.extend({ + keySize: 128/32, + hasher: MD5, + iterations: 1 + }), + + /** + * Initializes a newly created key derivation function. + * + * @param {Object} cfg (Optional) The configuration options to use for the derivation. + * + * @example + * + * var kdf = CryptoJS.algo.EvpKDF.create(); + * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 }); + * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 }); + */ + init: function (cfg) { + this.cfg = this.cfg.extend(cfg); + }, + + /** + * Derives a key from a password. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * + * @return {WordArray} The derived key. + * + * @example + * + * var key = kdf.compute(password, salt); + */ + compute: function (password, salt) { + // Shortcut + var cfg = this.cfg; + + // Init hasher + var hasher = cfg.hasher.create(); + + // Initial values + var derivedKey = WordArray.create(); + + // Shortcuts + var derivedKeyWords = derivedKey.words; + var keySize = cfg.keySize; + var iterations = cfg.iterations; + + // Generate key + while (derivedKeyWords.length < keySize) { + if (block) { + hasher.update(block); + } + var block = hasher.update(password).finalize(salt); + hasher.reset(); + + // Iterations + for (var i = 1; i < iterations; i++) { + block = hasher.finalize(block); + hasher.reset(); + } + + derivedKey.concat(block); + } + derivedKey.sigBytes = keySize * 4; + + return derivedKey; + } + }); + + /** + * Derives a key from a password. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * @param {Object} cfg (Optional) The configuration options to use for this computation. + * + * @return {WordArray} The derived key. + * + * @static + * + * @example + * + * var key = CryptoJS.EvpKDF(password, salt); + * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 }); + * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 }); + */ + C.EvpKDF = function (password, salt, cfg) { + return EvpKDF.create(cfg).compute(password, salt); + }; + }()); + + + return CryptoJS.EvpKDF; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/format-hex.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/format-hex.js new file mode 100644 index 0000000000000000000000000000000000000000..2e9a861f0cbaedcdc97a65034acb7ae590cd70e3 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/format-hex.js @@ -0,0 +1,66 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var CipherParams = C_lib.CipherParams; + var C_enc = C.enc; + var Hex = C_enc.Hex; + var C_format = C.format; + + var HexFormatter = C_format.Hex = { + /** + * Converts the ciphertext of a cipher params object to a hexadecimally encoded string. + * + * @param {CipherParams} cipherParams The cipher params object. + * + * @return {string} The hexadecimally encoded string. + * + * @static + * + * @example + * + * var hexString = CryptoJS.format.Hex.stringify(cipherParams); + */ + stringify: function (cipherParams) { + return cipherParams.ciphertext.toString(Hex); + }, + + /** + * Converts a hexadecimally encoded ciphertext string to a cipher params object. + * + * @param {string} input The hexadecimally encoded string. + * + * @return {CipherParams} The cipher params object. + * + * @static + * + * @example + * + * var cipherParams = CryptoJS.format.Hex.parse(hexString); + */ + parse: function (input) { + var ciphertext = Hex.parse(input); + return CipherParams.create({ ciphertext: ciphertext }); + } + }; + }()); + + + return CryptoJS.format.Hex; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/format-openssl.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/format-openssl.js new file mode 100644 index 0000000000000000000000000000000000000000..3373edc6a66fbaaaa5f31e22d230bb56ca7e1a42 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/format-openssl.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.format.OpenSSL; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/hmac-md5.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/hmac-md5.js new file mode 100644 index 0000000000000000000000000000000000000000..ad7a90adc27f6b407f7d278d5c4bb21d0dd5ad0d --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/hmac-md5.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./md5"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./md5", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.HmacMD5; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/hmac-ripemd160.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/hmac-ripemd160.js new file mode 100644 index 0000000000000000000000000000000000000000..73d55a77013f5d8b318d2e6bc550e203aae78697 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/hmac-ripemd160.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./ripemd160"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./ripemd160", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.HmacRIPEMD160; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/hmac-sha1.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/hmac-sha1.js new file mode 100644 index 0000000000000000000000000000000000000000..0b570cbc31a5651d1a9287028848a1252b7f56c3 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/hmac-sha1.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./sha1"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./sha1", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.HmacSHA1; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/hmac-sha224.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/hmac-sha224.js new file mode 100644 index 0000000000000000000000000000000000000000..3778863ac416f03e7ffff1dc69c13f35628e7e5c --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/hmac-sha224.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./sha256"), require("./sha224"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./sha256", "./sha224", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.HmacSHA224; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/hmac-sha256.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/hmac-sha256.js new file mode 100644 index 0000000000000000000000000000000000000000..33b0c9fec202fd6a2262ace762f4e32156eb4c40 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/hmac-sha256.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./sha256"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./sha256", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.HmacSHA256; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/hmac-sha3.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/hmac-sha3.js new file mode 100644 index 0000000000000000000000000000000000000000..1248804966613af18ce1ab4d65f19edaef32e11e --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/hmac-sha3.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core"), require("./sha3"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core", "./sha3", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.HmacSHA3; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/hmac-sha384.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/hmac-sha384.js new file mode 100644 index 0000000000000000000000000000000000000000..0036e2b887c69f0ae89073354a3792b88c20dfdd --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/hmac-sha384.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core"), require("./sha512"), require("./sha384"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core", "./sha512", "./sha384", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.HmacSHA384; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/hmac-sha512.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/hmac-sha512.js new file mode 100644 index 0000000000000000000000000000000000000000..c1005b6ac5223132073e0183e090c4c02eb9cb87 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/hmac-sha512.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core"), require("./sha512"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core", "./sha512", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.HmacSHA512; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/hmac.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/hmac.js new file mode 100644 index 0000000000000000000000000000000000000000..8c098511429d0c01ebd7adb44df4acaacdf2ae25 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/hmac.js @@ -0,0 +1,143 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var C_enc = C.enc; + var Utf8 = C_enc.Utf8; + var C_algo = C.algo; + + /** + * HMAC algorithm. + */ + var HMAC = C_algo.HMAC = Base.extend({ + /** + * Initializes a newly created HMAC. + * + * @param {Hasher} hasher The hash algorithm to use. + * @param {WordArray|string} key The secret key. + * + * @example + * + * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key); + */ + init: function (hasher, key) { + // Init hasher + hasher = this._hasher = new hasher.init(); + + // Convert string to WordArray, else assume WordArray already + if (typeof key == 'string') { + key = Utf8.parse(key); + } + + // Shortcuts + var hasherBlockSize = hasher.blockSize; + var hasherBlockSizeBytes = hasherBlockSize * 4; + + // Allow arbitrary length keys + if (key.sigBytes > hasherBlockSizeBytes) { + key = hasher.finalize(key); + } + + // Clamp excess bits + key.clamp(); + + // Clone key for inner and outer pads + var oKey = this._oKey = key.clone(); + var iKey = this._iKey = key.clone(); + + // Shortcuts + var oKeyWords = oKey.words; + var iKeyWords = iKey.words; + + // XOR keys with pad constants + for (var i = 0; i < hasherBlockSize; i++) { + oKeyWords[i] ^= 0x5c5c5c5c; + iKeyWords[i] ^= 0x36363636; + } + oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes; + + // Set initial values + this.reset(); + }, + + /** + * Resets this HMAC to its initial state. + * + * @example + * + * hmacHasher.reset(); + */ + reset: function () { + // Shortcut + var hasher = this._hasher; + + // Reset + hasher.reset(); + hasher.update(this._iKey); + }, + + /** + * Updates this HMAC with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {HMAC} This HMAC instance. + * + * @example + * + * hmacHasher.update('message'); + * hmacHasher.update(wordArray); + */ + update: function (messageUpdate) { + this._hasher.update(messageUpdate); + + // Chainable + return this; + }, + + /** + * Finalizes the HMAC computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The HMAC. + * + * @example + * + * var hmac = hmacHasher.finalize(); + * var hmac = hmacHasher.finalize('message'); + * var hmac = hmacHasher.finalize(wordArray); + */ + finalize: function (messageUpdate) { + // Shortcut + var hasher = this._hasher; + + // Compute HMAC + var innerHash = hasher.finalize(messageUpdate); + hasher.reset(); + var hmac = hasher.finalize(this._oKey.clone().concat(innerHash)); + + return hmac; + } + }); + }()); + + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/index.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/index.js new file mode 100644 index 0000000000000000000000000000000000000000..c93556a71598fddb82ab62ed06c5d51e44cdb1de --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/index.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core"), require("./lib-typedarrays"), require("./enc-utf16"), require("./enc-base64"), require("./md5"), require("./sha1"), require("./sha256"), require("./sha224"), require("./sha512"), require("./sha384"), require("./sha3"), require("./ripemd160"), require("./hmac"), require("./pbkdf2"), require("./evpkdf"), require("./cipher-core"), require("./mode-cfb"), require("./mode-ctr"), require("./mode-ctr-gladman"), require("./mode-ofb"), require("./mode-ecb"), require("./pad-ansix923"), require("./pad-iso10126"), require("./pad-iso97971"), require("./pad-zeropadding"), require("./pad-nopadding"), require("./format-hex"), require("./aes"), require("./tripledes"), require("./rc4"), require("./rabbit"), require("./rabbit-legacy")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core", "./lib-typedarrays", "./enc-utf16", "./enc-base64", "./md5", "./sha1", "./sha256", "./sha224", "./sha512", "./sha384", "./sha3", "./ripemd160", "./hmac", "./pbkdf2", "./evpkdf", "./cipher-core", "./mode-cfb", "./mode-ctr", "./mode-ctr-gladman", "./mode-ofb", "./mode-ecb", "./pad-ansix923", "./pad-iso10126", "./pad-iso97971", "./pad-zeropadding", "./pad-nopadding", "./format-hex", "./aes", "./tripledes", "./rc4", "./rabbit", "./rabbit-legacy"], factory); + } + else { + // Global (browser) + root.CryptoJS = factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/lib-typedarrays.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/lib-typedarrays.js new file mode 100644 index 0000000000000000000000000000000000000000..264b210742682d09a07094f3ccda90064fb6b0cf --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/lib-typedarrays.js @@ -0,0 +1,76 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Check if typed arrays are supported + if (typeof ArrayBuffer != 'function') { + return; + } + + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + + // Reference original init + var superInit = WordArray.init; + + // Augment WordArray.init to handle typed arrays + var subInit = WordArray.init = function (typedArray) { + // Convert buffers to uint8 + if (typedArray instanceof ArrayBuffer) { + typedArray = new Uint8Array(typedArray); + } + + // Convert other array views to uint8 + if ( + typedArray instanceof Int8Array || + (typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray) || + typedArray instanceof Int16Array || + typedArray instanceof Uint16Array || + typedArray instanceof Int32Array || + typedArray instanceof Uint32Array || + typedArray instanceof Float32Array || + typedArray instanceof Float64Array + ) { + typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); + } + + // Handle Uint8Array + if (typedArray instanceof Uint8Array) { + // Shortcut + var typedArrayByteLength = typedArray.byteLength; + + // Extract bytes + var words = []; + for (var i = 0; i < typedArrayByteLength; i++) { + words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8); + } + + // Initialize this word array + superInit.call(this, words, typedArrayByteLength); + } else { + // Else call normal init + superInit.apply(this, arguments); + } + }; + + subInit.prototype = WordArray; + }()); + + + return CryptoJS.lib.WordArray; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/md5.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/md5.js new file mode 100644 index 0000000000000000000000000000000000000000..12b0fdd4b4f00066c52969ead2bac439f668df2d --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/md5.js @@ -0,0 +1,268 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Constants table + var T = []; + + // Compute constants + (function () { + for (var i = 0; i < 64; i++) { + T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0; + } + }()); + + /** + * MD5 hash algorithm. + */ + var MD5 = C_algo.MD5 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0x67452301, 0xefcdab89, + 0x98badcfe, 0x10325476 + ]); + }, + + _doProcessBlock: function (M, offset) { + // Swap endian + for (var i = 0; i < 16; i++) { + // Shortcuts + var offset_i = offset + i; + var M_offset_i = M[offset_i]; + + M[offset_i] = ( + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ); + } + + // Shortcuts + var H = this._hash.words; + + var M_offset_0 = M[offset + 0]; + var M_offset_1 = M[offset + 1]; + var M_offset_2 = M[offset + 2]; + var M_offset_3 = M[offset + 3]; + var M_offset_4 = M[offset + 4]; + var M_offset_5 = M[offset + 5]; + var M_offset_6 = M[offset + 6]; + var M_offset_7 = M[offset + 7]; + var M_offset_8 = M[offset + 8]; + var M_offset_9 = M[offset + 9]; + var M_offset_10 = M[offset + 10]; + var M_offset_11 = M[offset + 11]; + var M_offset_12 = M[offset + 12]; + var M_offset_13 = M[offset + 13]; + var M_offset_14 = M[offset + 14]; + var M_offset_15 = M[offset + 15]; + + // Working varialbes + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + + // Computation + a = FF(a, b, c, d, M_offset_0, 7, T[0]); + d = FF(d, a, b, c, M_offset_1, 12, T[1]); + c = FF(c, d, a, b, M_offset_2, 17, T[2]); + b = FF(b, c, d, a, M_offset_3, 22, T[3]); + a = FF(a, b, c, d, M_offset_4, 7, T[4]); + d = FF(d, a, b, c, M_offset_5, 12, T[5]); + c = FF(c, d, a, b, M_offset_6, 17, T[6]); + b = FF(b, c, d, a, M_offset_7, 22, T[7]); + a = FF(a, b, c, d, M_offset_8, 7, T[8]); + d = FF(d, a, b, c, M_offset_9, 12, T[9]); + c = FF(c, d, a, b, M_offset_10, 17, T[10]); + b = FF(b, c, d, a, M_offset_11, 22, T[11]); + a = FF(a, b, c, d, M_offset_12, 7, T[12]); + d = FF(d, a, b, c, M_offset_13, 12, T[13]); + c = FF(c, d, a, b, M_offset_14, 17, T[14]); + b = FF(b, c, d, a, M_offset_15, 22, T[15]); + + a = GG(a, b, c, d, M_offset_1, 5, T[16]); + d = GG(d, a, b, c, M_offset_6, 9, T[17]); + c = GG(c, d, a, b, M_offset_11, 14, T[18]); + b = GG(b, c, d, a, M_offset_0, 20, T[19]); + a = GG(a, b, c, d, M_offset_5, 5, T[20]); + d = GG(d, a, b, c, M_offset_10, 9, T[21]); + c = GG(c, d, a, b, M_offset_15, 14, T[22]); + b = GG(b, c, d, a, M_offset_4, 20, T[23]); + a = GG(a, b, c, d, M_offset_9, 5, T[24]); + d = GG(d, a, b, c, M_offset_14, 9, T[25]); + c = GG(c, d, a, b, M_offset_3, 14, T[26]); + b = GG(b, c, d, a, M_offset_8, 20, T[27]); + a = GG(a, b, c, d, M_offset_13, 5, T[28]); + d = GG(d, a, b, c, M_offset_2, 9, T[29]); + c = GG(c, d, a, b, M_offset_7, 14, T[30]); + b = GG(b, c, d, a, M_offset_12, 20, T[31]); + + a = HH(a, b, c, d, M_offset_5, 4, T[32]); + d = HH(d, a, b, c, M_offset_8, 11, T[33]); + c = HH(c, d, a, b, M_offset_11, 16, T[34]); + b = HH(b, c, d, a, M_offset_14, 23, T[35]); + a = HH(a, b, c, d, M_offset_1, 4, T[36]); + d = HH(d, a, b, c, M_offset_4, 11, T[37]); + c = HH(c, d, a, b, M_offset_7, 16, T[38]); + b = HH(b, c, d, a, M_offset_10, 23, T[39]); + a = HH(a, b, c, d, M_offset_13, 4, T[40]); + d = HH(d, a, b, c, M_offset_0, 11, T[41]); + c = HH(c, d, a, b, M_offset_3, 16, T[42]); + b = HH(b, c, d, a, M_offset_6, 23, T[43]); + a = HH(a, b, c, d, M_offset_9, 4, T[44]); + d = HH(d, a, b, c, M_offset_12, 11, T[45]); + c = HH(c, d, a, b, M_offset_15, 16, T[46]); + b = HH(b, c, d, a, M_offset_2, 23, T[47]); + + a = II(a, b, c, d, M_offset_0, 6, T[48]); + d = II(d, a, b, c, M_offset_7, 10, T[49]); + c = II(c, d, a, b, M_offset_14, 15, T[50]); + b = II(b, c, d, a, M_offset_5, 21, T[51]); + a = II(a, b, c, d, M_offset_12, 6, T[52]); + d = II(d, a, b, c, M_offset_3, 10, T[53]); + c = II(c, d, a, b, M_offset_10, 15, T[54]); + b = II(b, c, d, a, M_offset_1, 21, T[55]); + a = II(a, b, c, d, M_offset_8, 6, T[56]); + d = II(d, a, b, c, M_offset_15, 10, T[57]); + c = II(c, d, a, b, M_offset_6, 15, T[58]); + b = II(b, c, d, a, M_offset_13, 21, T[59]); + a = II(a, b, c, d, M_offset_4, 6, T[60]); + d = II(d, a, b, c, M_offset_11, 10, T[61]); + c = II(c, d, a, b, M_offset_2, 15, T[62]); + b = II(b, c, d, a, M_offset_9, 21, T[63]); + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + + var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000); + var nBitsTotalL = nBitsTotal; + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = ( + (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) | + (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00) + ); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( + (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) | + (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00) + ); + + data.sigBytes = (dataWords.length + 1) * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var hash = this._hash; + var H = hash.words; + + // Swap endian + for (var i = 0; i < 4; i++) { + // Shortcut + var H_i = H[i]; + + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + } + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + function FF(a, b, c, d, x, s, t) { + var n = a + ((b & c) | (~b & d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function GG(a, b, c, d, x, s, t) { + var n = a + ((b & d) | (c & ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function HH(a, b, c, d, x, s, t) { + var n = a + (b ^ c ^ d) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function II(a, b, c, d, x, s, t) { + var n = a + (c ^ (b | ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.MD5('message'); + * var hash = CryptoJS.MD5(wordArray); + */ + C.MD5 = Hasher._createHelper(MD5); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacMD5(message, key); + */ + C.HmacMD5 = Hasher._createHmacHelper(MD5); + }(Math)); + + + return CryptoJS.MD5; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/mode-cfb.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/mode-cfb.js new file mode 100644 index 0000000000000000000000000000000000000000..86231f1b3f1e376f25fb566e654e742f6f860d28 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/mode-cfb.js @@ -0,0 +1,78 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Cipher Feedback block mode. + */ + CryptoJS.mode.CFB = (function () { + var CFB = CryptoJS.lib.BlockCipherMode.extend(); + + CFB.Encryptor = CFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); + + // Remember this block to use with next block + this._prevBlock = words.slice(offset, offset + blockSize); + } + }); + + CFB.Decryptor = CFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // Remember this block to use with next block + var thisBlock = words.slice(offset, offset + blockSize); + + generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); + + // This block becomes the previous block + this._prevBlock = thisBlock; + } + }); + + function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) { + // Shortcut + var iv = this._iv; + + // Generate keystream + if (iv) { + var keystream = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } else { + var keystream = this._prevBlock; + } + cipher.encryptBlock(keystream, 0); + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + + return CFB; + }()); + + + return CryptoJS.mode.CFB; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/mode-ctr-gladman.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/mode-ctr-gladman.js new file mode 100644 index 0000000000000000000000000000000000000000..bbc56876e3cf854f7620aae07c2125eb3dbb19a5 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/mode-ctr-gladman.js @@ -0,0 +1,116 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** @preserve + * Counter block mode compatible with Dr Brian Gladman fileenc.c + * derived from CryptoJS.mode.CTR + * Jan Hruby jhruby.web@gmail.com + */ + CryptoJS.mode.CTRGladman = (function () { + var CTRGladman = CryptoJS.lib.BlockCipherMode.extend(); + + function incWord(word) + { + if (((word >> 24) & 0xff) === 0xff) { //overflow + var b1 = (word >> 16)&0xff; + var b2 = (word >> 8)&0xff; + var b3 = word & 0xff; + + if (b1 === 0xff) // overflow b1 + { + b1 = 0; + if (b2 === 0xff) + { + b2 = 0; + if (b3 === 0xff) + { + b3 = 0; + } + else + { + ++b3; + } + } + else + { + ++b2; + } + } + else + { + ++b1; + } + + word = 0; + word += (b1 << 16); + word += (b2 << 8); + word += b3; + } + else + { + word += (0x01 << 24); + } + return word; + } + + function incCounter(counter) + { + if ((counter[0] = incWord(counter[0])) === 0) + { + // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8 + counter[1] = incWord(counter[1]); + } + return counter; + } + + var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var counter = this._counter; + + // Generate keystream + if (iv) { + counter = this._counter = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } + + incCounter(counter); + + var keystream = counter.slice(0); + cipher.encryptBlock(keystream, 0); + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); + + CTRGladman.Decryptor = Encryptor; + + return CTRGladman; + }()); + + + + + return CryptoJS.mode.CTRGladman; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/mode-ctr.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/mode-ctr.js new file mode 100644 index 0000000000000000000000000000000000000000..c3d470a6fac667465c5fe460a85bd3a7ad1c70a5 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/mode-ctr.js @@ -0,0 +1,58 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Counter block mode. + */ + CryptoJS.mode.CTR = (function () { + var CTR = CryptoJS.lib.BlockCipherMode.extend(); + + var Encryptor = CTR.Encryptor = CTR.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var counter = this._counter; + + // Generate keystream + if (iv) { + counter = this._counter = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } + var keystream = counter.slice(0); + cipher.encryptBlock(keystream, 0); + + // Increment counter + counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0 + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); + + CTR.Decryptor = Encryptor; + + return CTR; + }()); + + + return CryptoJS.mode.CTR; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/mode-ecb.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/mode-ecb.js new file mode 100644 index 0000000000000000000000000000000000000000..ff0692175b6dd588c023f25b10798ee25bd6d374 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/mode-ecb.js @@ -0,0 +1,40 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Electronic Codebook block mode. + */ + CryptoJS.mode.ECB = (function () { + var ECB = CryptoJS.lib.BlockCipherMode.extend(); + + ECB.Encryptor = ECB.extend({ + processBlock: function (words, offset) { + this._cipher.encryptBlock(words, offset); + } + }); + + ECB.Decryptor = ECB.extend({ + processBlock: function (words, offset) { + this._cipher.decryptBlock(words, offset); + } + }); + + return ECB; + }()); + + + return CryptoJS.mode.ECB; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/mode-ofb.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/mode-ofb.js new file mode 100644 index 0000000000000000000000000000000000000000..c01314c2284da6d92910ccb4d98e76f5e5fe1564 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/mode-ofb.js @@ -0,0 +1,54 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Output Feedback block mode. + */ + CryptoJS.mode.OFB = (function () { + var OFB = CryptoJS.lib.BlockCipherMode.extend(); + + var Encryptor = OFB.Encryptor = OFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var keystream = this._keystream; + + // Generate keystream + if (iv) { + keystream = this._keystream = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } + cipher.encryptBlock(keystream, 0); + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); + + OFB.Decryptor = Encryptor; + + return OFB; + }()); + + + return CryptoJS.mode.OFB; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/package.json b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/package.json new file mode 100644 index 0000000000000000000000000000000000000000..dae37ed2fccb40c8acf8343072f845773a405c5c --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/package.json @@ -0,0 +1,38 @@ +{ + "name": "crypto-js", + "version": "3.1.9", + "description": "JavaScript library of crypto standards.", + "license": "MIT", + "author": { + "name": "Evan Vosberg", + "url": "http://github.com/evanvosberg" + }, + "homepage": "http://github.com/brix/crypto-js", + "repository": { + "type": "git", + "url": "http://github.com/brix/crypto-js.git" + }, + "keywords": [ + "security", + "crypto", + "Hash", + "MD5", + "SHA1", + "SHA-1", + "SHA256", + "SHA-256", + "RC4", + "Rabbit", + "AES", + "DES", + "PBKDF2", + "HMAC", + "OFB", + "CFB", + "CTR", + "CBC", + "Base64" + ], + "main": "index.js", + "dependencies": {} +} diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/pad-ansix923.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/pad-ansix923.js new file mode 100644 index 0000000000000000000000000000000000000000..f01f21e45cc2e54e78fe9968a42e4e0f9c5372e1 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/pad-ansix923.js @@ -0,0 +1,49 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * ANSI X.923 padding strategy. + */ + CryptoJS.pad.AnsiX923 = { + pad: function (data, blockSize) { + // Shortcuts + var dataSigBytes = data.sigBytes; + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes; + + // Compute last byte position + var lastBytePos = dataSigBytes + nPaddingBytes - 1; + + // Pad + data.clamp(); + data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8); + data.sigBytes += nPaddingBytes; + }, + + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + + return CryptoJS.pad.Ansix923; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/pad-iso10126.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/pad-iso10126.js new file mode 100644 index 0000000000000000000000000000000000000000..6e2aefd8394228ed4573b4294ff7f7a6a65649f1 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/pad-iso10126.js @@ -0,0 +1,44 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * ISO 10126 padding strategy. + */ + CryptoJS.pad.Iso10126 = { + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; + + // Pad + data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)). + concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1)); + }, + + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + + return CryptoJS.pad.Iso10126; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/pad-iso97971.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/pad-iso97971.js new file mode 100644 index 0000000000000000000000000000000000000000..41049b45fc335ce11af619c9af5622fc5cda4621 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/pad-iso97971.js @@ -0,0 +1,40 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * ISO/IEC 9797-1 Padding Method 2. + */ + CryptoJS.pad.Iso97971 = { + pad: function (data, blockSize) { + // Add 0x80 byte + data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1)); + + // Zero pad the rest + CryptoJS.pad.ZeroPadding.pad(data, blockSize); + }, + + unpad: function (data) { + // Remove zero padding + CryptoJS.pad.ZeroPadding.unpad(data); + + // Remove one more byte -- the 0x80 byte + data.sigBytes--; + } + }; + + + return CryptoJS.pad.Iso97971; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/pad-nopadding.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/pad-nopadding.js new file mode 100644 index 0000000000000000000000000000000000000000..c7787c94d2e01d979ba45d2163b90ed05e902e35 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/pad-nopadding.js @@ -0,0 +1,30 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * A noop padding strategy. + */ + CryptoJS.pad.NoPadding = { + pad: function () { + }, + + unpad: function () { + } + }; + + + return CryptoJS.pad.NoPadding; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/pad-pkcs7.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/pad-pkcs7.js new file mode 100644 index 0000000000000000000000000000000000000000..3555168566e57e7baf9e13cdd48002ed92f8ea3e --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/pad-pkcs7.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.pad.Pkcs7; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/pad-zeropadding.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/pad-zeropadding.js new file mode 100644 index 0000000000000000000000000000000000000000..0e8a859cfdcf13f16127ff18e7988e2c4f745a5b --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/pad-zeropadding.js @@ -0,0 +1,45 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Zero padding strategy. + */ + CryptoJS.pad.ZeroPadding = { + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Pad + data.clamp(); + data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes); + }, + + unpad: function (data) { + // Shortcut + var dataWords = data.words; + + // Unpad + var i = data.sigBytes - 1; + while (!((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) { + i--; + } + data.sigBytes = i + 1; + } + }; + + + return CryptoJS.pad.ZeroPadding; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/pbkdf2.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/pbkdf2.js new file mode 100644 index 0000000000000000000000000000000000000000..1258251a58f9c46b68d9d7552680fa2010c25704 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/pbkdf2.js @@ -0,0 +1,145 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./sha1"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./sha1", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var SHA1 = C_algo.SHA1; + var HMAC = C_algo.HMAC; + + /** + * Password-Based Key Derivation Function 2 algorithm. + */ + var PBKDF2 = C_algo.PBKDF2 = Base.extend({ + /** + * Configuration options. + * + * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) + * @property {Hasher} hasher The hasher to use. Default: SHA1 + * @property {number} iterations The number of iterations to perform. Default: 1 + */ + cfg: Base.extend({ + keySize: 128/32, + hasher: SHA1, + iterations: 1 + }), + + /** + * Initializes a newly created key derivation function. + * + * @param {Object} cfg (Optional) The configuration options to use for the derivation. + * + * @example + * + * var kdf = CryptoJS.algo.PBKDF2.create(); + * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 }); + * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 }); + */ + init: function (cfg) { + this.cfg = this.cfg.extend(cfg); + }, + + /** + * Computes the Password-Based Key Derivation Function 2. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * + * @return {WordArray} The derived key. + * + * @example + * + * var key = kdf.compute(password, salt); + */ + compute: function (password, salt) { + // Shortcut + var cfg = this.cfg; + + // Init HMAC + var hmac = HMAC.create(cfg.hasher, password); + + // Initial values + var derivedKey = WordArray.create(); + var blockIndex = WordArray.create([0x00000001]); + + // Shortcuts + var derivedKeyWords = derivedKey.words; + var blockIndexWords = blockIndex.words; + var keySize = cfg.keySize; + var iterations = cfg.iterations; + + // Generate key + while (derivedKeyWords.length < keySize) { + var block = hmac.update(salt).finalize(blockIndex); + hmac.reset(); + + // Shortcuts + var blockWords = block.words; + var blockWordsLength = blockWords.length; + + // Iterations + var intermediate = block; + for (var i = 1; i < iterations; i++) { + intermediate = hmac.finalize(intermediate); + hmac.reset(); + + // Shortcut + var intermediateWords = intermediate.words; + + // XOR intermediate with block + for (var j = 0; j < blockWordsLength; j++) { + blockWords[j] ^= intermediateWords[j]; + } + } + + derivedKey.concat(block); + blockIndexWords[0]++; + } + derivedKey.sigBytes = keySize * 4; + + return derivedKey; + } + }); + + /** + * Computes the Password-Based Key Derivation Function 2. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * @param {Object} cfg (Optional) The configuration options to use for this computation. + * + * @return {WordArray} The derived key. + * + * @static + * + * @example + * + * var key = CryptoJS.PBKDF2(password, salt); + * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 }); + * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 }); + */ + C.PBKDF2 = function (password, salt, cfg) { + return PBKDF2.create(cfg).compute(password, salt); + }; + }()); + + + return CryptoJS.PBKDF2; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/rabbit-legacy.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/rabbit-legacy.js new file mode 100644 index 0000000000000000000000000000000000000000..e118b6b6a28b3ddc6d1547e42f16f8f34715e486 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/rabbit-legacy.js @@ -0,0 +1,190 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + // Reusable objects + var S = []; + var C_ = []; + var G = []; + + /** + * Rabbit stream cipher algorithm. + * + * This is a legacy version that neglected to convert the key to little-endian. + * This error doesn't affect the cipher's security, + * but it does affect its compatibility with other implementations. + */ + var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var K = this._key.words; + var iv = this.cfg.iv; + + // Generate initial state values + var X = this._X = [ + K[0], (K[3] << 16) | (K[2] >>> 16), + K[1], (K[0] << 16) | (K[3] >>> 16), + K[2], (K[1] << 16) | (K[0] >>> 16), + K[3], (K[2] << 16) | (K[1] >>> 16) + ]; + + // Generate initial counter values + var C = this._C = [ + (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), + (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), + (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), + (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) + ]; + + // Carry bit + this._b = 0; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + + // Modify the counters + for (var i = 0; i < 8; i++) { + C[i] ^= X[(i + 4) & 7]; + } + + // IV setup + if (iv) { + // Shortcuts + var IV = iv.words; + var IV_0 = IV[0]; + var IV_1 = IV[1]; + + // Generate four subvectors + var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); + var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); + var i1 = (i0 >>> 16) | (i2 & 0xffff0000); + var i3 = (i2 << 16) | (i0 & 0x0000ffff); + + // Modify counter values + C[0] ^= i0; + C[1] ^= i1; + C[2] ^= i2; + C[3] ^= i3; + C[4] ^= i0; + C[5] ^= i1; + C[6] ^= i2; + C[7] ^= i3; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + } + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var X = this._X; + + // Iterate the system + nextState.call(this); + + // Generate four keystream words + S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); + S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); + S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); + S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); + + for (var i = 0; i < 4; i++) { + // Swap endian + S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | + (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); + + // Encrypt + M[offset + i] ^= S[i]; + } + }, + + blockSize: 128/32, + + ivSize: 64/32 + }); + + function nextState() { + // Shortcuts + var X = this._X; + var C = this._C; + + // Save old counter values + for (var i = 0; i < 8; i++) { + C_[i] = C[i]; + } + + // Calculate new counter values + C[0] = (C[0] + 0x4d34d34d + this._b) | 0; + C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; + C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; + C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; + C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; + C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; + C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; + C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; + this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; + + // Calculate the g-values + for (var i = 0; i < 8; i++) { + var gx = X[i] + C[i]; + + // Construct high and low argument for squaring + var ga = gx & 0xffff; + var gb = gx >>> 16; + + // Calculate high and low result of squaring + var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; + var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); + + // High XOR low + G[i] = gh ^ gl; + } + + // Calculate new state values + X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; + X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; + X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; + X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; + X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; + X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; + X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; + X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg); + */ + C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy); + }()); + + + return CryptoJS.RabbitLegacy; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/rabbit.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/rabbit.js new file mode 100644 index 0000000000000000000000000000000000000000..1b0683362026c7143324e142515310e6f80fde00 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/rabbit.js @@ -0,0 +1,192 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + // Reusable objects + var S = []; + var C_ = []; + var G = []; + + /** + * Rabbit stream cipher algorithm + */ + var Rabbit = C_algo.Rabbit = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var K = this._key.words; + var iv = this.cfg.iv; + + // Swap endian + for (var i = 0; i < 4; i++) { + K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) | + (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00); + } + + // Generate initial state values + var X = this._X = [ + K[0], (K[3] << 16) | (K[2] >>> 16), + K[1], (K[0] << 16) | (K[3] >>> 16), + K[2], (K[1] << 16) | (K[0] >>> 16), + K[3], (K[2] << 16) | (K[1] >>> 16) + ]; + + // Generate initial counter values + var C = this._C = [ + (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), + (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), + (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), + (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) + ]; + + // Carry bit + this._b = 0; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + + // Modify the counters + for (var i = 0; i < 8; i++) { + C[i] ^= X[(i + 4) & 7]; + } + + // IV setup + if (iv) { + // Shortcuts + var IV = iv.words; + var IV_0 = IV[0]; + var IV_1 = IV[1]; + + // Generate four subvectors + var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); + var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); + var i1 = (i0 >>> 16) | (i2 & 0xffff0000); + var i3 = (i2 << 16) | (i0 & 0x0000ffff); + + // Modify counter values + C[0] ^= i0; + C[1] ^= i1; + C[2] ^= i2; + C[3] ^= i3; + C[4] ^= i0; + C[5] ^= i1; + C[6] ^= i2; + C[7] ^= i3; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + } + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var X = this._X; + + // Iterate the system + nextState.call(this); + + // Generate four keystream words + S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); + S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); + S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); + S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); + + for (var i = 0; i < 4; i++) { + // Swap endian + S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | + (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); + + // Encrypt + M[offset + i] ^= S[i]; + } + }, + + blockSize: 128/32, + + ivSize: 64/32 + }); + + function nextState() { + // Shortcuts + var X = this._X; + var C = this._C; + + // Save old counter values + for (var i = 0; i < 8; i++) { + C_[i] = C[i]; + } + + // Calculate new counter values + C[0] = (C[0] + 0x4d34d34d + this._b) | 0; + C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; + C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; + C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; + C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; + C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; + C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; + C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; + this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; + + // Calculate the g-values + for (var i = 0; i < 8; i++) { + var gx = X[i] + C[i]; + + // Construct high and low argument for squaring + var ga = gx & 0xffff; + var gb = gx >>> 16; + + // Calculate high and low result of squaring + var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; + var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); + + // High XOR low + G[i] = gh ^ gl; + } + + // Calculate new state values + X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; + X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; + X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; + X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; + X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; + X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; + X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; + X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg); + * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg); + */ + C.Rabbit = StreamCipher._createHelper(Rabbit); + }()); + + + return CryptoJS.Rabbit; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/rc4.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/rc4.js new file mode 100644 index 0000000000000000000000000000000000000000..0e4bdff517f01602ac862305889b2fbaeee1bf36 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/rc4.js @@ -0,0 +1,139 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + /** + * RC4 stream cipher algorithm. + */ + var RC4 = C_algo.RC4 = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + var keySigBytes = key.sigBytes; + + // Init sbox + var S = this._S = []; + for (var i = 0; i < 256; i++) { + S[i] = i; + } + + // Key setup + for (var i = 0, j = 0; i < 256; i++) { + var keyByteIndex = i % keySigBytes; + var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff; + + j = (j + S[i] + keyByte) % 256; + + // Swap + var t = S[i]; + S[i] = S[j]; + S[j] = t; + } + + // Counters + this._i = this._j = 0; + }, + + _doProcessBlock: function (M, offset) { + M[offset] ^= generateKeystreamWord.call(this); + }, + + keySize: 256/32, + + ivSize: 0 + }); + + function generateKeystreamWord() { + // Shortcuts + var S = this._S; + var i = this._i; + var j = this._j; + + // Generate keystream word + var keystreamWord = 0; + for (var n = 0; n < 4; n++) { + i = (i + 1) % 256; + j = (j + S[i]) % 256; + + // Swap + var t = S[i]; + S[i] = S[j]; + S[j] = t; + + keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8); + } + + // Update counters + this._i = i; + this._j = j; + + return keystreamWord; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg); + */ + C.RC4 = StreamCipher._createHelper(RC4); + + /** + * Modified RC4 stream cipher algorithm. + */ + var RC4Drop = C_algo.RC4Drop = RC4.extend({ + /** + * Configuration options. + * + * @property {number} drop The number of keystream words to drop. Default 192 + */ + cfg: RC4.cfg.extend({ + drop: 192 + }), + + _doReset: function () { + RC4._doReset.call(this); + + // Drop + for (var i = this.cfg.drop; i > 0; i--) { + generateKeystreamWord.call(this); + } + } + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg); + */ + C.RC4Drop = StreamCipher._createHelper(RC4Drop); + }()); + + + return CryptoJS.RC4; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/ripemd160.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/ripemd160.js new file mode 100644 index 0000000000000000000000000000000000000000..24feb47c75f2ba14079a0fe0b2ec44e7bfc5f8b3 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/ripemd160.js @@ -0,0 +1,267 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** @preserve + (c) 2012 by Cédric Mesnil. All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Constants table + var _zl = WordArray.create([ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, + 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, + 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, + 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]); + var _zr = WordArray.create([ + 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, + 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, + 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, + 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, + 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]); + var _sl = WordArray.create([ + 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, + 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, + 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, + 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, + 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]); + var _sr = WordArray.create([ + 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, + 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, + 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, + 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, + 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]); + + var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]); + var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]); + + /** + * RIPEMD160 hash algorithm. + */ + var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({ + _doReset: function () { + this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]); + }, + + _doProcessBlock: function (M, offset) { + + // Swap endian + for (var i = 0; i < 16; i++) { + // Shortcuts + var offset_i = offset + i; + var M_offset_i = M[offset_i]; + + // Swap + M[offset_i] = ( + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ); + } + // Shortcut + var H = this._hash.words; + var hl = _hl.words; + var hr = _hr.words; + var zl = _zl.words; + var zr = _zr.words; + var sl = _sl.words; + var sr = _sr.words; + + // Working variables + var al, bl, cl, dl, el; + var ar, br, cr, dr, er; + + ar = al = H[0]; + br = bl = H[1]; + cr = cl = H[2]; + dr = dl = H[3]; + er = el = H[4]; + // Computation + var t; + for (var i = 0; i < 80; i += 1) { + t = (al + M[offset+zl[i]])|0; + if (i<16){ + t += f1(bl,cl,dl) + hl[0]; + } else if (i<32) { + t += f2(bl,cl,dl) + hl[1]; + } else if (i<48) { + t += f3(bl,cl,dl) + hl[2]; + } else if (i<64) { + t += f4(bl,cl,dl) + hl[3]; + } else {// if (i<80) { + t += f5(bl,cl,dl) + hl[4]; + } + t = t|0; + t = rotl(t,sl[i]); + t = (t+el)|0; + al = el; + el = dl; + dl = rotl(cl, 10); + cl = bl; + bl = t; + + t = (ar + M[offset+zr[i]])|0; + if (i<16){ + t += f5(br,cr,dr) + hr[0]; + } else if (i<32) { + t += f4(br,cr,dr) + hr[1]; + } else if (i<48) { + t += f3(br,cr,dr) + hr[2]; + } else if (i<64) { + t += f2(br,cr,dr) + hr[3]; + } else {// if (i<80) { + t += f1(br,cr,dr) + hr[4]; + } + t = t|0; + t = rotl(t,sr[i]) ; + t = (t+er)|0; + ar = er; + er = dr; + dr = rotl(cr, 10); + cr = br; + br = t; + } + // Intermediate hash value + t = (H[1] + cl + dr)|0; + H[1] = (H[2] + dl + er)|0; + H[2] = (H[3] + el + ar)|0; + H[3] = (H[4] + al + br)|0; + H[4] = (H[0] + bl + cr)|0; + H[0] = t; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( + (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) | + (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00) + ); + data.sigBytes = (dataWords.length + 1) * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var hash = this._hash; + var H = hash.words; + + // Swap endian + for (var i = 0; i < 5; i++) { + // Shortcut + var H_i = H[i]; + + // Swap + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + } + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + + function f1(x, y, z) { + return ((x) ^ (y) ^ (z)); + + } + + function f2(x, y, z) { + return (((x)&(y)) | ((~x)&(z))); + } + + function f3(x, y, z) { + return (((x) | (~(y))) ^ (z)); + } + + function f4(x, y, z) { + return (((x) & (z)) | ((y)&(~(z)))); + } + + function f5(x, y, z) { + return ((x) ^ ((y) |(~(z)))); + + } + + function rotl(x,n) { + return (x<<n) | (x>>>(32-n)); + } + + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.RIPEMD160('message'); + * var hash = CryptoJS.RIPEMD160(wordArray); + */ + C.RIPEMD160 = Hasher._createHelper(RIPEMD160); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacRIPEMD160(message, key); + */ + C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160); + }(Math)); + + + return CryptoJS.RIPEMD160; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/sha1.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/sha1.js new file mode 100644 index 0000000000000000000000000000000000000000..669114962a3ffcaebcf98cff345d2043f6ae5e45 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/sha1.js @@ -0,0 +1,150 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Reusable object + var W = []; + + /** + * SHA-1 hash algorithm. + */ + var SHA1 = C_algo.SHA1 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0x67452301, 0xefcdab89, + 0x98badcfe, 0x10325476, + 0xc3d2e1f0 + ]); + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var H = this._hash.words; + + // Working variables + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + var e = H[4]; + + // Computation + for (var i = 0; i < 80; i++) { + if (i < 16) { + W[i] = M[offset + i] | 0; + } else { + var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]; + W[i] = (n << 1) | (n >>> 31); + } + + var t = ((a << 5) | (a >>> 27)) + e + W[i]; + if (i < 20) { + t += ((b & c) | (~b & d)) + 0x5a827999; + } else if (i < 40) { + t += (b ^ c ^ d) + 0x6ed9eba1; + } else if (i < 60) { + t += ((b & c) | (b & d) | (c & d)) - 0x70e44324; + } else /* if (i < 80) */ { + t += (b ^ c ^ d) - 0x359d3e2a; + } + + e = d; + d = c; + c = (b << 30) | (b >>> 2); + b = a; + a = t; + } + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + H[4] = (H[4] + e) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Return final computed hash + return this._hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA1('message'); + * var hash = CryptoJS.SHA1(wordArray); + */ + C.SHA1 = Hasher._createHelper(SHA1); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA1(message, key); + */ + C.HmacSHA1 = Hasher._createHmacHelper(SHA1); + }()); + + + return CryptoJS.SHA1; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/sha224.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/sha224.js new file mode 100644 index 0000000000000000000000000000000000000000..d8ce9885268313ae356a655ed641c71f5163c4f2 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/sha224.js @@ -0,0 +1,80 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./sha256")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./sha256"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var SHA256 = C_algo.SHA256; + + /** + * SHA-224 hash algorithm. + */ + var SHA224 = C_algo.SHA224 = SHA256.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, + 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 + ]); + }, + + _doFinalize: function () { + var hash = SHA256._doFinalize.call(this); + + hash.sigBytes -= 4; + + return hash; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA224('message'); + * var hash = CryptoJS.SHA224(wordArray); + */ + C.SHA224 = SHA256._createHelper(SHA224); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA224(message, key); + */ + C.HmacSHA224 = SHA256._createHmacHelper(SHA224); + }()); + + + return CryptoJS.SHA224; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/sha256.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/sha256.js new file mode 100644 index 0000000000000000000000000000000000000000..de2d7fca1019d0e23a0f85055f28aaf51b7e0f21 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/sha256.js @@ -0,0 +1,199 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Initialization and round constants tables + var H = []; + var K = []; + + // Compute constants + (function () { + function isPrime(n) { + var sqrtN = Math.sqrt(n); + for (var factor = 2; factor <= sqrtN; factor++) { + if (!(n % factor)) { + return false; + } + } + + return true; + } + + function getFractionalBits(n) { + return ((n - (n | 0)) * 0x100000000) | 0; + } + + var n = 2; + var nPrime = 0; + while (nPrime < 64) { + if (isPrime(n)) { + if (nPrime < 8) { + H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2)); + } + K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3)); + + nPrime++; + } + + n++; + } + }()); + + // Reusable object + var W = []; + + /** + * SHA-256 hash algorithm. + */ + var SHA256 = C_algo.SHA256 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init(H.slice(0)); + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var H = this._hash.words; + + // Working variables + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + var e = H[4]; + var f = H[5]; + var g = H[6]; + var h = H[7]; + + // Computation + for (var i = 0; i < 64; i++) { + if (i < 16) { + W[i] = M[offset + i] | 0; + } else { + var gamma0x = W[i - 15]; + var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^ + ((gamma0x << 14) | (gamma0x >>> 18)) ^ + (gamma0x >>> 3); + + var gamma1x = W[i - 2]; + var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^ + ((gamma1x << 13) | (gamma1x >>> 19)) ^ + (gamma1x >>> 10); + + W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; + } + + var ch = (e & f) ^ (~e & g); + var maj = (a & b) ^ (a & c) ^ (b & c); + + var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22)); + var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25)); + + var t1 = h + sigma1 + ch + K[i] + W[i]; + var t2 = sigma0 + maj; + + h = g; + g = f; + f = e; + e = (d + t1) | 0; + d = c; + c = b; + b = a; + a = (t1 + t2) | 0; + } + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + H[4] = (H[4] + e) | 0; + H[5] = (H[5] + f) | 0; + H[6] = (H[6] + g) | 0; + H[7] = (H[7] + h) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Return final computed hash + return this._hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA256('message'); + * var hash = CryptoJS.SHA256(wordArray); + */ + C.SHA256 = Hasher._createHelper(SHA256); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA256(message, key); + */ + C.HmacSHA256 = Hasher._createHmacHelper(SHA256); + }(Math)); + + + return CryptoJS.SHA256; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/sha3.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/sha3.js new file mode 100644 index 0000000000000000000000000000000000000000..4fb27fe45e180331a225ada078d3311bab123bc8 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/sha3.js @@ -0,0 +1,323 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var C_algo = C.algo; + + // Constants tables + var RHO_OFFSETS = []; + var PI_INDEXES = []; + var ROUND_CONSTANTS = []; + + // Compute Constants + (function () { + // Compute rho offset constants + var x = 1, y = 0; + for (var t = 0; t < 24; t++) { + RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64; + + var newX = y % 5; + var newY = (2 * x + 3 * y) % 5; + x = newX; + y = newY; + } + + // Compute pi index constants + for (var x = 0; x < 5; x++) { + for (var y = 0; y < 5; y++) { + PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5; + } + } + + // Compute round constants + var LFSR = 0x01; + for (var i = 0; i < 24; i++) { + var roundConstantMsw = 0; + var roundConstantLsw = 0; + + for (var j = 0; j < 7; j++) { + if (LFSR & 0x01) { + var bitPosition = (1 << j) - 1; + if (bitPosition < 32) { + roundConstantLsw ^= 1 << bitPosition; + } else /* if (bitPosition >= 32) */ { + roundConstantMsw ^= 1 << (bitPosition - 32); + } + } + + // Compute next LFSR + if (LFSR & 0x80) { + // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1 + LFSR = (LFSR << 1) ^ 0x71; + } else { + LFSR <<= 1; + } + } + + ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw); + } + }()); + + // Reusable objects for temporary values + var T = []; + (function () { + for (var i = 0; i < 25; i++) { + T[i] = X64Word.create(); + } + }()); + + /** + * SHA-3 hash algorithm. + */ + var SHA3 = C_algo.SHA3 = Hasher.extend({ + /** + * Configuration options. + * + * @property {number} outputLength + * The desired number of bits in the output hash. + * Only values permitted are: 224, 256, 384, 512. + * Default: 512 + */ + cfg: Hasher.cfg.extend({ + outputLength: 512 + }), + + _doReset: function () { + var state = this._state = [] + for (var i = 0; i < 25; i++) { + state[i] = new X64Word.init(); + } + + this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32; + }, + + _doProcessBlock: function (M, offset) { + // Shortcuts + var state = this._state; + var nBlockSizeLanes = this.blockSize / 2; + + // Absorb + for (var i = 0; i < nBlockSizeLanes; i++) { + // Shortcuts + var M2i = M[offset + 2 * i]; + var M2i1 = M[offset + 2 * i + 1]; + + // Swap endian + M2i = ( + (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) | + (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00) + ); + M2i1 = ( + (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) | + (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00) + ); + + // Absorb message into state + var lane = state[i]; + lane.high ^= M2i1; + lane.low ^= M2i; + } + + // Rounds + for (var round = 0; round < 24; round++) { + // Theta + for (var x = 0; x < 5; x++) { + // Mix column lanes + var tMsw = 0, tLsw = 0; + for (var y = 0; y < 5; y++) { + var lane = state[x + 5 * y]; + tMsw ^= lane.high; + tLsw ^= lane.low; + } + + // Temporary values + var Tx = T[x]; + Tx.high = tMsw; + Tx.low = tLsw; + } + for (var x = 0; x < 5; x++) { + // Shortcuts + var Tx4 = T[(x + 4) % 5]; + var Tx1 = T[(x + 1) % 5]; + var Tx1Msw = Tx1.high; + var Tx1Lsw = Tx1.low; + + // Mix surrounding columns + var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31)); + var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31)); + for (var y = 0; y < 5; y++) { + var lane = state[x + 5 * y]; + lane.high ^= tMsw; + lane.low ^= tLsw; + } + } + + // Rho Pi + for (var laneIndex = 1; laneIndex < 25; laneIndex++) { + // Shortcuts + var lane = state[laneIndex]; + var laneMsw = lane.high; + var laneLsw = lane.low; + var rhoOffset = RHO_OFFSETS[laneIndex]; + + // Rotate lanes + if (rhoOffset < 32) { + var tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset)); + var tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset)); + } else /* if (rhoOffset >= 32) */ { + var tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset)); + var tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset)); + } + + // Transpose lanes + var TPiLane = T[PI_INDEXES[laneIndex]]; + TPiLane.high = tMsw; + TPiLane.low = tLsw; + } + + // Rho pi at x = y = 0 + var T0 = T[0]; + var state0 = state[0]; + T0.high = state0.high; + T0.low = state0.low; + + // Chi + for (var x = 0; x < 5; x++) { + for (var y = 0; y < 5; y++) { + // Shortcuts + var laneIndex = x + 5 * y; + var lane = state[laneIndex]; + var TLane = T[laneIndex]; + var Tx1Lane = T[((x + 1) % 5) + 5 * y]; + var Tx2Lane = T[((x + 2) % 5) + 5 * y]; + + // Mix rows + lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high); + lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low); + } + } + + // Iota + var lane = state[0]; + var roundConstant = ROUND_CONSTANTS[round]; + lane.high ^= roundConstant.high; + lane.low ^= roundConstant.low;; + } + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + var blockSizeBits = this.blockSize * 32; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32); + dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var state = this._state; + var outputLengthBytes = this.cfg.outputLength / 8; + var outputLengthLanes = outputLengthBytes / 8; + + // Squeeze + var hashWords = []; + for (var i = 0; i < outputLengthLanes; i++) { + // Shortcuts + var lane = state[i]; + var laneMsw = lane.high; + var laneLsw = lane.low; + + // Swap endian + laneMsw = ( + (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) | + (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00) + ); + laneLsw = ( + (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) | + (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00) + ); + + // Squeeze state to retrieve hash + hashWords.push(laneLsw); + hashWords.push(laneMsw); + } + + // Return final computed hash + return new WordArray.init(hashWords, outputLengthBytes); + }, + + clone: function () { + var clone = Hasher.clone.call(this); + + var state = clone._state = this._state.slice(0); + for (var i = 0; i < 25; i++) { + state[i] = state[i].clone(); + } + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA3('message'); + * var hash = CryptoJS.SHA3(wordArray); + */ + C.SHA3 = Hasher._createHelper(SHA3); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA3(message, key); + */ + C.HmacSHA3 = Hasher._createHmacHelper(SHA3); + }(Math)); + + + return CryptoJS.SHA3; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/sha384.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/sha384.js new file mode 100644 index 0000000000000000000000000000000000000000..a0b95bf6328b2dae9d44554f35dfce7c82d57407 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/sha384.js @@ -0,0 +1,83 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core"), require("./sha512")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core", "./sha512"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var X64WordArray = C_x64.WordArray; + var C_algo = C.algo; + var SHA512 = C_algo.SHA512; + + /** + * SHA-384 hash algorithm. + */ + var SHA384 = C_algo.SHA384 = SHA512.extend({ + _doReset: function () { + this._hash = new X64WordArray.init([ + new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507), + new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939), + new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511), + new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4) + ]); + }, + + _doFinalize: function () { + var hash = SHA512._doFinalize.call(this); + + hash.sigBytes -= 16; + + return hash; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA384('message'); + * var hash = CryptoJS.SHA384(wordArray); + */ + C.SHA384 = SHA512._createHelper(SHA384); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA384(message, key); + */ + C.HmacSHA384 = SHA512._createHmacHelper(SHA384); + }()); + + + return CryptoJS.SHA384; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/sha512.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/sha512.js new file mode 100644 index 0000000000000000000000000000000000000000..335931585567e61d38c9fd4e1dfa96d3008051e1 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/sha512.js @@ -0,0 +1,323 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Hasher = C_lib.Hasher; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var X64WordArray = C_x64.WordArray; + var C_algo = C.algo; + + function X64Word_create() { + return X64Word.create.apply(X64Word, arguments); + } + + // Constants + var K = [ + X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd), + X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc), + X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019), + X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118), + X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe), + X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2), + X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1), + X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694), + X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3), + X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65), + X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483), + X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5), + X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210), + X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4), + X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725), + X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70), + X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926), + X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df), + X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8), + X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b), + X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001), + X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30), + X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910), + X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8), + X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53), + X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8), + X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb), + X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3), + X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60), + X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec), + X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9), + X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b), + X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207), + X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178), + X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6), + X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b), + X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493), + X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c), + X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a), + X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817) + ]; + + // Reusable objects + var W = []; + (function () { + for (var i = 0; i < 80; i++) { + W[i] = X64Word_create(); + } + }()); + + /** + * SHA-512 hash algorithm. + */ + var SHA512 = C_algo.SHA512 = Hasher.extend({ + _doReset: function () { + this._hash = new X64WordArray.init([ + new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b), + new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1), + new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f), + new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179) + ]); + }, + + _doProcessBlock: function (M, offset) { + // Shortcuts + var H = this._hash.words; + + var H0 = H[0]; + var H1 = H[1]; + var H2 = H[2]; + var H3 = H[3]; + var H4 = H[4]; + var H5 = H[5]; + var H6 = H[6]; + var H7 = H[7]; + + var H0h = H0.high; + var H0l = H0.low; + var H1h = H1.high; + var H1l = H1.low; + var H2h = H2.high; + var H2l = H2.low; + var H3h = H3.high; + var H3l = H3.low; + var H4h = H4.high; + var H4l = H4.low; + var H5h = H5.high; + var H5l = H5.low; + var H6h = H6.high; + var H6l = H6.low; + var H7h = H7.high; + var H7l = H7.low; + + // Working variables + var ah = H0h; + var al = H0l; + var bh = H1h; + var bl = H1l; + var ch = H2h; + var cl = H2l; + var dh = H3h; + var dl = H3l; + var eh = H4h; + var el = H4l; + var fh = H5h; + var fl = H5l; + var gh = H6h; + var gl = H6l; + var hh = H7h; + var hl = H7l; + + // Rounds + for (var i = 0; i < 80; i++) { + // Shortcut + var Wi = W[i]; + + // Extend message + if (i < 16) { + var Wih = Wi.high = M[offset + i * 2] | 0; + var Wil = Wi.low = M[offset + i * 2 + 1] | 0; + } else { + // Gamma0 + var gamma0x = W[i - 15]; + var gamma0xh = gamma0x.high; + var gamma0xl = gamma0x.low; + var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7); + var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25)); + + // Gamma1 + var gamma1x = W[i - 2]; + var gamma1xh = gamma1x.high; + var gamma1xl = gamma1x.low; + var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6); + var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26)); + + // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] + var Wi7 = W[i - 7]; + var Wi7h = Wi7.high; + var Wi7l = Wi7.low; + + var Wi16 = W[i - 16]; + var Wi16h = Wi16.high; + var Wi16l = Wi16.low; + + var Wil = gamma0l + Wi7l; + var Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0); + var Wil = Wil + gamma1l; + var Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0); + var Wil = Wil + Wi16l; + var Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0); + + Wi.high = Wih; + Wi.low = Wil; + } + + var chh = (eh & fh) ^ (~eh & gh); + var chl = (el & fl) ^ (~el & gl); + var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch); + var majl = (al & bl) ^ (al & cl) ^ (bl & cl); + + var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7)); + var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7)); + var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9)); + var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9)); + + // t1 = h + sigma1 + ch + K[i] + W[i] + var Ki = K[i]; + var Kih = Ki.high; + var Kil = Ki.low; + + var t1l = hl + sigma1l; + var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0); + var t1l = t1l + chl; + var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0); + var t1l = t1l + Kil; + var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0); + var t1l = t1l + Wil; + var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0); + + // t2 = sigma0 + maj + var t2l = sigma0l + majl; + var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0); + + // Update working variables + hh = gh; + hl = gl; + gh = fh; + gl = fl; + fh = eh; + fl = el; + el = (dl + t1l) | 0; + eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0; + dh = ch; + dl = cl; + ch = bh; + cl = bl; + bh = ah; + bl = al; + al = (t1l + t2l) | 0; + ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0; + } + + // Intermediate hash value + H0l = H0.low = (H0l + al); + H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0)); + H1l = H1.low = (H1l + bl); + H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0)); + H2l = H2.low = (H2l + cl); + H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0)); + H3l = H3.low = (H3l + dl); + H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0)); + H4l = H4.low = (H4l + el); + H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0)); + H5l = H5.low = (H5l + fl); + H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0)); + H6l = H6.low = (H6l + gl); + H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0)); + H7l = H7.low = (H7l + hl); + H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0)); + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Convert hash to 32-bit word array before returning + var hash = this._hash.toX32(); + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + }, + + blockSize: 1024/32 + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA512('message'); + * var hash = CryptoJS.SHA512(wordArray); + */ + C.SHA512 = Hasher._createHelper(SHA512); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA512(message, key); + */ + C.HmacSHA512 = Hasher._createHmacHelper(SHA512); + }()); + + + return CryptoJS.SHA512; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/tripledes.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/tripledes.js new file mode 100644 index 0000000000000000000000000000000000000000..c7becf3b70ad64bd271e718a73db61286f114356 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/tripledes.js @@ -0,0 +1,770 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + + // Permuted Choice 1 constants + var PC1 = [ + 57, 49, 41, 33, 25, 17, 9, 1, + 58, 50, 42, 34, 26, 18, 10, 2, + 59, 51, 43, 35, 27, 19, 11, 3, + 60, 52, 44, 36, 63, 55, 47, 39, + 31, 23, 15, 7, 62, 54, 46, 38, + 30, 22, 14, 6, 61, 53, 45, 37, + 29, 21, 13, 5, 28, 20, 12, 4 + ]; + + // Permuted Choice 2 constants + var PC2 = [ + 14, 17, 11, 24, 1, 5, + 3, 28, 15, 6, 21, 10, + 23, 19, 12, 4, 26, 8, + 16, 7, 27, 20, 13, 2, + 41, 52, 31, 37, 47, 55, + 30, 40, 51, 45, 33, 48, + 44, 49, 39, 56, 34, 53, + 46, 42, 50, 36, 29, 32 + ]; + + // Cumulative bit shift constants + var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28]; + + // SBOXes and round permutation constants + var SBOX_P = [ + { + 0x0: 0x808200, + 0x10000000: 0x8000, + 0x20000000: 0x808002, + 0x30000000: 0x2, + 0x40000000: 0x200, + 0x50000000: 0x808202, + 0x60000000: 0x800202, + 0x70000000: 0x800000, + 0x80000000: 0x202, + 0x90000000: 0x800200, + 0xa0000000: 0x8200, + 0xb0000000: 0x808000, + 0xc0000000: 0x8002, + 0xd0000000: 0x800002, + 0xe0000000: 0x0, + 0xf0000000: 0x8202, + 0x8000000: 0x0, + 0x18000000: 0x808202, + 0x28000000: 0x8202, + 0x38000000: 0x8000, + 0x48000000: 0x808200, + 0x58000000: 0x200, + 0x68000000: 0x808002, + 0x78000000: 0x2, + 0x88000000: 0x800200, + 0x98000000: 0x8200, + 0xa8000000: 0x808000, + 0xb8000000: 0x800202, + 0xc8000000: 0x800002, + 0xd8000000: 0x8002, + 0xe8000000: 0x202, + 0xf8000000: 0x800000, + 0x1: 0x8000, + 0x10000001: 0x2, + 0x20000001: 0x808200, + 0x30000001: 0x800000, + 0x40000001: 0x808002, + 0x50000001: 0x8200, + 0x60000001: 0x200, + 0x70000001: 0x800202, + 0x80000001: 0x808202, + 0x90000001: 0x808000, + 0xa0000001: 0x800002, + 0xb0000001: 0x8202, + 0xc0000001: 0x202, + 0xd0000001: 0x800200, + 0xe0000001: 0x8002, + 0xf0000001: 0x0, + 0x8000001: 0x808202, + 0x18000001: 0x808000, + 0x28000001: 0x800000, + 0x38000001: 0x200, + 0x48000001: 0x8000, + 0x58000001: 0x800002, + 0x68000001: 0x2, + 0x78000001: 0x8202, + 0x88000001: 0x8002, + 0x98000001: 0x800202, + 0xa8000001: 0x202, + 0xb8000001: 0x808200, + 0xc8000001: 0x800200, + 0xd8000001: 0x0, + 0xe8000001: 0x8200, + 0xf8000001: 0x808002 + }, + { + 0x0: 0x40084010, + 0x1000000: 0x4000, + 0x2000000: 0x80000, + 0x3000000: 0x40080010, + 0x4000000: 0x40000010, + 0x5000000: 0x40084000, + 0x6000000: 0x40004000, + 0x7000000: 0x10, + 0x8000000: 0x84000, + 0x9000000: 0x40004010, + 0xa000000: 0x40000000, + 0xb000000: 0x84010, + 0xc000000: 0x80010, + 0xd000000: 0x0, + 0xe000000: 0x4010, + 0xf000000: 0x40080000, + 0x800000: 0x40004000, + 0x1800000: 0x84010, + 0x2800000: 0x10, + 0x3800000: 0x40004010, + 0x4800000: 0x40084010, + 0x5800000: 0x40000000, + 0x6800000: 0x80000, + 0x7800000: 0x40080010, + 0x8800000: 0x80010, + 0x9800000: 0x0, + 0xa800000: 0x4000, + 0xb800000: 0x40080000, + 0xc800000: 0x40000010, + 0xd800000: 0x84000, + 0xe800000: 0x40084000, + 0xf800000: 0x4010, + 0x10000000: 0x0, + 0x11000000: 0x40080010, + 0x12000000: 0x40004010, + 0x13000000: 0x40084000, + 0x14000000: 0x40080000, + 0x15000000: 0x10, + 0x16000000: 0x84010, + 0x17000000: 0x4000, + 0x18000000: 0x4010, + 0x19000000: 0x80000, + 0x1a000000: 0x80010, + 0x1b000000: 0x40000010, + 0x1c000000: 0x84000, + 0x1d000000: 0x40004000, + 0x1e000000: 0x40000000, + 0x1f000000: 0x40084010, + 0x10800000: 0x84010, + 0x11800000: 0x80000, + 0x12800000: 0x40080000, + 0x13800000: 0x4000, + 0x14800000: 0x40004000, + 0x15800000: 0x40084010, + 0x16800000: 0x10, + 0x17800000: 0x40000000, + 0x18800000: 0x40084000, + 0x19800000: 0x40000010, + 0x1a800000: 0x40004010, + 0x1b800000: 0x80010, + 0x1c800000: 0x0, + 0x1d800000: 0x4010, + 0x1e800000: 0x40080010, + 0x1f800000: 0x84000 + }, + { + 0x0: 0x104, + 0x100000: 0x0, + 0x200000: 0x4000100, + 0x300000: 0x10104, + 0x400000: 0x10004, + 0x500000: 0x4000004, + 0x600000: 0x4010104, + 0x700000: 0x4010000, + 0x800000: 0x4000000, + 0x900000: 0x4010100, + 0xa00000: 0x10100, + 0xb00000: 0x4010004, + 0xc00000: 0x4000104, + 0xd00000: 0x10000, + 0xe00000: 0x4, + 0xf00000: 0x100, + 0x80000: 0x4010100, + 0x180000: 0x4010004, + 0x280000: 0x0, + 0x380000: 0x4000100, + 0x480000: 0x4000004, + 0x580000: 0x10000, + 0x680000: 0x10004, + 0x780000: 0x104, + 0x880000: 0x4, + 0x980000: 0x100, + 0xa80000: 0x4010000, + 0xb80000: 0x10104, + 0xc80000: 0x10100, + 0xd80000: 0x4000104, + 0xe80000: 0x4010104, + 0xf80000: 0x4000000, + 0x1000000: 0x4010100, + 0x1100000: 0x10004, + 0x1200000: 0x10000, + 0x1300000: 0x4000100, + 0x1400000: 0x100, + 0x1500000: 0x4010104, + 0x1600000: 0x4000004, + 0x1700000: 0x0, + 0x1800000: 0x4000104, + 0x1900000: 0x4000000, + 0x1a00000: 0x4, + 0x1b00000: 0x10100, + 0x1c00000: 0x4010000, + 0x1d00000: 0x104, + 0x1e00000: 0x10104, + 0x1f00000: 0x4010004, + 0x1080000: 0x4000000, + 0x1180000: 0x104, + 0x1280000: 0x4010100, + 0x1380000: 0x0, + 0x1480000: 0x10004, + 0x1580000: 0x4000100, + 0x1680000: 0x100, + 0x1780000: 0x4010004, + 0x1880000: 0x10000, + 0x1980000: 0x4010104, + 0x1a80000: 0x10104, + 0x1b80000: 0x4000004, + 0x1c80000: 0x4000104, + 0x1d80000: 0x4010000, + 0x1e80000: 0x4, + 0x1f80000: 0x10100 + }, + { + 0x0: 0x80401000, + 0x10000: 0x80001040, + 0x20000: 0x401040, + 0x30000: 0x80400000, + 0x40000: 0x0, + 0x50000: 0x401000, + 0x60000: 0x80000040, + 0x70000: 0x400040, + 0x80000: 0x80000000, + 0x90000: 0x400000, + 0xa0000: 0x40, + 0xb0000: 0x80001000, + 0xc0000: 0x80400040, + 0xd0000: 0x1040, + 0xe0000: 0x1000, + 0xf0000: 0x80401040, + 0x8000: 0x80001040, + 0x18000: 0x40, + 0x28000: 0x80400040, + 0x38000: 0x80001000, + 0x48000: 0x401000, + 0x58000: 0x80401040, + 0x68000: 0x0, + 0x78000: 0x80400000, + 0x88000: 0x1000, + 0x98000: 0x80401000, + 0xa8000: 0x400000, + 0xb8000: 0x1040, + 0xc8000: 0x80000000, + 0xd8000: 0x400040, + 0xe8000: 0x401040, + 0xf8000: 0x80000040, + 0x100000: 0x400040, + 0x110000: 0x401000, + 0x120000: 0x80000040, + 0x130000: 0x0, + 0x140000: 0x1040, + 0x150000: 0x80400040, + 0x160000: 0x80401000, + 0x170000: 0x80001040, + 0x180000: 0x80401040, + 0x190000: 0x80000000, + 0x1a0000: 0x80400000, + 0x1b0000: 0x401040, + 0x1c0000: 0x80001000, + 0x1d0000: 0x400000, + 0x1e0000: 0x40, + 0x1f0000: 0x1000, + 0x108000: 0x80400000, + 0x118000: 0x80401040, + 0x128000: 0x0, + 0x138000: 0x401000, + 0x148000: 0x400040, + 0x158000: 0x80000000, + 0x168000: 0x80001040, + 0x178000: 0x40, + 0x188000: 0x80000040, + 0x198000: 0x1000, + 0x1a8000: 0x80001000, + 0x1b8000: 0x80400040, + 0x1c8000: 0x1040, + 0x1d8000: 0x80401000, + 0x1e8000: 0x400000, + 0x1f8000: 0x401040 + }, + { + 0x0: 0x80, + 0x1000: 0x1040000, + 0x2000: 0x40000, + 0x3000: 0x20000000, + 0x4000: 0x20040080, + 0x5000: 0x1000080, + 0x6000: 0x21000080, + 0x7000: 0x40080, + 0x8000: 0x1000000, + 0x9000: 0x20040000, + 0xa000: 0x20000080, + 0xb000: 0x21040080, + 0xc000: 0x21040000, + 0xd000: 0x0, + 0xe000: 0x1040080, + 0xf000: 0x21000000, + 0x800: 0x1040080, + 0x1800: 0x21000080, + 0x2800: 0x80, + 0x3800: 0x1040000, + 0x4800: 0x40000, + 0x5800: 0x20040080, + 0x6800: 0x21040000, + 0x7800: 0x20000000, + 0x8800: 0x20040000, + 0x9800: 0x0, + 0xa800: 0x21040080, + 0xb800: 0x1000080, + 0xc800: 0x20000080, + 0xd800: 0x21000000, + 0xe800: 0x1000000, + 0xf800: 0x40080, + 0x10000: 0x40000, + 0x11000: 0x80, + 0x12000: 0x20000000, + 0x13000: 0x21000080, + 0x14000: 0x1000080, + 0x15000: 0x21040000, + 0x16000: 0x20040080, + 0x17000: 0x1000000, + 0x18000: 0x21040080, + 0x19000: 0x21000000, + 0x1a000: 0x1040000, + 0x1b000: 0x20040000, + 0x1c000: 0x40080, + 0x1d000: 0x20000080, + 0x1e000: 0x0, + 0x1f000: 0x1040080, + 0x10800: 0x21000080, + 0x11800: 0x1000000, + 0x12800: 0x1040000, + 0x13800: 0x20040080, + 0x14800: 0x20000000, + 0x15800: 0x1040080, + 0x16800: 0x80, + 0x17800: 0x21040000, + 0x18800: 0x40080, + 0x19800: 0x21040080, + 0x1a800: 0x0, + 0x1b800: 0x21000000, + 0x1c800: 0x1000080, + 0x1d800: 0x40000, + 0x1e800: 0x20040000, + 0x1f800: 0x20000080 + }, + { + 0x0: 0x10000008, + 0x100: 0x2000, + 0x200: 0x10200000, + 0x300: 0x10202008, + 0x400: 0x10002000, + 0x500: 0x200000, + 0x600: 0x200008, + 0x700: 0x10000000, + 0x800: 0x0, + 0x900: 0x10002008, + 0xa00: 0x202000, + 0xb00: 0x8, + 0xc00: 0x10200008, + 0xd00: 0x202008, + 0xe00: 0x2008, + 0xf00: 0x10202000, + 0x80: 0x10200000, + 0x180: 0x10202008, + 0x280: 0x8, + 0x380: 0x200000, + 0x480: 0x202008, + 0x580: 0x10000008, + 0x680: 0x10002000, + 0x780: 0x2008, + 0x880: 0x200008, + 0x980: 0x2000, + 0xa80: 0x10002008, + 0xb80: 0x10200008, + 0xc80: 0x0, + 0xd80: 0x10202000, + 0xe80: 0x202000, + 0xf80: 0x10000000, + 0x1000: 0x10002000, + 0x1100: 0x10200008, + 0x1200: 0x10202008, + 0x1300: 0x2008, + 0x1400: 0x200000, + 0x1500: 0x10000000, + 0x1600: 0x10000008, + 0x1700: 0x202000, + 0x1800: 0x202008, + 0x1900: 0x0, + 0x1a00: 0x8, + 0x1b00: 0x10200000, + 0x1c00: 0x2000, + 0x1d00: 0x10002008, + 0x1e00: 0x10202000, + 0x1f00: 0x200008, + 0x1080: 0x8, + 0x1180: 0x202000, + 0x1280: 0x200000, + 0x1380: 0x10000008, + 0x1480: 0x10002000, + 0x1580: 0x2008, + 0x1680: 0x10202008, + 0x1780: 0x10200000, + 0x1880: 0x10202000, + 0x1980: 0x10200008, + 0x1a80: 0x2000, + 0x1b80: 0x202008, + 0x1c80: 0x200008, + 0x1d80: 0x0, + 0x1e80: 0x10000000, + 0x1f80: 0x10002008 + }, + { + 0x0: 0x100000, + 0x10: 0x2000401, + 0x20: 0x400, + 0x30: 0x100401, + 0x40: 0x2100401, + 0x50: 0x0, + 0x60: 0x1, + 0x70: 0x2100001, + 0x80: 0x2000400, + 0x90: 0x100001, + 0xa0: 0x2000001, + 0xb0: 0x2100400, + 0xc0: 0x2100000, + 0xd0: 0x401, + 0xe0: 0x100400, + 0xf0: 0x2000000, + 0x8: 0x2100001, + 0x18: 0x0, + 0x28: 0x2000401, + 0x38: 0x2100400, + 0x48: 0x100000, + 0x58: 0x2000001, + 0x68: 0x2000000, + 0x78: 0x401, + 0x88: 0x100401, + 0x98: 0x2000400, + 0xa8: 0x2100000, + 0xb8: 0x100001, + 0xc8: 0x400, + 0xd8: 0x2100401, + 0xe8: 0x1, + 0xf8: 0x100400, + 0x100: 0x2000000, + 0x110: 0x100000, + 0x120: 0x2000401, + 0x130: 0x2100001, + 0x140: 0x100001, + 0x150: 0x2000400, + 0x160: 0x2100400, + 0x170: 0x100401, + 0x180: 0x401, + 0x190: 0x2100401, + 0x1a0: 0x100400, + 0x1b0: 0x1, + 0x1c0: 0x0, + 0x1d0: 0x2100000, + 0x1e0: 0x2000001, + 0x1f0: 0x400, + 0x108: 0x100400, + 0x118: 0x2000401, + 0x128: 0x2100001, + 0x138: 0x1, + 0x148: 0x2000000, + 0x158: 0x100000, + 0x168: 0x401, + 0x178: 0x2100400, + 0x188: 0x2000001, + 0x198: 0x2100000, + 0x1a8: 0x0, + 0x1b8: 0x2100401, + 0x1c8: 0x100401, + 0x1d8: 0x400, + 0x1e8: 0x2000400, + 0x1f8: 0x100001 + }, + { + 0x0: 0x8000820, + 0x1: 0x20000, + 0x2: 0x8000000, + 0x3: 0x20, + 0x4: 0x20020, + 0x5: 0x8020820, + 0x6: 0x8020800, + 0x7: 0x800, + 0x8: 0x8020000, + 0x9: 0x8000800, + 0xa: 0x20800, + 0xb: 0x8020020, + 0xc: 0x820, + 0xd: 0x0, + 0xe: 0x8000020, + 0xf: 0x20820, + 0x80000000: 0x800, + 0x80000001: 0x8020820, + 0x80000002: 0x8000820, + 0x80000003: 0x8000000, + 0x80000004: 0x8020000, + 0x80000005: 0x20800, + 0x80000006: 0x20820, + 0x80000007: 0x20, + 0x80000008: 0x8000020, + 0x80000009: 0x820, + 0x8000000a: 0x20020, + 0x8000000b: 0x8020800, + 0x8000000c: 0x0, + 0x8000000d: 0x8020020, + 0x8000000e: 0x8000800, + 0x8000000f: 0x20000, + 0x10: 0x20820, + 0x11: 0x8020800, + 0x12: 0x20, + 0x13: 0x800, + 0x14: 0x8000800, + 0x15: 0x8000020, + 0x16: 0x8020020, + 0x17: 0x20000, + 0x18: 0x0, + 0x19: 0x20020, + 0x1a: 0x8020000, + 0x1b: 0x8000820, + 0x1c: 0x8020820, + 0x1d: 0x20800, + 0x1e: 0x820, + 0x1f: 0x8000000, + 0x80000010: 0x20000, + 0x80000011: 0x800, + 0x80000012: 0x8020020, + 0x80000013: 0x20820, + 0x80000014: 0x20, + 0x80000015: 0x8020000, + 0x80000016: 0x8000000, + 0x80000017: 0x8000820, + 0x80000018: 0x8020820, + 0x80000019: 0x8000020, + 0x8000001a: 0x8000800, + 0x8000001b: 0x0, + 0x8000001c: 0x20800, + 0x8000001d: 0x820, + 0x8000001e: 0x20020, + 0x8000001f: 0x8020800 + } + ]; + + // Masks that select the SBOX input + var SBOX_MASK = [ + 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000, + 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f + ]; + + /** + * DES block cipher algorithm. + */ + var DES = C_algo.DES = BlockCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + + // Select 56 bits according to PC1 + var keyBits = []; + for (var i = 0; i < 56; i++) { + var keyBitPos = PC1[i] - 1; + keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1; + } + + // Assemble 16 subkeys + var subKeys = this._subKeys = []; + for (var nSubKey = 0; nSubKey < 16; nSubKey++) { + // Create subkey + var subKey = subKeys[nSubKey] = []; + + // Shortcut + var bitShift = BIT_SHIFTS[nSubKey]; + + // Select 48 bits according to PC2 + for (var i = 0; i < 24; i++) { + // Select from the left 28 key bits + subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6); + + // Select from the right 28 key bits + subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6); + } + + // Since each subkey is applied to an expanded 32-bit input, + // the subkey can be broken into 8 values scaled to 32-bits, + // which allows the key to be used without expansion + subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31); + for (var i = 1; i < 7; i++) { + subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3); + } + subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27); + } + + // Compute inverse subkeys + var invSubKeys = this._invSubKeys = []; + for (var i = 0; i < 16; i++) { + invSubKeys[i] = subKeys[15 - i]; + } + }, + + encryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._subKeys); + }, + + decryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._invSubKeys); + }, + + _doCryptBlock: function (M, offset, subKeys) { + // Get input + this._lBlock = M[offset]; + this._rBlock = M[offset + 1]; + + // Initial permutation + exchangeLR.call(this, 4, 0x0f0f0f0f); + exchangeLR.call(this, 16, 0x0000ffff); + exchangeRL.call(this, 2, 0x33333333); + exchangeRL.call(this, 8, 0x00ff00ff); + exchangeLR.call(this, 1, 0x55555555); + + // Rounds + for (var round = 0; round < 16; round++) { + // Shortcuts + var subKey = subKeys[round]; + var lBlock = this._lBlock; + var rBlock = this._rBlock; + + // Feistel function + var f = 0; + for (var i = 0; i < 8; i++) { + f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0]; + } + this._lBlock = rBlock; + this._rBlock = lBlock ^ f; + } + + // Undo swap from last round + var t = this._lBlock; + this._lBlock = this._rBlock; + this._rBlock = t; + + // Final permutation + exchangeLR.call(this, 1, 0x55555555); + exchangeRL.call(this, 8, 0x00ff00ff); + exchangeRL.call(this, 2, 0x33333333); + exchangeLR.call(this, 16, 0x0000ffff); + exchangeLR.call(this, 4, 0x0f0f0f0f); + + // Set output + M[offset] = this._lBlock; + M[offset + 1] = this._rBlock; + }, + + keySize: 64/32, + + ivSize: 64/32, + + blockSize: 64/32 + }); + + // Swap bits across the left and right words + function exchangeLR(offset, mask) { + var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask; + this._rBlock ^= t; + this._lBlock ^= t << offset; + } + + function exchangeRL(offset, mask) { + var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask; + this._lBlock ^= t; + this._rBlock ^= t << offset; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg); + */ + C.DES = BlockCipher._createHelper(DES); + + /** + * Triple-DES block cipher algorithm. + */ + var TripleDES = C_algo.TripleDES = BlockCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + + // Create DES instances + this._des1 = DES.createEncryptor(WordArray.create(keyWords.slice(0, 2))); + this._des2 = DES.createEncryptor(WordArray.create(keyWords.slice(2, 4))); + this._des3 = DES.createEncryptor(WordArray.create(keyWords.slice(4, 6))); + }, + + encryptBlock: function (M, offset) { + this._des1.encryptBlock(M, offset); + this._des2.decryptBlock(M, offset); + this._des3.encryptBlock(M, offset); + }, + + decryptBlock: function (M, offset) { + this._des3.decryptBlock(M, offset); + this._des2.encryptBlock(M, offset); + this._des1.decryptBlock(M, offset); + }, + + keySize: 192/32, + + ivSize: 64/32, + + blockSize: 64/32 + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg); + */ + C.TripleDES = BlockCipher._createHelper(TripleDES); + }()); + + + return CryptoJS.TripleDES; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/x64-core.js b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/x64-core.js new file mode 100644 index 0000000000000000000000000000000000000000..57dcc144b042207243d12dc0a488545ea4d794e6 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/crypto-js-3.1.9-1/x64-core.js @@ -0,0 +1,304 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var X32WordArray = C_lib.WordArray; + + /** + * x64 namespace. + */ + var C_x64 = C.x64 = {}; + + /** + * A 64-bit word. + */ + var X64Word = C_x64.Word = Base.extend({ + /** + * Initializes a newly created 64-bit word. + * + * @param {number} high The high 32 bits. + * @param {number} low The low 32 bits. + * + * @example + * + * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607); + */ + init: function (high, low) { + this.high = high; + this.low = low; + } + + /** + * Bitwise NOTs this word. + * + * @return {X64Word} A new x64-Word object after negating. + * + * @example + * + * var negated = x64Word.not(); + */ + // not: function () { + // var high = ~this.high; + // var low = ~this.low; + + // return X64Word.create(high, low); + // }, + + /** + * Bitwise ANDs this word with the passed word. + * + * @param {X64Word} word The x64-Word to AND with this word. + * + * @return {X64Word} A new x64-Word object after ANDing. + * + * @example + * + * var anded = x64Word.and(anotherX64Word); + */ + // and: function (word) { + // var high = this.high & word.high; + // var low = this.low & word.low; + + // return X64Word.create(high, low); + // }, + + /** + * Bitwise ORs this word with the passed word. + * + * @param {X64Word} word The x64-Word to OR with this word. + * + * @return {X64Word} A new x64-Word object after ORing. + * + * @example + * + * var ored = x64Word.or(anotherX64Word); + */ + // or: function (word) { + // var high = this.high | word.high; + // var low = this.low | word.low; + + // return X64Word.create(high, low); + // }, + + /** + * Bitwise XORs this word with the passed word. + * + * @param {X64Word} word The x64-Word to XOR with this word. + * + * @return {X64Word} A new x64-Word object after XORing. + * + * @example + * + * var xored = x64Word.xor(anotherX64Word); + */ + // xor: function (word) { + // var high = this.high ^ word.high; + // var low = this.low ^ word.low; + + // return X64Word.create(high, low); + // }, + + /** + * Shifts this word n bits to the left. + * + * @param {number} n The number of bits to shift. + * + * @return {X64Word} A new x64-Word object after shifting. + * + * @example + * + * var shifted = x64Word.shiftL(25); + */ + // shiftL: function (n) { + // if (n < 32) { + // var high = (this.high << n) | (this.low >>> (32 - n)); + // var low = this.low << n; + // } else { + // var high = this.low << (n - 32); + // var low = 0; + // } + + // return X64Word.create(high, low); + // }, + + /** + * Shifts this word n bits to the right. + * + * @param {number} n The number of bits to shift. + * + * @return {X64Word} A new x64-Word object after shifting. + * + * @example + * + * var shifted = x64Word.shiftR(7); + */ + // shiftR: function (n) { + // if (n < 32) { + // var low = (this.low >>> n) | (this.high << (32 - n)); + // var high = this.high >>> n; + // } else { + // var low = this.high >>> (n - 32); + // var high = 0; + // } + + // return X64Word.create(high, low); + // }, + + /** + * Rotates this word n bits to the left. + * + * @param {number} n The number of bits to rotate. + * + * @return {X64Word} A new x64-Word object after rotating. + * + * @example + * + * var rotated = x64Word.rotL(25); + */ + // rotL: function (n) { + // return this.shiftL(n).or(this.shiftR(64 - n)); + // }, + + /** + * Rotates this word n bits to the right. + * + * @param {number} n The number of bits to rotate. + * + * @return {X64Word} A new x64-Word object after rotating. + * + * @example + * + * var rotated = x64Word.rotR(7); + */ + // rotR: function (n) { + // return this.shiftR(n).or(this.shiftL(64 - n)); + // }, + + /** + * Adds this word with the passed word. + * + * @param {X64Word} word The x64-Word to add with this word. + * + * @return {X64Word} A new x64-Word object after adding. + * + * @example + * + * var added = x64Word.add(anotherX64Word); + */ + // add: function (word) { + // var low = (this.low + word.low) | 0; + // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0; + // var high = (this.high + word.high + carry) | 0; + + // return X64Word.create(high, low); + // } + }); + + /** + * An array of 64-bit words. + * + * @property {Array} words The array of CryptoJS.x64.Word objects. + * @property {number} sigBytes The number of significant bytes in this word array. + */ + var X64WordArray = C_x64.WordArray = Base.extend({ + /** + * Initializes a newly created word array. + * + * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects. + * @param {number} sigBytes (Optional) The number of significant bytes in the words. + * + * @example + * + * var wordArray = CryptoJS.x64.WordArray.create(); + * + * var wordArray = CryptoJS.x64.WordArray.create([ + * CryptoJS.x64.Word.create(0x00010203, 0x04050607), + * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) + * ]); + * + * var wordArray = CryptoJS.x64.WordArray.create([ + * CryptoJS.x64.Word.create(0x00010203, 0x04050607), + * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) + * ], 10); + */ + init: function (words, sigBytes) { + words = this.words = words || []; + + if (sigBytes != undefined) { + this.sigBytes = sigBytes; + } else { + this.sigBytes = words.length * 8; + } + }, + + /** + * Converts this 64-bit word array to a 32-bit word array. + * + * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array. + * + * @example + * + * var x32WordArray = x64WordArray.toX32(); + */ + toX32: function () { + // Shortcuts + var x64Words = this.words; + var x64WordsLength = x64Words.length; + + // Convert + var x32Words = []; + for (var i = 0; i < x64WordsLength; i++) { + var x64Word = x64Words[i]; + x32Words.push(x64Word.high); + x32Words.push(x64Word.low); + } + + return X32WordArray.create(x32Words, this.sigBytes); + }, + + /** + * Creates a copy of this word array. + * + * @return {X64WordArray} The clone. + * + * @example + * + * var clone = x64WordArray.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + + // Clone "words" array + var words = clone.words = this.words.slice(0); + + // Clone each X64Word object + var wordsLength = words.length; + for (var i = 0; i < wordsLength; i++) { + words[i] = words[i].clone(); + } + + return clone; + } + }); + }()); + + + return CryptoJS; + +})); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/dashboard_1_operation.js b/src/vitis/vas/doc/suivi_prod_immo/js/dashboard_1_operation.js new file mode 100644 index 0000000000000000000000000000000000000000..541e16a22145f8c7c3576532bc129fafe1e175eb --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/dashboard_1_operation.js @@ -0,0 +1,137 @@ + +// Pie +var config = { + type: 'pie', + data: { + datasets: [{ + data: aDataSdpPrev, + backgroundColor: ['rgb(255, 159, 64)','rgb(54, 162, 235)','rgb(255, 205, 86)','rgb(112, 189, 59)','rgb(134, 59, 189)'], + label: 'Dataset 1' + }], + labels: ['Logements','Bureaux','Commerces','Activités - Industries','Équipements'] + }, + options: { + responsive: true, + legend: {position: 'bottom'}, + title: { + display: true, + text: 'Répartition de l\'opération prévisionnelle (SDP en m²)', + fontSize: 16, + fontStyle: 'normal' + }, + tooltips: { + callbacks: { + label: function(tooltipItem, data) { + var dataset = data.datasets[tooltipItem.datasetIndex]; + var total = dataset.data.reduce(function(previousValue, currentValue, currentIndex, array) { + return previousValue + currentValue; + }); + var currentValue = dataset.data[tooltipItem.index]; + var precentage = Math.floor(((currentValue/total) * 100)+0.5); + return currentValue + ' m² (' + precentage + "%)"; + } + } + } + } +}; + +var config2={ + type: 'bar', + data: { + labels: ['LOGEMENTS', 'BUREAUX', 'COMMERCES', 'ACTIVITÉS- INDUSTRIES', 'ÉQUIPEMENTS'], + datasets: [{ + label: 'prévisionnel', + backgroundColor: ['rgba(255,159,64,1)', 'rgba(54,162,235,1)', 'rgba(255,205,86,1)','rgba(112,189,59,1)','rgba(134,59,189,1)'], + stack: 'Stack 0', + data: aDataAvancementPrev + }, { + label: 'engagé', + backgroundColor: ['rgba(255,159,64,0.5)','rgba(54,162,235,0.5)','rgba(255,205,86,0.5)','rgba(112,189,59,0.5)','rgb(134,59,189,0.5)'], + stack: 'Stack 1', + data: aDataAvancementEngag + }] + }, + options: { + title: { + display: false, + text: 'Répartition des logements selon le type et la granulométrie', + fontSize: 16, + fontStyle: 'normal' + }, + legend: {position: 'right'}, + tooltips: {mode: 'index',intersect: false}, + responsive: true, + scales: {xAxes: [{stacked: true}], yAxes: [{stacked: true,scaleLabel: {display: true,labelString: 'SDP en m²'}}]} + } +}; + +var config3 = { + type: 'pie', + data: { + datasets: [{ + data: aDataGanulometrie, + backgroundColor: ['rgb(174,214,241)','rgb(93,173,226)','rgb(52, 152, 219 )','rgb(46, 134, 193)','rgb(40, 116, 166 )','rgb(33, 97, 140)'], + label: 'Dataset 2' + }], + labels: ['T1','T2','T3','T4','T5','T6 et +'] + }, + options: { + responsive: true, + legend: {position: 'bottom'}, + title: { + display: true, + text: 'Nombre de logements par granulométrie', + fontSize: 16, + fontStyle: 'normal' + }, + tooltips: { + callbacks: { + label: function(tooltipItem, data) { + var dataset = data.datasets[tooltipItem.datasetIndex]; + var total = dataset.data.reduce(function(previousValue, currentValue, currentIndex, array) { + return previousValue + currentValue; + }); + var currentValue = dataset.data[tooltipItem.index]; + var _label = data.labels[tooltipItem.index]; + var precentage = Math.floor(((currentValue/total) * 100)+0.5); + return _label + ' ' + precentage + "%"; + } + } + } + } +}; + +var config4={ + type: 'bar', + data: { + labels: ['T1', 'T2', 'T3', 'T4', 'T5', 'T6 et +'], + datasets: [ + {label: 'Accession', backgroundColor: 'rgb(33, 97, 140 )', stack: 'Stack 0', data: aDataGanulometrieAccession}, + {label: 'Location (sociale ou intermédiaire)', backgroundColor: 'rgb(52, 152, 219)', stack: 'Stack 0', data: aDataGanulometrieLoc}, + {label: 'Habitat spécifique', backgroundColor: 'rgb(174, 214, 241)', stack: 'Stack 1', data: aDataGanulometrieHabSpe} + ] + }, + options: { + title: { + display: true, + text: 'Répartition des logements selon le type et la granulométrie', + fontSize: 16, + fontStyle: 'normal' + }, + tooltips: {mode: 'index',intersect: false}, + responsive: true, + scales: {xAxes: [{stacked: true,}], yAxes: [{stacked: true}]} + } +}; +window.onload = function() { + var ctx = document.getElementById('chart_sdp').getContext('2d'); + window.myPie = new Chart(ctx, config); + var ctx2 = document.getElementById('barchart_avancement').getContext('2d'); + //var ctx2 = $('#barchart_avancement'); + // ctx2.height(100); + window.myBar = new Chart(ctx2, config2); + var ctx3 = document.getElementById('chart_granulometrie').getContext('2d'); + window.myPie3 = new Chart(ctx3, config3); + var ctx4 = document.getElementById('barchart_granulometrie').getContext('2d'); + window.myBar2 = new Chart(ctx4, config4); +}; \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/dashboard_4_logement.js b/src/vitis/vas/doc/suivi_prod_immo/js/dashboard_4_logement.js new file mode 100644 index 0000000000000000000000000000000000000000..541e16a22145f8c7c3576532bc129fafe1e175eb --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/dashboard_4_logement.js @@ -0,0 +1,137 @@ + +// Pie +var config = { + type: 'pie', + data: { + datasets: [{ + data: aDataSdpPrev, + backgroundColor: ['rgb(255, 159, 64)','rgb(54, 162, 235)','rgb(255, 205, 86)','rgb(112, 189, 59)','rgb(134, 59, 189)'], + label: 'Dataset 1' + }], + labels: ['Logements','Bureaux','Commerces','Activités - Industries','Équipements'] + }, + options: { + responsive: true, + legend: {position: 'bottom'}, + title: { + display: true, + text: 'Répartition de l\'opération prévisionnelle (SDP en m²)', + fontSize: 16, + fontStyle: 'normal' + }, + tooltips: { + callbacks: { + label: function(tooltipItem, data) { + var dataset = data.datasets[tooltipItem.datasetIndex]; + var total = dataset.data.reduce(function(previousValue, currentValue, currentIndex, array) { + return previousValue + currentValue; + }); + var currentValue = dataset.data[tooltipItem.index]; + var precentage = Math.floor(((currentValue/total) * 100)+0.5); + return currentValue + ' m² (' + precentage + "%)"; + } + } + } + } +}; + +var config2={ + type: 'bar', + data: { + labels: ['LOGEMENTS', 'BUREAUX', 'COMMERCES', 'ACTIVITÉS- INDUSTRIES', 'ÉQUIPEMENTS'], + datasets: [{ + label: 'prévisionnel', + backgroundColor: ['rgba(255,159,64,1)', 'rgba(54,162,235,1)', 'rgba(255,205,86,1)','rgba(112,189,59,1)','rgba(134,59,189,1)'], + stack: 'Stack 0', + data: aDataAvancementPrev + }, { + label: 'engagé', + backgroundColor: ['rgba(255,159,64,0.5)','rgba(54,162,235,0.5)','rgba(255,205,86,0.5)','rgba(112,189,59,0.5)','rgb(134,59,189,0.5)'], + stack: 'Stack 1', + data: aDataAvancementEngag + }] + }, + options: { + title: { + display: false, + text: 'Répartition des logements selon le type et la granulométrie', + fontSize: 16, + fontStyle: 'normal' + }, + legend: {position: 'right'}, + tooltips: {mode: 'index',intersect: false}, + responsive: true, + scales: {xAxes: [{stacked: true}], yAxes: [{stacked: true,scaleLabel: {display: true,labelString: 'SDP en m²'}}]} + } +}; + +var config3 = { + type: 'pie', + data: { + datasets: [{ + data: aDataGanulometrie, + backgroundColor: ['rgb(174,214,241)','rgb(93,173,226)','rgb(52, 152, 219 )','rgb(46, 134, 193)','rgb(40, 116, 166 )','rgb(33, 97, 140)'], + label: 'Dataset 2' + }], + labels: ['T1','T2','T3','T4','T5','T6 et +'] + }, + options: { + responsive: true, + legend: {position: 'bottom'}, + title: { + display: true, + text: 'Nombre de logements par granulométrie', + fontSize: 16, + fontStyle: 'normal' + }, + tooltips: { + callbacks: { + label: function(tooltipItem, data) { + var dataset = data.datasets[tooltipItem.datasetIndex]; + var total = dataset.data.reduce(function(previousValue, currentValue, currentIndex, array) { + return previousValue + currentValue; + }); + var currentValue = dataset.data[tooltipItem.index]; + var _label = data.labels[tooltipItem.index]; + var precentage = Math.floor(((currentValue/total) * 100)+0.5); + return _label + ' ' + precentage + "%"; + } + } + } + } +}; + +var config4={ + type: 'bar', + data: { + labels: ['T1', 'T2', 'T3', 'T4', 'T5', 'T6 et +'], + datasets: [ + {label: 'Accession', backgroundColor: 'rgb(33, 97, 140 )', stack: 'Stack 0', data: aDataGanulometrieAccession}, + {label: 'Location (sociale ou intermédiaire)', backgroundColor: 'rgb(52, 152, 219)', stack: 'Stack 0', data: aDataGanulometrieLoc}, + {label: 'Habitat spécifique', backgroundColor: 'rgb(174, 214, 241)', stack: 'Stack 1', data: aDataGanulometrieHabSpe} + ] + }, + options: { + title: { + display: true, + text: 'Répartition des logements selon le type et la granulométrie', + fontSize: 16, + fontStyle: 'normal' + }, + tooltips: {mode: 'index',intersect: false}, + responsive: true, + scales: {xAxes: [{stacked: true,}], yAxes: [{stacked: true}]} + } +}; +window.onload = function() { + var ctx = document.getElementById('chart_sdp').getContext('2d'); + window.myPie = new Chart(ctx, config); + var ctx2 = document.getElementById('barchart_avancement').getContext('2d'); + //var ctx2 = $('#barchart_avancement'); + // ctx2.height(100); + window.myBar = new Chart(ctx2, config2); + var ctx3 = document.getElementById('chart_granulometrie').getContext('2d'); + window.myPie3 = new Chart(ctx3, config3); + var ctx4 = document.getElementById('barchart_granulometrie').getContext('2d'); + window.myBar2 = new Chart(ctx4, config4); +}; \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/js/form.js b/src/vitis/vas/doc/suivi_prod_immo/js/form.js new file mode 100644 index 0000000000000000000000000000000000000000..9ca4a21d82a5dbcb2a0fa1ee1e9bd30acd95fc0a --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/js/form.js @@ -0,0 +1,79 @@ + +$(document).ready(function(){ + + // bouton "Afficher la fiche" + $("#get_operation").on('click', function(event) { + var sIdOperation = $("#l_operation").val(); + if(sIdOperation==''){ + alert('Veuillez sélectioner une opération dans la liste.'); + }else{ + window.open('https://geo.urbalyon.org/doc/suivi_prod_immo/get_1_operation.php?token='+sToken+'&id_operation='+sIdOperation); + } + }); + $("#get_type").on('click', function(event) { + var iIdCommune = $("#l_commune").val(); + if(iIdCommune!='') iIdCommune='&id_commune='+iIdCommune; + var iIdCTM = ''; + if (iIdCommune==''){ + var iIdCTM = $("#l_ctm").val(); + if(iIdCTM!='') iIdCTM='&id_ctm='+iIdCTM; + if(iIdCTM==''){ + alert('Veuillez sélectioner une Conférence territoriale des Maires dans la liste.'); + } + } + if(iIdCTM!='' || iIdCommune!=''){ + // iIdCTM='&id_ctm='+iIdCTM; + // get code_procedure_amenagement + var iCodeProcedureAmenagement = $("#l_procedure_amenagement").val(); + if(iCodeProcedureAmenagement!='') iIdCTM=iIdCTM+'&code_procedure_amenagement='+iCodeProcedureAmenagement; + // get code_financement + var iCodeFinancement = $("#l_financement").val(); + if(iCodeFinancement!='') iIdCTM=iIdCTM+'&code_financement_equ_public='+iCodeFinancement; + // get code_suivi + var iCodeSuivi = $("#l_suivi").val(); + if(iCodeSuivi!='') iIdCTM=iIdCTM+'&code_suivi='+iCodeSuivi; + window.open('https://geo.urbalyon.org/doc/suivi_prod_immo/get_2_type.php?token='+sToken+iIdCommune+iIdCTM); + // alert('En cours de développement.'); + } + }); + $("#get_porteur").on('click', function(event) { + var sConcessionnaireAmenagement = $("#l_amenageur").val(); + if(sConcessionnaireAmenagement==''){ + alert('Veuillez sélectioner un aménageur dans la liste.'); + }else{ + window.open('https://geo.urbalyon.org/doc/suivi_prod_immo/get_3_porteur.php?token='+sToken+'&concessionnaire_amenagement='+sConcessionnaireAmenagement); + } + }); + $("#get_logement").on('click', function(event) { + var sCodeFinancement = $("#l_financement").val(); + if (sCodeFinancement!='') sCodeFinancement='&code_financement='+sCodeFinancement; + var iIdCommune = $("#l_commune").val(); + if(iIdCommune!='') iIdCommune='&id_commune='+iIdCommune; + var iIdCTM = ''; + if (iIdCommune==''){ + var iIdCTM = $("#l_ctm").val(); + if(iIdCTM!='') iIdCTM='&id_ctm='+iIdCTM; + } + window.open('https://geo.urbalyon.org/doc/suivi_prod_immo/get_4_logement.php?token='+sToken+sCodeFinancement+iIdCommune+iIdCTM); + }); + + // bouton "Export" + $("#get_operation_excel").on('click', function(event) { + var sIdOperation = $("#l_operation").val(); + if (sIdOperation==''){ + alert('Veuillez sélectioner une opération dans la liste.'); + }else{ + // window.open('https://geo.urbalyon.org/doc/suivi_prod_immo/get_1_operation.php?token='+sToken+'&id_operation='+sIdOperation); + alert('En cours de développement.'); + } + }); + $("#get_porteur_excel").on('click', function(event) { + var sConcessionnaireAmenagement = $("#l_amenageur").val(); + if(sConcessionnaireAmenagement==''){ + alert('Veuillez sélectioner un aménageur dans la liste.'); + }else{ + window.open('https://geo.urbalyon.org/doc/suivi_prod_immo/get_3_porteur_excel.php?token='+sToken+'&concessionnaire_amenagement='+sConcessionnaireAmenagement); + } + }); + +}); \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/lib/Encryption.php b/src/vitis/vas/doc/suivi_prod_immo/lib/Encryption.php new file mode 100644 index 0000000000000000000000000000000000000000..a9d4dac38dcf31ba90a4eaa7f010bd45692c7b1c --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/lib/Encryption.php @@ -0,0 +1,110 @@ +<?php + + +/** + * Encryption class for encrypt/decrypt that works between programming languages. + * + * @author Vee Winch. + * @link https://stackoverflow.com/questions/41222162/encrypt-in-php-openssl-and-decrypt-in-javascript-cryptojs Reference. + */ +class Encryption +{ + + + /** + * @link http://php.net/manual/en/function.openssl-get-cipher-methods.php Available methods. + * @var string Cipher method. Recommended AES-128-CBC, AES-192-CBC, AES-256-CBC + */ + protected $encryptMethod = 'AES-256-CBC'; + + + /** + * Decrypt string. + * + * @link https://stackoverflow.com/questions/41222162/encrypt-in-php-openssl-and-decrypt-in-javascript-cryptojs Reference. + * @param string $encryptedString The encrypted string that is base64 encode. + * @param string $key The key. + * @return mixed Return original string value. Return null for failure get salt, iv. + */ + public function decrypt($encryptedString, $key) + { + $json = json_decode(base64_decode($encryptedString), true); + + try { + $salt = hex2bin($json["salt"]); + $iv = hex2bin($json["iv"]); + } catch (Exception $e) { + return null; + } + + $cipherText = base64_decode($json['ciphertext']); + + $iterations = intval(abs($json['iterations'])); + if ($iterations <= 0) { + $iterations = 999; + } + $hashKey = hash_pbkdf2('sha512', $key, $salt, $iterations, ($this->encryptMethodLength() / 4)); + unset($iterations, $json, $salt); + + $decrypted= openssl_decrypt($cipherText , $this->encryptMethod, hex2bin($hashKey), OPENSSL_RAW_DATA, $iv); + unset($cipherText, $hashKey, $iv); + + return $decrypted; + }// decrypt + + + /** + * Encrypt string. + * + * @link https://stackoverflow.com/questions/41222162/encrypt-in-php-openssl-and-decrypt-in-javascript-cryptojs Reference. + * @param string $string The original string to be encrypt. + * @param string $key The key. + * @return string Return encrypted string. + */ + public function encrypt($string, $key) + { + $ivLength = openssl_cipher_iv_length($this->encryptMethod); + $iv = openssl_random_pseudo_bytes($ivLength); + + $salt = openssl_random_pseudo_bytes(256); + $iterations = 999; + $hashKey = hash_pbkdf2('sha512', $key, $salt, $iterations, ($this->encryptMethodLength() / 4)); + + $encryptedString = openssl_encrypt($string, $this->encryptMethod, hex2bin($hashKey), OPENSSL_RAW_DATA, $iv); + + $encryptedString = base64_encode($encryptedString); + unset($hashKey); + + $output = ['ciphertext' => $encryptedString, 'iv' => bin2hex($iv), 'salt' => bin2hex($salt), 'iterations' => $iterations]; + unset($encryptedString, $iterations, $iv, $ivLength, $salt); + + return base64_encode(json_encode($output)); + }// encrypt + + + /** + * Get encrypt method length number (128, 192, 256). + * + * @return integer. + */ + protected function encryptMethodLength() + { + $number = filter_var($this->encryptMethod, FILTER_SANITIZE_NUMBER_INT); + + return intval(abs($number)); + }// encryptMethodLength + + + /** + * Set encryption method. + * + * @link http://php.net/manual/en/function.openssl-get-cipher-methods.php Available methods. + * @param string $cipherMethod + */ + public function setCipherMethod($cipherMethod) + { + $this->encryptMethod = $cipherMethod; + }// setCipherMethod + + +} \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/login.php b/src/vitis/vas/doc/suivi_prod_immo/login.php new file mode 100644 index 0000000000000000000000000000000000000000..7dd5e25c5e4fad0c10381ccde23edbc7edc5a2ef --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/login.php @@ -0,0 +1,40 @@ +<?php +// https://geo.urbalyon.org/doc/suivi_prod_immo/login.php?login=fabien +session_start(); + +if (isset($_REQUEST['login']) && !is_null($_REQUEST['login'])){ + $_SESSION['login_bd_prod_immo']=$_REQUEST['login']; + if (isset($_REQUEST['password']) && !is_null($_REQUEST['password'])){ + // Try to log + require_once("../../rest/conf/properties.inc"); + require_once("properties_suivi_prod_immo.inc"); + require 'lib/Encryption.php'; + $Encryption = new Encryption(); + $sPassword=$Encryption->decrypt($_REQUEST['password'], $_REQUEST['encrypt_key']); + $aReturn['password']=$sPassword; + try{ + $oConn = new PDO('pgsql:host='.$properties['server'].';port='.$properties['port'].';dbname='.$properties['db_prod_immo'], $_REQUEST['login'], $sPassword); + if($oConn){ + // store session + $sToken = md5(uniqid()); + $_SESSION['token_bd_prod_immo']=$sToken; + // connect + $aReturn['location']=$properties['access_page']; + $aReturn['token']=$sToken; + }else{ + $aReturn['error']="Erreur de connexion vérifier vos identifiants."; + } + }catch (PDOException $e){ + $aReturn['error']="Erreur : ".$e->getMessage(); + } + }else{ + $aReturn['error']="Erreur pas de mot de passe."; + } +}else{ + $aReturn['error']="Erreur pas de login."; +} + +header('Content-type: application/json'); +echo json_encode($aReturn); + +?> \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/properties_suivi_prod_immo.inc b/src/vitis/vas/doc/suivi_prod_immo/properties_suivi_prod_immo.inc new file mode 100644 index 0000000000000000000000000000000000000000..8e27ade3d1a57acdc293ee2f2931ea96a27c793c --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/properties_suivi_prod_immo.inc @@ -0,0 +1,14 @@ +<?php + +// BD +$properties['db_prod_immo']='suivi_prod_immo'; +$properties['db_user_prod_immo']='prod_immo'; +$properties['db_pass_prod_immo']='urbalyon6!'; +$properties['schema_prod_immo']='prod_immo'; +// page d'acceuil +$properties['access_page']='form_1_operation.php'; + +$properties['server'] = '192.168.2.114'; +$properties['port'] = 5432; + +?> \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/signin.html b/src/vitis/vas/doc/suivi_prod_immo/signin.html new file mode 100644 index 0000000000000000000000000000000000000000..f7b044c9f06442450629f6137c22b7fbd0ef70cf --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/signin.html @@ -0,0 +1,79 @@ +<!doctype html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <title>BD PROD IMMO - Analyse</title> + <link rel="stylesheet" href="css/bootstrap_4.3.1/bootstrap.min.css"> + <link rel="stylesheet" href="css/signin.css"> +</head> +<body> + <div class="container"> + <div class="row"> + <div class="col-sm-6 offset-sm-3 text-center"> + <form class="form-signin"> + <img class="mb-4" src="images/urbalyon.png" alt="Urbalyon" width="150" height="150"> + <div class="alert alert-danger" role="alert" id="alert_box"><span data-feather="alert-triangle"></span></div> + <h1 class="h3 mb-3 font-weight-normal">Veuillez vous identifier</h1> + <label for="login" class="sr-only">Utilisateur</label> + <input type="text" id="login" class="form-control" placeholder="Utilisateur" <?php echo ($sLogin!='') ? 'value="'.$sLogin.'"' : 'autofocus'; ?> required> + <label for="password" class="sr-only">Mot de passe</label> + <input type="password" id="password" class="form-control" placeholder="Mot de passe" required <?php if($sLogin!='') echo 'autofocus'; ?>> + <!--<div class="checkbox mb-3"> + <label> + <input type="checkbox" value="remember-me"> Se souvenir de moi + </label> + </div>--> + <button class="btn btn-lg btn-primary btn-block" type="submit" id="submit">Connexion</button> + <p class="mt-5 mb-3 text-muted">Urbalyon © 2019</p> + </form> + </div> + </div> + </div> + <!-- Icons --> + <script src="https://unpkg.com/feather-icons/dist/feather.min.js"></script> + <script> + feather.replace(); + </script> + <script src="https://code.jquery.com/jquery-3.3.1.min.js" crossorigin="anonymous"></script> + <script src="js/crypto-js-3.1.9-1/crypto-js.js"></script><!-- https://github.com/brix/crypto-js/releases crypto-js.js can be download from here --> + <script src="js/Encryption.js"></script> +</body> +</html> + +<script> +var sEncryptKey = '<?php echo $randomString; ?>'; + + $(document).ready(function(){ + let encryption = new Encryption(); + + $("#alert_box").hide(); + $("#submit").click(function(e){ + $("#alert_box").hide(); + e.preventDefault(); + $.post( + 'login.php', + { + login : $("#login").val(), + password : encryption.encrypt($("#password").val(), sEncryptKey), + encrypt_key : sEncryptKey + }, + + function(data){ + data2=JSON.parse(data); + if (typeof data2.error == "undefined") { + // connected + window.location.href = data2.location+"?token="+data2.token; + }else{ + // error + $("#alert_box").html('<span data-feather="alert-triangle"></span> '+data2.error); + feather.replace(); + $("#alert_box").show(); + } + }, + 'text' + ); + }); +}); + +</script> diff --git a/src/vitis/vas/doc/suivi_prod_immo/signin.php b/src/vitis/vas/doc/suivi_prod_immo/signin.php new file mode 100644 index 0000000000000000000000000000000000000000..ecbd0debf88cf0d2a2fa0a08ce5529bac5c98ad2 --- /dev/null +++ b/src/vitis/vas/doc/suivi_prod_immo/signin.php @@ -0,0 +1,47 @@ +<?php +// https://geo.urbalyon.org/doc/suivi_prod_immo/signin.php?login=fabien +session_start(); + +//Genrate Random Key +$characters = '0123456789abcdefghijklmnopqrstuvwxyz'; +$charactersLength = strlen($characters); +$randomString = ''; +for ($i = 0; $i < 32; $i++){ + $randomString .= $characters[rand(0, $charactersLength - 1)]; +} + +$sLogin=''; +if (isset($_REQUEST['login']) && !is_null($_REQUEST['login'])){ + $sLogin=$_REQUEST['login']; + $_SESSION['login_bd_prod_immo']=$_REQUEST['login']; +}else{ + if (isset($_SESSION['login_bd_prod_immo']) && !is_null($_SESSION['login_bd_prod_immo'])) $sLogin=$_SESSION['login_bd_prod_immo']; +} + + /*if (isset($_REQUEST['password']) && !is_null($_REQUEST['password'])){ + // Try to log + require_once("../../rest/conf/properties.inc"); + require_once("properties_suivi_prod_immo.inc"); + try{ + $oConn = new PDO('pgsql:host='.$properties['server'].';port='.$properties['port'].';dbname='.$properties['db_prod_immo'], $sLogin, $_REQUEST['password']); + if($oConn){ + // store session + $sToken = md5(uniqid()); + $_SESSION['token_bd_prod_immo']=$sToken; + // connect + header ('location: '.$properties['access_page'].'?token='.$sToken); + exit(); + }else{ + $sError="Erreur de connexion vérifier vos identifiants."; + include ('signin.html'); + } + }catch (PDOException $e){ + $sError="ERROR : ".$e->getMessage(); + include ('signin.html'); + } + }else{ + include ('signin.html'); + } */ +include ('signin.html'); + +?> \ No newline at end of file diff --git a/src/vitis/vas/doc/suivi_prod_immo/template/template_3_porteur.xlsx b/src/vitis/vas/doc/suivi_prod_immo/template/template_3_porteur.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..e390a2ba63a8fe259627e6bdb85135219cc6b1ea Binary files /dev/null and b/src/vitis/vas/doc/suivi_prod_immo/template/template_3_porteur.xlsx differ